diff --git a/generated/DevCenter/DevCenter.AutoRest/Az.DevCenter.format.ps1xml b/generated/DevCenter/DevCenter.AutoRest/Az.DevCenter.format.ps1xml index 94196cd7ed8d..0776593c9bc2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/Az.DevCenter.format.ps1xml +++ b/generated/DevCenter/DevCenter.AutoRest/Az.DevCenter.format.ps1xml @@ -11,6 +11,9 @@ + + + @@ -33,13 +36,13 @@ - + - + - + @@ -47,15 +50,15 @@ - - - + + + @@ -78,6 +81,9 @@ AttachedNetworkConnectionName + + BuildName + CatalogName @@ -100,13 +106,13 @@ GalleryName - ImageName + ImageDefinitionName - Location + ImageName - MemberName + Location NetworkConnectionName @@ -114,15 +120,15 @@ OperationId - - PlanName - PoolName ProjectName + + ProjectPolicyName + ResourceGroupName @@ -144,21 +150,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryption + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryption + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders - + + + + - KeyEncryptionKeyUrl + AzureAsyncOperation + + + Location @@ -166,33 +178,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentity + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentity + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders - - - - + - + - DelegatedIdentityClientId - - - IdentityType + AzureAsyncOperation - UserAssignedIdentityResourceId + Location @@ -200,9 +206,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorDetail - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorDetail @@ -234,37 +240,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity - - - - - - - - - - - - - - - PrincipalId - - - TenantId - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ProxyResource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ProxyResource - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ProxyResource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ProxyResource @@ -320,9 +298,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource @@ -342,9 +320,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Sku + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Sku - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Sku + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Sku @@ -388,9 +366,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemData @@ -440,9 +418,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResource - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResource @@ -504,9 +482,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTags + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTags - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTags + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTags @@ -525,6 +503,90 @@ + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryption + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryption + + + + + + + + + + + + KeyEncryptionKeyUrl + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentity + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentity + + + + + + + + + + + + + + + + + + DelegatedIdentityClientId + + + IdentityType + + + UserAssignedIdentityResourceId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity + + + + + + + + + + + + + + + PrincipalId + + + TenantId + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentity @@ -792,9 +854,55 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentType + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ActiveHoursConfiguration + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ActiveHoursConfiguration + + + + + + + + + + + + + + + + + + + + + + + + AutoStartEnableStatus + + + DefaultEndTimeHour + + + DefaultStartTimeHour + + + DefaultTimeZone + + + KeepAwakeEnableStatus + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentType - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentType + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentType @@ -850,9 +958,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentTypeListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentTypeListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentTypeListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentTypeListResult @@ -872,9 +980,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentTypeProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentTypeProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentTypeProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentTypeProperties @@ -900,9 +1008,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnection + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnection - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnection + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnection @@ -958,9 +1066,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnectionProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnectionProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnectionProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnectionProperties @@ -1004,9 +1112,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkListResult @@ -1026,9 +1134,31 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Capability + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AzureAiServicesSettings + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AzureAiServicesSettings + + + + + + + + + + + + AzureAiServicesMode + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Capability - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Capability + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Capability @@ -1054,9 +1184,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Catalog + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Catalog - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Catalog + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Catalog @@ -1112,9 +1242,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogConflictError + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogConflictError - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogConflictError + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogConflictError @@ -1140,9 +1270,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogErrorDetails + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogErrorDetails - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogErrorDetails + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogErrorDetails @@ -1168,9 +1298,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogListResult @@ -1190,9 +1320,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogProperties @@ -1290,9 +1420,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogSyncError + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogSyncError - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogSyncError + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogSyncError @@ -1312,9 +1442,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdateProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdateProperties @@ -1334,9 +1464,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdatePropertiesTags + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdatePropertiesTags - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdatePropertiesTags + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdatePropertiesTags @@ -1356,9 +1486,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CheckScopedNameAvailabilityRequest + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CheckScopedNameAvailabilityRequest - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CheckScopedNameAvailabilityRequest + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CheckScopedNameAvailabilityRequest @@ -1384,9 +1514,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTask + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTask - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTask + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTask @@ -1442,9 +1572,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskInput + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskInput - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskInput + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskInput @@ -1470,9 +1600,49 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskInstance + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskInstance + + + + + + + + + + + + + + + + + + + + + Condition + + + DisplayName + + + Name + + + TimeoutInSecond + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskListResult @@ -1492,9 +1662,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskProperties @@ -1520,29 +1690,91 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinition + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DefinitionParametersItem - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinition + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DefinitionParametersItem - - - - - - - - - - - - - + + + + + + + + Name + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxAutoDeleteSettings + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxAutoDeleteSettings + + + + + + + + + + + + + + + + + + DeleteMode + + + GracePeriod + + + InactiveThreshold + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinition + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinition + + + + + + + + + + + + + + + + + + + + @@ -1584,9 +1816,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionListResult @@ -1606,9 +1838,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionProperties @@ -1694,9 +1926,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionUpdate - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionUpdate @@ -1716,9 +1948,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionUpdateProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionUpdateProperties @@ -1744,9 +1976,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxProvisioningSettings + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxProvisioningSettings - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxProvisioningSettings + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxProvisioningSettings @@ -1766,9 +1998,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenter + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenter - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenter + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenter @@ -1830,9 +2062,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSet + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSet - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSet + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSet @@ -1894,9 +2126,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetProperties @@ -1928,9 +2160,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetUpdateProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetUpdateProperties @@ -1956,9 +2188,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterListResult @@ -1978,9 +2210,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterNetworkSettings + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterNetworkSettings - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterNetworkSettings + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterNetworkSettings @@ -2000,131 +2232,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlan - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlan - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Location - - - Name - - - SystemDataCreatedAt - - - SystemDataCreatedBy - - - SystemDataCreatedByType - - - SystemDataLastModifiedAt - - - SystemDataLastModifiedBy - - - SystemDataLastModifiedByType - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlanMember - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlanMember - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Name - - - SystemDataCreatedAt - - - SystemDataCreatedBy - - - SystemDataCreatedByType - - - SystemDataLastModifiedAt - - - SystemDataLastModifiedBy - - - SystemDataLastModifiedByType - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettings + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettings - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettings + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettings @@ -2144,9 +2254,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProperties @@ -2171,9 +2281,6 @@ - - - @@ -2208,9 +2315,6 @@ NetworkSettingMicrosoftHostedNetworkEnableStatus - - PlanId - ProjectCatalogSettingCatalogItemSyncEnableStatus @@ -2226,9 +2330,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterSku + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterSku - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterSku + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterSku @@ -2284,9 +2388,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterUpdate - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterUpdate @@ -2306,18 +2410,15 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterUpdateProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterUpdateProperties - - - @@ -2325,18 +2426,15 @@ DisplayName - - PlanId - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EncryptionSetListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EncryptionSetListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EncryptionSetListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EncryptionSetListResult @@ -2356,9 +2454,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EncryptionSetUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EncryptionSetUpdate - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EncryptionSetUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EncryptionSetUpdate @@ -2378,9 +2476,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EndpointDependency + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EndpointDependency - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EndpointDependency + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EndpointDependency @@ -2406,9 +2504,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EndpointDetail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EndpointDetail - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EndpointDetail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EndpointDetail @@ -2428,9 +2526,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinition + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinition - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinition + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinition @@ -2486,9 +2584,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionListResult @@ -2508,9 +2606,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionParameter + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionParameter - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionParameter + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionParameter @@ -2548,9 +2646,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionProperties @@ -2582,9 +2680,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentRole + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentRole - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentRole + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentRole @@ -2610,9 +2708,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentType + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentType - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentType + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentType @@ -2668,9 +2766,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeListResult @@ -2690,9 +2788,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeProperties @@ -2718,9 +2816,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeUpdateProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeUpdateProperties @@ -2740,9 +2838,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Gallery + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Gallery - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Gallery + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Gallery @@ -2798,9 +2896,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GalleryListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GalleryListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GalleryListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GalleryListResult @@ -2820,9 +2918,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GalleryProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GalleryProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GalleryProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GalleryProperties @@ -2848,9 +2946,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalog + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalog - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalog + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalog @@ -2888,9 +2986,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheck + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheck - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheck + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheck @@ -2946,9 +3044,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetails + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetails - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetails + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetails @@ -3004,9 +3102,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetailsListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetailsListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetailsListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetailsListResult @@ -3026,9 +3124,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetailsProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetailsProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetailsProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetailsProperties @@ -3054,9 +3152,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthStatusDetail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthStatusDetail - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthStatusDetail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthStatusDetail @@ -3082,9 +3180,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Image + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Image - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Image + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Image @@ -3140,21 +3238,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageCreationErrorDetails - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageCreationErrorDetails - + + + + - NextLink + Code + + + Message @@ -3162,51 +3266,57 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinition - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinition - + - + - + - + - + - + + + + - Description + Name - HibernateSupport + SystemDataCreatedAt - Offer + SystemDataCreatedBy - ProvisioningState + SystemDataCreatedByType - Publisher + SystemDataLastModifiedAt - Sku + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType @@ -3214,31 +3324,499 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuild - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuild - + + + + + + + + + + + + + + + + + + + - ExactVersion + Name - - - - + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildDetails + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildDetails + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + EndTime + + + StartTime + + + Status + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildListResult + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildProperties + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildProperties + + + + + + + + + + + + + + + + + + EndTime + + + StartTime + + + Status + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTask + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTask + + + + + + + + + + + + + + + + + + + + + + + + + + + DisplayName + + + EndTime + + + LogUri + + + Name + + + StartTime + + + Status + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTaskGroup + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTaskGroup + + + + + + + + + + + + + + + + + + + + + EndTime + + + Name + + + StartTime + + + Status + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTaskParametersItem + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTaskParametersItem + + + + + + + + + + + + + + + Key + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionListResult + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionProperties + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionProperties + + + + + + + + + + + + + + + + + + + + + AutoImageBuild + + + FileUrl + + + ImageValidationStatus + + + ValidationStatus + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionReference + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionReference + + + + + + + + + + + + ImageDefinition + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageListResult + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageProperties + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + Description + + + HibernateSupport + + + Offer + + + ProvisioningState + + + Publisher + + + Sku + + + + + - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageValidationErrorDetails + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageValidationErrorDetails + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference + + + + + + + + + + + + ExactVersion + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetails + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetails @@ -3264,9 +3842,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersion + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersion - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersion + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersion @@ -3322,9 +3900,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersionListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersionListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersionListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersionListResult @@ -3344,9 +3922,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersionProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersionProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersionProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersionProperties @@ -3370,19 +3948,59 @@ - ExcludeFromLatest + ExcludeFromLatest + + + Name + + + OSDiskImageSizeInGb + + + ProvisioningState + + + PublishedDate + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.LatestImageBuild + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.LatestImageBuild + + + + + + + + + + + + + + + + + + + + + EndTime Name - OSDiskImageSizeInGb - - - ProvisioningState + StartTime - PublishedDate + Status @@ -3390,9 +4008,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ListUsagesResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ListUsagesResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ListUsagesResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ListUsagesResult @@ -3412,9 +4030,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnection + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnection - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnection + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnection @@ -3476,9 +4094,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionListResult @@ -3498,9 +4116,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionUpdate - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionUpdate @@ -3520,9 +4138,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionUpdateProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionUpdateProperties @@ -3566,9 +4184,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkProperties @@ -3636,9 +4254,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.OperationStatus + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.OperationStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.OperationStatus + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.OperationStatus @@ -3706,9 +4324,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.OutboundEnvironmentEndpoint + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.OutboundEnvironmentEndpoint - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.OutboundEnvironmentEndpoint + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.OutboundEnvironmentEndpoint @@ -3728,87 +4346,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.OutboundEnvironmentEndpointCollection - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.OutboundEnvironmentEndpointCollection - - - - - - - - - - - - NextLink - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanListResult - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanListResult - - - - - - - - - - - - NextLink - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanMemberProperties - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanMemberProperties - - - - - - - - - - - - - - - - - - MemberId - - - MemberType - - - ProvisioningState - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanMembersListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.OutboundEnvironmentEndpointCollection - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanMembersListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.OutboundEnvironmentEndpointCollection @@ -3828,53 +4368,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanProperties - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanProperties - - - - - - - - - - - - ProvisioningState - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanUpdate - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanUpdate - - - - - - - - - - - - Location - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Pool + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Pool - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Pool + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Pool @@ -3936,9 +4432,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolListResult @@ -3958,18 +4454,51 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3985,12 +4514,33 @@ + + + + + + + + + + + + + + + + + + + + + @@ -4007,12 +4557,45 @@ + + ActiveHourConfigurationAutoStartEnableStatus + + + ActiveHourConfigurationDefaultEndTimeHour + + + ActiveHourConfigurationDefaultStartTimeHour + + + ActiveHourConfigurationDefaultTimeZone + + + ActiveHourConfigurationKeepAwakeEnableStatus + + + ActiveImageReferenceExactVersion + + + ActiveImageReferenceId + DevBoxDefinitionName + + DevBoxDefinitionType + + + DevBoxTunnelEnableStatus + DisplayName + + ImageReferenceExactVersion + + + ImageReferenceId + LicenseType @@ -4028,12 +4611,33 @@ SingleSignOnStatus + + SkuCapacity + + + SkuFamily + + + SkuName + + + SkuSize + + + SkuTier + StopOnDisconnectGracePeriodMinute StopOnDisconnectStatus + + StopOnNoConnectGracePeriodMinute + + + StopOnNoConnectStatus + VirtualNetworkType @@ -4052,9 +4656,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolUpdate - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolUpdate @@ -4074,15 +4678,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolUpdateProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolUpdateProperties + + + + + + @@ -4111,6 +4721,12 @@ DevBoxDefinitionName + + DevBoxDefinitionType + + + DevBoxTunnelEnableStatus + DisplayName @@ -4138,9 +4754,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Project + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Project - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Project + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Project @@ -4202,21 +4818,71 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectCatalogSettings + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCatalogSettings + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCatalogSettings + + + + + + + + + + + + CatalogItemSyncType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationManagedIdentity + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationManagedIdentity + + + + + + + + + + + + + + + IdentityResourceId + + + IdentityType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationSettings - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectCatalogSettings + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationSettings - + - CatalogItemSyncType + UserCustomizationsEnableStatus @@ -4224,9 +4890,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentType + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentType - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentType + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentType @@ -4288,9 +4954,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeListResult @@ -4310,9 +4976,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeProperties @@ -4356,9 +5022,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdateProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdateProperties @@ -4390,9 +5056,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectListResult @@ -4412,9 +5078,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectNetworkSettings + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectNetworkSettings - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectNetworkSettings + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectNetworkSettings @@ -4434,18 +5100,163 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicy + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicy + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyListResult + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyProperties + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyProperties + + + + + + + + + + + + + + + Scope + + + ProvisioningState + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyUpdateProperties + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyUpdateProperties + + + + + + + + + + + + Scope + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectProperties + + + + + + + + + + + + + + + @@ -4455,6 +5266,15 @@ + + + + + + + + + @@ -4465,12 +5285,27 @@ + + AzureAiServiceSettingAzureAiServicesMode + CatalogSettingCatalogItemSyncType + + CustomizationSettingUserCustomizationsEnableStatus + Description + + DevBoxAutoDeleteSettingDeleteMode + + + DevBoxAutoDeleteSettingGracePeriod + + + DevBoxAutoDeleteSettingInactiveThreshold + DevCenterId @@ -4480,6 +5315,15 @@ MaxDevBoxesPerUser + + ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject + + + ServerlessGpuSessionSettingServerlessGpuSessionsMode + + + WorkspaceStorageSettingWorkspaceStorageMode + DevCenterUri @@ -4492,9 +5336,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectUpdate - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectUpdate @@ -4514,9 +5358,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectUpdateProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectUpdateProperties @@ -4554,9 +5398,49 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRange + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourcePolicy + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourcePolicy + + + + + + + + + + + + + + + + + + + + + Action + + + Filter + + + Resource + + + ResourceType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRange - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRange + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRange @@ -4582,9 +5466,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Schedule + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Schedule - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Schedule + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Schedule @@ -4640,9 +5524,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleListResult @@ -4662,9 +5546,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleProperties @@ -4714,9 +5598,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleUpdateProperties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleUpdateProperties @@ -4760,9 +5644,37 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SkuListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ServerlessGpuSessionsSettings + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ServerlessGpuSessionsSettings + + + + + + + + + + + + + + + MaxConcurrentSessionsPerProject + + + ServerlessGpuSessionsMode + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SkuListResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SkuListResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SkuListResult @@ -4782,9 +5694,37 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.StopOnDisconnectConfiguration + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnDisconnectConfiguration + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnDisconnectConfiguration + + + + + + + + + + + + + + + GracePeriodMinute + + + Status + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnNoConnectConfiguration - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.StopOnDisconnectConfiguration + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnNoConnectConfiguration @@ -4810,9 +5750,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SyncStats + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SyncStats - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SyncStats + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SyncStats @@ -4868,9 +5808,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Tags - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Tags @@ -4890,9 +5830,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate @@ -4912,9 +5852,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Usage + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Usage - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Usage + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Usage @@ -4946,9 +5886,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.UsageName + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.UsageName - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.UsageName + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.UsageName @@ -4973,5 +5913,27 @@ + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.WorkspaceStorageSettings + + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.WorkspaceStorageSettings + + + + + + + + + + + + WorkspaceStorageMode + + + + + + \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/Az.DevCenter.psd1 b/generated/DevCenter/DevCenter.AutoRest/Az.DevCenter.psd1 index 158841c0e6b6..cb485dd9bb4c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/Az.DevCenter.psd1 +++ b/generated/DevCenter/DevCenter.AutoRest/Az.DevCenter.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.DevCenter.private.dll' FormatsToProcess = './Az.DevCenter.format.ps1xml' - FunctionsToExport = 'Connect-AzDevCenterAdminCatalog', 'Connect-AzDevCenterAdminProjectCatalog', 'Get-AzDevCenterAdminAttachedNetwork', 'Get-AzDevCenterAdminCatalog', 'Get-AzDevCenterAdminCatalogSyncErrorDetail', 'Get-AzDevCenterAdminCustomizationTask', 'Get-AzDevCenterAdminCustomizationTaskErrorDetail', 'Get-AzDevCenterAdminDevBoxDefinition', 'Get-AzDevCenterAdminDevCenter', 'Get-AzDevCenterAdminEnvironmentDefinition', 'Get-AzDevCenterAdminEnvironmentDefinitionErrorDetail', 'Get-AzDevCenterAdminEnvironmentType', 'Get-AzDevCenterAdminGallery', 'Get-AzDevCenterAdminImage', 'Get-AzDevCenterAdminImageVersion', 'Get-AzDevCenterAdminNetworkConnection', 'Get-AzDevCenterAdminNetworkConnectionHealthDetail', 'Get-AzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint', 'Get-AzDevCenterAdminOperationStatus', 'Get-AzDevCenterAdminPlan', 'Get-AzDevCenterAdminPlanMember', 'Get-AzDevCenterAdminPool', 'Get-AzDevCenterAdminProject', 'Get-AzDevCenterAdminProjectAllowedEnvironmentType', 'Get-AzDevCenterAdminProjectCatalog', 'Get-AzDevCenterAdminProjectCatalogSyncErrorDetail', 'Get-AzDevCenterAdminProjectEnvironmentDefinition', 'Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail', 'Get-AzDevCenterAdminProjectEnvironmentType', 'Get-AzDevCenterAdminProjectInheritedSetting', 'Get-AzDevCenterAdminSchedule', 'Get-AzDevCenterAdminSku', 'Get-AzDevCenterAdminUsage', 'Invoke-AzDevCenterAdminExecuteCheckNameAvailability', 'Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability', 'New-AzDevCenterAdminAttachedNetwork', 'New-AzDevCenterAdminCatalog', 'New-AzDevCenterAdminDevBoxDefinition', 'New-AzDevCenterAdminDevCenter', 'New-AzDevCenterAdminEnvironmentType', 'New-AzDevCenterAdminGallery', 'New-AzDevCenterAdminNetworkConnection', 'New-AzDevCenterAdminPlan', 'New-AzDevCenterAdminPlanMember', 'New-AzDevCenterAdminPool', 'New-AzDevCenterAdminProject', 'New-AzDevCenterAdminProjectCatalog', 'New-AzDevCenterAdminProjectEnvironmentType', 'New-AzDevCenterAdminSchedule', 'Remove-AzDevCenterAdminAttachedNetwork', 'Remove-AzDevCenterAdminCatalog', 'Remove-AzDevCenterAdminDevBoxDefinition', 'Remove-AzDevCenterAdminDevCenter', 'Remove-AzDevCenterAdminEnvironmentType', 'Remove-AzDevCenterAdminGallery', 'Remove-AzDevCenterAdminNetworkConnection', 'Remove-AzDevCenterAdminPlan', 'Remove-AzDevCenterAdminPlanMember', 'Remove-AzDevCenterAdminPool', 'Remove-AzDevCenterAdminProject', 'Remove-AzDevCenterAdminProjectCatalog', 'Remove-AzDevCenterAdminProjectEnvironmentType', 'Remove-AzDevCenterAdminSchedule', 'Start-AzDevCenterAdminNetworkConnectionHealthCheck', 'Start-AzDevCenterAdminPoolHealthCheck', 'Sync-AzDevCenterAdminCatalog', 'Sync-AzDevCenterAdminProjectCatalog', 'Update-AzDevCenterAdminCatalog', 'Update-AzDevCenterAdminDevBoxDefinition', 'Update-AzDevCenterAdminDevCenter', 'Update-AzDevCenterAdminEnvironmentType', 'Update-AzDevCenterAdminNetworkConnection', 'Update-AzDevCenterAdminPlan', 'Update-AzDevCenterAdminPlanMember', 'Update-AzDevCenterAdminPool', 'Update-AzDevCenterAdminProject', 'Update-AzDevCenterAdminProjectCatalog', 'Update-AzDevCenterAdminProjectEnvironmentType', 'Update-AzDevCenterAdminSchedule', '*' + FunctionsToExport = 'Build-AzDevCenterAdminProjectCatalogImageDefinitionImage', 'Connect-AzDevCenterAdminCatalog', 'Connect-AzDevCenterAdminProjectCatalog', 'Get-AzDevCenterAdminAttachedNetwork', 'Get-AzDevCenterAdminCatalog', 'Get-AzDevCenterAdminCatalogSyncErrorDetail', 'Get-AzDevCenterAdminCustomizationTask', 'Get-AzDevCenterAdminCustomizationTaskErrorDetail', 'Get-AzDevCenterAdminDevBoxDefinition', 'Get-AzDevCenterAdminDevCenter', 'Get-AzDevCenterAdminEnvironmentDefinition', 'Get-AzDevCenterAdminEnvironmentDefinitionErrorDetail', 'Get-AzDevCenterAdminEnvironmentType', 'Get-AzDevCenterAdminGallery', 'Get-AzDevCenterAdminImage', 'Get-AzDevCenterAdminImageVersion', 'Get-AzDevCenterAdminNetworkConnection', 'Get-AzDevCenterAdminNetworkConnectionHealthDetail', 'Get-AzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint', 'Get-AzDevCenterAdminOperationStatus', 'Get-AzDevCenterAdminPool', 'Get-AzDevCenterAdminProject', 'Get-AzDevCenterAdminProjectAllowedEnvironmentType', 'Get-AzDevCenterAdminProjectCatalog', 'Get-AzDevCenterAdminProjectCatalogImageDefinition', 'Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild', 'Get-AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail', 'Get-AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail', 'Get-AzDevCenterAdminProjectCatalogSyncErrorDetail', 'Get-AzDevCenterAdminProjectEnvironmentDefinition', 'Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail', 'Get-AzDevCenterAdminProjectEnvironmentType', 'Get-AzDevCenterAdminProjectInheritedSetting', 'Get-AzDevCenterAdminProjectPolicy', 'Get-AzDevCenterAdminSchedule', 'Get-AzDevCenterAdminSku', 'Get-AzDevCenterAdminUsage', 'Invoke-AzDevCenterAdminExecuteCheckNameAvailability', 'Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability', 'New-AzDevCenterAdminAttachedNetwork', 'New-AzDevCenterAdminCatalog', 'New-AzDevCenterAdminDevBoxDefinition', 'New-AzDevCenterAdminDevCenter', 'New-AzDevCenterAdminEnvironmentType', 'New-AzDevCenterAdminGallery', 'New-AzDevCenterAdminNetworkConnection', 'New-AzDevCenterAdminPool', 'New-AzDevCenterAdminProject', 'New-AzDevCenterAdminProjectCatalog', 'New-AzDevCenterAdminProjectEnvironmentType', 'New-AzDevCenterAdminProjectPolicy', 'New-AzDevCenterAdminSchedule', 'Remove-AzDevCenterAdminAttachedNetwork', 'Remove-AzDevCenterAdminCatalog', 'Remove-AzDevCenterAdminDevBoxDefinition', 'Remove-AzDevCenterAdminDevCenter', 'Remove-AzDevCenterAdminEnvironmentType', 'Remove-AzDevCenterAdminGallery', 'Remove-AzDevCenterAdminNetworkConnection', 'Remove-AzDevCenterAdminPool', 'Remove-AzDevCenterAdminProject', 'Remove-AzDevCenterAdminProjectCatalog', 'Remove-AzDevCenterAdminProjectEnvironmentType', 'Remove-AzDevCenterAdminProjectPolicy', 'Remove-AzDevCenterAdminSchedule', 'Start-AzDevCenterAdminNetworkConnectionHealthCheck', 'Start-AzDevCenterAdminPoolHealthCheck', 'Stop-AzDevCenterAdminProjectCatalogImageDefinitionBuild', 'Sync-AzDevCenterAdminCatalog', 'Sync-AzDevCenterAdminProjectCatalog', 'Update-AzDevCenterAdminCatalog', 'Update-AzDevCenterAdminDevBoxDefinition', 'Update-AzDevCenterAdminDevCenter', 'Update-AzDevCenterAdminEnvironmentType', 'Update-AzDevCenterAdminNetworkConnection', 'Update-AzDevCenterAdminPool', 'Update-AzDevCenterAdminProject', 'Update-AzDevCenterAdminProjectCatalog', 'Update-AzDevCenterAdminProjectEnvironmentType', 'Update-AzDevCenterAdminProjectPolicy', 'Update-AzDevCenterAdminSchedule', '*' AliasesToExport = '*' PrivateData = @{ PSData = @{ diff --git a/generated/DevCenter/DevCenter.AutoRest/Properties/AssemblyInfo.cs b/generated/DevCenter/DevCenter.AutoRest/Properties/AssemblyInfo.cs index ca3aac42ce85..28f062a356d8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/Properties/AssemblyInfo.cs +++ b/generated/DevCenter/DevCenter.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 - DevCenter")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.0.1")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.0.1")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.0.2")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.0.2")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Build-AzDevCenterAdminProjectCatalogImageDefinitionImage.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Build-AzDevCenterAdminProjectCatalogImageDefinitionImage.ps1 new file mode 100644 index 000000000000..19bcd515f14f --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Build-AzDevCenterAdminProjectCatalogImageDefinitionImage.ps1 @@ -0,0 +1,271 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Builds an image for the specified Image Definition. +.Description +Builds an image for the specified Image Definition. +.Example +Build-AzDevCenterAdminProjectCatalogImageDefinitionImage ` + -CatalogName "CentralCatalog" ` + -ImageDefinitionName "DefaultDevImage" ` + -ProjectName "DevProject" ` + -ResourceGroupName "rg1" ` + -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +.Example +$inputObject = @{ + ResourceGroupName = "rg1" + ProjectName = "DevProject" + CatalogName = "CentralCatalog" + ImageDefinitionName = "DefaultDevImage" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +Build-AzDevCenterAdminProjectCatalogImageDefinitionImage -InputObject $inputObject + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/build-azdevcenteradminprojectcatalogimagedefinitionimage +#> +function Build-AzDevCenterAdminProjectCatalogImageDefinitionImage { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Build', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Build', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Build', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Build', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Build', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Build')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='BuildViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 = @{ + Build = 'Az.DevCenter.private\Build-AzDevCenterAdminProjectCatalogImageDefinitionImage_Build'; + BuildViaIdentity = 'Az.DevCenter.private\Build-AzDevCenterAdminProjectCatalogImageDefinitionImage_BuildViaIdentity'; + } + if (('Build') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/Connect-AzDevCenterAdminCatalog.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Connect-AzDevCenterAdminCatalog.ps1 index 1860b6611749..8159453f3b32 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Connect-AzDevCenterAdminCatalog.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Connect-AzDevCenterAdminCatalog.ps1 @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Connect-AzDevCenterAdminProjectCatalog.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Connect-AzDevCenterAdminProjectCatalog.ps1 index 1f0e2b72d3a1..abb987abf675 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Connect-AzDevCenterAdminProjectCatalog.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Connect-AzDevCenterAdminProjectCatalog.ps1 @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminAttachedNetwork.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminAttachedNetwork.ps1 index 68a0ef824d12..2e3f149c9153 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminAttachedNetwork.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminAttachedNetwork.ps1 @@ -31,7 +31,7 @@ Get-AzDevCenterAdminAttachedNetwork -ProjectName DevProject -ResourceGroupName t .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -39,6 +39,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -47,14 +48,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -64,7 +65,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminattachednetwork #> function Get-AzDevCenterAdminAttachedNetwork { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCatalog.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCatalog.ps1 index 66a20ff9adc3..881987b14e7d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCatalog.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCatalog.ps1 @@ -30,7 +30,7 @@ $catalog = Get-AzDevCenterAdminCatalog -InputObject $catalog .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -46,14 +47,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -63,7 +64,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmincatalog #> function Get-AzDevCenterAdminCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCatalogSyncErrorDetail.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCatalogSyncErrorDetail.ps1 index 3d68c0b47f51..2a343ed22073 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCatalogSyncErrorDetail.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCatalogSyncErrorDetail.ps1 @@ -28,7 +28,7 @@ $catalogErrorDetail = Get-AzDevCenterAdminCatalogSyncErrorDetail -InputObject $c .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmincatalogsyncerrordetail #> function Get-AzDevCenterAdminCatalogSyncErrorDetail { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCustomizationTask.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCustomizationTask.ps1 index 148a87bb35fb..186d0c69baf1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCustomizationTask.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCustomizationTask.ps1 @@ -30,7 +30,7 @@ $customizationTask = Get-AzDevCenterAdminCustomizationTask -InputObject $customi .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask .Notes COMPLEX PARAMETER PROPERTIES @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -46,14 +47,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -63,7 +64,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmincustomizationtask #> function Get-AzDevCenterAdminCustomizationTask { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCustomizationTaskErrorDetail.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCustomizationTaskErrorDetail.ps1 index 934530b338f2..b87e5bcc3816 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCustomizationTaskErrorDetail.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminCustomizationTaskErrorDetail.ps1 @@ -28,7 +28,7 @@ $customizationTaskErrorDetail = Get-AzDevCenterAdminCustomizationTaskErrorDetail .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmincustomizationtaskerrordetail #> function Get-AzDevCenterAdminCustomizationTaskErrorDetail { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminDevBoxDefinition.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminDevBoxDefinition.ps1 index 23a71ca0ba90..5d0cbb24e28c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminDevBoxDefinition.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminDevBoxDefinition.ps1 @@ -31,7 +31,7 @@ Get-AzDevCenterAdminDevBoxDefinition -ResourceGroupName testRg -ProjectName DevP .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -39,6 +39,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -47,14 +48,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -64,7 +65,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmindevboxdefinition #> function Get-AzDevCenterAdminDevBoxDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminDevCenter.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminDevCenter.ps1 index c0596cab97bd..d24f9198f5de 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminDevCenter.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminDevCenter.ps1 @@ -32,7 +32,7 @@ Get-AzDevCenterAdminDevCenter -InputObject $devCenter .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter .Notes COMPLEX PARAMETER PROPERTIES @@ -40,6 +40,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -48,14 +49,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -65,7 +66,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmindevcenter #> function Get-AzDevCenterAdminDevCenter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminEnvironmentDefinition.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminEnvironmentDefinition.ps1 index e5dfbbfa7d09..fab564957b67 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminEnvironmentDefinition.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminEnvironmentDefinition.ps1 @@ -30,7 +30,7 @@ $environmentDefinition = Get-AzDevCenterAdminEnvironmentDefinition -InputObject .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -46,14 +47,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -63,7 +64,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminenvironmentdefinition #> function Get-AzDevCenterAdminEnvironmentDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminEnvironmentDefinitionErrorDetail.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminEnvironmentDefinitionErrorDetail.ps1 index 54d628bf7692..d601dc8e563d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminEnvironmentDefinitionErrorDetail.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminEnvironmentDefinitionErrorDetail.ps1 @@ -28,7 +28,7 @@ $environmentDefinitionErrorDetail = Get-AzDevCenterAdminEnvironmentDefinitionErr .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminenvironmentdefinitionerrordetail #> function Get-AzDevCenterAdminEnvironmentDefinitionErrorDetail { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminEnvironmentType.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminEnvironmentType.ps1 index 50ba74efb8cf..402d791e89f6 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminEnvironmentType.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminEnvironmentType.ps1 @@ -29,7 +29,7 @@ Get-AzDevCenterAdminEnvironmentType -ResourceGroupName testRg -DevCenterName Con .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -37,6 +37,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -45,14 +46,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -62,7 +63,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminenvironmenttype #> function Get-AzDevCenterAdminEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminGallery.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminGallery.ps1 index efd3a0506bbe..d2a12aa83d7a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminGallery.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminGallery.ps1 @@ -30,7 +30,7 @@ Get-AzDevCenterAdminGallery -InputObject $gallery .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery .Notes COMPLEX PARAMETER PROPERTIES @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -46,14 +47,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -63,7 +64,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmingallery #> function Get-AzDevCenterAdminGallery { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminImage.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminImage.ps1 index 9b3fbd7e0ee5..7fd2c61f3101 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminImage.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminImage.ps1 @@ -32,7 +32,7 @@ Get-AzDevCenterAdminImage -InputObject $image .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage .Notes COMPLEX PARAMETER PROPERTIES @@ -40,6 +40,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -48,14 +49,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -65,7 +66,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminimage #> function Get-AzDevCenterAdminImage { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -84,6 +85,7 @@ param( ${GalleryName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Get1', Mandatory)] [Alias('ImageName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] @@ -91,8 +93,10 @@ param( ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Get1', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='List1', Mandatory)] + [Parameter(ParameterSetName='List2', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. @@ -100,15 +104,25 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='Get1')] [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='List1')] + [Parameter(ParameterSetName='List2')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List2', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter @@ -191,11 +205,14 @@ begin { $mapping = @{ Get = 'Az.DevCenter.private\Get-AzDevCenterAdminImage_Get'; + Get1 = 'Az.DevCenter.private\Get-AzDevCenterAdminImage_Get1'; GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminImage_GetViaIdentity'; + GetViaIdentity1 = 'Az.DevCenter.private\Get-AzDevCenterAdminImage_GetViaIdentity1'; List = 'Az.DevCenter.private\Get-AzDevCenterAdminImage_List'; List1 = 'Az.DevCenter.private\Get-AzDevCenterAdminImage_List1'; + List2 = 'Az.DevCenter.private\Get-AzDevCenterAdminImage_List2'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'Get1', 'List', 'List1', 'List2') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminImageVersion.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminImageVersion.ps1 index 09d39c1802c0..98117ca98c7f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminImageVersion.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminImageVersion.ps1 @@ -30,7 +30,7 @@ Get-AzDevCenterAdminImageVersion -InputObject $imageVersion .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion .Notes COMPLEX PARAMETER PROPERTIES @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -46,14 +47,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -63,8 +64,8 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminimageversion #> function Get-AzDevCenterAdminImageVersion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] @@ -81,14 +82,18 @@ param( ${GalleryName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Get1', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the image. ${ImageName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Get1', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. @@ -96,7 +101,9 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='Get1')] [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] @@ -104,12 +111,21 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Get1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The version of the image. ${VersionName}, + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter @@ -192,10 +208,13 @@ begin { $mapping = @{ Get = 'Az.DevCenter.private\Get-AzDevCenterAdminImageVersion_Get'; + Get1 = 'Az.DevCenter.private\Get-AzDevCenterAdminImageVersion_Get1'; GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminImageVersion_GetViaIdentity'; + GetViaIdentity1 = 'Az.DevCenter.private\Get-AzDevCenterAdminImageVersion_GetViaIdentity1'; List = 'Az.DevCenter.private\Get-AzDevCenterAdminImageVersion_List'; + List1 = 'Az.DevCenter.private\Get-AzDevCenterAdminImageVersion_List1'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'Get1', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminNetworkConnection.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminNetworkConnection.ps1 index 085ffa2bd55e..467896930121 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminNetworkConnection.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminNetworkConnection.ps1 @@ -32,7 +32,7 @@ Get-AzDevCenterAdminNetworkConnection -InputObject $networkConnection .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -40,6 +40,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -48,14 +49,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -65,7 +66,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminnetworkconnection #> function Get-AzDevCenterAdminNetworkConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminNetworkConnectionHealthDetail.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminNetworkConnectionHealthDetail.ps1 index 74c0d78d1a46..fd2165fa2904 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminNetworkConnectionHealthDetail.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminNetworkConnectionHealthDetail.ps1 @@ -28,7 +28,7 @@ Get-AzDevCenterAdminNetworkConnectionHealthDetail -InputObject $networkConnectio .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminnetworkconnectionhealthdetail #> function Get-AzDevCenterAdminNetworkConnectionHealthDetail { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint.ps1 index 00b693aac985..362a981f747c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint.ps1 @@ -25,12 +25,12 @@ These FQDNs should be allowed for outbound access in order for the Dev Box servi Get-AzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint -ResourceGroupName testRg -NetworkConnectionName eastusNetwork .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminnetworkconnectionoutboundnetworkdependencyendpoint #> function Get-AzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminOperationStatus.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminOperationStatus.ps1 index 3c2d6f3f79e8..211b8cc46196 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminOperationStatus.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminOperationStatus.ps1 @@ -28,7 +28,7 @@ Get-AzDevCenterAdminOperationStatus -InputObject $operation .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminoperationstatus #> function Get-AzDevCenterAdminOperationStatus { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminPlan.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminPlan.ps1 deleted file mode 100644 index e37eceb01484..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminPlan.ps1 +++ /dev/null @@ -1,239 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code -# is regenerated. -# ---------------------------------------------------------------------------------- - -<# -.Synopsis -Gets a devcenter plan. -.Description -Gets a devcenter plan. -.Example -Get-AzDevCenterAdminPlan -.Example -Get-AzDevCenterAdminPlan -ResourceGroupName testRg -.Example -Get-AzDevCenterAdminPlan -ResourceGroupName testRg -Name ContosoPlan -.Example -$plan = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -Get-AzDevCenterAdminPlan -InputObject $plan - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan -.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 - [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. - [CatalogName ]: The name of the Catalog. - [DevBoxDefinitionName ]: The name of the Dev Box definition. - [DevCenterName ]: The name of the devcenter. - [EncryptionSetName ]: The name of the devcenter encryption set. - [EnvironmentDefinitionName ]: The name of the Environment Definition. - [EnvironmentTypeName ]: The name of the environment type. - [GalleryName ]: The name of the gallery. - [Id ]: Resource identity path - [ImageName ]: The name of the image. - [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. - [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. - [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. - [PoolName ]: Name of the pool. - [ProjectName ]: The name of the project. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ScheduleName ]: The name of the schedule that uniquely identifies it. - [SubscriptionId ]: The ID of the target subscription. - [TaskName ]: The name of the Task. - [VersionName ]: The version of the image. -.Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminplan -#> -function Get-AzDevCenterAdminPlan { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] -param( - [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('PlanName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the devcenter plan. - ${Name}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] - [Parameter(ParameterSetName='List1')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String[]] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.private\Get-AzDevCenterAdminPlan_Get'; - GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminPlan_GetViaIdentity'; - List = 'Az.DevCenter.private\Get-AzDevCenterAdminPlan_List'; - List1 = 'Az.DevCenter.private\Get-AzDevCenterAdminPlan_List1'; - } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } - if ($testPlayback) { - $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') - } else { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminPlanMember.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminPlanMember.ps1 deleted file mode 100644 index 1148464cbf88..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminPlanMember.ps1 +++ /dev/null @@ -1,241 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code -# is regenerated. -# ---------------------------------------------------------------------------------- - -<# -.Synopsis -Gets a devcenter plan member. -.Description -Gets a devcenter plan member. -.Example -Get-AzDevCenterAdminPlanMember -PlanName ContosoPlan -ResourceGroupName testRg -.Example -Get-AzDevCenterAdminPlanMember -PlanName ContosoPlan -MemberName d702f662-b3f2-4796-9e8c-13c22378ced3 -ResourceGroupName testRg -.Example -$planMember = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "MemberName" = "d702f662-b3f2-4796-9e8c-13c22378ced3"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -$planMember = Get-AzDevCenterAdminPlanMember -InputObject $planMember - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember -.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 - [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. - [CatalogName ]: The name of the Catalog. - [DevBoxDefinitionName ]: The name of the Dev Box definition. - [DevCenterName ]: The name of the devcenter. - [EncryptionSetName ]: The name of the devcenter encryption set. - [EnvironmentDefinitionName ]: The name of the Environment Definition. - [EnvironmentTypeName ]: The name of the environment type. - [GalleryName ]: The name of the gallery. - [Id ]: Resource identity path - [ImageName ]: The name of the image. - [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. - [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. - [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. - [PoolName ]: Name of the pool. - [ProjectName ]: The name of the project. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ScheduleName ]: The name of the schedule that uniquely identifies it. - [SubscriptionId ]: The ID of the target subscription. - [TaskName ]: The name of the Task. - [VersionName ]: The version of the image. -.Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminplanmember -#> -function Get-AzDevCenterAdminPlanMember { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] -param( - [Parameter(ParameterSetName='Get', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of a devcenter plan member. - ${MemberName}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the devcenter plan. - ${PlanName}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String[]] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.private\Get-AzDevCenterAdminPlanMember_Get'; - GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminPlanMember_GetViaIdentity'; - List = 'Az.DevCenter.private\Get-AzDevCenterAdminPlanMember_List'; - } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } - if ($testPlayback) { - $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') - } else { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminPool.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminPool.ps1 index e195216d7b89..b88e6a19fe6b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminPool.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminPool.ps1 @@ -30,7 +30,7 @@ Get-AzDevCenterAdminPool -InputObject $pool .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool .Notes COMPLEX PARAMETER PROPERTIES @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -46,14 +47,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -63,7 +64,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminpool #> function Get-AzDevCenterAdminPool { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProject.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProject.ps1 index 03ce395e5ef9..b7c37a5d5d29 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProject.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProject.ps1 @@ -32,7 +32,7 @@ Get-AzDevCenterAdminProject -InputObject $project .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject .Notes COMPLEX PARAMETER PROPERTIES @@ -40,6 +40,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -48,14 +49,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -65,7 +66,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminproject #> function Get-AzDevCenterAdminProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectAllowedEnvironmentType.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectAllowedEnvironmentType.ps1 index ed7956d32225..5e01f0e094b0 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectAllowedEnvironmentType.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectAllowedEnvironmentType.ps1 @@ -30,7 +30,7 @@ Get-AzDevCenterAdminProjectAllowedEnvironmentType -InputObject $envType .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -46,14 +47,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -63,7 +64,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectallowedenvironmenttype #> function Get-AzDevCenterAdminProjectAllowedEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalog.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalog.ps1 index 65aafbd778ed..44c05defa289 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalog.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalog.ps1 @@ -30,7 +30,7 @@ $catalog = Get-AzDevCenterAdminProjectCatalog -InputObject $catalog .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -46,14 +47,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -63,7 +64,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectcatalog #> function Get-AzDevCenterAdminProjectCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogImageDefinition.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogImageDefinition.ps1 new file mode 100644 index 000000000000..a502c7b88302 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogImageDefinition.ps1 @@ -0,0 +1,255 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an Image Definition from the catalog +.Description +Gets an Image Definition from the catalog +.Example +Get-AzDevCenterAdminProjectCatalogImageDefinition -CatalogName "CentralCatalog" -ProjectName "DevProject" -ResourceGroupName "rg1" -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +.Example +Get-AzDevCenterAdminProjectCatalogImageDefinition -CatalogName "CentralCatalog" -ImageDefinitionName "DefaultDevImage" -ProjectName "DevProject" -ResourceGroupName "rg1" -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +.Example +$inputObject = @{ + ResourceGroupName = "rg1" + ProjectName = "DevProject" + CatalogName = "CentralCatalog" + ImageDefinitionName = "DefaultDevImage" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +Get-AzDevCenterAdminProjectCatalogImageDefinition -InputObject $inputObject + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectcatalogimagedefinition +#> +function Get-AzDevCenterAdminProjectCatalogImageDefinition { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinition_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinition_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinition_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild.ps1 new file mode 100644 index 000000000000..7867628a8819 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild.ps1 @@ -0,0 +1,263 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets a build for a specified image definition. +.Description +Gets a build for a specified image definition. +.Example +Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild -ImageDefinitionName "DefaultDevImage" -CatalogName "CentralCatalog" -ProjectName "DevProject" -ResourceGroupName "rg1" -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +.Example +Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild -BuildName "0a28fc61-6f87-4611-8fe2-32df44ab93b7" -CatalogName "CentralCatalog" -ImageDefinitionName "DefaultDevImage" -ProjectName "DevProject" -ResourceGroupName "rg1" -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +.Example +$inputObject = @{ + ResourceGroupName = "rg1" + ProjectName = "DevProject" + CatalogName = "CentralCatalog" + ImageDefinitionName = "DefaultDevImage" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" + BuildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7" +} +Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild -InputObject $inputObject + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectcatalogimagedefinitionbuild +#> +function Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The ID of the Image Definition Build. + ${BuildName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail.ps1 new file mode 100644 index 000000000000..aacaae34ef72 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail.ps1 @@ -0,0 +1,261 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets Build details +.Description +Gets Build details +.Example +Get-AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail ` + -BuildName "0a28fc61-6f87-4611-8fe2-32df44ab93b7" ` + -CatalogName "CentralCatalog" ` + -ImageDefinitionName "DefaultDevImage" ` + -ProjectName "DevProject" ` + -ResourceGroupName "rg1" ` + -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +.Example +$inputObject = @{ + ResourceGroupName = "rg1" + ProjectName = "DevProject" + CatalogName = "CentralCatalog" + ImageDefinitionName = "DefaultDevImage" + BuildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +Get-AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail -InputObject $inputObject + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectcatalogimagedefinitionbuilddetail +#> +function Get-AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The ID of the Image Definition Build. + ${BuildName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail.ps1 new file mode 100644 index 000000000000..ba9995601904 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail.ps1 @@ -0,0 +1,253 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets Image Definition error details +.Description +Gets Image Definition error details +.Example +Get-AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail ` + -CatalogName "CentralCatalog" ` + -ImageDefinitionName "DefaultDevImage" ` + -ProjectName "DevProject" ` + -ResourceGroupName "rg1" ` + -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +.Example +$inputObject = @{ + ResourceGroupName = "rg1" + ProjectName = "DevProject" + CatalogName = "CentralCatalog" + ImageDefinitionName = "DefaultDevImage" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +Get-AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail -InputObject $inputObject + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectcatalogimagedefinitionerrordetail +#> +function Get-AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogSyncErrorDetail.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogSyncErrorDetail.ps1 index f1c985f41447..31ab158a1ed5 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogSyncErrorDetail.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectCatalogSyncErrorDetail.ps1 @@ -28,7 +28,7 @@ $catalogErrorDetail = Get-AzDevCenterAdminProjectCatalogSyncErrorDetail -InputOb .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectcatalogsyncerrordetail #> function Get-AzDevCenterAdminProjectCatalogSyncErrorDetail { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectEnvironmentDefinition.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectEnvironmentDefinition.ps1 index f573e2911d50..6b1f84fa736f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectEnvironmentDefinition.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectEnvironmentDefinition.ps1 @@ -30,7 +30,7 @@ $environmentDefinition = Get-AzDevCenterAdminProjectEnvironmentDefinition -Input .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -46,14 +47,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -63,7 +64,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectenvironmentdefinition #> function Get-AzDevCenterAdminProjectEnvironmentDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail.ps1 index 06c7ee3a4611..68ad064c6391 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail.ps1 @@ -28,7 +28,7 @@ $environmentDefinitionErrorDetail = Get-AzDevCenterAdminProjectEnvironmentDefini .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectenvironmentdefinitionerrordetail #> function Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectEnvironmentType.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectEnvironmentType.ps1 index 2001bf04c819..2d49589a4199 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectEnvironmentType.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectEnvironmentType.ps1 @@ -30,7 +30,7 @@ Get-AzDevCenterAdminProjectEnvironmentType -InputObject $envType .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -46,14 +47,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -63,7 +64,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectenvironmenttype #> function Get-AzDevCenterAdminProjectEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectInheritedSetting.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectInheritedSetting.ps1 index ee7cb7ef15f5..3642ec43e883 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectInheritedSetting.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectInheritedSetting.ps1 @@ -28,7 +28,7 @@ $inheritedSettings = Get-AzDevCenterAdminProjectInheritedSetting -InputObject $p .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectinheritedsetting #> function Get-AzDevCenterAdminProjectInheritedSetting { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectPolicy.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectPolicy.ps1 new file mode 100644 index 000000000000..caad28111d5b --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminProjectPolicy.ps1 @@ -0,0 +1,248 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets a specific project policy. +.Description +Gets a specific project policy. +.Example +Get-AzDevCenterAdminProjectPolicy -DevCenterName Contoso -ResourceGroupName testRg -SubscriptionId 0ac520ee-14c0-480f-b6c9-0a90c58ffff +.Example +Get-AzDevCenterAdminProjectPolicy -DevCenterName Contoso -Name myPolicy -ResourceGroupName testRg -SubscriptionId 0ac520ee-14c0-480f-b6c9-0a90c58ffff +.Example +$inputObject = @{ + ResourceGroupName = "testRg" + DevCenterName = "Contoso" + ProjectPolicyName = "myPolicy" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +Get-AzDevCenterAdminProjectPolicy -InputObject $inputObject + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectpolicy +#> +function Get-AzDevCenterAdminProjectPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ProjectPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project policy. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.private\Get-AzDevCenterAdminProjectPolicy_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectPolicy_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectPolicy_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminSchedule.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminSchedule.ps1 index 7ef661328faa..dc1e9d0713fb 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminSchedule.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminSchedule.ps1 @@ -28,7 +28,7 @@ Get-AzDevCenterAdminSchedule -InputObject $schedule .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminschedule #> function Get-AzDevCenterAdminSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule])] [CmdletBinding(DefaultParameterSetName='GetWithDefault', PositionalBinding=$false)] param( [Parameter(ParameterSetName='GetWithDefault', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminSku.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminSku.ps1 index 5e9d21ed7464..1a8627032e82 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminSku.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminSku.ps1 @@ -16,21 +16,34 @@ <# .Synopsis -Lists the Microsoft.DevCenter SKUs available in a subscription +Lists SKUs available to the project .Description -Lists the Microsoft.DevCenter SKUs available in a subscription +Lists SKUs available to the project .Example Get-AzDevCenterAdminSku .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminsku #> function Get-AzDevCenterAdminSku { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] @@ -114,8 +127,9 @@ begin { $mapping = @{ List = 'Az.DevCenter.private\Get-AzDevCenterAdminSku_List'; + List1 = 'Az.DevCenter.private\Get-AzDevCenterAdminSku_List1'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminUsage.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminUsage.ps1 index 912b3026d9d4..d5d046b98ab8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminUsage.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Get-AzDevCenterAdminUsage.ps1 @@ -23,12 +23,12 @@ Lists the current usages and limits in this location for the provided subscripti Get-AzDevCenterAdminUsage -Location "westus3" .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminusage #> function Get-AzDevCenterAdminUsage { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Invoke-AzDevCenterAdminExecuteCheckNameAvailability.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Invoke-AzDevCenterAdminExecuteCheckNameAvailability.ps1 index 6264ddb0c4de..24c233e5f165 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Invoke-AzDevCenterAdminExecuteCheckNameAvailability.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Invoke-AzDevCenterAdminExecuteCheckNameAvailability.ps1 @@ -33,6 +33,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -41,14 +42,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability.ps1 index 8bdff6078dfa..522fa76e26e2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability.ps1 @@ -35,6 +35,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -43,14 +44,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminAttachedNetwork.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminAttachedNetwork.ps1 index e85d11f81ac0..311f84259177 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminAttachedNetwork.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminAttachedNetwork.ps1 @@ -28,7 +28,7 @@ New-AzDevCenterAdminAttachedNetwork -InputObject $attachedNetwork -NetworkConnec .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminattachednetwork #> function New-AzDevCenterAdminAttachedNetwork { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminCatalog.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminCatalog.ps1 index 856fbda87d01..f0f1fe4b2f6b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminCatalog.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminCatalog.ps1 @@ -33,7 +33,7 @@ New-AzDevCenterAdminCatalog -InputObject $catalog -GitHubBranch main -GitHubPath .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -49,14 +50,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -66,7 +67,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmincatalog #> function New-AzDevCenterAdminCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='CreateExpandedAdo', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpandedAdo', Mandatory)] @@ -145,7 +146,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminDevBoxDefinition.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminDevBoxDefinition.ps1 index c0408cba3484..03125cf23ce2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminDevBoxDefinition.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminDevBoxDefinition.ps1 @@ -28,7 +28,7 @@ New-AzDevCenterAdminDevBoxDefinition -InputObject $devBoxDefinition -Location "w .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmindevboxdefinition #> function New-AzDevCenterAdminDevBoxDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -164,7 +165,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminDevCenter.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminDevCenter.ps1 index e1a7327aa27b..9324935a1fef 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminDevCenter.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminDevCenter.ps1 @@ -34,7 +34,7 @@ New-AzDevCenterAdminDevCenter -InputObject $devCenter -Location eastus -Identity .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter .Notes COMPLEX PARAMETER PROPERTIES @@ -42,6 +42,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -50,14 +51,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -67,7 +68,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmindevcenter #> function New-AzDevCenterAdminDevCenter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -141,12 +142,6 @@ param( # Defaults to Enabled if not set. ${NetworkSettingMicrosoftHostedNetworkEnableStatus}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Resource Id of an associated Plan - ${PlanId}, - [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] @@ -156,7 +151,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminEnvironmentType.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminEnvironmentType.ps1 index 514a6b6c69f1..4088f157a19f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminEnvironmentType.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminEnvironmentType.ps1 @@ -30,7 +30,7 @@ New-AzDevCenterAdminEnvironmentType -InputObject $envType -Tag $tags .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -46,14 +47,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -63,7 +64,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminenvironmenttype #> function New-AzDevCenterAdminEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -108,7 +109,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminGallery.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminGallery.ps1 index 596f9f9d7c6a..0d6d808ca026 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminGallery.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminGallery.ps1 @@ -28,7 +28,7 @@ New-AzDevCenterAdminGallery -InputObject $gallery -GalleryResourceId "/subscript .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmingallery #> function New-AzDevCenterAdminGallery { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminNetworkConnection.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminNetworkConnection.ps1 index 93cb39daeeac..c2e8322e85c5 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminNetworkConnection.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminNetworkConnection.ps1 @@ -34,7 +34,7 @@ New-AzDevCenterAdminNetworkConnection -InputObject $networkConnection -Location .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -42,6 +42,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -50,14 +51,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -67,7 +68,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminnetworkconnection #> function New-AzDevCenterAdminNetworkConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -150,7 +151,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminPlan.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminPlan.ps1 deleted file mode 100644 index f01e956e7954..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminPlan.ps1 +++ /dev/null @@ -1,291 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code -# is regenerated. -# ---------------------------------------------------------------------------------- - -<# -.Synopsis -Creates or updates a devcenter plan resource -.Description -Creates or updates a devcenter plan resource -.Example -New-AzDevCenterAdminPlan -Name ContosoPlan -ResourceGroupName testRg -Location eastus -SkuName CCOG_Standard -.Example -$plan = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminPlan -InputObject $plan -Location eastus -SkuName CCOG_Standard - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan -.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 - [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. - [CatalogName ]: The name of the Catalog. - [DevBoxDefinitionName ]: The name of the Dev Box definition. - [DevCenterName ]: The name of the devcenter. - [EncryptionSetName ]: The name of the devcenter encryption set. - [EnvironmentDefinitionName ]: The name of the Environment Definition. - [EnvironmentTypeName ]: The name of the environment type. - [GalleryName ]: The name of the gallery. - [Id ]: Resource identity path - [ImageName ]: The name of the image. - [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. - [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. - [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. - [PoolName ]: Name of the pool. - [ProjectName ]: The name of the project. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ScheduleName ]: The name of the schedule that uniquely identifies it. - [SubscriptionId ]: The ID of the target subscription. - [TaskName ]: The name of the Task. - [VersionName ]: The version of the image. -.Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminplan -#> -function New-AzDevCenterAdminPlan { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('PlanName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the devcenter plan. - ${Name}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.Int32] - # If the SKU supports scale out/in then the capacity integer should be included. - # If scale out/in is not possible for the resource this may be omitted. - ${SkuCapacity}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # If the service has different generations of hardware, for the same SKU, then that can be captured here. - ${SkuFamily}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The name of the SKU. - # E.g. - # P3. - # It is typically a letter+number code - ${SkuName}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The SKU size. - # When the name field is the combination of tier and some other value, this would be the standalone code. - ${SkuSize}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] - # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - ${SkuTier}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.custom\New-AzDevCenterAdminPlan'; - CreateViaIdentityExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminPlan'; - } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } - if ($testPlayback) { - $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') - } else { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminPlanMember.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminPlanMember.ps1 deleted file mode 100644 index 5613a526e29b..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminPlanMember.ps1 +++ /dev/null @@ -1,276 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code -# is regenerated. -# ---------------------------------------------------------------------------------- - -<# -.Synopsis -Creates or updates a devcenter plan member resource -.Description -Creates or updates a devcenter plan member resource -.Example -$tags = @{"dev" ="test"} -New-AzDevCenterAdminPlanMember -PlanName ContosoPlan -MemberName d702f662-b3f2-4796-9e8c-13c22378ced3 -ResourceGroupName testRg -Tag $tags -MemberId d702f662-b3f2-4796-9e8c-13c22378ced3 -MemberType User -.Example -$tags = @{"dev" ="test"} -$planMember = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "MemberName" = "d702f662-b3f2-4796-9e8c-13c22378ced3"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminPlanMember -InputObject $planMember -Tag $tags -MemberId d702f662-b3f2-4796-9e8c-13c22378ced3 -MemberType User - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember -.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 - [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. - [CatalogName ]: The name of the Catalog. - [DevBoxDefinitionName ]: The name of the Dev Box definition. - [DevCenterName ]: The name of the devcenter. - [EncryptionSetName ]: The name of the devcenter encryption set. - [EnvironmentDefinitionName ]: The name of the Environment Definition. - [EnvironmentTypeName ]: The name of the environment type. - [GalleryName ]: The name of the gallery. - [Id ]: Resource identity path - [ImageName ]: The name of the image. - [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. - [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. - [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. - [PoolName ]: Name of the pool. - [ProjectName ]: The name of the project. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ScheduleName ]: The name of the schedule that uniquely identifies it. - [SubscriptionId ]: The ID of the target subscription. - [TaskName ]: The name of the Task. - [VersionName ]: The version of the image. -.Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminplanmember -#> -function New-AzDevCenterAdminPlanMember { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of a devcenter plan member. - ${MemberName}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the devcenter plan. - ${PlanName}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The unique id of the member. - ${MemberId}, - - [Parameter(Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType] - # The type of the member (user, group) - ${MemberType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] - [System.Collections.Hashtable] - # Resource tags. - ${PropertiesTag}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.custom\New-AzDevCenterAdminPlanMember'; - CreateViaIdentityExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminPlanMember'; - } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } - if ($testPlayback) { - $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') - } else { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminPool.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminPool.ps1 index d36c494690ea..ea4687f7be68 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminPool.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminPool.ps1 @@ -28,7 +28,7 @@ New-AzDevCenterAdminPool -InputObject $pool -Location westus2 -DevBoxDefinitionN .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminpool #> function New-AzDevCenterAdminPool { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -104,12 +105,6 @@ param( # The geo-location where the resource lives ${Location}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Name of a Dev Box definition in parent Project of this Pool - ${DevBoxDefinitionName}, - [Parameter(Mandatory)] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] @@ -117,11 +112,58 @@ param( # Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. ${LocalAdministrator}, - [Parameter(Mandatory)] + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus] + # Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + ${ActiveHourConfigurationAutoStartEnableStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # The default end time of the active hours + ${ActiveHourConfigurationDefaultEndTimeHour}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # The default start time of the active hours. + ${ActiveHourConfigurationDefaultStartTimeHour}, + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Name of a Network Connection in parent Project of this Pool - ${NetworkConnectionName}, + # The default IANA timezone id of the active hours. + ${ActiveHourConfigurationDefaultTimeZone}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus] + # Enables or disables whether the Dev Box should be kept awake during active hours. + ${ActiveHourConfigurationKeepAwakeEnableStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Name of a Dev Box definition in parent Project of this Pool. + # Will be ignored if devBoxDefinitionType is Value. + ${DevBoxDefinitionName}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType] + # Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + ${DevBoxDefinitionType}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus] + # Indicates whether Dev Box Tunnel is enabled for a the pool. + ${DevBoxTunnelEnableStatus}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] @@ -129,6 +171,13 @@ param( # The display name of the pool. ${DisplayName}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Image ID, or Image version ID. + # When Image ID is provided, its latest version will be used. + ${ImageReferenceId}, + [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] @@ -136,6 +185,12 @@ param( # The regions of the managed virtual network (required when managedNetworkType is Managed). ${ManagedVirtualNetworkRegion}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Name of a Network Connection in parent Project of this Pool + ${NetworkConnectionName}, + [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] @@ -144,6 +199,42 @@ param( # The also requires that single sign on be enabled on the tenant. ${SingleSignOnStatus}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # If the SKU supports scale out/in then the capacity integer should be included. + # If scale out/in is not possible for the resource this may be omitted. + ${SkuCapacity}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # If the service has different generations of hardware, for the same SKU, then that can be captured here. + ${SkuFamily}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The name of the SKU. + # E.g. + # P3. + # It is typically a letter+number code + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The SKU size. + # When the name field is the combination of tier and some other value, this would be the standalone code. + ${SkuSize}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] + # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + ${SkuTier}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.Int32] @@ -159,7 +250,20 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [System.Int32] + # The specified time in minutes to wait before stopping a Dev Box if no connection is made. + ${StopOnNoConnectGracePeriodMinute}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus] + # Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + ${StopOnNoConnectStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminProject.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminProject.ps1 index 50a32e87f33b..b6da82fc2d0c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminProject.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminProject.ps1 @@ -28,14 +28,19 @@ New-AzDevCenterAdminProject -InputObject $project -Location eastus -DevCenterId .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject .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. +CUSTOMIZATIONSETTINGIDENTITY : The identities that can to be used in customization scenarios; e.g., to clone a repository. + [IdentityResourceId ]: Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity. + [IdentityType ]: Values can be systemAssignedIdentity or userAssignedIdentity + INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +49,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +66,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminproject #> function New-AzDevCenterAdminProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -104,6 +109,13 @@ param( # Resource Id of an associated DevCenter ${DevCenterId}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode] + # The property indicates whether Azure AI services is enabled. + ${AzureAiServiceSettingAzureAiServicesMode}, + [Parameter()] [AllowEmptyCollection()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType])] @@ -112,12 +124,48 @@ param( # Indicates catalog item types that can be synced. ${CatalogSettingCatalogItemSyncType}, + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]] + # The identities that can to be used in customization scenarios; e.g., to clone a repository. + # To construct, see NOTES section for CUSTOMIZATIONSETTINGIDENTITY properties and create a hash table. + ${CustomizationSettingIdentity}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus] + # Indicates whether user customizations are enabled. + ${CustomizationSettingUserCustomizationsEnableStatus}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] # Description of the project. ${Description}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode] + # Indicates the delete mode for Dev Boxes within this project. + ${DevBoxAutoDeleteSettingDeleteMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. + # ISO8601 format PT[n]H[n]M[n]S. + ${DevBoxAutoDeleteSettingGracePeriod}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. + # ISO8601 format PT[n]H[n]M[n]S. + ${DevBoxAutoDeleteSettingInactiveThreshold}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] @@ -149,11 +197,31 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [System.Int32] + # When specified, limits the maximum number of concurrent sessions across all pools in the project. + ${ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode] + # The property indicates whether serverless GPU access is enabled on the project. + ${ServerlessGpuSessionSettingServerlessGpuSessionsMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode] + # Indicates whether workspace storage is enabled. + ${WorkspaceStorageSettingWorkspaceStorageMode}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminProjectCatalog.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminProjectCatalog.ps1 index 154a65bb2286..04b9129d6a4d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminProjectCatalog.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminProjectCatalog.ps1 @@ -33,7 +33,7 @@ New-AzDevCenterAdminProjectCatalog -InputObject $catalog -GitHubBranch main -Git .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -49,14 +50,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -66,7 +67,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminprojectcatalog #> function New-AzDevCenterAdminProjectCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='CreateExpandedAdo', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpandedAdo', Mandatory)] @@ -145,7 +146,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminProjectEnvironmentType.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminProjectEnvironmentType.ps1 index 9b19c03c3c92..fa4e3bfc3f19 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminProjectEnvironmentType.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminProjectEnvironmentType.ps1 @@ -50,7 +50,7 @@ New-AzDevCenterAdminProjectEnvironmentType -InputObject $envType -CreatorRoleAss .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -58,6 +58,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -66,14 +67,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -83,7 +84,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminprojectenvironmenttype #> function New-AzDevCenterAdminProjectEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -119,27 +120,20 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Id of a subscription that the environment type will be mapped to. - # The environment's resources will be deployed into this subscription. - ${DeploymentTargetId}, - - [Parameter(Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus] - # Defines whether this Environment Type can be used in this Project. - ${Status}, - [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles]))] [System.Collections.Hashtable] # A map of roles to assign to the environment creator. ${CreatorRoleAssignmentRole}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Id of a subscription that the environment type will be mapped to. + # The environment's resources will be deployed into this subscription. + ${DeploymentTargetId}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] @@ -168,16 +162,23 @@ param( # The geo-location for the environment type ${Location}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus] + # Defines whether this Environment Type can be used in this Project. + ${Status}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments]))] [System.Collections.Hashtable] # Role Assignments created on environment backing resources. # This is a mapping from a user object ID to an object of role definition IDs. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminProjectPolicy.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminProjectPolicy.ps1 new file mode 100644 index 000000000000..dfc6f1e11377 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminProjectPolicy.ps1 @@ -0,0 +1,297 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates or updates an project policy. +.Description +Creates or updates an project policy. +.Example +$resourcePolicies = @( + @{ Resource = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/default/images/microsoftvisualstudio_visualstudio2019plustools_vs-2019-ent-general-win10-m365-gen2" }; + @{ Resource = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/default/images/microsoftvisualstudio_visualstudio2019plustools_vs-2019-ent-general-win11-m365-gen2" }; + @{ Resource = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/attachednetworks/network-westus3" }; + @{ Action = "Allow"; ResourceType = "Skus" } +) +$scopes = @( + "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/projects/devProject"; + "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/projects/devProject2" +) +New-AzDevCenterAdminProjectPolicy ` + -DevCenterName "Contoso" ` + -Name "myPolicy" ` + -ResourceGroupName "testRg" ` + -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" ` + -ResourcePolicy $resourcePolicies ` + -Scope $scopes +.Example +$inputObject = @{ + ResourceGroupName = "testRg" + DevCenterName = "Contoso" + ProjectPolicyName = "myPolicy" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +$resourcePolicies = @( + @{ Resource = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/default/images/microsoftvisualstudio_visualstudio2019plustools_vs-2019-ent-general-win10-m365-gen2" } +) +$scopes = @( + "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/projects/devProject" +) +New-AzDevCenterAdminProjectPolicy -InputObject $inputObject -ResourcePolicy $resourcePolicies -Scope $scopes + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. + +RESOURCEPOLICY : Resource policies that are a part of this project policy. + [Action ]: Policy action to be taken on the resources. This is optional, and defaults to allow + [Filter ]: Optional. When specified, this expression is used to filter the resources. + [Resource ]: Resources that are included and shared as a part of a project policy. + [ResourceType ]: Optional. The resource type being restricted or allowed by a project policy. Used with a given action to restrict or allow access to a resource type. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminprojectpolicy +#> +function New-AzDevCenterAdminProjectPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Alias('ProjectPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project policy. + ${Name}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[]] + # Resource policies that are a part of this project policy. + # To construct, see NOTES section for RESOURCEPOLICY properties and create a hash table. + ${ResourcePolicy}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String[]] + # Resources that have access to the shared resources that are a part of this project policy. + ${Scope}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.private\New-AzDevCenterAdminProjectPolicy_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminProjectPolicy_CreateViaIdentityExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminSchedule.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminSchedule.ps1 index b8e4f563db4f..ad7f94bfddb2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminSchedule.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/New-AzDevCenterAdminSchedule.ps1 @@ -28,7 +28,7 @@ New-AzDevCenterAdminSchedule -InputObject $schedule .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminschedule #> function New-AzDevCenterAdminSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/ProxyCmdletDefinitions.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/ProxyCmdletDefinitions.ps1 index e9ca55226fda..4dcca4571ac0 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/ProxyCmdletDefinitions.ps1 @@ -14,6 +14,262 @@ # is regenerated. # ---------------------------------------------------------------------------------- +<# +.Synopsis +Builds an image for the specified Image Definition. +.Description +Builds an image for the specified Image Definition. +.Example +Build-AzDevCenterAdminProjectCatalogImageDefinitionImage ` + -CatalogName "CentralCatalog" ` + -ImageDefinitionName "DefaultDevImage" ` + -ProjectName "DevProject" ` + -ResourceGroupName "rg1" ` + -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +.Example +$inputObject = @{ + ResourceGroupName = "rg1" + ProjectName = "DevProject" + CatalogName = "CentralCatalog" + ImageDefinitionName = "DefaultDevImage" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +Build-AzDevCenterAdminProjectCatalogImageDefinitionImage -InputObject $inputObject + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/build-azdevcenteradminprojectcatalogimagedefinitionimage +#> +function Build-AzDevCenterAdminProjectCatalogImageDefinitionImage { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Build', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Build', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Build', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Build', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Build', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Build')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='BuildViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 = @{ + Build = 'Az.DevCenter.private\Build-AzDevCenterAdminProjectCatalogImageDefinitionImage_Build'; + BuildViaIdentity = 'Az.DevCenter.private\Build-AzDevCenterAdminProjectCatalogImageDefinitionImage_BuildViaIdentity'; + } + if (('Build') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Connects a catalog to enable syncing. @@ -36,6 +292,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +301,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -275,6 +532,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -283,14 +541,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -508,7 +766,7 @@ Get-AzDevCenterAdminAttachedNetwork -ProjectName DevProject -ResourceGroupName t .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -516,6 +774,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -524,14 +783,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -541,7 +800,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminattachednetwork #> function Get-AzDevCenterAdminAttachedNetwork { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -747,7 +1006,7 @@ $catalogErrorDetail = Get-AzDevCenterAdminCatalogSyncErrorDetail -InputObject $c .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails .Notes COMPLEX PARAMETER PROPERTIES @@ -755,6 +1014,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -763,14 +1023,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -780,7 +1040,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmincatalogsyncerrordetail #> function Get-AzDevCenterAdminCatalogSyncErrorDetail { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -969,7 +1229,7 @@ $catalog = Get-AzDevCenterAdminCatalog -InputObject $catalog .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -977,6 +1237,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -985,14 +1246,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -1002,7 +1263,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmincatalog #> function Get-AzDevCenterAdminCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -1194,7 +1455,7 @@ $customizationTaskErrorDetail = Get-AzDevCenterAdminCustomizationTaskErrorDetail .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails .Notes COMPLEX PARAMETER PROPERTIES @@ -1202,6 +1463,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -1210,14 +1472,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -1227,7 +1489,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmincustomizationtaskerrordetail #> function Get-AzDevCenterAdminCustomizationTaskErrorDetail { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -1422,7 +1684,7 @@ $customizationTask = Get-AzDevCenterAdminCustomizationTask -InputObject $customi .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask .Notes COMPLEX PARAMETER PROPERTIES @@ -1430,6 +1692,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -1438,14 +1701,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -1455,7 +1718,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmincustomizationtask #> function Get-AzDevCenterAdminCustomizationTask { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -1656,7 +1919,7 @@ Get-AzDevCenterAdminDevBoxDefinition -ResourceGroupName testRg -ProjectName DevP .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -1664,6 +1927,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -1672,14 +1936,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -1689,7 +1953,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmindevboxdefinition #> function Get-AzDevCenterAdminDevBoxDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -1899,7 +2163,7 @@ Get-AzDevCenterAdminDevCenter -InputObject $devCenter .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter .Notes COMPLEX PARAMETER PROPERTIES @@ -1907,6 +2171,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -1915,14 +2180,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -1932,7 +2197,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmindevcenter #> function Get-AzDevCenterAdminDevCenter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -2119,7 +2384,7 @@ $environmentDefinitionErrorDetail = Get-AzDevCenterAdminEnvironmentDefinitionErr .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails .Notes COMPLEX PARAMETER PROPERTIES @@ -2127,6 +2392,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -2135,14 +2401,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -2152,7 +2418,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminenvironmentdefinitionerrordetail #> function Get-AzDevCenterAdminEnvironmentDefinitionErrorDetail { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -2347,7 +2613,7 @@ $environmentDefinition = Get-AzDevCenterAdminEnvironmentDefinition -InputObject .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -2355,6 +2621,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -2363,14 +2630,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -2380,7 +2647,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminenvironmentdefinition #> function Get-AzDevCenterAdminEnvironmentDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -2580,7 +2847,7 @@ Get-AzDevCenterAdminEnvironmentType -ResourceGroupName testRg -DevCenterName Con .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -2588,6 +2855,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -2596,14 +2864,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -2613,7 +2881,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminenvironmenttype #> function Get-AzDevCenterAdminEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -2807,7 +3075,7 @@ Get-AzDevCenterAdminGallery -InputObject $gallery .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery .Notes COMPLEX PARAMETER PROPERTIES @@ -2815,6 +3083,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -2823,14 +3092,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -2840,7 +3109,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmingallery #> function Get-AzDevCenterAdminGallery { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -3034,7 +3303,7 @@ Get-AzDevCenterAdminImageVersion -InputObject $imageVersion .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion .Notes COMPLEX PARAMETER PROPERTIES @@ -3042,6 +3311,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -3050,14 +3320,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -3067,8 +3337,8 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminimageversion #> function Get-AzDevCenterAdminImageVersion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] @@ -3085,14 +3355,18 @@ param( ${GalleryName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Get1', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the image. ${ImageName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Get1', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. @@ -3100,7 +3374,9 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='Get1')] [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] @@ -3108,12 +3384,21 @@ param( ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Get1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The version of the image. ${VersionName}, + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter @@ -3196,10 +3481,13 @@ begin { $mapping = @{ Get = 'Az.DevCenter.private\Get-AzDevCenterAdminImageVersion_Get'; + Get1 = 'Az.DevCenter.private\Get-AzDevCenterAdminImageVersion_Get1'; GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminImageVersion_GetViaIdentity'; + GetViaIdentity1 = 'Az.DevCenter.private\Get-AzDevCenterAdminImageVersion_GetViaIdentity1'; List = 'Az.DevCenter.private\Get-AzDevCenterAdminImageVersion_List'; + List1 = 'Az.DevCenter.private\Get-AzDevCenterAdminImageVersion_List1'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'Get1', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3276,7 +3564,7 @@ Get-AzDevCenterAdminImage -InputObject $image .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage .Notes COMPLEX PARAMETER PROPERTIES @@ -3284,6 +3572,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -3292,14 +3581,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -3309,7 +3598,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminimage #> function Get-AzDevCenterAdminImage { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -3328,6 +3617,7 @@ param( ${GalleryName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Get1', Mandatory)] [Alias('ImageName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] @@ -3335,8 +3625,10 @@ param( ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Get1', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='List1', Mandatory)] + [Parameter(ParameterSetName='List2', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. @@ -3344,15 +3636,25 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='Get1')] [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='List1')] + [Parameter(ParameterSetName='List2')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, + [Parameter(ParameterSetName='Get1', Mandatory)] + [Parameter(ParameterSetName='List2', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity1', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter @@ -3435,11 +3737,14 @@ begin { $mapping = @{ Get = 'Az.DevCenter.private\Get-AzDevCenterAdminImage_Get'; + Get1 = 'Az.DevCenter.private\Get-AzDevCenterAdminImage_Get1'; GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminImage_GetViaIdentity'; + GetViaIdentity1 = 'Az.DevCenter.private\Get-AzDevCenterAdminImage_GetViaIdentity1'; List = 'Az.DevCenter.private\Get-AzDevCenterAdminImage_List'; List1 = 'Az.DevCenter.private\Get-AzDevCenterAdminImage_List1'; + List2 = 'Az.DevCenter.private\Get-AzDevCenterAdminImage_List2'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'Get1', 'List', 'List1', 'List2') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -3512,7 +3817,7 @@ Get-AzDevCenterAdminNetworkConnectionHealthDetail -InputObject $networkConnectio .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails .Notes COMPLEX PARAMETER PROPERTIES @@ -3520,6 +3825,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -3528,14 +3834,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -3545,7 +3851,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminnetworkconnectionhealthdetail #> function Get-AzDevCenterAdminNetworkConnectionHealthDetail { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -3723,12 +4029,12 @@ These FQDNs should be allowed for outbound access in order for the Dev Box servi Get-AzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint -ResourceGroupName testRg -NetworkConnectionName eastusNetwork .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminnetworkconnectionoutboundnetworkdependencyendpoint #> function Get-AzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -3905,7 +4211,7 @@ Get-AzDevCenterAdminNetworkConnection -InputObject $networkConnection .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -3913,6 +4219,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -3921,14 +4228,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -3938,7 +4245,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminnetworkconnection #> function Get-AzDevCenterAdminNetworkConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -4125,7 +4432,7 @@ Get-AzDevCenterAdminOperationStatus -InputObject $operation .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -4133,6 +4440,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -4141,14 +4449,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -4158,7 +4466,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminoperationstatus #> function Get-AzDevCenterAdminOperationStatus { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -4326,21 +4634,21 @@ end { <# .Synopsis -Gets a devcenter plan member. +Gets a machine pool .Description -Gets a devcenter plan member. +Gets a machine pool .Example -Get-AzDevCenterAdminPlanMember -PlanName ContosoPlan -ResourceGroupName testRg +Get-AzDevCenterAdminPool -ResourceGroupName testRg -ProjectName DevProject .Example -Get-AzDevCenterAdminPlanMember -PlanName ContosoPlan -MemberName d702f662-b3f2-4796-9e8c-13c22378ced3 -ResourceGroupName testRg +Get-AzDevCenterAdminPool -ResourceGroupName testRg -Name DevPool -ProjectName DevProject .Example -$planMember = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "MemberName" = "d702f662-b3f2-4796-9e8c-13c22378ced3"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -$planMember = Get-AzDevCenterAdminPlanMember -InputObject $planMember - +$pool = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "PoolName" = "DevPool"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +Get-AzDevCenterAdminPool -InputObject $pool + .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool .Notes COMPLEX PARAMETER PROPERTIES @@ -4348,6 +4656,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -4356,38 +4665,39 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminplanmember +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminpool #> -function Get-AzDevCenterAdminPlanMember { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember])] +function Get-AzDevCenterAdminPool { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('PoolName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of a devcenter plan member. - ${MemberName}, + # Name of the pool. + ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter plan. - ${PlanName}, + # The name of the project. + ${ProjectName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] @@ -4487,9 +4797,9 @@ begin { } $mapping = @{ - Get = 'Az.DevCenter.private\Get-AzDevCenterAdminPlanMember_Get'; - GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminPlanMember_GetViaIdentity'; - List = 'Az.DevCenter.private\Get-AzDevCenterAdminPlanMember_List'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminPool_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminPool_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminPool_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -4552,23 +4862,21 @@ end { <# .Synopsis -Gets a devcenter plan. +Gets an allowed environment type. .Description -Gets a devcenter plan. -.Example -Get-AzDevCenterAdminPlan +Gets an allowed environment type. .Example -Get-AzDevCenterAdminPlan -ResourceGroupName testRg +Get-AzDevCenterAdminProjectAllowedEnvironmentType -ProjectName DevProject -ResourceGroupName testRg .Example -Get-AzDevCenterAdminPlan -ResourceGroupName testRg -Name ContosoPlan +Get-AzDevCenterAdminProjectAllowedEnvironmentType -ProjectName DevProject -ResourceGroupName testRg -EnvironmentTypeName DevTest .Example -$plan = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -Get-AzDevCenterAdminPlan -InputObject $plan +$envType = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "EnvironmentTypeName" = "DevTest"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +Get-AzDevCenterAdminProjectAllowedEnvironmentType -InputObject $envType .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -4576,6 +4884,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -4584,35 +4893,41 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminplan +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectallowedenvironmenttype #> -function Get-AzDevCenterAdminPlan { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan])] +function Get-AzDevCenterAdminProjectAllowedEnvironmentType { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('PlanName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter plan. - ${Name}, + # The name of the environment type. + ${EnvironmentTypeName}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. @@ -4621,7 +4936,6 @@ param( [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] - [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] @@ -4710,12 +5024,11 @@ begin { } $mapping = @{ - Get = 'Az.DevCenter.private\Get-AzDevCenterAdminPlan_Get'; - GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminPlan_GetViaIdentity'; - List = 'Az.DevCenter.private\Get-AzDevCenterAdminPlan_List'; - List1 = 'Az.DevCenter.private\Get-AzDevCenterAdminPlan_List1'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectAllowedEnvironmentType_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectAllowedEnvironmentType_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectAllowedEnvironmentType_List'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -4776,21 +5089,32 @@ end { <# .Synopsis -Gets a machine pool +Gets Build details .Description -Gets a machine pool -.Example -Get-AzDevCenterAdminPool -ResourceGroupName testRg -ProjectName DevProject +Gets Build details .Example -Get-AzDevCenterAdminPool -ResourceGroupName testRg -Name DevPool -ProjectName DevProject +Get-AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail ` + -BuildName "0a28fc61-6f87-4611-8fe2-32df44ab93b7" ` + -CatalogName "CentralCatalog" ` + -ImageDefinitionName "DefaultDevImage" ` + -ProjectName "DevProject" ` + -ResourceGroupName "rg1" ` + -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" .Example -$pool = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "PoolName" = "DevPool"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -Get-AzDevCenterAdminPool -InputObject $pool +$inputObject = @{ + ResourceGroupName = "rg1" + ProjectName = "DevProject" + CatalogName = "CentralCatalog" + ImageDefinitionName = "DefaultDevImage" + BuildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +Get-AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail -InputObject $inputObject .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails .Notes COMPLEX PARAMETER PROPERTIES @@ -4798,6 +5122,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -4806,42 +5131,51 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminpool +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectcatalogimagedefinitionbuilddetail #> -function Get-AzDevCenterAdminPool { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Get-AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('PoolName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # Name of the pool. - ${Name}, + # The ID of the Image Definition Build. + ${BuildName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the project. ${ProjectName}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. @@ -4849,7 +5183,6 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] @@ -4938,11 +5271,10 @@ begin { } $mapping = @{ - Get = 'Az.DevCenter.private\Get-AzDevCenterAdminPool_Get'; - GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminPool_GetViaIdentity'; - List = 'Az.DevCenter.private\Get-AzDevCenterAdminPool_List'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_GetViaIdentity'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -5003,21 +5335,28 @@ end { <# .Synopsis -Gets an allowed environment type. +Gets a build for a specified image definition. .Description -Gets an allowed environment type. +Gets a build for a specified image definition. .Example -Get-AzDevCenterAdminProjectAllowedEnvironmentType -ProjectName DevProject -ResourceGroupName testRg +Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild -ImageDefinitionName "DefaultDevImage" -CatalogName "CentralCatalog" -ProjectName "DevProject" -ResourceGroupName "rg1" -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" .Example -Get-AzDevCenterAdminProjectAllowedEnvironmentType -ProjectName DevProject -ResourceGroupName testRg -EnvironmentTypeName DevTest +Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild -BuildName "0a28fc61-6f87-4611-8fe2-32df44ab93b7" -CatalogName "CentralCatalog" -ImageDefinitionName "DefaultDevImage" -ProjectName "DevProject" -ResourceGroupName "rg1" -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" .Example -$envType = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "EnvironmentTypeName" = "DevTest"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -Get-AzDevCenterAdminProjectAllowedEnvironmentType -InputObject $envType +$inputObject = @{ + ResourceGroupName = "rg1" + ProjectName = "DevProject" + CatalogName = "CentralCatalog" + ImageDefinitionName = "DefaultDevImage" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" + BuildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7" +} +Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild -InputObject $inputObject .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild .Notes COMPLEX PARAMETER PROPERTIES @@ -5025,6 +5364,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -5033,31 +5373,45 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectallowedenvironmenttype +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectcatalogimagedefinitionbuild #> -function Get-AzDevCenterAdminProjectAllowedEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType])] +function Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the environment type. - ${EnvironmentTypeName}, + # The ID of the Image Definition Build. + ${BuildName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] @@ -5164,9 +5518,9 @@ begin { } $mapping = @{ - Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectAllowedEnvironmentType_Get'; - GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectAllowedEnvironmentType_GetViaIdentity'; - List = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectAllowedEnvironmentType_List'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinitionBuild_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -5229,19 +5583,30 @@ end { <# .Synopsis -Gets project catalog synchronization error details +Gets Image Definition error details .Description -Gets project catalog synchronization error details +Gets Image Definition error details .Example -Get-AzDevCenterAdminProjectCatalogSyncErrorDetail -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg +Get-AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail ` + -CatalogName "CentralCatalog" ` + -ImageDefinitionName "DefaultDevImage" ` + -ProjectName "DevProject" ` + -ResourceGroupName "rg1" ` + -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" .Example -$catalog = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -$catalogErrorDetail = Get-AzDevCenterAdminProjectCatalogSyncErrorDetail -InputObject $catalog +$inputObject = @{ + ResourceGroupName = "rg1" + ProjectName = "DevProject" + CatalogName = "CentralCatalog" + ImageDefinitionName = "DefaultDevImage" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +Get-AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail -InputObject $inputObject .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails .Notes COMPLEX PARAMETER PROPERTIES @@ -5249,6 +5614,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -5257,24 +5623,24 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectcatalogsyncerrordetail +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectcatalogimagedefinitionerrordetail #> -function Get-AzDevCenterAdminProjectCatalogSyncErrorDetail { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails])] +function Get-AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -5283,6 +5649,12 @@ param( # The name of the Catalog. ${CatalogName}, + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] @@ -5385,8 +5757,8 @@ begin { } $mapping = @{ - Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogSyncErrorDetail_Get'; - GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogSyncErrorDetail_GetViaIdentity'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_GetViaIdentity'; } if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -5449,21 +5821,27 @@ end { <# .Synopsis -Gets an associated project catalog. +Gets an Image Definition from the catalog .Description -Gets an associated project catalog. +Gets an Image Definition from the catalog .Example -Get-AzDevCenterAdminProjectCatalog -ProjectName DevProject -ResourceGroupName testRg +Get-AzDevCenterAdminProjectCatalogImageDefinition -CatalogName "CentralCatalog" -ProjectName "DevProject" -ResourceGroupName "rg1" -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" .Example -Get-AzDevCenterAdminProjectCatalog -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg +Get-AzDevCenterAdminProjectCatalogImageDefinition -CatalogName "CentralCatalog" -ImageDefinitionName "DefaultDevImage" -ProjectName "DevProject" -ResourceGroupName "rg1" -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" .Example -$catalog = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -$catalog = Get-AzDevCenterAdminProjectCatalog -InputObject $catalog +$inputObject = @{ + ResourceGroupName = "rg1" + ProjectName = "DevProject" + CatalogName = "CentralCatalog" + ImageDefinitionName = "DefaultDevImage" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +Get-AzDevCenterAdminProjectCatalogImageDefinition -InputObject $inputObject .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -5471,6 +5849,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -5479,32 +5858,39 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectcatalog +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectcatalogimagedefinition #> -function Get-AzDevCenterAdminProjectCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] +function Get-AzDevCenterAdminProjectCatalogImageDefinition { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the Catalog. ${CatalogName}, + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] @@ -5610,9 +5996,9 @@ begin { } $mapping = @{ - Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalog_Get'; - GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalog_GetViaIdentity'; - List = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalog_List'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinition_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinition_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogImageDefinition_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -5675,19 +6061,19 @@ end { <# .Synopsis -Gets Environment Definition error details +Gets project catalog synchronization error details .Description -Gets Environment Definition error details +Gets project catalog synchronization error details .Example -Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg -EnvironmentDefinitionName envDefName +Get-AzDevCenterAdminProjectCatalogSyncErrorDetail -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg .Example -$environmentDefinition = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; "EnvironmentDefinitionName"="envDefName"} -$environmentDefinitionErrorDetail = Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail -InputObject $environmentDefinition +$catalog = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +$catalogErrorDetail = Get-AzDevCenterAdminProjectCatalogSyncErrorDetail -InputObject $catalog .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails .Notes COMPLEX PARAMETER PROPERTIES @@ -5695,6 +6081,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -5703,24 +6090,24 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectenvironmentdefinitionerrordetail +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectcatalogsyncerrordetail #> -function Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails])] +function Get-AzDevCenterAdminProjectCatalogSyncErrorDetail { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -5729,12 +6116,6 @@ param( # The name of the Catalog. ${CatalogName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the Environment Definition. - ${EnvironmentDefinitionName}, - [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] @@ -5837,8 +6218,8 @@ begin { } $mapping = @{ - Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_Get'; - GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_GetViaIdentity'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogSyncErrorDetail_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalogSyncErrorDetail_GetViaIdentity'; } if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -5901,21 +6282,21 @@ end { <# .Synopsis -Gets an environment definition from the catalog. +Gets an associated project catalog. .Description -Gets an environment definition from the catalog. +Gets an associated project catalog. .Example -Get-AzDevCenterAdminProjectEnvironmentDefinition -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg +Get-AzDevCenterAdminProjectCatalog -ProjectName DevProject -ResourceGroupName testRg .Example -Get-AzDevCenterAdminProjectEnvironmentDefinition -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg -EnvironmentDefinitionName envDefName +Get-AzDevCenterAdminProjectCatalog -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg .Example -$environmentDefinition = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; "EnvironmentDefinitionName"="envDefName"} -$environmentDefinition = Get-AzDevCenterAdminProjectEnvironmentDefinition -InputObject $environmentDefinition +$catalog = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +$catalog = Get-AzDevCenterAdminProjectCatalog -InputObject $catalog .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -5923,6 +6304,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -5931,39 +6313,32 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectenvironmentdefinition +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectcatalog #> -function Get-AzDevCenterAdminProjectEnvironmentDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition])] +function Get-AzDevCenterAdminProjectCatalog { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the Catalog. ${CatalogName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the Environment Definition. - ${EnvironmentDefinitionName}, - [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] @@ -6069,9 +6444,9 @@ begin { } $mapping = @{ - Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentDefinition_Get'; - GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentDefinition_GetViaIdentity'; - List = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentDefinition_List'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalog_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalog_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectCatalog_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -6134,21 +6509,19 @@ end { <# .Synopsis -Gets a project environment type. +Gets Environment Definition error details .Description -Gets a project environment type. -.Example -Get-AzDevCenterAdminProjectEnvironmentType -ProjectName DevProject -ResourceGroupName testRg +Gets Environment Definition error details .Example -Get-AzDevCenterAdminProjectEnvironmentType -ProjectName DevProject -ResourceGroupName testRg -EnvironmentTypeName DevTest +Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg -EnvironmentDefinitionName envDefName .Example -$envType = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "EnvironmentTypeName" = "DevTest"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -Get-AzDevCenterAdminProjectEnvironmentType -InputObject $envType +$environmentDefinition = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; "EnvironmentDefinitionName"="envDefName"} +$environmentDefinitionErrorDetail = Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail -InputObject $environmentDefinition .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails .Notes COMPLEX PARAMETER PROPERTIES @@ -6156,6 +6529,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -6164,41 +6538,45 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectenvironmenttype +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectenvironmentdefinitionerrordetail #> -function Get-AzDevCenterAdminProjectEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the environment type. - ${EnvironmentTypeName}, + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Environment Definition. + ${EnvironmentDefinitionName}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the project. ${ProjectName}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. @@ -6206,7 +6584,6 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] @@ -6295,11 +6672,10 @@ begin { } $mapping = @{ - Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentType_Get'; - GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentType_GetViaIdentity'; - List = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentType_List'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_GetViaIdentity'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -6360,19 +6736,21 @@ end { <# .Synopsis -Gets applicable inherited settings for this project. +Gets an environment definition from the catalog. .Description -Gets applicable inherited settings for this project. +Gets an environment definition from the catalog. .Example -Get-AzDevCenterAdminProjectInheritedSetting -ProjectName DevProject -ResourceGroupName testRg +Get-AzDevCenterAdminProjectEnvironmentDefinition -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg .Example -$project = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -$inheritedSettings = Get-AzDevCenterAdminProjectInheritedSetting -InputObject $project +Get-AzDevCenterAdminProjectEnvironmentDefinition -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg -EnvironmentDefinitionName envDefName +.Example +$environmentDefinition = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"; "EnvironmentDefinitionName"="envDefName"} +$environmentDefinition = Get-AzDevCenterAdminProjectEnvironmentDefinition -InputObject $environmentDefinition .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -6380,6 +6758,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -6388,33 +6767,48 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectinheritedsetting +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectenvironmentdefinition #> -function Get-AzDevCenterAdminProjectInheritedSetting { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzDevCenterAdminProjectEnvironmentDefinition { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Environment Definition. + ${EnvironmentDefinitionName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the project. ${ProjectName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. @@ -6422,6 +6816,7 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] @@ -6510,10 +6905,11 @@ begin { } $mapping = @{ - Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectInheritedSetting_Get'; - GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectInheritedSetting_GetViaIdentity'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentDefinition_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentDefinition_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentDefinition_List'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -6574,23 +6970,21 @@ end { <# .Synopsis -Gets a specific project. +Gets a project environment type. .Description -Gets a specific project. -.Example - +Gets a project environment type. .Example -Get-AzDevCenterAdminProject -ResourceGroupName testRg +Get-AzDevCenterAdminProjectEnvironmentType -ProjectName DevProject -ResourceGroupName testRg .Example -Get-AzDevCenterAdminProject -ResourceGroupName testRg -Name DevProject +Get-AzDevCenterAdminProjectEnvironmentType -ProjectName DevProject -ResourceGroupName testRg -EnvironmentTypeName DevTest .Example -$project = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -Get-AzDevCenterAdminProject -InputObject $project +$envType = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "EnvironmentTypeName" = "DevTest"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +Get-AzDevCenterAdminProjectEnvironmentType -InputObject $envType .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -6598,6 +6992,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -6606,35 +7001,41 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminproject +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectenvironmenttype #> -function Get-AzDevCenterAdminProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject])] +function Get-AzDevCenterAdminProjectEnvironmentType { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('ProjectName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the environment type. + ${EnvironmentTypeName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the project. - ${Name}, + ${ProjectName}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. @@ -6643,7 +7044,6 @@ param( [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='List')] - [Parameter(ParameterSetName='List1')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] @@ -6732,12 +7132,11 @@ begin { } $mapping = @{ - Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProject_Get'; - GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProject_GetViaIdentity'; - List = 'Az.DevCenter.private\Get-AzDevCenterAdminProject_List'; - List1 = 'Az.DevCenter.private\Get-AzDevCenterAdminProject_List1'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentType_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentType_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectEnvironmentType_List'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -6798,28 +7197,82 @@ end { <# .Synopsis -Lists the Microsoft.DevCenter SKUs available in a subscription +Gets applicable inherited settings for this project. .Description -Lists the Microsoft.DevCenter SKUs available in a subscription +Gets applicable inherited settings for this project. .Example -Get-AzDevCenterAdminSku +Get-AzDevCenterAdminProjectInheritedSetting -ProjectName DevProject -ResourceGroupName testRg +.Example +$project = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +$inheritedSettings = Get-AzDevCenterAdminProjectInheritedSetting -InputObject $project +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminsku +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectinheritedsetting #> -function Get-AzDevCenterAdminSku { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Get-AzDevCenterAdminProjectInheritedSetting { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter()] + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -6895,9 +7348,10 @@ begin { } $mapping = @{ - List = 'Az.DevCenter.private\Get-AzDevCenterAdminSku_List'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectInheritedSetting_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectInheritedSetting_GetViaIdentity'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -6958,34 +7412,99 @@ end { <# .Synopsis -Lists the current usages and limits in this location for the provided subscription. +Gets a specific project policy. .Description -Lists the current usages and limits in this location for the provided subscription. +Gets a specific project policy. .Example -Get-AzDevCenterAdminUsage -Location "westus3" +Get-AzDevCenterAdminProjectPolicy -DevCenterName Contoso -ResourceGroupName testRg -SubscriptionId 0ac520ee-14c0-480f-b6c9-0a90c58ffff +.Example +Get-AzDevCenterAdminProjectPolicy -DevCenterName Contoso -Name myPolicy -ResourceGroupName testRg -SubscriptionId 0ac520ee-14c0-480f-b6c9-0a90c58ffff +.Example +$inputObject = @{ + ResourceGroupName = "testRg" + DevCenterName = "Contoso" + ProjectPolicyName = "myPolicy" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +Get-AzDevCenterAdminProjectPolicy -InputObject $inputObject +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminusage +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminprojectpolicy #> -function Get-AzDevCenterAdminUsage { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage])] +function Get-AzDevCenterAdminProjectPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The Azure region - ${Location}, + # The name of the devcenter. + ${DevCenterName}, - [Parameter()] + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ProjectPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project policy. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] # The ID of the target subscription. ${SubscriptionId}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -7061,9 +7580,11 @@ begin { } $mapping = @{ - List = 'Az.DevCenter.private\Get-AzDevCenterAdminUsage_List'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectPolicy_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectPolicy_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminProjectPolicy_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -7124,16 +7645,23 @@ end { <# .Synopsis -Check the availability of name for resource +Gets a specific project. .Description -Check the availability of name for resource +Gets a specific project. .Example -Invoke-AzDevCenterAdminExecuteCheckNameAvailability -Name "Contoso" -Type "Microsoft.Devcenter/devcenters" + +.Example +Get-AzDevCenterAdminProject -ResourceGroupName testRg +.Example +Get-AzDevCenterAdminProject -ResourceGroupName testRg -Name DevProject +.Example +$project = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +Get-AzDevCenterAdminProject -InputObject $project .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityResponse +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject .Notes COMPLEX PARAMETER PROPERTIES @@ -7141,6 +7669,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -7149,52 +7678,57 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteradminexecutechecknameavailability +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminproject #> -function Invoke-AzDevCenterAdminExecuteCheckNameAvailability { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityResponse])] -[CmdletBinding(DefaultParameterSetName='ExecuteExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzDevCenterAdminProject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='ExecuteExpanded')] + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ProjectName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] + # The name of the project. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='ExecuteViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The name of the resource for which availability needs to be checked. - ${Name}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The resource type. - ${Type}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -7270,10 +7804,12 @@ begin { } $mapping = @{ - ExecuteExpanded = 'Az.DevCenter.private\Invoke-AzDevCenterAdminExecuteCheckNameAvailability_ExecuteExpanded'; - ExecuteViaIdentityExpanded = 'Az.DevCenter.private\Invoke-AzDevCenterAdminExecuteCheckNameAvailability_ExecuteViaIdentityExpanded'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminProject_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminProject_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminProject_List'; + List1 = 'Az.DevCenter.private\Get-AzDevCenterAdminProject_List1'; } - if (('ExecuteExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -7334,84 +7870,207 @@ end { <# .Synopsis -Check the availability of name for resource +Lists SKUs available to the project .Description -Check the availability of name for resource -.Example -Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability -Name "CentralCatalog" -Type "Microsoft.DevCenter/projects/catalogs" -Scope "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject" +Lists SKUs available to the project .Example -Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability -Name "CentralCatalog" -Type "Microsoft.DevCenter/devcenters/catalogs" -Scope "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso" +Get-AzDevCenterAdminSku -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityResponse -.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 - [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. - [CatalogName ]: The name of the Catalog. - [DevBoxDefinitionName ]: The name of the Dev Box definition. - [DevCenterName ]: The name of the devcenter. - [EncryptionSetName ]: The name of the devcenter encryption set. - [EnvironmentDefinitionName ]: The name of the Environment Definition. - [EnvironmentTypeName ]: The name of the environment type. - [GalleryName ]: The name of the gallery. - [Id ]: Resource identity path - [ImageName ]: The name of the image. - [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. - [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. - [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. - [PoolName ]: Name of the pool. - [ProjectName ]: The name of the project. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ScheduleName ]: The name of the schedule that uniquely identifies it. - [SubscriptionId ]: The ID of the target subscription. - [TaskName ]: The name of the Task. - [VersionName ]: The version of the image. +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku .Link -https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteradminexecutecheckscopednameavailability +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminsku #> -function Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityResponse])] -[CmdletBinding(DefaultParameterSetName='ExecuteExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzDevCenterAdminSku { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='ExecuteExpanded')] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The ID of the target subscription. - ${SubscriptionId}, + # The name of the project. + ${ProjectName}, - [Parameter(ParameterSetName='ExecuteViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The name of the resource for which availability needs to be checked. - ${Name}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.DevCenter.private\Get-AzDevCenterAdminSku_List'; + List1 = 'Az.DevCenter.private\Get-AzDevCenterAdminSku_List1'; + } + if (('List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Lists the current usages and limits in this location for the provided subscription. +.Description +Lists the current usages and limits in this location for the provided subscription. +.Example +Get-AzDevCenterAdminUsage -Location "westus3" + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminusage +#> +function Get-AzDevCenterAdminUsage { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The resource id to scope the name check. - ${Scope}, + # The Azure region + ${Location}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The resource type. - ${Type}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -7488,10 +8147,9 @@ begin { } $mapping = @{ - ExecuteExpanded = 'Az.DevCenter.private\Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteExpanded'; - ExecuteViaIdentityExpanded = 'Az.DevCenter.private\Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteViaIdentityExpanded'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminUsage_List'; } - if (('ExecuteExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -7552,25 +8210,16 @@ end { <# .Synopsis -Creates or updates a devcenter resource +Check the availability of name for resource .Description -Creates or updates a devcenter resource -.Example -New-AzDevCenterAdminDevCenter -Name Contoso -ResourceGroupName testRg -Location eastus -.Example -$identity = @{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1" = @{} } -New-AzDevCenterAdminDevCenter -Name Contoso -ResourceGroupName testRg -Location eastus -IdentityType "UserAssigned" -IdentityUserAssignedIdentity $identity -.Example -$devCenter = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminDevCenter -InputObject $devCenter -Location eastus +Check the availability of name for resource .Example -$devCenter = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminDevCenter -InputObject $devCenter -Location eastus -IdentityType "SystemAssigned" +Invoke-AzDevCenterAdminExecuteCheckNameAvailability -Name "Contoso" -Type "Microsoft.Devcenter/devcenters" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityResponse .Notes COMPLEX PARAMETER PROPERTIES @@ -7578,6 +8227,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -7586,116 +8236,51 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmindevcenter +https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteradminexecutechecknameavailability #> -function New-AzDevCenterAdminDevCenter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Invoke-AzDevCenterAdminExecuteCheckNameAvailability { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityResponse])] +[CmdletBinding(DefaultParameterSetName='ExecuteExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('DevCenterName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the devcenter. - ${Name}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='ExecuteExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ExecuteViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus] - # Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. - ${DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus}, - [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The display name of the devcenter. - ${DisplayName}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType] - # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - ${IdentityType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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. - ${IdentityUserAssignedIdentity}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus] - # Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. - # Defaults to Enabled if not set. - ${NetworkSettingMicrosoftHostedNetworkEnableStatus}, + # The name of the resource for which availability needs to be checked. + ${Name}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Resource Id of an associated Plan - ${PlanId}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus] - # Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. - ${ProjectCatalogSettingCatalogItemSyncEnableStatus}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, + # The resource type. + ${Type}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -7706,12 +8291,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -7732,12 +8311,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Uri] @@ -7784,10 +8357,10 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminDevCenter_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminDevCenter_CreateViaIdentityExpanded'; + ExecuteExpanded = 'Az.DevCenter.private\Invoke-AzDevCenterAdminExecuteCheckNameAvailability_ExecuteExpanded'; + ExecuteViaIdentityExpanded = 'Az.DevCenter.private\Invoke-AzDevCenterAdminExecuteCheckNameAvailability_ExecuteViaIdentityExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('ExecuteExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -7848,21 +8421,18 @@ end { <# .Synopsis -Creates or updates an environment type. +Check the availability of name for resource .Description -Creates or updates an environment type. +Check the availability of name for resource .Example -$tags = @{"dev" ="test"} -New-AzDevCenterAdminEnvironmentType -DevCenterName Contoso -Name DevTest -ResourceGroupName testRg -Tag $tags +Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability -Name "CentralCatalog" -Type "Microsoft.DevCenter/projects/catalogs" -Scope "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/projects/DevProject" .Example -$tags = @{"dev" ="test"} -$envType = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "EnvironmentTypeName" = "DevTest"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminEnvironmentType -InputObject $envType -Tag $tags +Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability -Name "CentralCatalog" -Type "Microsoft.DevCenter/devcenters/catalogs" -Scope "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityResponse .Notes COMPLEX PARAMETER PROPERTIES @@ -7870,6 +8440,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -7878,54 +8449,34 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminenvironmenttype +https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteradminexecutecheckscopednameavailability #> -function New-AzDevCenterAdminEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityResponse])] +[CmdletBinding(DefaultParameterSetName='ExecuteExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the devcenter. - ${DevCenterName}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('EnvironmentTypeName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the environment type. - ${Name}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='ExecuteExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ExecuteViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter @@ -7935,15 +8486,20 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The display name of the environment type. - ${DisplayName}, + # The name of the resource for which availability needs to be checked. + ${Name}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, + [System.String] + # The resource id to scope the name check. + ${Scope}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The resource type. + ${Type}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -8020,10 +8576,10 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminEnvironmentType_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminEnvironmentType_CreateViaIdentityExpanded'; + ExecuteExpanded = 'Az.DevCenter.private\Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteExpanded'; + ExecuteViaIdentityExpanded = 'Az.DevCenter.private\Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteViaIdentityExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('ExecuteExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -8084,21 +8640,25 @@ end { <# .Synopsis -Un-attach a NetworkConnection. +Creates or updates a devcenter resource .Description -Un-attach a NetworkConnection. +Creates or updates a devcenter resource .Example -Remove-AzDevCenterAdminAttachedNetwork -ConnectionName network-uswest3 -DevCenterName Contoso -ResourceGroupName testRg +New-AzDevCenterAdminDevCenter -Name Contoso -ResourceGroupName testRg -Location eastus +.Example +$identity = @{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1" = @{} } +New-AzDevCenterAdminDevCenter -Name Contoso -ResourceGroupName testRg -Location eastus -IdentityType "UserAssigned" -IdentityUserAssignedIdentity $identity +.Example +$devCenter = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminDevCenter -InputObject $devCenter -Location eastus .Example -$id = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/attachednetworks/network-uswest32" - -$attachedNetwork = @{"Id" = $id} -Remove-AzDevCenterAdminAttachedNetwork -InputObject $attachedNetwork +$devCenter = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminDevCenter -InputObject $devCenter -Location eastus -IdentityType "SystemAssigned" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -System.Boolean +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter .Notes COMPLEX PARAMETER PROPERTIES @@ -8106,6 +8666,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -8114,60 +8675,111 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminattachednetwork +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmindevcenter #> -function Remove-AzDevCenterAdminAttachedNetwork { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function New-AzDevCenterAdminDevCenter { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('AttachedNetworkConnectionName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the attached NetworkConnection. - ${ConnectionName}, - - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Alias('DevCenterName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the devcenter. - ${DevCenterName}, + ${Name}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus] + # Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. + ${DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The display name of the devcenter. + ${DisplayName}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType] + # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + ${IdentityType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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. + ${IdentityUserAssignedIdentity}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus] + # Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. + # Defaults to Enabled if not set. + ${NetworkSettingMicrosoftHostedNetworkEnableStatus}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus] + # Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. + ${ProjectCatalogSettingCatalogItemSyncEnableStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -8209,12 +8821,6 @@ param( # Run the command asynchronously ${NoWait}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Uri] @@ -8261,10 +8867,10 @@ begin { } $mapping = @{ - Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminAttachedNetwork_Delete'; - DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminAttachedNetwork_DeleteViaIdentity'; + CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminDevCenter_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminDevCenter_CreateViaIdentityExpanded'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -8325,19 +8931,21 @@ end { <# .Synopsis -Deletes a catalog resource. +Creates or updates an environment type. .Description -Deletes a catalog resource. +Creates or updates an environment type. .Example -Remove-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg +$tags = @{"dev" ="test"} +New-AzDevCenterAdminEnvironmentType -DevCenterName Contoso -Name DevTest -ResourceGroupName testRg -Tag $tags .Example -$catalog = Get-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg -Remove-AzDevCenterAdminCatalog -InputObject $catalog +$tags = @{"dev" ="test"} +$envType = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "EnvironmentTypeName" = "DevTest"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminEnvironmentType -InputObject $envType -Tag $tags .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -System.Boolean +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -8345,6 +8953,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -8353,60 +8962,73 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradmincatalog +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminenvironmenttype #> -function Remove-AzDevCenterAdminCatalog { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function New-AzDevCenterAdminEnvironmentType { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the devcenter. ${DevCenterName}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('CatalogName')] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Alias('EnvironmentTypeName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the Catalog. + # The name of the environment type. ${Name}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The display name of the environment type. + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -8416,12 +9038,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -8442,18 +9058,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Uri] @@ -8500,10 +9104,10 @@ begin { } $mapping = @{ - Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminCatalog_Delete'; - DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminCatalog_DeleteViaIdentity'; + CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminEnvironmentType_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminEnvironmentType_CreateViaIdentityExpanded'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -8564,21 +9168,46 @@ end { <# .Synopsis -Deletes a Dev Box definition +Creates or updates an project policy. .Description -Deletes a Dev Box definition +Creates or updates an project policy. .Example -Remove-AzDevCenterAdminDevBoxDefinition -DevCenterName Contoso -Name WebDevBox -ResourceGroupName testRg +$resourcePolicies = @( + @{ Resource = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/default/images/microsoftvisualstudio_visualstudio2019plustools_vs-2019-ent-general-win10-m365-gen2" }; + @{ Resource = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/default/images/microsoftvisualstudio_visualstudio2019plustools_vs-2019-ent-general-win11-m365-gen2" }; + @{ Resource = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/attachednetworks/network-westus3" }; + @{ Action = "Allow"; ResourceType = "Skus" } +) +$scopes = @( + "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/projects/devProject"; + "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/projects/devProject2" +) +New-AzDevCenterAdminProjectPolicy ` + -DevCenterName "Contoso" ` + -Name "myPolicy" ` + -ResourceGroupName "testRg" ` + -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" ` + -ResourcePolicy $resourcePolicies ` + -Scope $scopes .Example -$id = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/devboxdefinitions/WebDevBox" - -$devBoxDefinitionId = @{"Id" = $id } -Remove-AzDevCenterAdminDevBoxDefinition -InputObject $devBoxDefinitionId +$inputObject = @{ + ResourceGroupName = "testRg" + DevCenterName = "Contoso" + ProjectPolicyName = "myPolicy" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +$resourcePolicies = @( + @{ Resource = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/default/images/microsoftvisualstudio_visualstudio2019plustools_vs-2019-ent-general-win10-m365-gen2" } +) +$scopes = @( + "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/projects/devProject" +) +New-AzDevCenterAdminProjectPolicy -InputObject $inputObject -ResourcePolicy $resourcePolicies -Scope $scopes .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -System.Boolean +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy .Notes COMPLEX PARAMETER PROPERTIES @@ -8586,6 +9215,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -8594,60 +9224,81 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. + +RESOURCEPOLICY : Resource policies that are a part of this project policy. + [Action ]: Policy action to be taken on the resources. This is optional, and defaults to allow + [Filter ]: Optional. When specified, this expression is used to filter the resources. + [Resource ]: Resources that are included and shared as a part of a project policy. + [ResourceType ]: Optional. The resource type being restricted or allowed by a project policy. Used with a given action to restrict or allow access to a resource type. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradmindevboxdefinition +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminprojectpolicy #> -function Remove-AzDevCenterAdminDevBoxDefinition { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function New-AzDevCenterAdminProjectPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the devcenter. ${DevCenterName}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('DevBoxDefinitionName')] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Alias('ProjectPolicyName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the Dev Box definition. + # The name of the project policy. ${Name}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[]] + # Resource policies that are a part of this project policy. + # To construct, see NOTES section for RESOURCEPOLICY properties and create a hash table. + ${ResourcePolicy}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String[]] + # Resources that have access to the shared resources that are a part of this project policy. + ${Scope}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -8689,12 +9340,6 @@ param( # Run the command asynchronously ${NoWait}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Uri] @@ -8741,10 +9386,10 @@ begin { } $mapping = @{ - Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminDevBoxDefinition_Delete'; - DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminDevBoxDefinition_DeleteViaIdentity'; + CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminProjectPolicy_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminProjectPolicy_CreateViaIdentityExpanded'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -8805,15 +9450,16 @@ end { <# .Synopsis -Deletes a devcenter +Un-attach a NetworkConnection. .Description -Deletes a devcenter +Un-attach a NetworkConnection. .Example -Remove-AzDevCenterAdminDevCenter -Name Contoso -ResourceGroupName testRg +Remove-AzDevCenterAdminAttachedNetwork -ConnectionName network-uswest3 -DevCenterName Contoso -ResourceGroupName testRg .Example -$devCenter = Get-AzDevCenterAdminDevCenter -ResourceGroupName testRg -Name Contoso +$id = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/attachednetworks/network-uswest32" -Remove-AzDevCenterAdminDevCenter -InputObject $devCenter +$attachedNetwork = @{"Id" = $id} +Remove-AzDevCenterAdminAttachedNetwork -InputObject $attachedNetwork .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity @@ -8826,6 +9472,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -8834,32 +9481,38 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradmindevcenter +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminattachednetwork #> -function Remove-AzDevCenterAdminDevCenter { +function Remove-AzDevCenterAdminAttachedNetwork { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('DevCenterName')] + [Alias('AttachedNetworkConnectionName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the attached NetworkConnection. + ${ConnectionName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the devcenter. - ${Name}, + ${DevCenterName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] @@ -8975,8 +9628,8 @@ begin { } $mapping = @{ - Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminDevCenter_Delete'; - DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminDevCenter_DeleteViaIdentity'; + Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminAttachedNetwork_Delete'; + DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminAttachedNetwork_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -9039,14 +9692,14 @@ end { <# .Synopsis -Deletes an environment type. +Deletes a catalog resource. .Description -Deletes an environment type. +Deletes a catalog resource. .Example -Remove-AzDevCenterAdminEnvironmentType -ResourceGroupName testRg -DevCenterName Contoso -Name DevTest +Remove-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg .Example -$envType = Get-AzDevCenterAdminEnvironmentType -ResourceGroupName testRg -DevCenterName Contoso -Name DevTest -Remove-AzDevCenterAdminEnvironmentType -InputObject $envType +$catalog = Get-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg +Remove-AzDevCenterAdminCatalog -InputObject $catalog .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity @@ -9059,6 +9712,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -9067,23 +9721,23 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminenvironmenttype +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradmincatalog #> -function Remove-AzDevCenterAdminEnvironmentType { +function Remove-AzDevCenterAdminCatalog { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( @@ -9094,10 +9748,10 @@ param( ${DevCenterName}, [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('EnvironmentTypeName')] + [Alias('CatalogName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the environment type. + # The name of the Catalog. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] @@ -9130,6 +9784,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -9150,6 +9810,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -9202,8 +9868,8 @@ begin { } $mapping = @{ - Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminEnvironmentType_Delete'; - DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminEnvironmentType_DeleteViaIdentity'; + Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminCatalog_Delete'; + DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminCatalog_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -9266,14 +9932,16 @@ end { <# .Synopsis -Deletes a gallery resource. +Deletes a Dev Box definition .Description -Deletes a gallery resource. +Deletes a Dev Box definition .Example -Remove-AzDevCenterAdminGallery -ResourceGroupName testRg -DevCenterName Contoso -Name StandardGallery +Remove-AzDevCenterAdminDevBoxDefinition -DevCenterName Contoso -Name WebDevBox -ResourceGroupName testRg .Example -$gallery = Get-AzDevCenterAdminGallery -ResourceGroupName testRg -DevCenterName Contoso -Name StandardGallery -Remove-AzDevCenterAdminGallery -InputObject $gallery +$id = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/devboxdefinitions/WebDevBox" + +$devBoxDefinitionId = @{"Id" = $id } +Remove-AzDevCenterAdminDevBoxDefinition -InputObject $devBoxDefinitionId .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity @@ -9286,6 +9954,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -9294,23 +9963,23 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradmingallery +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradmindevboxdefinition #> -function Remove-AzDevCenterAdminGallery { +function Remove-AzDevCenterAdminDevBoxDefinition { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( @@ -9321,10 +9990,10 @@ param( ${DevCenterName}, [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('GalleryName')] + [Alias('DevBoxDefinitionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the gallery. + # The name of the Dev Box definition. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] @@ -9441,8 +10110,8 @@ begin { } $mapping = @{ - Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminGallery_Delete'; - DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminGallery_DeleteViaIdentity'; + Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminDevBoxDefinition_Delete'; + DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminDevBoxDefinition_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -9505,14 +10174,15 @@ end { <# .Synopsis -Deletes a Network Connections resource +Deletes a devcenter .Description -Deletes a Network Connections resource +Deletes a devcenter .Example -Remove-AzDevCenterAdminNetworkConnection -Name networkEastUs -ResourceGroupName testRg +Remove-AzDevCenterAdminDevCenter -Name Contoso -ResourceGroupName testRg .Example -$networkConnection = Get-AzDevCenterAdminNetworkConnection -ResourceGroupName testRg -Name networkEastUs -Remove-AzDevCenterAdminNetworkConnection -InputObject $networkConnection +$devCenter = Get-AzDevCenterAdminDevCenter -ResourceGroupName testRg -Name Contoso + +Remove-AzDevCenterAdminDevCenter -InputObject $devCenter .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity @@ -9525,6 +10195,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -9533,31 +10204,31 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminnetworkconnection +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradmindevcenter #> -function Remove-AzDevCenterAdminNetworkConnection { +function Remove-AzDevCenterAdminDevCenter { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('NetworkConnectionName')] + [Alias('DevCenterName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # Name of the Network Connection that can be applied to a Pool. + # The name of the devcenter. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] @@ -9674,8 +10345,8 @@ begin { } $mapping = @{ - Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminNetworkConnection_Delete'; - DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminNetworkConnection_DeleteViaIdentity'; + Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminDevCenter_Delete'; + DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminDevCenter_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -9738,14 +10409,14 @@ end { <# .Synopsis -Deletes a devcenter plan member +Deletes an environment type. .Description -Deletes a devcenter plan member +Deletes an environment type. .Example -Remove-AzDevCenterAdminPlanMember -ResourceGroupName testRg -PlanName ContosoPlan -MemberName d702f662-b3f2-4796-9e8c-13c22378ced3 +Remove-AzDevCenterAdminEnvironmentType -ResourceGroupName testRg -DevCenterName Contoso -Name DevTest .Example -$planMember = Get-AzDevCenterAdminPlanMember -ResourceGroupName testRg -PlanName ContosoPlan -MemberName d702f662-b3f2-4796-9e8c-13c22378ced3 -Remove-AzDevCenterAdminPlanMember -InputObject $planMember +$envType = Get-AzDevCenterAdminEnvironmentType -ResourceGroupName testRg -DevCenterName Contoso -Name DevTest +Remove-AzDevCenterAdminEnvironmentType -InputObject $envType .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity @@ -9758,6 +10429,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -9766,37 +10438,38 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminplanmember +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminenvironmenttype #> -function Remove-AzDevCenterAdminPlanMember { +function Remove-AzDevCenterAdminEnvironmentType { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of a devcenter plan member. - ${MemberName}, + # The name of the devcenter. + ${DevCenterName}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('EnvironmentTypeName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter plan. - ${PlanName}, + # The name of the environment type. + ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] @@ -9828,12 +10501,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -9854,12 +10521,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -9912,8 +10573,8 @@ begin { } $mapping = @{ - Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminPlanMember_Delete'; - DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminPlanMember_DeleteViaIdentity'; + Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminEnvironmentType_Delete'; + DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminEnvironmentType_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -9976,15 +10637,14 @@ end { <# .Synopsis -Deletes a devcenter plan +Deletes a gallery resource. .Description -Deletes a devcenter plan +Deletes a gallery resource. .Example -Remove-AzDevCenterAdminPlan -Name ContosoPlan -ResourceGroupName testRg +Remove-AzDevCenterAdminGallery -ResourceGroupName testRg -DevCenterName Contoso -Name StandardGallery .Example -$plan = Get-AzDevCenterAdminPlan -ResourceGroupName testRg -Name ContosoPlan - -Remove-AzDevCenterAdminPlan -InputObject $plan +$gallery = Get-AzDevCenterAdminGallery -ResourceGroupName testRg -DevCenterName Contoso -Name StandardGallery +Remove-AzDevCenterAdminGallery -InputObject $gallery .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity @@ -9997,6 +10657,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -10005,31 +10666,37 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminplan +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradmingallery #> -function Remove-AzDevCenterAdminPlan { +function Remove-AzDevCenterAdminGallery { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('PlanName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter plan. + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('GalleryName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the gallery. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] @@ -10146,8 +10813,8 @@ begin { } $mapping = @{ - Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminPlan_Delete'; - DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminPlan_DeleteViaIdentity'; + Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminGallery_Delete'; + DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminGallery_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -10210,14 +10877,14 @@ end { <# .Synopsis -Deletes a machine pool +Deletes a Network Connections resource .Description -Deletes a machine pool +Deletes a Network Connections resource .Example -Remove-AzDevCenterAdminPool -ResourceGroupName testRg -Name DevPool -ProjectName DevProject +Remove-AzDevCenterAdminNetworkConnection -Name networkEastUs -ResourceGroupName testRg .Example -$pool = Get-AzDevCenterAdminPool -ResourceGroupName testRg -Name DevPool -ProjectName DevProject -Remove-AzDevCenterAdminPool -InputObject $pool +$networkConnection = Get-AzDevCenterAdminNetworkConnection -ResourceGroupName testRg -Name networkEastUs +Remove-AzDevCenterAdminNetworkConnection -InputObject $networkConnection .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity @@ -10230,6 +10897,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -10238,39 +10906,33 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminpool +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminnetworkconnection #> -function Remove-AzDevCenterAdminPool { +function Remove-AzDevCenterAdminNetworkConnection { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('PoolName')] + [Alias('NetworkConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # Name of the pool. + # Name of the Network Connection that can be applied to a Pool. ${Name}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the project. - ${ProjectName}, - [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] @@ -10385,8 +11047,8 @@ begin { } $mapping = @{ - Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminPool_Delete'; - DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminPool_DeleteViaIdentity'; + Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminNetworkConnection_Delete'; + DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminNetworkConnection_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -10449,14 +11111,14 @@ end { <# .Synopsis -Deletes a project catalog resource. +Deletes a machine pool .Description -Deletes a project catalog resource. +Deletes a machine pool .Example -Remove-AzDevCenterAdminProjectCatalog -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg +Remove-AzDevCenterAdminPool -ResourceGroupName testRg -Name DevPool -ProjectName DevProject .Example -$catalog = Get-AzDevCenterAdminProjectCatalog -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg -Remove-AzDevCenterAdminProjectCatalog -InputObject $catalog +$pool = Get-AzDevCenterAdminPool -ResourceGroupName testRg -Name DevPool -ProjectName DevProject +Remove-AzDevCenterAdminPool -InputObject $pool .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity @@ -10469,6 +11131,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -10477,31 +11140,32 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminprojectcatalog +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminpool #> -function Remove-AzDevCenterAdminProjectCatalog { +function Remove-AzDevCenterAdminPool { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('PoolName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the Catalog. - ${CatalogName}, + # Name of the pool. + ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] @@ -10623,8 +11287,8 @@ begin { } $mapping = @{ - Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminProjectCatalog_Delete'; - DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminProjectCatalog_DeleteViaIdentity'; + Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminPool_Delete'; + DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminPool_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -10687,14 +11351,14 @@ end { <# .Synopsis -Deletes a project environment type. +Deletes a project catalog resource. .Description -Deletes a project environment type. +Deletes a project catalog resource. .Example -Remove-AzDevCenterAdminProjectEnvironmentType -ProjectName DevProject -ResourceGroupName testRg -EnvironmentTypeName DevTest +Remove-AzDevCenterAdminProjectCatalog -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg .Example -$projEnvType = Get-AzDevCenterAdminProjectEnvironmentType -ProjectName DevProject -ResourceGroupName testRg -EnvironmentTypeName DevTest -Remove-AzDevCenterAdminProjectEnvironmentType -InputObject $projEnvType +$catalog = Get-AzDevCenterAdminProjectCatalog -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg +Remove-AzDevCenterAdminProjectCatalog -InputObject $catalog .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity @@ -10707,6 +11371,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -10715,31 +11380,31 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminprojectenvironmenttype +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminprojectcatalog #> -function Remove-AzDevCenterAdminProjectEnvironmentType { +function Remove-AzDevCenterAdminProjectCatalog { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the environment type. - ${EnvironmentTypeName}, + # The name of the Catalog. + ${CatalogName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] @@ -10777,6 +11442,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -10797,6 +11468,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -10849,8 +11526,8 @@ begin { } $mapping = @{ - Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminProjectEnvironmentType_Delete'; - DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminProjectEnvironmentType_DeleteViaIdentity'; + Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminProjectCatalog_Delete'; + DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminProjectCatalog_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -10913,14 +11590,14 @@ end { <# .Synopsis -Deletes a project resource. +Deletes a project environment type. .Description -Deletes a project resource. +Deletes a project environment type. .Example -Remove-AzDevCenterAdminProject -ResourceGroupName testRg -Name DevProject +Remove-AzDevCenterAdminProjectEnvironmentType -ProjectName DevProject -ResourceGroupName testRg -EnvironmentTypeName DevTest .Example -$project = Get-AzDevCenterAdminProject -ResourceGroupName testRg -Name DevProject -Remove-AzDevCenterAdminProject -InputObject $project +$projEnvType = Get-AzDevCenterAdminProjectEnvironmentType -ProjectName DevProject -ResourceGroupName testRg -EnvironmentTypeName DevTest +Remove-AzDevCenterAdminProjectEnvironmentType -InputObject $projEnvType .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity @@ -10933,6 +11610,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -10941,32 +11619,37 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminproject +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminprojectenvironmenttype #> -function Remove-AzDevCenterAdminProject { +function Remove-AzDevCenterAdminProjectEnvironmentType { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('ProjectName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the environment type. + ${EnvironmentTypeName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the project. - ${Name}, + ${ProjectName}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] @@ -10998,12 +11681,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -11024,12 +11701,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -11082,8 +11753,8 @@ begin { } $mapping = @{ - Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminProject_Delete'; - DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminProject_DeleteViaIdentity'; + Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminProjectEnvironmentType_Delete'; + DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminProjectEnvironmentType_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -11146,16 +11817,14 @@ end { <# .Synopsis -Triggers a new health check run. -The execution and health check result can be tracked via the network Connection health check details +Deletes an project policy. .Description -Triggers a new health check run. -The execution and health check result can be tracked via the network Connection health check details +Deletes an project policy. .Example -Start-AzDevCenterAdminNetworkConnectionHealthCheck -NetworkConnectionName eastusNetwork -ResourceGroupName testRg +Remove-AzDevCenterAdminProjectPolicy -DevCenterName Contoso -Name MyPolicy -ResourceGroupName testRg .Example -$networkConnection = @{"ResourceGroupName" = "testRg"; "NetworkConnectionName" = "eastusNetwork"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -Start-AzDevCenterAdminNetworkConnectionHealthCheck -InputObject $networkConnection +$policy = Get-AzDevCenterAdminProjectPolicy -DevCenterName Contoso -Name MyPolicy -ResourceGroupName testRg +Remove-AzDevCenterAdminProjectPolicy -InputObject $policy .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity @@ -11168,6 +11837,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -11176,47 +11846,54 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/start-azdevcenteradminnetworkconnectionhealthcheck +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminprojectpolicy #> -function Start-AzDevCenterAdminNetworkConnectionHealthCheck { +function Remove-AzDevCenterAdminProjectPolicy { [OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Run', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Run', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # Name of the Network Connection that can be applied to a Pool. - ${NetworkConnectionName}, + # The name of the devcenter. + ${DevCenterName}, - [Parameter(ParameterSetName='Run', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ProjectPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project policy. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Run')] + [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='RunViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter @@ -11316,10 +11993,10 @@ begin { } $mapping = @{ - Run = 'Az.DevCenter.private\Start-AzDevCenterAdminNetworkConnectionHealthCheck_Run'; - RunViaIdentity = 'Az.DevCenter.private\Start-AzDevCenterAdminNetworkConnectionHealthCheck_RunViaIdentity'; + Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminProjectPolicy_Delete'; + DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminProjectPolicy_DeleteViaIdentity'; } - if (('Run') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -11380,14 +12057,14 @@ end { <# .Synopsis -Triggers a refresh of the pool status. +Deletes a project resource. .Description -Triggers a refresh of the pool status. +Deletes a project resource. .Example -Start-AzDevCenterAdminPoolHealthCheck -ResourceGroupName testRg -PoolName DevPool -ProjectName DevProject +Remove-AzDevCenterAdminProject -ResourceGroupName testRg -Name DevProject .Example -$pool = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "PoolName" = "DevPool"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -Start-AzDevCenterAdminPoolHealthCheck -InputObject $pool +$project = Get-AzDevCenterAdminProject -ResourceGroupName testRg -Name DevProject +Remove-AzDevCenterAdminProject -InputObject $project .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity @@ -11400,6 +12077,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -11408,53 +12086,48 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/start-azdevcenteradminpoolhealthcheck +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminproject #> -function Start-AzDevCenterAdminPoolHealthCheck { +function Remove-AzDevCenterAdminProject { [OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Run', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Run', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # Name of the pool. - ${PoolName}, - - [Parameter(ParameterSetName='Run', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ProjectName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the project. - ${ProjectName}, + ${Name}, - [Parameter(ParameterSetName='Run', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Run')] + [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='RunViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter @@ -11554,10 +12227,10 @@ begin { } $mapping = @{ - Run = 'Az.DevCenter.private\Start-AzDevCenterAdminPoolHealthCheck_Run'; - RunViaIdentity = 'Az.DevCenter.private\Start-AzDevCenterAdminPoolHealthCheck_RunViaIdentity'; + Delete = 'Az.DevCenter.private\Remove-AzDevCenterAdminProject_Delete'; + DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminProject_DeleteViaIdentity'; } - if (('Run') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -11618,14 +12291,16 @@ end { <# .Synopsis -Syncs templates for a template source. +Triggers a new health check run. +The execution and health check result can be tracked via the network Connection health check details .Description -Syncs templates for a template source. +Triggers a new health check run. +The execution and health check result can be tracked via the network Connection health check details .Example -Sync-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg +Start-AzDevCenterAdminNetworkConnectionHealthCheck -NetworkConnectionName eastusNetwork -ResourceGroupName testRg .Example -$catalog = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -Sync-AzDevCenterAdminCatalog -InputObject $catalog +$networkConnection = @{"ResourceGroupName" = "testRg"; "NetworkConnectionName" = "eastusNetwork"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +Start-AzDevCenterAdminNetworkConnectionHealthCheck -InputObject $networkConnection .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity @@ -11638,6 +12313,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -11646,54 +12322,47 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/sync-azdevcenteradmincatalog +https://learn.microsoft.com/powershell/module/az.devcenter/start-azdevcenteradminnetworkconnectionhealthcheck #> -function Sync-AzDevCenterAdminCatalog { +function Start-AzDevCenterAdminNetworkConnectionHealthCheck { [OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Sync', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='Run', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Sync', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the devcenter. - ${DevCenterName}, - - [Parameter(ParameterSetName='Sync', Mandatory)] - [Alias('CatalogName')] + [Parameter(ParameterSetName='Run', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the Catalog. - ${Name}, + # Name of the Network Connection that can be applied to a Pool. + ${NetworkConnectionName}, - [Parameter(ParameterSetName='Sync', Mandatory)] + [Parameter(ParameterSetName='Run', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Sync')] + [Parameter(ParameterSetName='Run')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='SyncViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RunViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter @@ -11793,10 +12462,10 @@ begin { } $mapping = @{ - Sync = 'Az.DevCenter.private\Sync-AzDevCenterAdminCatalog_Sync'; - SyncViaIdentity = 'Az.DevCenter.private\Sync-AzDevCenterAdminCatalog_SyncViaIdentity'; + Run = 'Az.DevCenter.private\Start-AzDevCenterAdminNetworkConnectionHealthCheck_Run'; + RunViaIdentity = 'Az.DevCenter.private\Start-AzDevCenterAdminNetworkConnectionHealthCheck_RunViaIdentity'; } - if (('Sync') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Run') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -11857,14 +12526,14 @@ end { <# .Synopsis -Syncs templates for a template source. +Triggers a refresh of the pool status. .Description -Syncs templates for a template source. +Triggers a refresh of the pool status. .Example -Sync-AzDevCenterAdminProjectCatalog -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg +Start-AzDevCenterAdminPoolHealthCheck -ResourceGroupName testRg -PoolName DevPool -ProjectName DevProject .Example -$catalog = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -Sync-AzDevCenterAdminProjectCatalog -InputObject $catalog +$pool = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "PoolName" = "DevPool"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +Start-AzDevCenterAdminPoolHealthCheck -InputObject $pool .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity @@ -11877,6 +12546,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -11885,53 +12555,53 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/sync-azdevcenteradminprojectcatalog +https://learn.microsoft.com/powershell/module/az.devcenter/start-azdevcenteradminpoolhealthcheck #> -function Sync-AzDevCenterAdminProjectCatalog { +function Start-AzDevCenterAdminPoolHealthCheck { [OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Sync', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[CmdletBinding(DefaultParameterSetName='Run', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Sync', Mandatory)] + [Parameter(ParameterSetName='Run', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the Catalog. - ${CatalogName}, + # Name of the pool. + ${PoolName}, - [Parameter(ParameterSetName='Sync', Mandatory)] + [Parameter(ParameterSetName='Run', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Sync', Mandatory)] + [Parameter(ParameterSetName='Run', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Sync')] + [Parameter(ParameterSetName='Run')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='SyncViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RunViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter @@ -12031,10 +12701,10 @@ begin { } $mapping = @{ - Sync = 'Az.DevCenter.private\Sync-AzDevCenterAdminProjectCatalog_Sync'; - SyncViaIdentity = 'Az.DevCenter.private\Sync-AzDevCenterAdminProjectCatalog_SyncViaIdentity'; + Run = 'Az.DevCenter.private\Start-AzDevCenterAdminPoolHealthCheck_Run'; + RunViaIdentity = 'Az.DevCenter.private\Start-AzDevCenterAdminPoolHealthCheck_RunViaIdentity'; } - if (('Sync') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Run') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -12095,20 +12765,32 @@ end { <# .Synopsis -Partially updates a catalog. +Cancels the specified build for an image definition. .Description -Partially updates a catalog. +Cancels the specified build for an image definition. .Example -Update-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg -GitHubPath "testpath" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" +Stop-AzDevCenterAdminProjectCatalogImageDefinitionBuild ` + -BuildName "0a28fc61-6f87-4611-8fe2-32df44ab93b7" ` + -CatalogName "CentralCatalog" ` + -ImageDefinitionName "DefaultDevImage" ` + -ProjectName "DevProject" ` + -ResourceGroupName "rg1" ` + -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" .Example -$catalogInput = Get-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg - -Update-AzDevCenterAdminCatalog -InputObject $catalogInput -GitHubPath "testpath" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" +$inputObject = @{ + ResourceGroupName = "rg1" + ProjectName = "DevProject" + CatalogName = "CentralCatalog" + ImageDefinitionName = "DefaultDevImage" + BuildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +Stop-AzDevCenterAdminProjectCatalogImageDefinitionBuild -InputObject $inputObject .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +System.Boolean .Notes COMPLEX PARAMETER PROPERTIES @@ -12116,6 +12798,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -12124,122 +12807,71 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradmincatalog +https://learn.microsoft.com/powershell/module/az.devcenter/stop-azdevcenteradminprojectcatalogimagedefinitionbuild #> -function Update-AzDevCenterAdminCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] -[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Stop-AzDevCenterAdminProjectCatalogImageDefinitionBuild { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Cancel', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='Cancel', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter. - ${DevCenterName}, + # The ID of the Image Definition Build. + ${BuildName}, - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Alias('CatalogName')] + [Parameter(ParameterSetName='Cancel', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the Catalog. - ${Name}, + ${CatalogName}, - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Cancel', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='Cancel')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CancelViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Git branch. - ${AdoGitBranch}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The folder where the catalog items can be found inside the repository. - ${AdoGitPath}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - ${AdoGitSecretIdentifier}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Git URI. - ${AdoGitUri}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Git branch. - ${GitHubBranch}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The folder where the catalog items can be found inside the repository. - ${GitHubPath}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - ${GitHubSecretIdentifier}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Git URI. - ${GitHubUri}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType] - # Indicates the type of sync that is configured for the catalog. - ${SyncType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -12281,6 +12913,12 @@ param( # Run the command asynchronously ${NoWait}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Uri] @@ -12327,10 +12965,10 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminCatalog_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminCatalog_UpdateViaIdentityExpanded'; + Cancel = 'Az.DevCenter.private\Stop-AzDevCenterAdminProjectCatalogImageDefinitionBuild_Cancel'; + CancelViaIdentity = 'Az.DevCenter.private\Stop-AzDevCenterAdminProjectCatalogImageDefinitionBuild_CancelViaIdentity'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Cancel') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -12391,27 +13029,19 @@ end { <# .Synopsis -Partially updates a Dev Box definition. +Syncs templates for a template source. .Description -Partially updates a Dev Box definition. +Syncs templates for a template source. .Example -$vsImage = "microsoftvisualstudio_visualstudioplustools_vs-2022-pro-general-win10-m365-gen2" -$vsImageReferenceId = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/Default/images/" + $vsImage - -$devBoxDefinition = Update-AzDevCenterAdminDevBoxDefinition -Name "WebDevBox" -DevCenterName Contoso -ResourceGroupName testRg -HibernateSupport "Disabled" -ImageReferenceId $vsImageReferenceId +Sync-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg .Example -$id = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/devboxdefinitions/WebDevBox" -$devBoxDefinitionId = @{"Id" = $id } - -$vsImage = "microsoftvisualstudio_visualstudioplustools_vs-2022-pro-general-win10-m365-gen2" -$vsImageReferenceId = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/Default/images/" + $vsImage - -Update-AzDevCenterAdminDevBoxDefinition -InputObject $devBoxDefinitionId -HibernateSupport "Disabled" -ImageReferenceId $vsImageReferenceId +$catalog = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +Sync-AzDevCenterAdminCatalog -InputObject $catalog .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition +System.Boolean .Notes COMPLEX PARAMETER PROPERTIES @@ -12419,6 +13049,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -12427,125 +13058,60 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradmindevboxdefinition +https://learn.microsoft.com/powershell/module/az.devcenter/sync-azdevcenteradmincatalog #> -function Update-AzDevCenterAdminDevBoxDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition])] -[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Sync-AzDevCenterAdminCatalog { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Sync', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='Sync', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the devcenter. ${DevCenterName}, - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Alias('DevBoxDefinitionName')] + [Parameter(ParameterSetName='Sync', Mandatory)] + [Alias('CatalogName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the Dev Box definition. + # The name of the Catalog. ${Name}, - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='Sync', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='Sync')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='SyncViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport] - # Indicates whether Dev Boxes created with this definition are capable of hibernation. - # Not all images are capable of supporting hibernation. - # To find out more see https://aka.ms/devbox/hibernate - ${HibernateSupport}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Image ID, or Image version ID. - # When Image ID is provided, its latest version will be used. - ${ImageReferenceId}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The storage type used for the Operating System disk of Dev Boxes created using this definition. - ${OSStorageType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.Int32] - # If the SKU supports scale out/in then the capacity integer should be included. - # If scale out/in is not possible for the resource this may be omitted. - ${SkuCapacity}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # If the service has different generations of hardware, for the same SKU, then that can be captured here. - ${SkuFamily}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The name of the SKU. - # E.g. - # P3. - # It is typically a letter+number code - ${SkuName}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The SKU size. - # When the name field is the combination of tier and some other value, this would be the standalone code. - ${SkuSize}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] - # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - ${SkuTier}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -12587,6 +13153,12 @@ param( # Run the command asynchronously ${NoWait}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Uri] @@ -12633,10 +13205,10 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminDevBoxDefinition_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminDevBoxDefinition_UpdateViaIdentityExpanded'; + Sync = 'Az.DevCenter.private\Sync-AzDevCenterAdminCatalog_Sync'; + SyncViaIdentity = 'Az.DevCenter.private\Sync-AzDevCenterAdminCatalog_SyncViaIdentity'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Sync') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -12697,20 +13269,19 @@ end { <# .Synopsis -Partially updates a devcenter. +Syncs templates for a template source. .Description -Partially updates a devcenter. +Syncs templates for a template source. .Example -Update-AzDevCenterAdminDevCenter -Name Contoso -ResourceGroupName testRg -IdentityType "SystemAssigned" +Sync-AzDevCenterAdminProjectCatalog -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg .Example -$devCenterInput = Get-AzDevCenterAdminDevCenter -Name Contoso -ResourceGroupName testRg - -Update-AzDevCenterAdminDevCenter -InputObject $devCenterInput -IdentityType "SystemAssigned" +$catalog = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +Sync-AzDevCenterAdminProjectCatalog -InputObject $catalog .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter +System.Boolean .Notes COMPLEX PARAMETER PROPERTIES @@ -12718,6 +13289,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -12726,111 +13298,59 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradmindevcenter +https://learn.microsoft.com/powershell/module/az.devcenter/sync-azdevcenteradminprojectcatalog #> -function Update-AzDevCenterAdminDevCenter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter])] -[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Sync-AzDevCenterAdminProjectCatalog { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Sync', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Alias('DevCenterName')] + [Parameter(ParameterSetName='Sync', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter. - ${Name}, + # The name of the Catalog. + ${CatalogName}, - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='Sync', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Sync', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='Sync')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='SyncViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus] - # Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. - ${DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The display name of the devcenter. - ${DisplayName}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType] - # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - ${IdentityType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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. - ${IdentityUserAssignedIdentity}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus] - # Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. - # Defaults to Enabled if not set. - ${NetworkSettingMicrosoftHostedNetworkEnableStatus}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Resource Id of an associated Plan - ${PlanId}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus] - # Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. - ${ProjectCatalogSettingCatalogItemSyncEnableStatus}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -12872,6 +13392,12 @@ param( # Run the command asynchronously ${NoWait}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Uri] @@ -12918,10 +13444,10 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminDevCenter_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminDevCenter_UpdateViaIdentityExpanded'; + Sync = 'Az.DevCenter.private\Sync-AzDevCenterAdminProjectCatalog_Sync'; + SyncViaIdentity = 'Az.DevCenter.private\Sync-AzDevCenterAdminProjectCatalog_SyncViaIdentity'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Sync') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -12982,23 +13508,20 @@ end { <# .Synopsis -Partially updates an environment type. +Partially updates a catalog. .Description -Partially updates an environment type. +Partially updates a catalog. .Example -$tags = @{"dev" = "test" } - -Update-AzDevCenterAdminEnvironmentType -DevCenterName Contoso -Name DevTest -ResourceGroupName testRg -Tag $tags +Update-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg -GitHubPath "testpath" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" .Example -$envType = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "EnvironmentTypeName" = "DevTest"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -$tags = @{"dev" = "test" } +$catalogInput = Get-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg -Update-AzDevCenterAdminEnvironmentType -InputObject $envType -Tag $tags +Update-AzDevCenterAdminCatalog -InputObject $catalogInput -GitHubPath "testpath" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -13006,6 +13529,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -13014,24 +13538,24 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminenvironmenttype +https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradmincatalog #> -function Update-AzDevCenterAdminEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType])] +function Update-AzDevCenterAdminCatalog { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -13041,10 +13565,10 @@ param( ${DevCenterName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Alias('EnvironmentTypeName')] + [Alias('CatalogName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the environment type. + # The name of the Catalog. ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -13071,12 +13595,61 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The display name of the environment type. - ${DisplayName}, + # Git branch. + ${AdoGitBranch}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The folder where the catalog items can be found inside the repository. + ${AdoGitPath}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + ${AdoGitSecretIdentifier}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Git URI. + ${AdoGitUri}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Git branch. + ${GitHubBranch}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The folder where the catalog items can be found inside the repository. + ${GitHubPath}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + ${GitHubSecretIdentifier}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Git URI. + ${GitHubUri}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType] + # Indicates the type of sync that is configured for the catalog. + ${SyncType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -13090,6 +13663,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -13110,6 +13689,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Uri] @@ -13156,8 +13741,8 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminEnvironmentType_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminEnvironmentType_UpdateViaIdentityExpanded'; + UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminCatalog_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminCatalog_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -13220,24 +13805,27 @@ end { <# .Synopsis -Partially updates a Network Connection +Partially updates a Dev Box definition. .Description -Partially updates a Network Connection -.Example -Update-AzDevCenterAdminNetworkConnection -Name eastusNetwork -ResourceGroupName testRg -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" -DomainPassword $null -.Example -Update-AzDevCenterAdminNetworkConnection -Name eastusNetwork -ResourceGroupName testRg -DomainName mydomaincontroller.local -DomainUsername testuser@mydomaincontroller.local -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" +Partially updates a Dev Box definition. .Example -$networkConnectionInput = Get-AzDevCenterAdminNetworkConnection -ResourceGroupName testRg -Name eastusNetwork -Update-AzDevCenterAdminNetworkConnection -InputObject $networkConnectionInput -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" -DomainPassword $null +$vsImage = "microsoftvisualstudio_visualstudioplustools_vs-2022-pro-general-win10-m365-gen2" +$vsImageReferenceId = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/Default/images/" + $vsImage + +$devBoxDefinition = Update-AzDevCenterAdminDevBoxDefinition -Name "WebDevBox" -DevCenterName Contoso -ResourceGroupName testRg -HibernateSupport "Disabled" -ImageReferenceId $vsImageReferenceId .Example -$hybridNetworkConnectionInput = Get-AzDevCenterAdminNetworkConnection -ResourceGroupName testRg -Name eastusNetwork -Update-AzDevCenterAdminNetworkConnection -InputObject $hybridNetworkConnectionInput -DomainName mydomaincontroller.local -DomainUsername testuser@mydomaincontroller.local -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" +$id = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/devboxdefinitions/WebDevBox" +$devBoxDefinitionId = @{"Id" = $id } + +$vsImage = "microsoftvisualstudio_visualstudioplustools_vs-2022-pro-general-win10-m365-gen2" +$vsImageReferenceId = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/Default/images/" + $vsImage + +Update-AzDevCenterAdminDevBoxDefinition -InputObject $devBoxDefinitionId -HibernateSupport "Disabled" -ImageReferenceId $vsImageReferenceId .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -13245,6 +13833,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -13253,31 +13842,37 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminnetworkconnection +https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradmindevboxdefinition #> -function Update-AzDevCenterAdminNetworkConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection])] +function Update-AzDevCenterAdminDevBoxDefinition { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Alias('NetworkConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # Name of the Network Connection that can be applied to a Pool. + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('DevBoxDefinitionName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Dev Box definition. ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -13301,40 +13896,67 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport] + # Indicates whether Dev Boxes created with this definition are capable of hibernation. + # Not all images are capable of supporting hibernation. + # To find out more see https://aka.ms/devbox/hibernate + ${HibernateSupport}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Active Directory domain name - ${DomainName}, + # Image ID, or Image version ID. + # When Image ID is provided, its latest version will be used. + ${ImageReferenceId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The password for the account used to join domain - ${DomainPassword}, + # The storage type used for the Operating System disk of Dev Boxes created using this definition. + ${OSStorageType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # If the SKU supports scale out/in then the capacity integer should be included. + # If scale out/in is not possible for the resource this may be omitted. + ${SkuCapacity}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The username of an Active Directory account (user or service account) that has permissions to create computer objects in Active Directory. - # Required format: admin@contoso.com. - ${DomainUsername}, + # If the service has different generations of hardware, for the same SKU, then that can be captured here. + ${SkuFamily}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Active Directory domain Organization Unit (OU) - ${OrganizationUnit}, + # The name of the SKU. + # E.g. + # P3. + # It is typically a letter+number code + ${SkuName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The subnet to attach Virtual Machines to - ${SubnetId}, + # The SKU size. + # When the name field is the combination of tier and some other value, this would be the standalone code. + ${SkuSize}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] + # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + ${SkuTier}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -13426,8 +14048,8 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminNetworkConnection_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminNetworkConnection_UpdateViaIdentityExpanded'; + UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminDevBoxDefinition_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminDevBoxDefinition_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -13490,23 +14112,20 @@ end { <# .Synopsis -Partially updates a devcenter plan. +Partially updates a devcenter. .Description -Partially updates a devcenter plan. +Partially updates a devcenter. .Example -$tags = @{"dev" = "test" } - -Update-AzDevCenterAdminPlanMember -PlanName ContosoPlan -MemberName d702f662-b3f2-4796-9e8c-13c22378ced3 -ResourceGroupName testRg -Tag $tags +Update-AzDevCenterAdminDevCenter -Name Contoso -ResourceGroupName testRg -IdentityType "SystemAssigned" .Example -$planMember = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "MemberName" = "d702f662-b3f2-4796-9e8c-13c22378ced3"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -$tags = @{"dev" = "test" } +$devCenterInput = Get-AzDevCenterAdminDevCenter -Name Contoso -ResourceGroupName testRg -Update-AzDevCenterAdminPlanMember -InputObject $planMember -Tag $tags +Update-AzDevCenterAdminDevCenter -InputObject $devCenterInput -IdentityType "SystemAssigned" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter .Notes COMPLEX PARAMETER PROPERTIES @@ -13514,6 +14133,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -13522,37 +14142,32 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminplanmember +https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradmindevcenter #> -function Update-AzDevCenterAdminPlanMember { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember])] +function Update-AzDevCenterAdminDevCenter { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('DevCenterName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of a devcenter plan member. - ${MemberName}, - - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the devcenter plan. - ${PlanName}, + # The name of the devcenter. + ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] @@ -13575,9 +14190,53 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus] + # Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. + ${DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The display name of the devcenter. + ${DisplayName}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType] + # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + ${IdentityType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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. + ${IdentityUserAssignedIdentity}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus] + # Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. + # Defaults to Enabled if not set. + ${NetworkSettingMicrosoftHostedNetworkEnableStatus}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus] + # Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. + ${ProjectCatalogSettingCatalogItemSyncEnableStatus}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -13669,8 +14328,8 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminPlanMember_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminPlanMember_UpdateViaIdentityExpanded'; + UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminDevCenter_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminDevCenter_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -13733,19 +14392,23 @@ end { <# .Synopsis -Partially updates a devcenter plan. +Partially updates an environment type. .Description -Partially updates a devcenter plan. +Partially updates an environment type. .Example -Update-AzDevCenterAdminPlan -Name ContosoPlan -ResourceGroupName testRg -SkuName CCOG_Standard +$tags = @{"dev" = "test" } + +Update-AzDevCenterAdminEnvironmentType -DevCenterName Contoso -Name DevTest -ResourceGroupName testRg -Tag $tags .Example -$plan = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -Update-AzDevCenterAdminPlan -InputObject $plan -SkuName CCOG_Standard +$envType = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "EnvironmentTypeName" = "DevTest"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +$tags = @{"dev" = "test" } + +Update-AzDevCenterAdminEnvironmentType -InputObject $envType -Tag $tags .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -13753,6 +14416,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -13761,31 +14425,37 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminplan +https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminenvironmenttype #> -function Update-AzDevCenterAdminPlan { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan])] +function Update-AzDevCenterAdminEnvironmentType { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Alias('PlanName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter plan. + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('EnvironmentTypeName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the environment type. ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -13809,45 +14479,15 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.Int32] - # If the SKU supports scale out/in then the capacity integer should be included. - # If scale out/in is not possible for the resource this may be omitted. - ${SkuCapacity}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # If the service has different generations of hardware, for the same SKU, then that can be captured here. - ${SkuFamily}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The name of the SKU. - # E.g. - # P3. - # It is typically a letter+number code - ${SkuName}, - [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The SKU size. - # When the name field is the combination of tier and some other value, this would be the standalone code. - ${SkuSize}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] - # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - ${SkuTier}, + # The display name of the environment type. + ${DisplayName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -13861,12 +14501,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -13884,14 +14518,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] @@ -13939,8 +14567,8 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminPlan_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminPlan_UpdateViaIdentityExpanded'; + UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminEnvironmentType_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminEnvironmentType_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -14003,20 +14631,24 @@ end { <# .Synopsis -Partially updates a machine pool +Partially updates a Network Connection .Description -Partially updates a machine pool +Partially updates a Network Connection .Example -Update-AzDevCenterAdminPool -Name DevPool -ProjectName DevProject -ResourceGroupName testRg -DevBoxDefinitionName WebDevBox -LocalAdministrator "Disabled" -NetworkConnectionName Network1westus2 +Update-AzDevCenterAdminNetworkConnection -Name eastusNetwork -ResourceGroupName testRg -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" -DomainPassword $null .Example -Get-AzDevCenterAdminPool -ResourceGroupName testRg -Name DevPool -ProjectName DevProject -Update-AzDevCenterAdminPool -InputObject $poolInput -DevBoxDefinitionName WebDevBox -LocalAdministrator "Disabled" -NetworkConnectionName Network1westus2 - +Update-AzDevCenterAdminNetworkConnection -Name eastusNetwork -ResourceGroupName testRg -DomainName mydomaincontroller.local -DomainUsername testuser@mydomaincontroller.local -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" +.Example +$networkConnectionInput = Get-AzDevCenterAdminNetworkConnection -ResourceGroupName testRg -Name eastusNetwork +Update-AzDevCenterAdminNetworkConnection -InputObject $networkConnectionInput -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" -DomainPassword $null +.Example +$hybridNetworkConnectionInput = Get-AzDevCenterAdminNetworkConnection -ResourceGroupName testRg -Name eastusNetwork +Update-AzDevCenterAdminNetworkConnection -InputObject $hybridNetworkConnectionInput -DomainName mydomaincontroller.local -DomainUsername testuser@mydomaincontroller.local -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -14024,6 +14656,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -14032,39 +14665,33 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminpool +https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminnetworkconnection #> -function Update-AzDevCenterAdminPool { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool])] +function Update-AzDevCenterAdminNetworkConnection { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Alias('PoolName')] + [Alias('NetworkConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # Name of the pool. + # Name of the Network Connection that can be applied to a Pool. ${Name}, - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the project. - ${ProjectName}, - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] @@ -14089,70 +14716,41 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Name of a Dev Box definition in parent Project of this Pool - ${DevBoxDefinitionName}, + # Active Directory domain name + ${DomainName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The display name of the pool. - ${DisplayName}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus] - # Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. - ${LocalAdministrator}, - - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String[]] - # The regions of the managed virtual network (required when managedNetworkType is Managed). - ${ManagedVirtualNetworkRegion}, + # The password for the account used to join domain + ${DomainPassword}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Name of a Network Connection in parent Project of this Pool - ${NetworkConnectionName}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus] - # Indicates whether Dev Boxes in this pool are created with single sign on enabled. - # The also requires that single sign on be enabled on the tenant. - ${SingleSignOnStatus}, + # The username of an Active Directory account (user or service account) that has permissions to create computer objects in Active Directory. + # Required format: admin@contoso.com. + ${DomainUsername}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.Int32] - # The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. - ${StopOnDisconnectGracePeriodMinute}, + [System.String] + # Active Directory domain Organization Unit (OU) + ${OrganizationUnit}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus] - # Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. - ${StopOnDisconnectStatus}, + [System.String] + # The subnet to attach Virtual Machines to + ${SubnetId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType] - # Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. - ${VirtualNetworkType}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -14240,8 +14838,8 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminPool_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminPool_UpdateViaIdentityExpanded'; + UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminNetworkConnection_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminNetworkConnection_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -14252,9 +14850,6 @@ begin { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } - if (('UpdateExpanded', 'UpdateViaIdentityExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('LicenseType')) { - $PSBoundParameters['LicenseType'] = "Windows_Client" - } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ @@ -14307,42 +14902,28 @@ end { <# .Synopsis -Partially updates a project catalog. +Partially updates a machine pool .Description -Partially updates a project catalog. +Partially updates a machine pool .Example -Update-AzDevCenterAdminProjectCatalog -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg -GitHubPath "testpath" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" +Update-AzDevCenterAdminPool -Name DevPool -ProjectName DevProject -ResourceGroupName testRg -DevBoxDefinitionName WebDevBox -LocalAdministrator "Disabled" -NetworkConnectionName Network1westus2 .Example -$catalogInput = Get-AzDevCenterAdminProjectCatalog -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg +Get-AzDevCenterAdminPool -ResourceGroupName testRg -Name DevPool -ProjectName DevProject +Update-AzDevCenterAdminPool -InputObject $poolInput -DevBoxDefinitionName WebDevBox -LocalAdministrator "Disabled" -NetworkConnectionName Network1westus2 -Update-AzDevCenterAdminProjectCatalog -InputObject $catalogInput -GitHubPath "testpath" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool .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 : The catalog's properties for partial update. Properties not provided in the update request will not be changed. - [AdoGitBranch ]: Git branch. - [AdoGitPath ]: The folder where the catalog items can be found inside the repository. - [AdoGitSecretIdentifier ]: A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - [AdoGitUri ]: Git URI. - [GitHubBranch ]: Git branch. - [GitHubPath ]: The folder where the catalog items can be found inside the repository. - [GitHubSecretIdentifier ]: A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - [GitHubUri ]: Git URI. - [SyncType ]: Indicates the type of sync that is configured for the catalog. - [Tag ]: Resource tags. - [(Any) ]: This indicates any property can be added to this object. - INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -14351,145 +14932,230 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminprojectcatalog +https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminpool #> -function Update-AzDevCenterAdminProjectCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] -[CmdletBinding(DefaultParameterSetName='PatchExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Update-AzDevCenterAdminPool { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Patch', Mandatory)] - [Parameter(ParameterSetName='PatchExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('PoolName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the Catalog. - ${CatalogName}, + # Name of the pool. + ${Name}, - [Parameter(ParameterSetName='Patch', Mandatory)] - [Parameter(ParameterSetName='PatchExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Patch', Mandatory)] - [Parameter(ParameterSetName='PatchExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Patch')] - [Parameter(ParameterSetName='PatchExpanded')] + [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='PatchViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='PatchViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='Patch', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='PatchViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate] - # The catalog's properties for partial update. - # Properties not provided in the update request will not be changed. - # To construct, see NOTES section for BODY properties and create a hash table. - ${Body}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus] + # Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + ${ActiveHourConfigurationAutoStartEnableStatus}, - [Parameter(ParameterSetName='PatchExpanded')] - [Parameter(ParameterSetName='PatchViaIdentityExpanded')] + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # The default end time of the active hours + ${ActiveHourConfigurationDefaultEndTimeHour}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # The default start time of the active hours. + ${ActiveHourConfigurationDefaultStartTimeHour}, + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Git branch. - ${AdoGitBranch}, + # The default IANA timezone id of the active hours. + ${ActiveHourConfigurationDefaultTimeZone}, - [Parameter(ParameterSetName='PatchExpanded')] - [Parameter(ParameterSetName='PatchViaIdentityExpanded')] + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus] + # Enables or disables whether the Dev Box should be kept awake during active hours. + ${ActiveHourConfigurationKeepAwakeEnableStatus}, + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The folder where the catalog items can be found inside the repository. - ${AdoGitPath}, + # Name of a Dev Box definition in parent Project of this Pool. + # Will be ignored if devBoxDefinitionType is Value. + ${DevBoxDefinitionName}, - [Parameter(ParameterSetName='PatchExpanded')] - [Parameter(ParameterSetName='PatchViaIdentityExpanded')] + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType] + # Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + ${DevBoxDefinitionType}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus] + # Indicates whether Dev Box Tunnel is enabled for a the pool. + ${DevBoxTunnelEnableStatus}, + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - ${AdoGitSecretIdentifier}, + # The display name of the pool. + ${DisplayName}, - [Parameter(ParameterSetName='PatchExpanded')] - [Parameter(ParameterSetName='PatchViaIdentityExpanded')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Git URI. - ${AdoGitUri}, + # Image ID, or Image version ID. + # When Image ID is provided, its latest version will be used. + ${ImageReferenceId}, - [Parameter(ParameterSetName='PatchExpanded')] - [Parameter(ParameterSetName='PatchViaIdentityExpanded')] + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus] + # Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. + ${LocalAdministrator}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String[]] + # The regions of the managed virtual network (required when managedNetworkType is Managed). + ${ManagedVirtualNetworkRegion}, + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Git branch. - ${GitHubBranch}, + # Name of a Network Connection in parent Project of this Pool + ${NetworkConnectionName}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus] + # Indicates whether Dev Boxes in this pool are created with single sign on enabled. + # The also requires that single sign on be enabled on the tenant. + ${SingleSignOnStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # If the SKU supports scale out/in then the capacity integer should be included. + # If scale out/in is not possible for the resource this may be omitted. + ${SkuCapacity}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # If the service has different generations of hardware, for the same SKU, then that can be captured here. + ${SkuFamily}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The name of the SKU. + # E.g. + # P3. + # It is typically a letter+number code + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The SKU size. + # When the name field is the combination of tier and some other value, this would be the standalone code. + ${SkuSize}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] + # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + ${SkuTier}, - [Parameter(ParameterSetName='PatchExpanded')] - [Parameter(ParameterSetName='PatchViaIdentityExpanded')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The folder where the catalog items can be found inside the repository. - ${GitHubPath}, + [System.Int32] + # The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + ${StopOnDisconnectGracePeriodMinute}, - [Parameter(ParameterSetName='PatchExpanded')] - [Parameter(ParameterSetName='PatchViaIdentityExpanded')] + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - ${GitHubSecretIdentifier}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus] + # Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + ${StopOnDisconnectStatus}, - [Parameter(ParameterSetName='PatchExpanded')] - [Parameter(ParameterSetName='PatchViaIdentityExpanded')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Git URI. - ${GitHubUri}, + [System.Int32] + # The specified time in minutes to wait before stopping a Dev Box if no connection is made. + ${StopOnNoConnectGracePeriodMinute}, - [Parameter(ParameterSetName='PatchExpanded')] - [Parameter(ParameterSetName='PatchViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType])] + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType] - # Indicates the type of sync that is configured for the catalog. - ${SyncType}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus] + # Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + ${StopOnNoConnectStatus}, - [Parameter(ParameterSetName='PatchExpanded')] - [Parameter(ParameterSetName='PatchViaIdentityExpanded')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType] + # Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + ${VirtualNetworkType}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -14577,12 +15243,10 @@ begin { } $mapping = @{ - Patch = 'Az.DevCenter.private\Update-AzDevCenterAdminProjectCatalog_Patch'; - PatchExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminProjectCatalog_PatchExpanded'; - PatchViaIdentity = 'Az.DevCenter.private\Update-AzDevCenterAdminProjectCatalog_PatchViaIdentity'; - PatchViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminProjectCatalog_PatchViaIdentityExpanded'; + UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminPool_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminPool_UpdateViaIdentityExpanded'; } - if (('Patch', 'PatchExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -14591,6 +15255,9 @@ begin { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } + if (('UpdateExpanded', 'UpdateViaIdentityExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('LicenseType')) { + $PSBoundParameters['LicenseType'] = "Windows_Client" + } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ @@ -14643,47 +15310,43 @@ end { <# .Synopsis -Partially updates a project environment type. +Partially updates a project catalog. .Description -Partially updates a project environment type. +Partially updates a project catalog. .Example -$deploymentTargetId = '/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff' -$creatorRoleAssignmentRole = @{"b24988ac-6180-42a0-ab88-20f7382dd24c" = @{} } -$userRoleAssignment = @{ - $env.identityPrincipalId = @{ - "roles" = @{ - "b24988ac-6180-42a0-ab88-20f7382dd24c" = @{} - } - } -} - -Update-AzDevCenterAdminProjectEnvironmentType -EnvironmentTypeName DevTest -ProjectName DevProject -ResourceGroupName testRg -CreatorRoleAssignmentRole $creatorRoleAssignmentRole -IdentityType "SystemAssigned" -Status "Disabled" -UserRoleAssignment $userRoleAssignment +Update-AzDevCenterAdminProjectCatalog -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg -GitHubPath "testpath" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" .Example -$projEnvTypeInput =Get-AzDevCenterAdminProjectEnvironmentType -ProjectName DevProject -ResourceGroupName testRg -EnvironmentTypeName DevTest - -$deploymentTargetId = '/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff' -$creatorRoleAssignmentRole = @{"b24988ac-6180-42a0-ab88-20f7382dd24c" = @{} } -$userRoleAssignment = @{ - $env.identityPrincipalId = @{ - "roles" = @{ - "b24988ac-6180-42a0-ab88-20f7382dd24c" = @{} - } - } -} +$catalogInput = Get-AzDevCenterAdminProjectCatalog -ProjectName DevProject -CatalogName CentralCatalog -ResourceGroupName testRg -Update-AzDevCenterAdminProjectEnvironmentType -InputObject $projEnvTypeInput -CreatorRoleAssignmentRole $creatorRoleAssignmentRole -IdentityType "SystemAssigned" -Status "Disabled" -UserRoleAssignment $userRoleAssignment +Update-AzDevCenterAdminProjectCatalog -InputObject $catalogInput -GitHubPath "testpath" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .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 : The catalog's properties for partial update. Properties not provided in the update request will not be changed. + [AdoGitBranch ]: Git branch. + [AdoGitPath ]: The folder where the catalog items can be found inside the repository. + [AdoGitSecretIdentifier ]: A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + [AdoGitUri ]: Git URI. + [GitHubBranch ]: Git branch. + [GitHubPath ]: The folder where the catalog items can be found inside the repository. + [GitHubSecretIdentifier ]: A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + [GitHubUri ]: Git URI. + [SyncType ]: Indicates the type of sync that is configured for the catalog. + [Tag ]: Resource tags. + [(Any) ]: This indicates any property can be added to this object. + INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -14692,116 +15355,144 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminprojectenvironmenttype +https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminprojectcatalog #> -function Update-AzDevCenterAdminProjectEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType])] -[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Update-AzDevCenterAdminProjectCatalog { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] +[CmdletBinding(DefaultParameterSetName='PatchExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='Patch', Mandatory)] + [Parameter(ParameterSetName='PatchExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the environment type. - ${EnvironmentTypeName}, + # The name of the Catalog. + ${CatalogName}, - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='Patch', Mandatory)] + [Parameter(ParameterSetName='PatchExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the project. ${ProjectName}, - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='Patch', Mandatory)] + [Parameter(ParameterSetName='PatchExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='Patch')] + [Parameter(ParameterSetName='PatchExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PatchViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PatchViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] + [Parameter(ParameterSetName='Patch', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PatchViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles]))] - [System.Collections.Hashtable] - # A map of roles to assign to the environment creator. - ${CreatorRoleAssignmentRole}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate] + # The catalog's properties for partial update. + # Properties not provided in the update request will not be changed. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, - [Parameter()] + [Parameter(ParameterSetName='PatchExpanded')] + [Parameter(ParameterSetName='PatchViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Id of a subscription that the environment type will be mapped to. - # The environment's resources will be deployed into this subscription. - ${DeploymentTargetId}, + # Git branch. + ${AdoGitBranch}, - [Parameter()] + [Parameter(ParameterSetName='PatchExpanded')] + [Parameter(ParameterSetName='PatchViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The display name of the project environment type. - ${DisplayName}, + # The folder where the catalog items can be found inside the repository. + ${AdoGitPath}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType])] + [Parameter(ParameterSetName='PatchExpanded')] + [Parameter(ParameterSetName='PatchViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType] - # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - ${IdentityType}, + [System.String] + # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + ${AdoGitSecretIdentifier}, - [Parameter()] + [Parameter(ParameterSetName='PatchExpanded')] + [Parameter(ParameterSetName='PatchViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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. - ${IdentityUserAssignedIdentity}, + [System.String] + # Git URI. + ${AdoGitUri}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus])] + [Parameter(ParameterSetName='PatchExpanded')] + [Parameter(ParameterSetName='PatchViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus] - # Defines whether this Environment Type can be used in this Project. - ${Status}, + [System.String] + # Git branch. + ${GitHubBranch}, - [Parameter()] + [Parameter(ParameterSetName='PatchExpanded')] + [Parameter(ParameterSetName='PatchViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, + [System.String] + # The folder where the catalog items can be found inside the repository. + ${GitHubPath}, - [Parameter()] + [Parameter(ParameterSetName='PatchExpanded')] + [Parameter(ParameterSetName='PatchViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + ${GitHubSecretIdentifier}, + + [Parameter(ParameterSetName='PatchExpanded')] + [Parameter(ParameterSetName='PatchViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Git URI. + ${GitHubUri}, + + [Parameter(ParameterSetName='PatchExpanded')] + [Parameter(ParameterSetName='PatchViaIdentityExpanded')] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType] + # Indicates the type of sync that is configured for the catalog. + ${SyncType}, + + [Parameter(ParameterSetName='PatchExpanded')] + [Parameter(ParameterSetName='PatchViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags]))] [System.Collections.Hashtable] - # Role Assignments created on environment backing resources. - # This is a mapping from a user object ID to an object of role definition IDs. - ${UserRoleAssignment}, + # Resource tags. + ${Tag}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -14812,6 +15503,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -14832,6 +15529,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Uri] @@ -14878,10 +15581,12 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminProjectEnvironmentType_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminProjectEnvironmentType_UpdateViaIdentityExpanded'; + Patch = 'Az.DevCenter.private\Update-AzDevCenterAdminProjectCatalog_Patch'; + PatchExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminProjectCatalog_PatchExpanded'; + PatchViaIdentity = 'Az.DevCenter.private\Update-AzDevCenterAdminProjectCatalog_PatchViaIdentity'; + PatchViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminProjectCatalog_PatchViaIdentityExpanded'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Patch', 'PatchExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -14937,25 +15642,45 @@ end { [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} +} + +<# +.Synopsis +Partially updates a project environment type. +.Description +Partially updates a project environment type. +.Example +$deploymentTargetId = '/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff' +$creatorRoleAssignmentRole = @{"b24988ac-6180-42a0-ab88-20f7382dd24c" = @{} } +$userRoleAssignment = @{ + $env.identityPrincipalId = @{ + "roles" = @{ + "b24988ac-6180-42a0-ab88-20f7382dd24c" = @{} + } + } } -<# -.Synopsis -Partially updates a project. -.Description -Partially updates a project. -.Example -Update-AzDevCenterAdminProject -Name DevProject -ResourceGroupName testRg -MaxDevBoxesPerUser 5 +Update-AzDevCenterAdminProjectEnvironmentType -EnvironmentTypeName DevTest -ProjectName DevProject -ResourceGroupName testRg -CreatorRoleAssignmentRole $creatorRoleAssignmentRole -IdentityType "SystemAssigned" -Status "Disabled" -UserRoleAssignment $userRoleAssignment .Example -$projectInput = Get-AzDevCenterAdminProject -ResourceGroupName testRg -Name DevProject +$projEnvTypeInput =Get-AzDevCenterAdminProjectEnvironmentType -ProjectName DevProject -ResourceGroupName testRg -EnvironmentTypeName DevTest -Update-AzDevCenterAdminProject -InputObject $projectInput -MaxDevBoxesPerUser 5 +$deploymentTargetId = '/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff' +$creatorRoleAssignmentRole = @{"b24988ac-6180-42a0-ab88-20f7382dd24c" = @{} } +$userRoleAssignment = @{ + $env.identityPrincipalId = @{ + "roles" = @{ + "b24988ac-6180-42a0-ab88-20f7382dd24c" = @{} + } + } +} + +Update-AzDevCenterAdminProjectEnvironmentType -InputObject $projEnvTypeInput -CreatorRoleAssignmentRole $creatorRoleAssignmentRole -IdentityType "SystemAssigned" -Status "Disabled" -UserRoleAssignment $userRoleAssignment .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -14963,6 +15688,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -14971,32 +15697,37 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminproject +https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminprojectenvironmenttype #> -function Update-AzDevCenterAdminProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject])] +function Update-AzDevCenterAdminProjectEnvironmentType { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Alias('ProjectName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the environment type. + ${EnvironmentTypeName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the project. - ${Name}, + ${ProjectName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] @@ -15020,23 +15751,23 @@ param( ${InputObject}, [Parameter()] - [AllowEmptyCollection()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]] - # Indicates catalog item types that can be synced. - ${CatalogSettingCatalogItemSyncType}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles]))] + [System.Collections.Hashtable] + # A map of roles to assign to the environment creator. + ${CreatorRoleAssignmentRole}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Description of the project. - ${Description}, + # Id of a subscription that the environment type will be mapped to. + # The environment's resources will be deployed into this subscription. + ${DeploymentTargetId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The display name of the project. + # The display name of the project environment type. ${DisplayName}, [Parameter()] @@ -15056,19 +15787,27 @@ param( ${IdentityUserAssignedIdentity}, [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.Int32] - # When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. - # This will have no effect on existing Dev Boxes when reduced. - ${MaxDevBoxesPerUser}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus] + # Defines whether this Environment Type can be used in this Project. + ${Status}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments]))] + [System.Collections.Hashtable] + # Role Assignments created on environment backing resources. + # This is a mapping from a user object ID to an object of role definition IDs. + ${UserRoleAssignment}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -15078,12 +15817,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -15104,12 +15837,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Uri] @@ -15156,8 +15883,8 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminProject_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminProject_UpdateViaIdentityExpanded'; + UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminProjectEnvironmentType_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminProjectEnvironmentType_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -15220,19 +15947,37 @@ end { <# .Synopsis -Gets a schedule resource. +Partially updates an project policy. .Description -Gets a schedule resource. +Partially updates an project policy. .Example -Get-AzDevCenterAdminSchedule -PoolName DevPool -ProjectName DevProject -ResourceGroupName testRg +$resourcePolicies = @( + @{ Resource = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/default/images/microsoftvisualstudio_visualstudio2019plustools_vs-2019-ent-general-win10-m365-gen2" }; + @{ Action = "Deny"; ResourceType = "Skus" } +) +Update-AzDevCenterAdminProjectPolicy ` + -DevCenterName "Contoso" ` + -Name "myPolicy" ` + -ResourceGroupName "testRg" ` + -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" ` + -ResourcePolicy $resourcePolicies .Example -$schedule = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "PoolName" = "DevPool"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -Get-AzDevCenterAdminSchedule -InputObject $schedule +$inputObject = @{ + ResourceGroupName = "testRg" + DevCenterName = "Contoso" + ProjectPolicyName = "myPolicy" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +$scopes = @( + "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/projects/devProject"; + "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/projects/devProject2" +) +Update-AzDevCenterAdminProjectPolicy -InputObject $inputObject -Scope $scopes .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy .Notes COMPLEX PARAMETER PROPERTIES @@ -15240,6 +15985,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -15248,59 +15994,81 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. + +RESOURCEPOLICY : Resource policies that are a part of this project policy. + [Action ]: Policy action to be taken on the resources. This is optional, and defaults to allow + [Filter ]: Optional. When specified, this expression is used to filter the resources. + [Resource ]: Resources that are included and shared as a part of a project policy. + [ResourceType ]: Optional. The resource type being restricted or allowed by a project policy. Used with a given action to restrict or allow access to a resource type. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminschedule +https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminprojectpolicy #> -function Get-AzDevCenterAdminSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule])] -[CmdletBinding(DefaultParameterSetName='GetWithDefault', PositionalBinding=$false)] +function Update-AzDevCenterAdminProjectPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='GetWithDefault', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # Name of the pool. - ${PoolName}, + # The name of the devcenter. + ${DevCenterName}, - [Parameter(ParameterSetName='GetWithDefault', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('ProjectPolicyName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the project. - ${ProjectName}, + # The name of the project policy. + ${Name}, - [Parameter(ParameterSetName='GetWithDefault', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='GetWithDefault')] + [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String[]] + [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[]] + # Resource policies that are a part of this project policy. + # To construct, see NOTES section for RESOURCEPOLICY properties and create a hash table. + ${ResourcePolicy}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String[]] + # Resources that have access to the shared resources that are a part of this project policy. + ${Scope}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -15310,6 +16078,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -15330,6 +16104,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Uri] @@ -15376,10 +16156,10 @@ begin { } $mapping = @{ - GetWithDefault = 'Az.DevCenter.custom\Get-AzDevCenterAdminSchedule'; - GetViaIdentity = 'Az.DevCenter.custom\Get-AzDevCenterAdminSchedule'; + UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminProjectPolicy_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminProjectPolicy_UpdateViaIdentityExpanded'; } - if (('GetWithDefault') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -15440,26 +16220,32 @@ end { <# .Synopsis -Creates or updates an attached NetworkConnection. +Partially updates a project. .Description -Creates or updates an attached NetworkConnection. +Partially updates a project. .Example -New-AzDevCenterAdminAttachedNetwork -ConnectionName network-uswest3 -DevCenterName Contoso -ResourceGroupName testRg -NetworkConnectionId /subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3 +Update-AzDevCenterAdminProject -Name DevProject -ResourceGroupName testRg -MaxDevBoxesPerUser 5 .Example -$attachedNetwork = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "AttachedNetworkConnectionName" = "network-uswest3"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminAttachedNetwork -InputObject $attachedNetwork -NetworkConnectionId /subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3 +$projectInput = Get-AzDevCenterAdminProject -ResourceGroupName testRg -Name DevProject + +Update-AzDevCenterAdminProject -InputObject $projectInput -MaxDevBoxesPerUser 5 .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject .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. +CUSTOMIZATIONSETTINGIDENTITY : The identities that can to be used in customization scenarios; e.g., to clone a repository. + [IdentityResourceId ]: Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity. + [IdentityType ]: Values can be systemAssignedIdentity or userAssignedIdentity + INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -15468,65 +16254,166 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminattachednetwork +https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminproject #> -function New-AzDevCenterAdminAttachedNetwork { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Update-AzDevCenterAdminProject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('AttachedNetworkConnectionName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the attached NetworkConnection. - ${ConnectionName}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('ProjectName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter. - ${DevCenterName}, + # The name of the project. + ${Name}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='UpdateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode] + # The property indicates whether Azure AI services is enabled. + ${AzureAiServiceSettingAzureAiServicesMode}, + + [Parameter()] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]] + # Indicates catalog item types that can be synced. + ${CatalogSettingCatalogItemSyncType}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]] + # The identities that can to be used in customization scenarios; e.g., to clone a repository. + # To construct, see NOTES section for CUSTOMIZATIONSETTINGIDENTITY properties and create a hash table. + ${CustomizationSettingIdentity}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus] + # Indicates whether user customizations are enabled. + ${CustomizationSettingUserCustomizationsEnableStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Description of the project. + ${Description}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode] + # Indicates the delete mode for Dev Boxes within this project. + ${DevBoxAutoDeleteSettingDeleteMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. + # ISO8601 format PT[n]H[n]M[n]S. + ${DevBoxAutoDeleteSettingGracePeriod}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. + # ISO8601 format PT[n]H[n]M[n]S. + ${DevBoxAutoDeleteSettingInactiveThreshold}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The display name of the project. + ${DisplayName}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType] + # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + ${IdentityType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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. + ${IdentityUserAssignedIdentity}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. + # This will have no effect on existing Dev Boxes when reduced. + ${MaxDevBoxesPerUser}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # When specified, limits the maximum number of concurrent sessions across all pools in the project. + ${ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode] + # The property indicates whether serverless GPU access is enabled on the project. + ${ServerlessGpuSessionSettingServerlessGpuSessionsMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, - [Parameter(Mandatory)] + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The resource ID of the NetworkConnection you want to attach. - ${NetworkConnectionId}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode] + # Indicates whether workspace storage is enabled. + ${WorkspaceStorageSettingWorkspaceStorageMode}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -15615,10 +16502,10 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminAttachedNetwork'; - CreateViaIdentityExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminAttachedNetwork'; + UpdateExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminProject_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminProject_UpdateViaIdentityExpanded'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -15679,24 +16566,19 @@ end { <# .Synopsis -Creates or updates a catalog. +Gets a schedule resource. .Description -Creates or updates a catalog. -.Example -New-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg -AdoGitBranch main -AdoGitPath "/templates" -AdoGitSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -AdoGitUri "https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso" -.Example -New-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg -GitHubBranch main -GitHubPath "/templates" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -GitHubUri "https://github.com/Contoso/centralrepo-fake.git" +Gets a schedule resource. .Example -$catalog = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminCatalog -InputObject $catalog -AdoGitBranch main -AdoGitPath "/templates" -AdoGitSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -AdoGitUri "https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso" +Get-AzDevCenterAdminSchedule -PoolName DevPool -ProjectName DevProject -ResourceGroupName testRg .Example -$catalog = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminCatalog -InputObject $catalog -GitHubBranch main -GitHubPath "/templates" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -GitHubUri "https://github.com/Contoso/centralrepo-fake.git" +$schedule = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "PoolName" = "DevPool"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +Get-AzDevCenterAdminSchedule -InputObject $schedule .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule .Notes COMPLEX PARAMETER PROPERTIES @@ -15704,6 +16586,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -15712,135 +16595,59 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmincatalog +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminschedule #> -function New-AzDevCenterAdminCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] -[CmdletBinding(DefaultParameterSetName='CreateExpandedAdo', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzDevCenterAdminSchedule { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule])] +[CmdletBinding(DefaultParameterSetName='GetWithDefault', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='CreateExpandedAdo', Mandatory)] - [Parameter(ParameterSetName='CreateExpandedGitHub', Mandatory)] + [Parameter(ParameterSetName='GetWithDefault', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter. - ${DevCenterName}, + # Name of the pool. + ${PoolName}, - [Parameter(ParameterSetName='CreateExpandedAdo', Mandatory)] - [Parameter(ParameterSetName='CreateExpandedGitHub', Mandatory)] - [Alias('CatalogName')] + [Parameter(ParameterSetName='GetWithDefault', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the Catalog. - ${Name}, + # The name of the project. + ${ProjectName}, - [Parameter(ParameterSetName='CreateExpandedAdo', Mandatory)] - [Parameter(ParameterSetName='CreateExpandedGitHub', Mandatory)] + [Parameter(ParameterSetName='GetWithDefault', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='CreateExpandedAdo')] - [Parameter(ParameterSetName='CreateExpandedGitHub')] + [Parameter(ParameterSetName='GetWithDefault')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] + [System.String[]] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='CreateViaIdentityExpandedGitHub', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CreateViaIdentityExpandedAdo', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='CreateExpandedAdo', Mandatory)] - [Parameter(ParameterSetName='CreateViaIdentityExpandedAdo', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - ${AdoGitSecretIdentifier}, - - [Parameter(ParameterSetName='CreateExpandedAdo', Mandatory)] - [Parameter(ParameterSetName='CreateViaIdentityExpandedAdo', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Git URI. - ${AdoGitUri}, - - [Parameter(ParameterSetName='CreateExpandedAdo')] - [Parameter(ParameterSetName='CreateViaIdentityExpandedAdo')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Git branch. - ${AdoGitBranch}, - - [Parameter(ParameterSetName='CreateExpandedAdo')] - [Parameter(ParameterSetName='CreateViaIdentityExpandedAdo')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The folder where the catalog items can be found inside the repository. - ${AdoGitPath}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType] - # Indicates the type of sync that is configured for the catalog. - ${SyncType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, - - [Parameter(ParameterSetName='CreateExpandedGitHub', Mandatory)] - [Parameter(ParameterSetName='CreateViaIdentityExpandedGitHub', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - ${GitHubSecretIdentifier}, - - [Parameter(ParameterSetName='CreateExpandedGitHub', Mandatory)] - [Parameter(ParameterSetName='CreateViaIdentityExpandedGitHub', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Git URI. - ${GitHubUri}, - - [Parameter(ParameterSetName='CreateExpandedGitHub')] - [Parameter(ParameterSetName='CreateViaIdentityExpandedGitHub')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Git branch. - ${GitHubBranch}, - - [Parameter(ParameterSetName='CreateExpandedGitHub')] - [Parameter(ParameterSetName='CreateViaIdentityExpandedGitHub')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The folder where the catalog items can be found inside the repository. - ${GitHubPath}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -15850,12 +16657,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -15876,12 +16677,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Uri] @@ -15928,12 +16723,10 @@ begin { } $mapping = @{ - CreateExpandedAdo = 'Az.DevCenter.custom\New-AzDevCenterAdminCatalog'; - CreateExpandedGitHub = 'Az.DevCenter.custom\New-AzDevCenterAdminCatalog'; - CreateViaIdentityExpandedGitHub = 'Az.DevCenter.custom\New-AzDevCenterAdminCatalog'; - CreateViaIdentityExpandedAdo = 'Az.DevCenter.custom\New-AzDevCenterAdminCatalog'; + GetWithDefault = 'Az.DevCenter.custom\Get-AzDevCenterAdminSchedule'; + GetViaIdentity = 'Az.DevCenter.custom\Get-AzDevCenterAdminSchedule'; } - if (('CreateExpandedAdo', 'CreateExpandedGitHub') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('GetWithDefault') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -15994,19 +16787,19 @@ end { <# .Synopsis -Creates or updates a Dev Box definition. +Creates or updates an attached NetworkConnection. .Description -Creates or updates a Dev Box definition. +Creates or updates an attached NetworkConnection. .Example -New-AzDevCenterAdminDevBoxDefinition -Name "WebDevBox" -DevCenterName Contoso -ResourceGroupName testRg -Location "westus3" -HibernateSupport "Enabled" -ImageReferenceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0" -OSStorageType "ssd_1024gb" -SkuName "general_a_8c32gb_v1" +New-AzDevCenterAdminAttachedNetwork -ConnectionName network-uswest3 -DevCenterName Contoso -ResourceGroupName testRg -NetworkConnectionId /subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3 .Example -$devBoxDefinition = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "DevBoxDefinitionName" = "WebDevBox"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminDevBoxDefinition -InputObject $devBoxDefinition -Location "westus3" -HibernateSupport "Enabled" -ImageReferenceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0" -OSStorageType "ssd_1024gb" -SkuName "general_a_8c32gb_v1" +$attachedNetwork = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "AttachedNetworkConnectionName" = "network-uswest3"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminAttachedNetwork -InputObject $attachedNetwork -NetworkConnectionId /subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3 .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -16014,6 +16807,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -16022,38 +16816,38 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmindevboxdefinition +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminattachednetwork #> -function New-AzDevCenterAdminDevBoxDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition])] +function New-AzDevCenterAdminAttachedNetwork { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Alias('AttachedNetworkConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter. - ${DevCenterName}, + # The name of the attached NetworkConnection. + ${ConnectionName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('DevBoxDefinitionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the Dev Box definition. - ${Name}, + # The name of the devcenter. + ${DevCenterName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] @@ -16079,73 +16873,8 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The geo-location where the resource lives - ${Location}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Image ID, or Image version ID. - # When Image ID is provided, its latest version will be used. - ${ImageReferenceId}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The storage type used for the Operating System disk of Dev Boxes created using this definition. - ${OSStorageType}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The name of the SKU. - # E.g. - # P3. - # It is typically a letter+number code - ${SkuName}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport] - # Indicates whether Dev Boxes created with this definition are capable of hibernation. - # Not all images are capable of supporting hibernation. - # To find out more see https://aka.ms/devbox/hibernate - ${HibernateSupport}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.Int32] - # If the SKU supports scale out/in then the capacity integer should be included. - # If scale out/in is not possible for the resource this may be omitted. - ${SkuCapacity}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # If the service has different generations of hardware, for the same SKU, then that can be captured here. - ${SkuFamily}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The SKU size. - # When the name field is the combination of tier and some other value, this would be the standalone code. - ${SkuSize}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] - # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - ${SkuTier}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, + # The resource ID of the NetworkConnection you want to attach. + ${NetworkConnectionId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -16234,8 +16963,8 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminDevBoxDefinition'; - CreateViaIdentityExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminDevBoxDefinition'; + CreateExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminAttachedNetwork'; + CreateViaIdentityExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminAttachedNetwork'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -16298,19 +17027,24 @@ end { <# .Synopsis -Creates or updates a gallery. +Creates or updates a catalog. .Description -Creates or updates a gallery. +Creates or updates a catalog. .Example -New-AzDevCenterAdminGallery -DevCenterName Contoso -Name StandardGallery -ResourceGroupName testRg -GalleryResourceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.Compute/galleries/StandardGallery" +New-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg -AdoGitBranch main -AdoGitPath "/templates" -AdoGitSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -AdoGitUri "https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso" .Example -$gallery = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "GalleryName" = "StandardGallery"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminGallery -InputObject $gallery -GalleryResourceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.Compute/galleries/StandardGallery" +New-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg -GitHubBranch main -GitHubPath "/templates" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -GitHubUri "https://github.com/Contoso/centralrepo-fake.git" +.Example +$catalog = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminCatalog -InputObject $catalog -AdoGitBranch main -AdoGitPath "/templates" -AdoGitSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -AdoGitUri "https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso" +.Example +$catalog = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminCatalog -InputObject $catalog -GitHubBranch main -GitHubPath "/templates" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -GitHubUri "https://github.com/Contoso/centralrepo-fake.git" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -16318,6 +17052,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -16326,65 +17061,134 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmingallery +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmincatalog #> -function New-AzDevCenterAdminGallery { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function New-AzDevCenterAdminCatalog { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] +[CmdletBinding(DefaultParameterSetName='CreateExpandedAdo', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedAdo', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedGitHub', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the devcenter. ${DevCenterName}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('GalleryName')] + [Parameter(ParameterSetName='CreateExpandedAdo', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedGitHub', Mandatory)] + [Alias('CatalogName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the gallery. + # The name of the Catalog. ${Name}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedAdo', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedGitHub', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateExpandedAdo')] + [Parameter(ParameterSetName='CreateExpandedGitHub')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedGitHub', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedAdo', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpandedAdo', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedAdo', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The resource ID of the backing Azure Compute Gallery. - ${GalleryResourceId}, + # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + ${AdoGitSecretIdentifier}, + + [Parameter(ParameterSetName='CreateExpandedAdo', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedAdo', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Git URI. + ${AdoGitUri}, + + [Parameter(ParameterSetName='CreateExpandedAdo')] + [Parameter(ParameterSetName='CreateViaIdentityExpandedAdo')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Git branch. + ${AdoGitBranch}, + + [Parameter(ParameterSetName='CreateExpandedAdo')] + [Parameter(ParameterSetName='CreateViaIdentityExpandedAdo')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The folder where the catalog items can be found inside the repository. + ${AdoGitPath}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType] + # Indicates the type of sync that is configured for the catalog. + ${SyncType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='CreateExpandedGitHub', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedGitHub', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + ${GitHubSecretIdentifier}, + + [Parameter(ParameterSetName='CreateExpandedGitHub', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedGitHub', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Git URI. + ${GitHubUri}, + + [Parameter(ParameterSetName='CreateExpandedGitHub')] + [Parameter(ParameterSetName='CreateViaIdentityExpandedGitHub')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Git branch. + ${GitHubBranch}, + + [Parameter(ParameterSetName='CreateExpandedGitHub')] + [Parameter(ParameterSetName='CreateViaIdentityExpandedGitHub')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The folder where the catalog items can be found inside the repository. + ${GitHubPath}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -16473,10 +17277,12 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminGallery'; - CreateViaIdentityExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminGallery'; + CreateExpandedAdo = 'Az.DevCenter.custom\New-AzDevCenterAdminCatalog'; + CreateExpandedGitHub = 'Az.DevCenter.custom\New-AzDevCenterAdminCatalog'; + CreateViaIdentityExpandedGitHub = 'Az.DevCenter.custom\New-AzDevCenterAdminCatalog'; + CreateViaIdentityExpandedAdo = 'Az.DevCenter.custom\New-AzDevCenterAdminCatalog'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('CreateExpandedAdo', 'CreateExpandedGitHub') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -16537,25 +17343,19 @@ end { <# .Synopsis -Creates or updates a Network Connections resource +Creates or updates a Dev Box definition. .Description -Creates or updates a Network Connections resource -.Example -New-AzDevCenterAdminNetworkConnection -Name eastusNetwork -ResourceGroupName testRg -Location westus3 -DomainJoinType AzureADJoin -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" - -.Example -New-AzDevCenterAdminNetworkConnection -Name eastusNetwork -ResourceGroupName testRg -Location westus3 -DomainJoinType HybridAzureADJoin -DomainName mydomaincontroller.local -DomainPassword $password -DomainUsername testuser@mydomaincontroller.local -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" +Creates or updates a Dev Box definition. .Example -$networkConnection = @{"ResourceGroupName" = "testRg"; "NetworkConnectionName" = "eastusNetwork"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminNetworkConnection -InputObject $networkConnection -Location westus3 -DomainJoinType AzureADJoin -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" +New-AzDevCenterAdminDevBoxDefinition -Name "WebDevBox" -DevCenterName Contoso -ResourceGroupName testRg -Location "westus3" -HibernateSupport "Enabled" -ImageReferenceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0" -OSStorageType "ssd_1024gb" -SkuName "general_a_8c32gb_v1" .Example -$networkConnection = @{"ResourceGroupName" = "testRg"; "NetworkConnectionName" = "eastusNetwork"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminNetworkConnection -InputObject $networkConnection -Location westus3 -DomainJoinType HybridAzureADJoin -DomainName mydomaincontroller.local -DomainPassword $password -DomainUsername testuser@mydomaincontroller.local -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" +$devBoxDefinition = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "DevBoxDefinitionName" = "WebDevBox"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminDevBoxDefinition -InputObject $devBoxDefinition -Location "westus3" -HibernateSupport "Enabled" -ImageReferenceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0" -OSStorageType "ssd_1024gb" -SkuName "general_a_8c32gb_v1" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -16563,6 +17363,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -16571,31 +17372,37 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminnetworkconnection +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmindevboxdefinition #> -function New-AzDevCenterAdminNetworkConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection])] +function New-AzDevCenterAdminDevBoxDefinition { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('NetworkConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # Name of the Network Connection that can be applied to a Pool. + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Alias('DevBoxDefinitionName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Dev Box definition. ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -16626,52 +17433,66 @@ param( ${Location}, [Parameter(Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType] - # AAD Join type. - ${DomainJoinType}, + [System.String] + # Image ID, or Image version ID. + # When Image ID is provided, its latest version will be used. + ${ImageReferenceId}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The subnet to attach Virtual Machines to - ${SubnetId}, + # The storage type used for the Operating System disk of Dev Boxes created using this definition. + ${OSStorageType}, - [Parameter()] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Active Directory domain name - ${DomainName}, + # The name of the SKU. + # E.g. + # P3. + # It is typically a letter+number code + ${SkuName}, [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The password for the account used to join domain - ${DomainPassword}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport] + # Indicates whether Dev Boxes created with this definition are capable of hibernation. + # Not all images are capable of supporting hibernation. + # To find out more see https://aka.ms/devbox/hibernate + ${HibernateSupport}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The username of an Active Directory account (user or service account) that has permissions to create computer objects in Active Directory. - # Required format: admin@contoso.com. - ${DomainUsername}, + [System.Int32] + # If the SKU supports scale out/in then the capacity integer should be included. + # If scale out/in is not possible for the resource this may be omitted. + ${SkuCapacity}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The name for resource group where NICs will be placed. - ${NetworkingResourceGroupName}, + # If the service has different generations of hardware, for the same SKU, then that can be captured here. + ${SkuFamily}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Active Directory domain Organization Unit (OU) - ${OrganizationUnit}, + # The SKU size. + # When the name field is the combination of tier and some other value, this would be the standalone code. + ${SkuSize}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] + # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + ${SkuTier}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -16763,8 +17584,8 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminNetworkConnection'; - CreateViaIdentityExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminNetworkConnection'; + CreateExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminDevBoxDefinition'; + CreateViaIdentityExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminDevBoxDefinition'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -16827,19 +17648,19 @@ end { <# .Synopsis -Creates or updates a devcenter plan resource +Creates or updates a gallery. .Description -Creates or updates a devcenter plan resource +Creates or updates a gallery. .Example -New-AzDevCenterAdminPlan -Name ContosoPlan -ResourceGroupName testRg -Location eastus -SkuName CCOG_Standard +New-AzDevCenterAdminGallery -DevCenterName Contoso -Name StandardGallery -ResourceGroupName testRg -GalleryResourceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.Compute/galleries/StandardGallery" .Example -$plan = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminPlan -InputObject $plan -Location eastus -SkuName CCOG_Standard +$gallery = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "GalleryName" = "StandardGallery"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminGallery -InputObject $gallery -GalleryResourceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.Compute/galleries/StandardGallery" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery .Notes COMPLEX PARAMETER PROPERTIES @@ -16847,6 +17668,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -16855,102 +17677,65 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminplan +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmingallery #> -function New-AzDevCenterAdminPlan { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan])] +function New-AzDevCenterAdminGallery { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('PlanName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter plan. - ${Name}, + # The name of the devcenter. + ${DevCenterName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Alias('GalleryName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, + # The name of the gallery. + ${Name}, - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.Int32] - # If the SKU supports scale out/in then the capacity integer should be included. - # If scale out/in is not possible for the resource this may be omitted. - ${SkuCapacity}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # If the service has different generations of hardware, for the same SKU, then that can be captured here. - ${SkuFamily}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The name of the SKU. - # E.g. - # P3. - # It is typically a letter+number code - ${SkuName}, + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # The SKU size. - # When the name field is the combination of tier and some other value, this would be the standalone code. - ${SkuSize}, + # The ID of the target subscription. + ${SubscriptionId}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] - # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - ${SkuTier}, + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, - [Parameter()] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, + [System.String] + # The resource ID of the backing Azure Compute Gallery. + ${GalleryResourceId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -17039,8 +17824,8 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminPlan'; - CreateViaIdentityExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminPlan'; + CreateExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminGallery'; + CreateViaIdentityExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminGallery'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -17103,21 +17888,25 @@ end { <# .Synopsis -Creates or updates a devcenter plan member resource +Creates or updates a Network Connections resource .Description -Creates or updates a devcenter plan member resource +Creates or updates a Network Connections resource .Example -$tags = @{"dev" ="test"} -New-AzDevCenterAdminPlanMember -PlanName ContosoPlan -MemberName d702f662-b3f2-4796-9e8c-13c22378ced3 -ResourceGroupName testRg -Tag $tags -MemberId d702f662-b3f2-4796-9e8c-13c22378ced3 -MemberType User +New-AzDevCenterAdminNetworkConnection -Name eastusNetwork -ResourceGroupName testRg -Location westus3 -DomainJoinType AzureADJoin -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" + .Example -$tags = @{"dev" ="test"} -$planMember = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "MemberName" = "d702f662-b3f2-4796-9e8c-13c22378ced3"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminPlanMember -InputObject $planMember -Tag $tags -MemberId d702f662-b3f2-4796-9e8c-13c22378ced3 -MemberType User +New-AzDevCenterAdminNetworkConnection -Name eastusNetwork -ResourceGroupName testRg -Location westus3 -DomainJoinType HybridAzureADJoin -DomainName mydomaincontroller.local -DomainPassword $password -DomainUsername testuser@mydomaincontroller.local -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" +.Example +$networkConnection = @{"ResourceGroupName" = "testRg"; "NetworkConnectionName" = "eastusNetwork"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminNetworkConnection -InputObject $networkConnection -Location westus3 -DomainJoinType AzureADJoin -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" +.Example +$networkConnection = @{"ResourceGroupName" = "testRg"; "NetworkConnectionName" = "eastusNetwork"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminNetworkConnection -InputObject $networkConnection -Location westus3 -DomainJoinType HybridAzureADJoin -DomainName mydomaincontroller.local -DomainPassword $password -DomainUsername testuser@mydomaincontroller.local -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -17125,6 +17914,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -17133,37 +17923,32 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminplanmember +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminnetworkconnection #> -function New-AzDevCenterAdminPlanMember { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember])] +function New-AzDevCenterAdminNetworkConnection { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Alias('NetworkConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of a devcenter plan member. - ${MemberName}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the devcenter plan. - ${PlanName}, + # Name of the Network Connection that can be applied to a Pool. + ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] @@ -17189,26 +17974,56 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The unique id of the member. - ${MemberId}, + # The geo-location where the resource lives + ${Location}, + + [Parameter(Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType] + # AAD Join type. + ${DomainJoinType}, [Parameter(Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType] - # The type of the member (user, group) - ${MemberType}, + [System.String] + # The subnet to attach Virtual Machines to + ${SubnetId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] - [System.Collections.Hashtable] - # Resource tags. - ${PropertiesTag}, + [System.String] + # Active Directory domain name + ${DomainName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The password for the account used to join domain + ${DomainPassword}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The username of an Active Directory account (user or service account) that has permissions to create computer objects in Active Directory. + # Required format: admin@contoso.com. + ${DomainUsername}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The name for resource group where NICs will be placed. + ${NetworkingResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Active Directory domain Organization Unit (OU) + ${OrganizationUnit}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -17300,8 +18115,8 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminPlanMember'; - CreateViaIdentityExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminPlanMember'; + CreateExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminNetworkConnection'; + CreateViaIdentityExpanded = 'Az.DevCenter.custom\New-AzDevCenterAdminNetworkConnection'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -17376,7 +18191,7 @@ New-AzDevCenterAdminPool -InputObject $pool -Location westus2 -DevBoxDefinitionN .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool .Notes COMPLEX PARAMETER PROPERTIES @@ -17384,6 +18199,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -17392,14 +18208,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -17409,7 +18225,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminpool #> function New-AzDevCenterAdminPool { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -17452,12 +18268,6 @@ param( # The geo-location where the resource lives ${Location}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Name of a Dev Box definition in parent Project of this Pool - ${DevBoxDefinitionName}, - [Parameter(Mandatory)] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] @@ -17465,11 +18275,58 @@ param( # Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. ${LocalAdministrator}, - [Parameter(Mandatory)] + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus] + # Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + ${ActiveHourConfigurationAutoStartEnableStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # The default end time of the active hours + ${ActiveHourConfigurationDefaultEndTimeHour}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # The default start time of the active hours. + ${ActiveHourConfigurationDefaultStartTimeHour}, + + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Name of a Network Connection in parent Project of this Pool - ${NetworkConnectionName}, + # The default IANA timezone id of the active hours. + ${ActiveHourConfigurationDefaultTimeZone}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus] + # Enables or disables whether the Dev Box should be kept awake during active hours. + ${ActiveHourConfigurationKeepAwakeEnableStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Name of a Dev Box definition in parent Project of this Pool. + # Will be ignored if devBoxDefinitionType is Value. + ${DevBoxDefinitionName}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType] + # Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + ${DevBoxDefinitionType}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus] + # Indicates whether Dev Box Tunnel is enabled for a the pool. + ${DevBoxTunnelEnableStatus}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] @@ -17477,6 +18334,13 @@ param( # The display name of the pool. ${DisplayName}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Image ID, or Image version ID. + # When Image ID is provided, its latest version will be used. + ${ImageReferenceId}, + [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] @@ -17484,6 +18348,12 @@ param( # The regions of the managed virtual network (required when managedNetworkType is Managed). ${ManagedVirtualNetworkRegion}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Name of a Network Connection in parent Project of this Pool + ${NetworkConnectionName}, + [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] @@ -17492,6 +18362,42 @@ param( # The also requires that single sign on be enabled on the tenant. ${SingleSignOnStatus}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # If the SKU supports scale out/in then the capacity integer should be included. + # If scale out/in is not possible for the resource this may be omitted. + ${SkuCapacity}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # If the service has different generations of hardware, for the same SKU, then that can be captured here. + ${SkuFamily}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The name of the SKU. + # E.g. + # P3. + # It is typically a letter+number code + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The SKU size. + # When the name field is the combination of tier and some other value, this would be the standalone code. + ${SkuSize}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] + # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + ${SkuTier}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.Int32] @@ -17507,7 +18413,20 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [System.Int32] + # The specified time in minutes to wait before stopping a Dev Box if no connection is made. + ${StopOnNoConnectGracePeriodMinute}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus] + # Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + ${StopOnNoConnectStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -17682,14 +18601,19 @@ New-AzDevCenterAdminProject -InputObject $project -Location eastus -DevCenterId .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject .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. +CUSTOMIZATIONSETTINGIDENTITY : The identities that can to be used in customization scenarios; e.g., to clone a repository. + [IdentityResourceId ]: Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity. + [IdentityType ]: Values can be systemAssignedIdentity or userAssignedIdentity + INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -17698,14 +18622,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -17715,7 +18639,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminproject #> function New-AzDevCenterAdminProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -17758,6 +18682,13 @@ param( # Resource Id of an associated DevCenter ${DevCenterId}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode] + # The property indicates whether Azure AI services is enabled. + ${AzureAiServiceSettingAzureAiServicesMode}, + [Parameter()] [AllowEmptyCollection()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType])] @@ -17766,12 +18697,48 @@ param( # Indicates catalog item types that can be synced. ${CatalogSettingCatalogItemSyncType}, + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]] + # The identities that can to be used in customization scenarios; e.g., to clone a repository. + # To construct, see NOTES section for CUSTOMIZATIONSETTINGIDENTITY properties and create a hash table. + ${CustomizationSettingIdentity}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus] + # Indicates whether user customizations are enabled. + ${CustomizationSettingUserCustomizationsEnableStatus}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] # Description of the project. ${Description}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode] + # Indicates the delete mode for Dev Boxes within this project. + ${DevBoxAutoDeleteSettingDeleteMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. + # ISO8601 format PT[n]H[n]M[n]S. + ${DevBoxAutoDeleteSettingGracePeriod}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. + # ISO8601 format PT[n]H[n]M[n]S. + ${DevBoxAutoDeleteSettingInactiveThreshold}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] @@ -17803,11 +18770,31 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [System.Int32] + # When specified, limits the maximum number of concurrent sessions across all pools in the project. + ${ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode] + # The property indicates whether serverless GPU access is enabled on the project. + ${ServerlessGpuSessionSettingServerlessGpuSessionsMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode] + # Indicates whether workspace storage is enabled. + ${WorkspaceStorageSettingWorkspaceStorageMode}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -17976,7 +18963,7 @@ New-AzDevCenterAdminProjectCatalog -InputObject $catalog -GitHubBranch main -Git .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -17984,6 +18971,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -17992,14 +18980,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -18009,7 +18997,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminprojectcatalog #> function New-AzDevCenterAdminProjectCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='CreateExpandedAdo', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpandedAdo', Mandatory)] @@ -18088,7 +19076,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -18308,7 +19296,7 @@ New-AzDevCenterAdminProjectEnvironmentType -InputObject $envType -CreatorRoleAss .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -18316,6 +19304,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -18324,14 +19313,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -18341,7 +19330,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminprojectenvironmenttype #> function New-AzDevCenterAdminProjectEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -18377,27 +19366,20 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Id of a subscription that the environment type will be mapped to. - # The environment's resources will be deployed into this subscription. - ${DeploymentTargetId}, - - [Parameter(Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus] - # Defines whether this Environment Type can be used in this Project. - ${Status}, - [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles]))] [System.Collections.Hashtable] # A map of roles to assign to the environment creator. ${CreatorRoleAssignmentRole}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Id of a subscription that the environment type will be mapped to. + # The environment's resources will be deployed into this subscription. + ${DeploymentTargetId}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] @@ -18426,16 +19408,23 @@ param( # The geo-location for the environment type ${Location}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus] + # Defines whether this Environment Type can be used in this Project. + ${Status}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments]))] [System.Collections.Hashtable] # Role Assignments created on environment backing resources. # This is a mapping from a user object ID to an object of role definition IDs. @@ -18592,7 +19581,7 @@ New-AzDevCenterAdminSchedule -InputObject $schedule .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule .Notes COMPLEX PARAMETER PROPERTIES @@ -18600,6 +19589,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -18608,14 +19598,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -18625,7 +19615,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminschedule #> function New-AzDevCenterAdminSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -18852,6 +19842,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -18860,14 +19851,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -19083,7 +20074,7 @@ New-AzDevCenterAdminSchedule -InputObject $scheduleInput -State "Disabled" -Time .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule .Notes COMPLEX PARAMETER PROPERTIES @@ -19091,6 +20082,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -19099,14 +20091,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -19116,7 +20108,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminschedule #> function Update-AzDevCenterAdminSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -19161,7 +20153,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminAttachedNetwork.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminAttachedNetwork.ps1 index 4334dd463084..7dc543f21c9a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminAttachedNetwork.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminAttachedNetwork.ps1 @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -46,14 +47,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminCatalog.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminCatalog.ps1 index 686569706f24..481147a85f29 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminCatalog.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminCatalog.ps1 @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminDevBoxDefinition.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminDevBoxDefinition.ps1 index 66187e86d80d..45bb258e1b4e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminDevBoxDefinition.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminDevBoxDefinition.ps1 @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -46,14 +47,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminDevCenter.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminDevCenter.ps1 index cdea562fb149..721ff1fffc52 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminDevCenter.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminDevCenter.ps1 @@ -37,6 +37,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -45,14 +46,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminEnvironmentType.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminEnvironmentType.ps1 index 0aa90ba6a2c2..121f3140324f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminEnvironmentType.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminEnvironmentType.ps1 @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminGallery.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminGallery.ps1 index 7fafe11ddde6..04f7bf396155 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminGallery.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminGallery.ps1 @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminNetworkConnection.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminNetworkConnection.ps1 index 83a5aa0776ad..a1ecfd6203dc 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminNetworkConnection.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminNetworkConnection.ps1 @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminPlan.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminPlan.ps1 deleted file mode 100644 index 8afadf6977c7..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminPlan.ps1 +++ /dev/null @@ -1,249 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code -# is regenerated. -# ---------------------------------------------------------------------------------- - -<# -.Synopsis -Deletes a devcenter plan -.Description -Deletes a devcenter plan -.Example -Remove-AzDevCenterAdminPlan -Name ContosoPlan -ResourceGroupName testRg -.Example -$plan = Get-AzDevCenterAdminPlan -ResourceGroupName testRg -Name ContosoPlan - -Remove-AzDevCenterAdminPlan -InputObject $plan - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity -.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 - [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. - [CatalogName ]: The name of the Catalog. - [DevBoxDefinitionName ]: The name of the Dev Box definition. - [DevCenterName ]: The name of the devcenter. - [EncryptionSetName ]: The name of the devcenter encryption set. - [EnvironmentDefinitionName ]: The name of the Environment Definition. - [EnvironmentTypeName ]: The name of the environment type. - [GalleryName ]: The name of the gallery. - [Id ]: Resource identity path - [ImageName ]: The name of the image. - [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. - [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. - [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. - [PoolName ]: Name of the pool. - [ProjectName ]: The name of the project. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ScheduleName ]: The name of the schedule that uniquely identifies it. - [SubscriptionId ]: The ID of the target subscription. - [TaskName ]: The name of the Task. - [VersionName ]: The version of the image. -.Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminplan -#> -function Remove-AzDevCenterAdminPlan { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('PlanName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the devcenter plan. - ${Name}, - - [Parameter(ParameterSetName='Delete', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='Delete')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.private\Remove-AzDevCenterAdminPlan_Delete'; - DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminPlan_DeleteViaIdentity'; - } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } - if ($testPlayback) { - $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') - } else { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminPlanMember.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminPlanMember.ps1 deleted file mode 100644 index 3bc415c6c27f..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminPlanMember.ps1 +++ /dev/null @@ -1,253 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code -# is regenerated. -# ---------------------------------------------------------------------------------- - -<# -.Synopsis -Deletes a devcenter plan member -.Description -Deletes a devcenter plan member -.Example -Remove-AzDevCenterAdminPlanMember -ResourceGroupName testRg -PlanName ContosoPlan -MemberName d702f662-b3f2-4796-9e8c-13c22378ced3 -.Example -$planMember = Get-AzDevCenterAdminPlanMember -ResourceGroupName testRg -PlanName ContosoPlan -MemberName d702f662-b3f2-4796-9e8c-13c22378ced3 -Remove-AzDevCenterAdminPlanMember -InputObject $planMember - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity -.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 - [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. - [CatalogName ]: The name of the Catalog. - [DevBoxDefinitionName ]: The name of the Dev Box definition. - [DevCenterName ]: The name of the devcenter. - [EncryptionSetName ]: The name of the devcenter encryption set. - [EnvironmentDefinitionName ]: The name of the Environment Definition. - [EnvironmentTypeName ]: The name of the environment type. - [GalleryName ]: The name of the gallery. - [Id ]: Resource identity path - [ImageName ]: The name of the image. - [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. - [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. - [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. - [PoolName ]: Name of the pool. - [ProjectName ]: The name of the project. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ScheduleName ]: The name of the schedule that uniquely identifies it. - [SubscriptionId ]: The ID of the target subscription. - [TaskName ]: The name of the Task. - [VersionName ]: The version of the image. -.Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminplanmember -#> -function Remove-AzDevCenterAdminPlanMember { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='Delete', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of a devcenter plan member. - ${MemberName}, - - [Parameter(ParameterSetName='Delete', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the devcenter plan. - ${PlanName}, - - [Parameter(ParameterSetName='Delete', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='Delete')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.private\Remove-AzDevCenterAdminPlanMember_Delete'; - DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminPlanMember_DeleteViaIdentity'; - } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } - if ($testPlayback) { - $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') - } else { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminPool.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminPool.ps1 index e7383d445b8a..4ae93e5c7c10 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminPool.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminPool.ps1 @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminProject.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminProject.ps1 index 7c0918de5362..ac9451272b0e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminProject.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminProject.ps1 @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminProjectCatalog.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminProjectCatalog.ps1 index a42fda0bccd1..64c728750318 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminProjectCatalog.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminProjectCatalog.ps1 @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminProjectEnvironmentType.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminProjectEnvironmentType.ps1 index 97634749f734..57caa88fc547 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminProjectEnvironmentType.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminProjectEnvironmentType.ps1 @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminProjectPolicy.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminProjectPolicy.ps1 new file mode 100644 index 000000000000..e26d7fa2690f --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminProjectPolicy.ps1 @@ -0,0 +1,255 @@ + +# ---------------------------------------------------------------------------------- +# 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 an project policy. +.Description +Deletes an project policy. +.Example +Remove-AzDevCenterAdminProjectPolicy -DevCenterName Contoso -Name MyPolicy -ResourceGroupName testRg +.Example +$policy = Get-AzDevCenterAdminProjectPolicy -DevCenterName Contoso -Name MyPolicy -ResourceGroupName testRg +Remove-AzDevCenterAdminProjectPolicy -InputObject $policy + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteradminprojectpolicy +#> +function Remove-AzDevCenterAdminProjectPolicy { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ProjectPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project policy. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.private\Remove-AzDevCenterAdminProjectPolicy_Delete'; + DeleteViaIdentity = 'Az.DevCenter.private\Remove-AzDevCenterAdminProjectPolicy_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminSchedule.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminSchedule.ps1 index e10cb68d0348..5a9b3689c086 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminSchedule.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Remove-AzDevCenterAdminSchedule.ps1 @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Start-AzDevCenterAdminNetworkConnectionHealthCheck.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Start-AzDevCenterAdminNetworkConnectionHealthCheck.ps1 index 463976a6415e..28d6f036a1e6 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Start-AzDevCenterAdminNetworkConnectionHealthCheck.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Start-AzDevCenterAdminNetworkConnectionHealthCheck.ps1 @@ -38,6 +38,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -46,14 +47,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Start-AzDevCenterAdminPoolHealthCheck.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Start-AzDevCenterAdminPoolHealthCheck.ps1 index 056635f18762..86ed99ef6fd5 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Start-AzDevCenterAdminPoolHealthCheck.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Start-AzDevCenterAdminPoolHealthCheck.ps1 @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Stop-AzDevCenterAdminProjectCatalogImageDefinitionBuild.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Stop-AzDevCenterAdminProjectCatalogImageDefinitionBuild.ps1 new file mode 100644 index 000000000000..c05d04cc5368 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Stop-AzDevCenterAdminProjectCatalogImageDefinitionBuild.ps1 @@ -0,0 +1,279 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Cancels the specified build for an image definition. +.Description +Cancels the specified build for an image definition. +.Example +Stop-AzDevCenterAdminProjectCatalogImageDefinitionBuild ` + -BuildName "0a28fc61-6f87-4611-8fe2-32df44ab93b7" ` + -CatalogName "CentralCatalog" ` + -ImageDefinitionName "DefaultDevImage" ` + -ProjectName "DevProject" ` + -ResourceGroupName "rg1" ` + -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +.Example +$inputObject = @{ + ResourceGroupName = "rg1" + ProjectName = "DevProject" + CatalogName = "CentralCatalog" + ImageDefinitionName = "DefaultDevImage" + BuildName = "0a28fc61-6f87-4611-8fe2-32df44ab93b7" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +Stop-AzDevCenterAdminProjectCatalogImageDefinitionBuild -InputObject $inputObject + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/stop-azdevcenteradminprojectcatalogimagedefinitionbuild +#> +function Stop-AzDevCenterAdminProjectCatalogImageDefinitionBuild { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Cancel', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The ID of the Image Definition Build. + ${BuildName}, + + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Cancel')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CancelViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 = @{ + Cancel = 'Az.DevCenter.private\Stop-AzDevCenterAdminProjectCatalogImageDefinitionBuild_Cancel'; + CancelViaIdentity = 'Az.DevCenter.private\Stop-AzDevCenterAdminProjectCatalogImageDefinitionBuild_CancelViaIdentity'; + } + if (('Cancel') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/Sync-AzDevCenterAdminCatalog.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Sync-AzDevCenterAdminCatalog.ps1 index 70d829e4bd61..dcc49d89bdb1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Sync-AzDevCenterAdminCatalog.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Sync-AzDevCenterAdminCatalog.ps1 @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Sync-AzDevCenterAdminProjectCatalog.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Sync-AzDevCenterAdminProjectCatalog.ps1 index bfec14fe301e..ac5e1dcead64 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Sync-AzDevCenterAdminProjectCatalog.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Sync-AzDevCenterAdminProjectCatalog.ps1 @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminCatalog.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminCatalog.ps1 index 3a8024de6298..55f3cd960198 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminCatalog.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminCatalog.ps1 @@ -29,7 +29,7 @@ Update-AzDevCenterAdminCatalog -InputObject $catalogInput -GitHubPath "testpath" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -37,6 +37,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -45,14 +46,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -62,7 +63,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradmincatalog #> function Update-AzDevCenterAdminCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -156,7 +157,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminDevBoxDefinition.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminDevBoxDefinition.ps1 index 62724a6b9fb6..3c5d4b748cb4 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminDevBoxDefinition.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminDevBoxDefinition.ps1 @@ -36,7 +36,7 @@ Update-AzDevCenterAdminDevBoxDefinition -InputObject $devBoxDefinitionId -Hibern .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -44,6 +44,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -52,14 +53,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -69,7 +70,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradmindevboxdefinition #> function Update-AzDevCenterAdminDevBoxDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -166,7 +167,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminDevCenter.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminDevCenter.ps1 index a3dbc1f17cb7..eb6a22897a30 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminDevCenter.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminDevCenter.ps1 @@ -29,7 +29,7 @@ Update-AzDevCenterAdminDevCenter -InputObject $devCenterInput -IdentityType "Sys .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter .Notes COMPLEX PARAMETER PROPERTIES @@ -37,6 +37,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -45,14 +46,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -62,7 +63,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradmindevcenter #> function Update-AzDevCenterAdminDevCenter { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -130,12 +131,6 @@ param( # Defaults to Enabled if not set. ${NetworkSettingMicrosoftHostedNetworkEnableStatus}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Resource Id of an associated Plan - ${PlanId}, - [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] @@ -145,7 +140,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminEnvironmentType.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminEnvironmentType.ps1 index 3b7a46eb4617..fc475ada227b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminEnvironmentType.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminEnvironmentType.ps1 @@ -32,7 +32,7 @@ Update-AzDevCenterAdminEnvironmentType -InputObject $envType -Tag $tags .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -40,6 +40,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -48,14 +49,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -65,7 +66,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminenvironmenttype #> function Update-AzDevCenterAdminEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -110,7 +111,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminNetworkConnection.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminNetworkConnection.ps1 index 600266044490..1397278a6ca4 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminNetworkConnection.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminNetworkConnection.ps1 @@ -33,7 +33,7 @@ Update-AzDevCenterAdminNetworkConnection -InputObject $hybridNetworkConnectionIn .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -49,14 +50,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -66,7 +67,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminnetworkconnection #> function Update-AzDevCenterAdminNetworkConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -130,7 +131,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminPlan.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminPlan.ps1 deleted file mode 100644 index df551ed58511..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminPlan.ps1 +++ /dev/null @@ -1,285 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# 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 -Partially updates a devcenter plan. -.Description -Partially updates a devcenter plan. -.Example -Update-AzDevCenterAdminPlan -Name ContosoPlan -ResourceGroupName testRg -SkuName CCOG_Standard -.Example -$plan = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -Update-AzDevCenterAdminPlan -InputObject $plan -SkuName CCOG_Standard - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan -.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 - [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. - [CatalogName ]: The name of the Catalog. - [DevBoxDefinitionName ]: The name of the Dev Box definition. - [DevCenterName ]: The name of the devcenter. - [EncryptionSetName ]: The name of the devcenter encryption set. - [EnvironmentDefinitionName ]: The name of the Environment Definition. - [EnvironmentTypeName ]: The name of the environment type. - [GalleryName ]: The name of the gallery. - [Id ]: Resource identity path - [ImageName ]: The name of the image. - [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. - [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. - [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. - [PoolName ]: Name of the pool. - [ProjectName ]: The name of the project. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ScheduleName ]: The name of the schedule that uniquely identifies it. - [SubscriptionId ]: The ID of the target subscription. - [TaskName ]: The name of the Task. - [VersionName ]: The version of the image. -.Link -https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminplan -#> -function Update-AzDevCenterAdminPlan { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan])] -[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Alias('PlanName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the devcenter plan. - ${Name}, - - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.Int32] - # If the SKU supports scale out/in then the capacity integer should be included. - # If scale out/in is not possible for the resource this may be omitted. - ${SkuCapacity}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # If the service has different generations of hardware, for the same SKU, then that can be captured here. - ${SkuFamily}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The name of the SKU. - # E.g. - # P3. - # It is typically a letter+number code - ${SkuName}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The SKU size. - # When the name field is the combination of tier and some other value, this would be the standalone code. - ${SkuSize}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] - # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - ${SkuTier}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.private\Update-AzDevCenterAdminPlan_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminPlan_UpdateViaIdentityExpanded'; - } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } - if ($testPlayback) { - $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') - } else { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminPlanMember.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminPlanMember.ps1 deleted file mode 100644 index 4938f6119738..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminPlanMember.ps1 +++ /dev/null @@ -1,258 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# 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 -Partially updates a devcenter plan. -.Description -Partially updates a devcenter plan. -.Example -$tags = @{"dev" = "test" } - -Update-AzDevCenterAdminPlanMember -PlanName ContosoPlan -MemberName d702f662-b3f2-4796-9e8c-13c22378ced3 -ResourceGroupName testRg -Tag $tags -.Example -$planMember = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "MemberName" = "d702f662-b3f2-4796-9e8c-13c22378ced3"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -$tags = @{"dev" = "test" } - -Update-AzDevCenterAdminPlanMember -InputObject $planMember -Tag $tags - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember -.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 - [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. - [CatalogName ]: The name of the Catalog. - [DevBoxDefinitionName ]: The name of the Dev Box definition. - [DevCenterName ]: The name of the devcenter. - [EncryptionSetName ]: The name of the devcenter encryption set. - [EnvironmentDefinitionName ]: The name of the Environment Definition. - [EnvironmentTypeName ]: The name of the environment type. - [GalleryName ]: The name of the gallery. - [Id ]: Resource identity path - [ImageName ]: The name of the image. - [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. - [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. - [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. - [PoolName ]: Name of the pool. - [ProjectName ]: The name of the project. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ScheduleName ]: The name of the schedule that uniquely identifies it. - [SubscriptionId ]: The ID of the target subscription. - [TaskName ]: The name of the Task. - [VersionName ]: The version of the image. -.Link -https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminplanmember -#> -function Update-AzDevCenterAdminPlanMember { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember])] -[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of a devcenter plan member. - ${MemberName}, - - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the devcenter plan. - ${PlanName}, - - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.private\Update-AzDevCenterAdminPlanMember_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminPlanMember_UpdateViaIdentityExpanded'; - } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } - if ($testPlayback) { - $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') - } else { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminPool.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminPool.ps1 index a3d9be45edfa..41ac51ff15b4 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminPool.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminPool.ps1 @@ -29,7 +29,7 @@ Update-AzDevCenterAdminPool -InputObject $poolInput -DevBoxDefinitionName WebDev .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool .Notes COMPLEX PARAMETER PROPERTIES @@ -37,6 +37,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -45,14 +46,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -62,7 +63,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminpool #> function Update-AzDevCenterAdminPool { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -99,18 +100,72 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus] + # Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + ${ActiveHourConfigurationAutoStartEnableStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # The default end time of the active hours + ${ActiveHourConfigurationDefaultEndTimeHour}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # The default start time of the active hours. + ${ActiveHourConfigurationDefaultStartTimeHour}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Name of a Dev Box definition in parent Project of this Pool + # The default IANA timezone id of the active hours. + ${ActiveHourConfigurationDefaultTimeZone}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus] + # Enables or disables whether the Dev Box should be kept awake during active hours. + ${ActiveHourConfigurationKeepAwakeEnableStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Name of a Dev Box definition in parent Project of this Pool. + # Will be ignored if devBoxDefinitionType is Value. ${DevBoxDefinitionName}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType] + # Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + ${DevBoxDefinitionType}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus] + # Indicates whether Dev Box Tunnel is enabled for a the pool. + ${DevBoxTunnelEnableStatus}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] # The display name of the pool. ${DisplayName}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Image ID, or Image version ID. + # When Image ID is provided, its latest version will be used. + ${ImageReferenceId}, + [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] @@ -139,6 +194,42 @@ param( # The also requires that single sign on be enabled on the tenant. ${SingleSignOnStatus}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # If the SKU supports scale out/in then the capacity integer should be included. + # If scale out/in is not possible for the resource this may be omitted. + ${SkuCapacity}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # If the service has different generations of hardware, for the same SKU, then that can be captured here. + ${SkuFamily}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The name of the SKU. + # E.g. + # P3. + # It is typically a letter+number code + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The SKU size. + # When the name field is the combination of tier and some other value, this would be the standalone code. + ${SkuSize}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] + # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + ${SkuTier}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.Int32] @@ -154,7 +245,20 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [System.Int32] + # The specified time in minutes to wait before stopping a Dev Box if no connection is made. + ${StopOnNoConnectGracePeriodMinute}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus] + # Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + ${StopOnNoConnectStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminProject.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminProject.ps1 index 64cacaef4d41..57a8e9bdda26 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminProject.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminProject.ps1 @@ -29,14 +29,19 @@ Update-AzDevCenterAdminProject -InputObject $projectInput -MaxDevBoxesPerUser 5 .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject .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. +CUSTOMIZATIONSETTINGIDENTITY : The identities that can to be used in customization scenarios; e.g., to clone a repository. + [IdentityResourceId ]: Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity. + [IdentityType ]: Values can be systemAssignedIdentity or userAssignedIdentity + INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -45,14 +50,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -62,7 +67,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminproject #> function Update-AzDevCenterAdminProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -93,6 +98,13 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode] + # The property indicates whether Azure AI services is enabled. + ${AzureAiServiceSettingAzureAiServicesMode}, + [Parameter()] [AllowEmptyCollection()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType])] @@ -101,12 +113,48 @@ param( # Indicates catalog item types that can be synced. ${CatalogSettingCatalogItemSyncType}, + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]] + # The identities that can to be used in customization scenarios; e.g., to clone a repository. + # To construct, see NOTES section for CUSTOMIZATIONSETTINGIDENTITY properties and create a hash table. + ${CustomizationSettingIdentity}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus] + # Indicates whether user customizations are enabled. + ${CustomizationSettingUserCustomizationsEnableStatus}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] # Description of the project. ${Description}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode] + # Indicates the delete mode for Dev Boxes within this project. + ${DevBoxAutoDeleteSettingDeleteMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. + # ISO8601 format PT[n]H[n]M[n]S. + ${DevBoxAutoDeleteSettingGracePeriod}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. + # ISO8601 format PT[n]H[n]M[n]S. + ${DevBoxAutoDeleteSettingInactiveThreshold}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] @@ -138,11 +186,31 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [System.Int32] + # When specified, limits the maximum number of concurrent sessions across all pools in the project. + ${ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode] + # The property indicates whether serverless GPU access is enabled on the project. + ${ServerlessGpuSessionSettingServerlessGpuSessionsMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode] + # Indicates whether workspace storage is enabled. + ${WorkspaceStorageSettingWorkspaceStorageMode}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminProjectCatalog.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminProjectCatalog.ps1 index 456efcac950d..e9fdba5b123d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminProjectCatalog.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminProjectCatalog.ps1 @@ -27,11 +27,11 @@ $catalogInput = Get-AzDevCenterAdminProjectCatalog -ProjectName DevProject -Cata Update-AzDevCenterAdminProjectCatalog -InputObject $catalogInput -GitHubPath "testpath" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -52,6 +52,7 @@ BODY : The catalog's properties for partial update. Properties n INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -60,14 +61,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -77,7 +78,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminprojectcatalog #> function Update-AzDevCenterAdminProjectCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='PatchExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Patch', Mandatory)] @@ -121,7 +122,7 @@ param( [Parameter(ParameterSetName='Patch', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='PatchViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate] # The catalog's properties for partial update. # Properties not provided in the update request will not be changed. # To construct, see NOTES section for BODY properties and create a hash table. @@ -194,7 +195,7 @@ param( [Parameter(ParameterSetName='PatchExpanded')] [Parameter(ParameterSetName='PatchViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminProjectEnvironmentType.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminProjectEnvironmentType.ps1 index 9eeaab280a91..174f0b13f44e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminProjectEnvironmentType.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminProjectEnvironmentType.ps1 @@ -49,7 +49,7 @@ Update-AzDevCenterAdminProjectEnvironmentType -InputObject $projEnvTypeInput -Cr .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -57,6 +57,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -65,14 +66,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -82,7 +83,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminprojectenvironmenttype #> function Update-AzDevCenterAdminProjectEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -120,7 +121,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles]))] [System.Collections.Hashtable] # A map of roles to assign to the environment creator. ${CreatorRoleAssignmentRole}, @@ -163,14 +164,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments]))] [System.Collections.Hashtable] # Role Assignments created on environment backing resources. # This is a mapping from a user object ID to an object of role definition IDs. diff --git a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminProjectPolicy.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminProjectPolicy.ps1 new file mode 100644 index 000000000000..6d08e50cdd63 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminProjectPolicy.ps1 @@ -0,0 +1,288 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Partially updates an project policy. +.Description +Partially updates an project policy. +.Example +$resourcePolicies = @( + @{ Resource = "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/default/images/microsoftvisualstudio_visualstudio2019plustools_vs-2019-ent-general-win10-m365-gen2" }; + @{ Action = "Deny"; ResourceType = "Skus" } +) +Update-AzDevCenterAdminProjectPolicy ` + -DevCenterName "Contoso" ` + -Name "myPolicy" ` + -ResourceGroupName "testRg" ` + -SubscriptionId "0ac520ee-14c0-480f-b6c9-0a90c58ffff" ` + -ResourcePolicy $resourcePolicies +.Example +$inputObject = @{ + ResourceGroupName = "testRg" + DevCenterName = "Contoso" + ProjectPolicyName = "myPolicy" + SubscriptionId = "0ac520ee-14c0-480f-b6c9-0a90c58ffff" +} +$scopes = @( + "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/projects/devProject"; + "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/projects/devProject2" +) +Update-AzDevCenterAdminProjectPolicy -InputObject $inputObject -Scope $scopes + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. + +RESOURCEPOLICY : Resource policies that are a part of this project policy. + [Action ]: Policy action to be taken on the resources. This is optional, and defaults to allow + [Filter ]: Optional. When specified, this expression is used to filter the resources. + [Resource ]: Resources that are included and shared as a part of a project policy. + [ResourceType ]: Optional. The resource type being restricted or allowed by a project policy. Used with a given action to restrict or allow access to a resource type. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminprojectpolicy +#> +function Update-AzDevCenterAdminProjectPolicy { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('ProjectPolicyName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the project policy. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[]] + # Resource policies that are a part of this project policy. + # To construct, see NOTES section for RESOURCEPOLICY properties and create a hash table. + ${ResourcePolicy}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String[]] + # Resources that have access to the shared resources that are a part of this project policy. + ${Scope}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.DevCenter.private\Update-AzDevCenterAdminProjectPolicy_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.DevCenter.private\Update-AzDevCenterAdminProjectPolicy_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminSchedule.ps1 b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminSchedule.ps1 index 2ba3de4daf59..285a84252628 100644 --- a/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminSchedule.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/exports/Update-AzDevCenterAdminSchedule.ps1 @@ -29,7 +29,7 @@ New-AzDevCenterAdminSchedule -InputObject $scheduleInput -State "Disabled" -Time .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule .Notes COMPLEX PARAMETER PROPERTIES @@ -37,6 +37,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -45,14 +46,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -62,7 +63,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminschedule #> function Update-AzDevCenterAdminSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -107,7 +108,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/generate-info.json b/generated/DevCenter/DevCenter.AutoRest/generate-info.json index 0963107c4f1b..ca743a7b98b3 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generate-info.json +++ b/generated/DevCenter/DevCenter.AutoRest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "ac3b0a11-4f4f-4d5b-a971-e820b3344978" + "generate_Id": "412c3969-68d0-48ad-a79e-20fedb1d09cd" } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/DevCenter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/DevCenter.cs index 178a22f6ca0c..b189a43b40f1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/DevCenter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/DevCenter.cs @@ -28,9 +28,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AttachedNetworksCreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AttachedNetworksCreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -76,9 +76,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AttachedNetworksCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AttachedNetworksCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -136,7 +136,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AttachedNetworksCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AttachedNetworksCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -250,13 +250,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -284,7 +284,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AttachedNetworksCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task AttachedNetworksCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -320,9 +320,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AttachedNetworksDelete(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AttachedNetworksDelete(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -364,9 +364,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AttachedNetworksDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AttachedNetworksDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -421,7 +421,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AttachedNetworksDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AttachedNetworksDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -548,7 +548,7 @@ public partial class DevCenter default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -608,9 +608,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AttachedNetworksGetByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AttachedNetworksGetByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, string attachedNetworkConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -651,9 +651,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AttachedNetworksGetByDevCenterViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AttachedNetworksGetByDevCenterViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -707,7 +707,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AttachedNetworksGetByDevCenter_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AttachedNetworksGetByDevCenter_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -725,13 +725,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -791,9 +791,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AttachedNetworksGetByProject(string subscriptionId, string resourceGroupName, string projectName, string attachedNetworkConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AttachedNetworksGetByProject(string subscriptionId, string resourceGroupName, string projectName, string attachedNetworkConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -834,9 +834,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AttachedNetworksGetByProjectViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AttachedNetworksGetByProjectViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -890,7 +890,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AttachedNetworksGetByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AttachedNetworksGetByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -908,13 +908,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -974,9 +974,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AttachedNetworksListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AttachedNetworksListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1019,9 +1019,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AttachedNetworksListByDevCenterViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AttachedNetworksListByDevCenterViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1075,7 +1075,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AttachedNetworksListByDevCenter_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AttachedNetworksListByDevCenter_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1093,13 +1093,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1155,9 +1155,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AttachedNetworksListByProject(string subscriptionId, string resourceGroupName, string projectName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AttachedNetworksListByProject(string subscriptionId, string resourceGroupName, string projectName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1200,9 +1200,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AttachedNetworksListByProjectViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AttachedNetworksListByProjectViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1256,7 +1256,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AttachedNetworksListByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AttachedNetworksListByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1274,13 +1274,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1336,9 +1336,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsConnect(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsConnect(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1380,9 +1380,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsConnectViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsConnectViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1437,7 +1437,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CatalogsConnect_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CatalogsConnect_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1558,7 +1558,7 @@ public partial class DevCenter default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1619,9 +1619,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsCreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsCreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1667,9 +1667,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1727,7 +1727,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CatalogsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CatalogsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1841,13 +1841,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1875,7 +1875,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CatalogsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task CatalogsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1911,9 +1911,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsDelete(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsDelete(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1955,9 +1955,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2012,7 +2012,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CatalogsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CatalogsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2139,7 +2139,7 @@ public partial class DevCenter default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2199,9 +2199,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsGet(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsGet(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2245,9 +2245,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsGetSyncErrorDetails(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsGetSyncErrorDetails(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2289,9 +2289,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsGetSyncErrorDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsGetSyncErrorDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2346,7 +2346,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CatalogsGetSyncErrorDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CatalogsGetSyncErrorDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2364,13 +2364,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SyncErrorDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SyncErrorDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2427,9 +2427,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2483,7 +2483,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CatalogsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CatalogsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2501,13 +2501,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2567,9 +2567,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2612,9 +2612,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsListByDevCenterViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsListByDevCenterViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2668,7 +2668,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CatalogsListByDevCenter_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CatalogsListByDevCenter_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2686,13 +2686,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2748,9 +2748,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsSync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsSync(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2792,9 +2792,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsSyncViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsSyncViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2849,7 +2849,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CatalogsSync_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CatalogsSync_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2970,7 +2970,7 @@ public partial class DevCenter default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3031,9 +3031,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3079,9 +3079,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CatalogsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CatalogsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3139,7 +3139,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CatalogsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CatalogsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3253,13 +3253,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3287,7 +3287,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CatalogsUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task CatalogsUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3320,9 +3320,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CheckNameAvailabilityExecute(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CheckNameAvailabilityExecute(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3363,9 +3363,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CheckNameAvailabilityExecuteViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CheckNameAvailabilityExecuteViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3415,7 +3415,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CheckNameAvailabilityExecute_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CheckNameAvailabilityExecute_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3439,7 +3439,7 @@ public partial class DevCenter default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3486,9 +3486,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CheckScopedNameAvailabilityExecute(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CheckScopedNameAvailabilityExecute(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3529,9 +3529,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CheckScopedNameAvailabilityExecuteViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CheckScopedNameAvailabilityExecuteViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3581,7 +3581,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CheckScopedNameAvailabilityExecute_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CheckScopedNameAvailabilityExecute_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3605,7 +3605,7 @@ public partial class DevCenter default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3630,7 +3630,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CheckScopedNameAvailabilityExecute_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequest body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task CheckScopedNameAvailabilityExecute_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequest body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3655,9 +3655,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CustomizationTasksGet(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string taskName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CustomizationTasksGet(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string taskName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3704,9 +3704,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CustomizationTasksGetErrorDetails(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string taskName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CustomizationTasksGetErrorDetails(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string taskName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3750,9 +3750,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CustomizationTasksGetErrorDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CustomizationTasksGetErrorDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3810,7 +3810,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CustomizationTasksGetErrorDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CustomizationTasksGetErrorDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3828,13 +3828,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogResourceValidationErrorDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogResourceValidationErrorDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3896,9 +3896,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CustomizationTasksGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CustomizationTasksGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3955,7 +3955,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CustomizationTasksGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CustomizationTasksGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3973,13 +3973,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTask.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTask.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4045,9 +4045,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CustomizationTasksListByCatalog(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CustomizationTasksListByCatalog(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4092,9 +4092,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task CustomizationTasksListByCatalogViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task CustomizationTasksListByCatalogViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4151,7 +4151,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task CustomizationTasksListByCatalog_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task CustomizationTasksListByCatalog_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4169,13 +4169,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4237,9 +4237,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxDefinitionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string devBoxDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxDefinitionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string devBoxDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4285,9 +4285,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxDefinitionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxDefinitionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4345,7 +4345,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxDefinitionsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxDefinitionsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4459,13 +4459,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4493,7 +4493,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxDefinitionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string devBoxDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxDefinitionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string devBoxDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -4529,9 +4529,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxDefinitionsDelete(string subscriptionId, string resourceGroupName, string devCenterName, string devBoxDefinitionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxDefinitionsDelete(string subscriptionId, string resourceGroupName, string devCenterName, string devBoxDefinitionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4573,9 +4573,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxDefinitionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxDefinitionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4630,7 +4630,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxDefinitionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxDefinitionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4757,7 +4757,7 @@ public partial class DevCenter default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4817,9 +4817,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxDefinitionsGet(string subscriptionId, string resourceGroupName, string devCenterName, string devBoxDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxDefinitionsGet(string subscriptionId, string resourceGroupName, string devCenterName, string devBoxDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4863,9 +4863,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxDefinitionsGetByProject(string subscriptionId, string resourceGroupName, string projectName, string devBoxDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxDefinitionsGetByProject(string subscriptionId, string resourceGroupName, string projectName, string devBoxDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4906,9 +4906,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxDefinitionsGetByProjectViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxDefinitionsGetByProjectViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4962,7 +4962,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxDefinitionsGetByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxDefinitionsGetByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4980,13 +4980,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5043,9 +5043,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxDefinitionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxDefinitionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5099,7 +5099,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxDefinitionsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxDefinitionsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5117,13 +5117,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5183,9 +5183,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxDefinitionsListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxDefinitionsListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5228,9 +5228,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxDefinitionsListByDevCenterViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxDefinitionsListByDevCenterViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5284,7 +5284,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxDefinitionsListByDevCenter_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxDefinitionsListByDevCenter_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5302,13 +5302,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5364,9 +5364,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxDefinitionsListByProject(string subscriptionId, string resourceGroupName, string projectName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxDefinitionsListByProject(string subscriptionId, string resourceGroupName, string projectName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5409,9 +5409,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxDefinitionsListByProjectViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxDefinitionsListByProjectViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5465,7 +5465,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxDefinitionsListByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxDefinitionsListByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5483,13 +5483,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5546,9 +5546,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxDefinitionsUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string devBoxDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxDefinitionsUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string devBoxDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5594,9 +5594,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxDefinitionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxDefinitionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5654,7 +5654,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxDefinitionsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxDefinitionsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5768,13 +5768,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5802,7 +5802,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxDefinitionsUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string devBoxDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxDefinitionsUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string devBoxDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -5824,12 +5824,13 @@ public partial class DevCenter } } - /// Creates or updates a devcenter resource + /// Cancels the specified build for an image definition. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// Represents a devcenter. - /// a delegate that is called when the remote service returns 200 (OK). + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -5837,9 +5838,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevCentersCreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionBuildCancel(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5851,6 +5852,13 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/devcenters/" + global::System.Uri.EscapeDataString(devCenterName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions/" + + global::System.Uri.EscapeDataString(imageDefinitionName) + + "/builds/" + + global::System.Uri.EscapeDataString(buildName) + + "/cancel" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5859,23 +5867,17 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevCentersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCenterCatalogImageDefinitionBuildCancel_Call(request,onDefault,eventListener,sender); } } - /// Creates or updates a devcenter resource + /// Cancels the specified build for an image definition. /// - /// Represents a devcenter. - /// 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. @@ -5883,24 +5885,27 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevCentersCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionBuildCancelViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions/(?[^/]+)/builds/(?[^/]+)/cancel$", 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.DevCenter/devcenters/{devCenterName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/cancel'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var devCenterName = _match.Groups["devCenterName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageDefinitionName = _match.Groups["imageDefinitionName"].Value; + var buildName = _match.Groups["buildName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -5909,6 +5914,13 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/devcenters/" + devCenterName + + "/catalogs/" + + catalogName + + "/imageDefinitions/" + + imageDefinitionName + + "/builds/" + + buildName + + "/cancel" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5917,22 +5929,19 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevCentersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCenterCatalogImageDefinitionBuildCancel_Call(request,onDefault,eventListener,sender); } } - /// 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. @@ -5940,7 +5949,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevCentersCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionBuildCancel_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5954,6 +5963,7 @@ public partial class DevCenter // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"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 ) @@ -6037,7 +6047,7 @@ public partial class DevCenter } // 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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); // drop the old response _response?.Dispose(); @@ -6051,16 +6061,10 @@ public partial class DevCenter switch ( _response.StatusCode ) { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenter.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6076,18 +6080,20 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// Represents a devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. /// 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 DevCentersCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionBuildCancel_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -6100,17 +6106,29 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageDefinitionName),imageDefinitionName); + await eventListener.AssertMinimumLength(nameof(imageDefinitionName),imageDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(imageDefinitionName),imageDefinitionName,63); + await eventListener.AssertRegEx(nameof(imageDefinitionName),imageDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(buildName),buildName); + await eventListener.AssertMinimumLength(nameof(buildName),buildName,3); + await eventListener.AssertMaximumLength(nameof(buildName),buildName,63); + await eventListener.AssertRegEx(nameof(buildName),buildName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Deletes a devcenter + /// Gets a build for a specified image definition. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -6118,9 +6136,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevCentersDelete(string subscriptionId, string resourceGroupName, string devCenterName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionBuildGet(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6132,6 +6150,12 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/devcenters/" + global::System.Uri.EscapeDataString(devCenterName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions/" + + global::System.Uri.EscapeDataString(imageDefinitionName) + + "/builds/" + + global::System.Uri.EscapeDataString(buildName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6140,19 +6164,71 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevCentersDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.DevCenterCatalogImageDefinitionBuildGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Deletes a devcenter + /// Gets Build details + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 DevCenterCatalogImageDefinitionBuildGetBuildDetails(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions/" + + global::System.Uri.EscapeDataString(imageDefinitionName) + + "/builds/" + + global::System.Uri.EscapeDataString(buildName) + + "/getBuildDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevCenterCatalogImageDefinitionBuildGetBuildDetails_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets Build details /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -6160,24 +6236,27 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevCentersDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionBuildGetBuildDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions/(?[^/]+)/builds/(?[^/]+)/getBuildDetails$", 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.DevCenter/devcenters/{devCenterName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/getBuildDetails'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var devCenterName = _match.Groups["devCenterName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageDefinitionName = _match.Groups["imageDefinitionName"].Value; + var buildName = _match.Groups["buildName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -6186,6 +6265,13 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/devcenters/" + devCenterName + + "/catalogs/" + + catalogName + + "/imageDefinitions/" + + imageDefinitionName + + "/builds/" + + buildName + + "/getBuildDetails" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6194,19 +6280,20 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevCentersDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.DevCenterCatalogImageDefinitionBuildGetBuildDetails_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -6214,7 +6301,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevCentersDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionBuildGetBuildDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6225,103 +6312,6 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -6329,19 +6319,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6357,17 +6341,20 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. /// 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 DevCentersDelete_Validate(string subscriptionId, string resourceGroupName, string devCenterName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionBuildGetBuildDetails_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -6380,13 +6367,23 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageDefinitionName),imageDefinitionName); + await eventListener.AssertMinimumLength(nameof(imageDefinitionName),imageDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(imageDefinitionName),imageDefinitionName,63); + await eventListener.AssertRegEx(nameof(imageDefinitionName),imageDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(buildName),buildName); + await eventListener.AssertMinimumLength(nameof(buildName),buildName,3); + await eventListener.AssertMaximumLength(nameof(buildName),buildName,63); + await eventListener.AssertRegEx(nameof(buildName),buildName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Gets a devcenter. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. + /// Gets a build for a specified image definition. + /// /// 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). @@ -6395,20 +6392,41 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevCentersGet(string subscriptionId, string resourceGroupName, string devCenterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionBuildGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions/(?[^/]+)/builds/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageDefinitionName = _match.Groups["imageDefinitionName"].Value; + var buildName = _match.Groups["buildName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.DevCenter/devcenters/" - + global::System.Uri.EscapeDataString(devCenterName) + + devCenterName + + "/catalogs/" + + catalogName + + "/imageDefinitions/" + + imageDefinitionName + + "/builds/" + + buildName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6422,64 +6440,13 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevCentersGet_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCenterCatalogImageDefinitionBuildGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets a devcenter. - /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 DevCentersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) - { - var apiVersion = @"2024-05-01-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.DevCenter/devcenters/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var devCenterName = _match.Groups["devCenterName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.DevCenter/devcenters/" - + devCenterName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.DevCentersGet_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// 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 @@ -6489,7 +6456,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevCentersGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionBuildGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6507,13 +6474,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenter.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuild.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6529,17 +6496,20 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. /// 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 DevCentersGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionBuildGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, string buildName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -6552,13 +6522,27 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageDefinitionName),imageDefinitionName); + await eventListener.AssertMinimumLength(nameof(imageDefinitionName),imageDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(imageDefinitionName),imageDefinitionName,63); + await eventListener.AssertRegEx(nameof(imageDefinitionName),imageDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(buildName),buildName); + await eventListener.AssertMinimumLength(nameof(buildName),buildName,3); + await eventListener.AssertMaximumLength(nameof(buildName),buildName,63); + await eventListener.AssertRegEx(nameof(buildName),buildName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Lists all devcenters in a resource group. + /// Lists builds for a specified image definition. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. /// 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). @@ -6567,9 +6551,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevCentersListByResourceGroup(string subscriptionId, string resourceGroupName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionBuildsListByImageDefinition(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6579,11 +6563,15 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/devcenters" + + "/providers/Microsoft.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions/" + + global::System.Uri.EscapeDataString(imageDefinitionName) + + "/builds" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -6595,13 +6583,12 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevCentersListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCenterCatalogImageDefinitionBuildsListByImageDefinition_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists all devcenters in a resource group. + /// Lists builds for a specified image definition. /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -6610,34 +6597,41 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevCentersListByResourceGroupViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionBuildsListByImageDefinitionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions/(?[^/]+)/builds$", 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.DevCenter/devcenters'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageDefinitionName = _match.Groups["imageDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/devcenters" + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/catalogs/" + + catalogName + + "/imageDefinitions/" + + imageDefinitionName + + "/builds" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -6649,11 +6643,13 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevCentersListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCenterCatalogImageDefinitionBuildsListByImageDefinition_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -6663,7 +6659,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevCentersListByResourceGroup_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionBuildsListByImageDefinition_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6681,13 +6677,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6703,17 +6699,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. /// 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 DevCentersListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionBuildsListByImageDefinition_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -6722,13 +6720,27 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageDefinitionName),imageDefinitionName); + await eventListener.AssertMinimumLength(nameof(imageDefinitionName),imageDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(imageDefinitionName),imageDefinitionName,63); + await eventListener.AssertRegEx(nameof(imageDefinitionName),imageDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Lists all devcenters in a subscription. + /// Builds an image for the specified Image Definition. /// The ID of the target subscription. - /// The maximum number of resources to return from the operation. Example: '$top=10'. - /// a delegate that is called when the remote service returns 200 (OK). + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -6736,9 +6748,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevCentersListBySubscription(string subscriptionId, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionsBuildImage(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6746,30 +6758,34 @@ public partial class DevCenter var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.DevCenter/devcenters" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions/" + + global::System.Uri.EscapeDataString(imageDefinitionName) + + "/buildImage" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevCentersListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCenterCatalogImageDefinitionsBuildImage_Call(request,onDefault,eventListener,sender); } } - /// Lists all devcenters in a subscription. + /// Builds an image for the specified Image Definition. /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. - /// 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. @@ -6777,49 +6793,60 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevCentersListBySubscriptionViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionsBuildImageViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions/(?[^/]+)/buildImage$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/devcenters'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/buildImage'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageDefinitionName = _match.Groups["imageDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.DevCenter/devcenters" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/catalogs/" + + catalogName + + "/imageDefinitions/" + + imageDefinitionName + + "/buildImage" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevCentersListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCenterCatalogImageDefinitionsBuildImage_Call(request,onDefault,eventListener,sender); } } - /// 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. @@ -6827,7 +6854,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevCentersListBySubscription_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionsBuildImage_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6838,20 +6865,111 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6867,29 +6985,48 @@ public partial class DevCenter } /// - /// 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 maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. /// 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 DevCentersListBySubscription_Validate(string subscriptionId, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionsBuildImage_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - } + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageDefinitionName),imageDefinitionName); + await eventListener.AssertMinimumLength(nameof(imageDefinitionName),imageDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(imageDefinitionName),imageDefinitionName,63); + await eventListener.AssertRegEx(nameof(imageDefinitionName),imageDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } } - /// Partially updates a devcenter. + /// Gets an Image Definition from the catalog /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// Updatable devcenter properties. + /// The name of the Catalog. + /// The name of the Image Definition. /// 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). @@ -6898,9 +7035,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevCentersUpdate(string subscriptionId, string resourceGroupName, string devCenterName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionsGetByDevCenterCatalog(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6912,6 +7049,10 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/devcenters/" + global::System.Uri.EscapeDataString(devCenterName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions/" + + global::System.Uri.EscapeDataString(imageDefinitionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6920,22 +7061,17 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevCentersUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCenterCatalogImageDefinitionsGetByDevCenterCatalog_Call(request,onOk,onDefault,eventListener,sender); } } - /// Partially updates a devcenter. + /// Gets an Image Definition from the catalog /// - /// Updatable devcenter properties. /// 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). @@ -6944,24 +7080,26 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevCentersUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionsGetByDevCenterCatalogViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var devCenterName = _match.Groups["devCenterName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageDefinitionName = _match.Groups["imageDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -6970,6 +7108,10 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/devcenters/" + devCenterName + + "/catalogs/" + + catalogName + + "/imageDefinitions/" + + imageDefinitionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6978,20 +7120,18 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevCentersUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCenterCatalogImageDefinitionsGetByDevCenterCatalog_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -7001,7 +7141,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevCentersUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionsGetByDevCenterCatalog_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7012,102 +7152,6 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -7115,13 +7159,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenter.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7137,18 +7181,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// Updatable devcenter properties. + /// The name of the Catalog. + /// The name of the Image Definition. /// 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 DevCentersUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionsGetByDevCenterCatalog_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -7161,17 +7206,23 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageDefinitionName),imageDefinitionName); + await eventListener.AssertMinimumLength(nameof(imageDefinitionName),imageDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(imageDefinitionName),imageDefinitionName,63); + await eventListener.AssertRegEx(nameof(imageDefinitionName),imageDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Creates or updates a devcenter encryption set resource + /// Gets Image Definition error details /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the devcenter encryption set. - /// Represents a devcenter encryption set. + /// The name of the Catalog. + /// The name of the Image Definition. /// 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). @@ -7180,9 +7231,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EncryptionSetsCreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionsGetErrorDetails(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7194,8 +7245,11 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/devcenters/" + global::System.Uri.EscapeDataString(devCenterName) - + "/encryptionSets/" - + global::System.Uri.EscapeDataString(encryptionSetName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions/" + + global::System.Uri.EscapeDataString(imageDefinitionName) + + "/getErrorDetails" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7204,22 +7258,17 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EncryptionSetsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCenterCatalogImageDefinitionsGetErrorDetails_Call(request,onOk,onDefault,eventListener,sender); } } - /// Creates or updates a devcenter encryption set resource + /// Gets Image Definition error details /// - /// Represents a devcenter encryption set. /// 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). @@ -7228,25 +7277,26 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EncryptionSetsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionsGetErrorDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/encryptionSets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions/(?[^/]+)/getErrorDetails$", 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.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/getErrorDetails'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var devCenterName = _match.Groups["devCenterName"].Value; - var encryptionSetName = _match.Groups["encryptionSetName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageDefinitionName = _match.Groups["imageDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -7255,8 +7305,11 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/devcenters/" + devCenterName - + "/encryptionSets/" - + encryptionSetName + + "/catalogs/" + + catalogName + + "/imageDefinitions/" + + imageDefinitionName + + "/getErrorDetails" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7265,20 +7318,18 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EncryptionSetsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCenterCatalogImageDefinitionsGetErrorDetails_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -7288,7 +7339,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EncryptionSetsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionsGetErrorDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7299,102 +7350,204 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + 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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogResourceValidationErrorDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + default: { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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; - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; + /// + /// Validation method for method. Call this like the actual + /// call, but you will get validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Image Definition. + /// 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 DevCenterCatalogImageDefinitionsGetErrorDetails_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string imageDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageDefinitionName),imageDefinitionName); + await eventListener.AssertMinimumLength(nameof(imageDefinitionName),imageDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(imageDefinitionName),imageDefinitionName,63); + await eventListener.AssertRegEx(nameof(imageDefinitionName),imageDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.UndeclaredResponseException(_response); - } - } + /// List Image Definitions in the catalog. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 DevCenterCatalogImageDefinitionsListByDevCenterCatalog(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // 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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // drop the old response - _response?.Dispose(); + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevCenterCatalogImageDefinitionsListByDevCenterCatalog_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List Image Definitions in the catalog. + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 DevCenterCatalogImageDefinitionsListByDevCenterCatalogViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions$", 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.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/catalogs/" + + catalogName + + "/imageDefinitions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevCenterCatalogImageDefinitionsListByDevCenterCatalog_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 DevCenterCatalogImageDefinitionsListByDevCenterCatalog_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -7402,13 +7555,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7424,19 +7577,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the devcenter encryption set. - /// Represents a devcenter encryption set. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 EncryptionSetsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevCenterCatalogImageDefinitionsListByDevCenterCatalog_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -7449,21 +7602,19 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(encryptionSetName),encryptionSetName); - await eventListener.AssertMinimumLength(nameof(encryptionSetName),encryptionSetName,3); - await eventListener.AssertMaximumLength(nameof(encryptionSetName),encryptionSetName,63); - await eventListener.AssertRegEx(nameof(encryptionSetName),encryptionSetName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Deletes a devcenter encryption set + /// Creates or updates a devcenter resource /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the devcenter encryption set. - /// a delegate that is called when the remote service returns 204 (NoContent). + /// Represents a devcenter. + /// 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. @@ -7471,9 +7622,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EncryptionSetsDelete(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCentersCreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7485,8 +7636,6 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/devcenters/" + global::System.Uri.EscapeDataString(devCenterName) - + "/encryptionSets/" - + global::System.Uri.EscapeDataString(encryptionSetName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7495,18 +7644,23 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EncryptionSetsDelete_Call(request,onNoContent,onDefault,eventListener,sender); + await this.DevCentersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Deletes a devcenter encryption set + /// Creates or updates a devcenter resource /// - /// a delegate that is called when the remote service returns 204 (NoContent). + /// Represents a devcenter. + /// 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. @@ -7514,25 +7668,24 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EncryptionSetsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCentersCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/encryptionSets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var devCenterName = _match.Groups["devCenterName"].Value; - var encryptionSetName = _match.Groups["encryptionSetName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -7541,8 +7694,6 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/devcenters/" + devCenterName - + "/encryptionSets/" - + encryptionSetName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7551,18 +7702,22 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EncryptionSetsDelete_Call(request,onNoContent,onDefault,eventListener,sender); + await this.DevCentersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 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. @@ -7570,7 +7725,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EncryptionSetsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevCentersCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7584,7 +7739,6 @@ public partial class DevCenter // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: azure-async-operation - var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"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 ) @@ -7668,7 +7822,7 @@ public partial class DevCenter } // 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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); // drop the old response _response?.Dispose(); @@ -7682,16 +7836,16 @@ public partial class DevCenter switch ( _response.StatusCode ) { - case global::System.Net.HttpStatusCode.NoContent: + case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenter.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7707,18 +7861,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the devcenter encryption set. + /// Represents a devcenter. /// 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 EncryptionSetsDelete_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevCentersCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -7731,19 +7885,17 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(encryptionSetName),encryptionSetName); - await eventListener.AssertMinimumLength(nameof(encryptionSetName),encryptionSetName,3); - await eventListener.AssertMaximumLength(nameof(encryptionSetName),encryptionSetName,63); - await eventListener.AssertRegEx(nameof(encryptionSetName),encryptionSetName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - } + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } } - /// Gets a devcenter encryption set. + /// Deletes a devcenter /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the devcenter encryption set. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -7751,9 +7903,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EncryptionSetsGet(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCentersDelete(string subscriptionId, string resourceGroupName, string devCenterName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7765,8 +7917,6 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/devcenters/" + global::System.Uri.EscapeDataString(devCenterName) - + "/encryptionSets/" - + global::System.Uri.EscapeDataString(encryptionSetName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7775,18 +7925,19 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EncryptionSetsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCentersDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Gets a devcenter encryption set. + /// Deletes a devcenter /// /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -7794,25 +7945,24 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EncryptionSetsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCentersDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/encryptionSets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var devCenterName = _match.Groups["devCenterName"].Value; - var encryptionSetName = _match.Groups["encryptionSetName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -7821,8 +7971,6 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/devcenters/" + devCenterName - + "/encryptionSets/" - + encryptionSetName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7831,18 +7979,19 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EncryptionSetsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCentersDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// 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 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -7850,7 +7999,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EncryptionSetsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevCentersDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7861,6 +8010,103 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -7868,13 +8114,19 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7890,18 +8142,17 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the devcenter encryption set. /// 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 EncryptionSetsGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevCentersDelete_Validate(string subscriptionId, string resourceGroupName, string devCenterName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -7914,18 +8165,13 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(encryptionSetName),encryptionSetName); - await eventListener.AssertMinimumLength(nameof(encryptionSetName),encryptionSetName,3); - await eventListener.AssertMaximumLength(nameof(encryptionSetName),encryptionSetName,63); - await eventListener.AssertRegEx(nameof(encryptionSetName),encryptionSetName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); } } - /// Lists all encryption sets in the devcenter. + /// Gets a devcenter. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -7934,9 +8180,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EncryptionSetsList(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCentersGet(string subscriptionId, string resourceGroupName, string devCenterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7948,11 +8194,8 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/devcenters/" + global::System.Uri.EscapeDataString(devCenterName) - + "/encryptionSets" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -7964,13 +8207,12 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EncryptionSetsList_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCentersGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists all encryption sets in the devcenter. + /// Gets a devcenter. /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -7979,18 +8221,18 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EncryptionSetsListViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCentersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/encryptionSets$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/encryptionSets'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}'"); } // replace URI parameters with values from identity @@ -8005,11 +8247,8 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/devcenters/" + devCenterName - + "/encryptionSets" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -8021,11 +8260,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EncryptionSetsList_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCentersGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -8035,7 +8274,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EncryptionSetsList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevCentersGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8053,13 +8292,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EncryptionSetListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenter.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8075,18 +8314,17 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 EncryptionSetsList_Validate(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevCentersGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -8102,12 +8340,10 @@ public partial class DevCenter } } - /// Partially updates a devcenter encryption set. + /// Lists all devcenters in a resource group. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the devcenter encryption set. - /// Updatable devcenter encryption set properties. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -8116,9 +8352,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EncryptionSetsUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCentersListByResourceGroup(string subscriptionId, string resourceGroupName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8128,34 +8364,29 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/devcenters/" - + global::System.Uri.EscapeDataString(devCenterName) - + "/encryptionSets/" - + global::System.Uri.EscapeDataString(encryptionSetName) + + "/providers/Microsoft.DevCenter/devcenters" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EncryptionSetsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCentersListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); } } - /// Partially updates a devcenter encryption set. + /// Lists all devcenters in a resource group. /// - /// Updatable devcenter encryption set properties. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -8164,57 +8395,50 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EncryptionSetsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCentersListByResourceGroupViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/encryptionSets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters$", 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.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var devCenterName = _match.Groups["devCenterName"].Value; - var encryptionSetName = _match.Groups["encryptionSetName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/devcenters/" - + devCenterName - + "/encryptionSets/" - + encryptionSetName + + "/providers/Microsoft.DevCenter/devcenters" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EncryptionSetsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCentersListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -8224,7 +8448,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EncryptionSetsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevCentersListByResourceGroup_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8235,117 +8459,21 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + 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"); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; } } } @@ -8360,19 +8488,17 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the devcenter encryption set. - /// Updatable devcenter encryption set properties. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 EncryptionSetsUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevCentersListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -8381,25 +8507,12 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); - await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); - await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); - await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(encryptionSetName),encryptionSetName); - await eventListener.AssertMinimumLength(nameof(encryptionSetName),encryptionSetName,3); - await eventListener.AssertMaximumLength(nameof(encryptionSetName),encryptionSetName,63); - await eventListener.AssertRegEx(nameof(encryptionSetName),encryptionSetName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Gets an environment definition from the catalog. + /// Lists all devcenters in a subscription. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the Catalog. - /// The name of the Environment Definition. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -8408,9 +8521,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentDefinitionsGet(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCentersListBySubscription(string subscriptionId, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8418,16 +8531,11 @@ public partial class DevCenter var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/devcenters/" - + global::System.Uri.EscapeDataString(devCenterName) - + "/catalogs/" - + global::System.Uri.EscapeDataString(catalogName) - + "/environmentDefinitions/" - + global::System.Uri.EscapeDataString(environmentDefinitionName) + + "/providers/Microsoft.DevCenter/devcenters" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -8439,62 +8547,13 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EnvironmentDefinitionsGet_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Gets Environment Definition error details - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the Catalog. - /// The name of the Environment Definition. - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentDefinitionsGetErrorDetails(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) - { - var apiVersion = @"2024-05-01-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.DevCenter/devcenters/" - + global::System.Uri.EscapeDataString(devCenterName) - + "/catalogs/" - + global::System.Uri.EscapeDataString(catalogName) - + "/environmentDefinitions/" - + global::System.Uri.EscapeDataString(environmentDefinitionName) - + "/getErrorDetails" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.EnvironmentDefinitionsGetErrorDetails_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCentersListBySubscription_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets Environment Definition error details + /// Lists all devcenters in a subscription. /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -8503,59 +8562,47 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentDefinitionsGetErrorDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCentersListBySubscriptionViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/catalogs/(?[^/]+)/environmentDefinitions/(?[^/]+)/getErrorDetails$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.DevCenter/devcenters$", 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.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/devcenters'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var devCenterName = _match.Groups["devCenterName"].Value; - var catalogName = _match.Groups["catalogName"].Value; - var environmentDefinitionName = _match.Groups["environmentDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.DevCenter/devcenters/" - + devCenterName - + "/catalogs/" - + catalogName - + "/environmentDefinitions/" - + environmentDefinitionName - + "/getErrorDetails" + + "/providers/Microsoft.DevCenter/devcenters" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EnvironmentDefinitionsGetErrorDetails_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCentersListBySubscription_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// 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 @@ -8565,7 +8612,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentDefinitionsGetErrorDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevCentersListBySubscription_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8583,13 +8630,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogResourceValidationErrorDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8605,44 +8652,29 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the Catalog. - /// The name of the Environment Definition. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 EnvironmentDefinitionsGetErrorDetails_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevCentersListBySubscription_Validate(string subscriptionId, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); - await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); - await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); - await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(catalogName),catalogName); - await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); - await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); - await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(environmentDefinitionName),environmentDefinitionName); - await eventListener.AssertMinimumLength(nameof(environmentDefinitionName),environmentDefinitionName,3); - await eventListener.AssertMaximumLength(nameof(environmentDefinitionName),environmentDefinitionName,63); - await eventListener.AssertRegEx(nameof(environmentDefinitionName),environmentDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Gets an environment definition from the catalog. - /// + /// Partially updates a devcenter. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// Updatable devcenter properties. /// 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). @@ -8651,38 +8683,20 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentDefinitionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevCentersUpdate(string subscriptionId, string resourceGroupName, string devCenterName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/catalogs/(?[^/]+)/environmentDefinitions/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var devCenterName = _match.Groups["devCenterName"].Value; - var catalogName = _match.Groups["catalogName"].Value; - var environmentDefinitionName = _match.Groups["environmentDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/devcenters/" - + devCenterName - + "/catalogs/" - + catalogName - + "/environmentDefinitions/" - + environmentDefinitionName + + global::System.Uri.EscapeDataString(devCenterName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -8691,16 +8705,78 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EnvironmentDefinitionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.DevCentersUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// Partially updates a devcenter. + /// + /// Updatable devcenter properties. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 DevCentersUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevCentersUpdate_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 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -8710,7 +8786,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentDefinitionsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevCentersUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8721,6 +8797,102 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -8728,13 +8900,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenter.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8750,19 +8922,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the Catalog. - /// The name of the Environment Definition. + /// Updatable devcenter properties. /// 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 EnvironmentDefinitionsGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevCentersUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -8775,23 +8946,17 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(catalogName),catalogName); - await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); - await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); - await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(environmentDefinitionName),environmentDefinitionName); - await eventListener.AssertMinimumLength(nameof(environmentDefinitionName),environmentDefinitionName,3); - await eventListener.AssertMaximumLength(nameof(environmentDefinitionName),environmentDefinitionName,63); - await eventListener.AssertRegEx(nameof(environmentDefinitionName),environmentDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// List environment definitions in the catalog. + /// Creates or updates a devcenter encryption set resource /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the Catalog. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the devcenter encryption set. + /// Represents a devcenter encryption set. /// 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). @@ -8800,9 +8965,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentDefinitionsListByCatalog(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EncryptionSetsCreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8814,31 +8979,32 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/devcenters/" + global::System.Uri.EscapeDataString(devCenterName) - + "/catalogs/" - + global::System.Uri.EscapeDataString(catalogName) - + "/environmentDefinitions" + + "/encryptionSets/" + + global::System.Uri.EscapeDataString(encryptionSetName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EnvironmentDefinitionsListByCatalog_Call(request,onOk,onDefault,eventListener,sender); + await this.EncryptionSetsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// List environment definitions in the catalog. + /// Creates or updates a devcenter encryption set resource /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// Represents a devcenter encryption set. /// 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). @@ -8847,25 +9013,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentDefinitionsListByCatalogViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EncryptionSetsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/catalogs/(?[^/]+)/environmentDefinitions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/encryptionSets/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var devCenterName = _match.Groups["devCenterName"].Value; - var catalogName = _match.Groups["catalogName"].Value; + var encryptionSetName = _match.Groups["encryptionSetName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -8874,29 +9040,30 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/devcenters/" + devCenterName - + "/catalogs/" - + catalogName - + "/environmentDefinitions" + + "/encryptionSets/" + + encryptionSetName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EnvironmentDefinitionsListByCatalog_Call(request,onOk,onDefault,eventListener,sender); + await this.EncryptionSetsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -8906,7 +9073,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentDefinitionsListByCatalog_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EncryptionSetsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8917,21 +9084,2405 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the devcenter encryption set. + /// Represents a devcenter encryption set. + /// 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 EncryptionSetsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(encryptionSetName),encryptionSetName); + await eventListener.AssertMinimumLength(nameof(encryptionSetName),encryptionSetName,3); + await eventListener.AssertMaximumLength(nameof(encryptionSetName),encryptionSetName,63); + await eventListener.AssertRegEx(nameof(encryptionSetName),encryptionSetName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes a devcenter encryption set + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the devcenter encryption set. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EncryptionSetsDelete(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/encryptionSets/" + + global::System.Uri.EscapeDataString(encryptionSetName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EncryptionSetsDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a devcenter encryption set + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EncryptionSetsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/encryptionSets/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var encryptionSetName = _match.Groups["encryptionSetName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/encryptionSets/" + + encryptionSetName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EncryptionSetsDelete_Call(request,onNoContent,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 default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EncryptionSetsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the devcenter encryption set. + /// 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 EncryptionSetsDelete_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(encryptionSetName),encryptionSetName); + await eventListener.AssertMinimumLength(nameof(encryptionSetName),encryptionSetName,3); + await eventListener.AssertMaximumLength(nameof(encryptionSetName),encryptionSetName,63); + await eventListener.AssertRegEx(nameof(encryptionSetName),encryptionSetName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + } + } + + /// Gets a devcenter encryption set. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the devcenter encryption set. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EncryptionSetsGet(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/encryptionSets/" + + global::System.Uri.EscapeDataString(encryptionSetName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EncryptionSetsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets a devcenter encryption set. + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EncryptionSetsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/encryptionSets/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var encryptionSetName = _match.Groups["encryptionSetName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/encryptionSets/" + + encryptionSetName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EncryptionSetsGet_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EncryptionSetsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the devcenter encryption set. + /// 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 EncryptionSetsGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(encryptionSetName),encryptionSetName); + await eventListener.AssertMinimumLength(nameof(encryptionSetName),encryptionSetName,3); + await eventListener.AssertMaximumLength(nameof(encryptionSetName),encryptionSetName,63); + await eventListener.AssertRegEx(nameof(encryptionSetName),encryptionSetName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + } + } + + /// Lists all encryption sets in the devcenter. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EncryptionSetsList(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/encryptionSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EncryptionSetsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists all encryption sets in the devcenter. + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EncryptionSetsListViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/encryptionSets$", 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.DevCenter/devcenters/{devCenterName}/encryptionSets'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/encryptionSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EncryptionSetsList_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EncryptionSetsList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EncryptionSetListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// 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 EncryptionSetsList_Validate(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + } + } + + /// Partially updates a devcenter encryption set. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the devcenter encryption set. + /// Updatable devcenter encryption set properties. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EncryptionSetsUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/encryptionSets/" + + global::System.Uri.EscapeDataString(encryptionSetName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EncryptionSetsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Partially updates a devcenter encryption set. + /// + /// Updatable devcenter encryption set properties. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EncryptionSetsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/encryptionSets/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var encryptionSetName = _match.Groups["encryptionSetName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/encryptionSets/" + + encryptionSetName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EncryptionSetsUpdate_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EncryptionSetsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the devcenter encryption set. + /// Updatable devcenter encryption set properties. + /// 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 EncryptionSetsUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string encryptionSetName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(encryptionSetName),encryptionSetName); + await eventListener.AssertMinimumLength(nameof(encryptionSetName),encryptionSetName,3); + await eventListener.AssertMaximumLength(nameof(encryptionSetName),encryptionSetName,63); + await eventListener.AssertRegEx(nameof(encryptionSetName),encryptionSetName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Gets an environment definition from the catalog. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Environment Definition. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentDefinitionsGet(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/environmentDefinitions/" + + global::System.Uri.EscapeDataString(environmentDefinitionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EnvironmentDefinitionsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets Environment Definition error details + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Environment Definition. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentDefinitionsGetErrorDetails(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/environmentDefinitions/" + + global::System.Uri.EscapeDataString(environmentDefinitionName) + + "/getErrorDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EnvironmentDefinitionsGetErrorDetails_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets Environment Definition error details + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentDefinitionsGetErrorDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/catalogs/(?[^/]+)/environmentDefinitions/(?[^/]+)/getErrorDetails$", 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.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var environmentDefinitionName = _match.Groups["environmentDefinitionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/catalogs/" + + catalogName + + "/environmentDefinitions/" + + environmentDefinitionName + + "/getErrorDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EnvironmentDefinitionsGetErrorDetails_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentDefinitionsGetErrorDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogResourceValidationErrorDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Environment Definition. + /// 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 EnvironmentDefinitionsGetErrorDetails_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(environmentDefinitionName),environmentDefinitionName); + await eventListener.AssertMinimumLength(nameof(environmentDefinitionName),environmentDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(environmentDefinitionName),environmentDefinitionName,63); + await eventListener.AssertRegEx(nameof(environmentDefinitionName),environmentDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Gets an environment definition from the catalog. + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentDefinitionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/catalogs/(?[^/]+)/environmentDefinitions/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var environmentDefinitionName = _match.Groups["environmentDefinitionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/catalogs/" + + catalogName + + "/environmentDefinitions/" + + environmentDefinitionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EnvironmentDefinitionsGet_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentDefinitionsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The name of the Environment Definition. + /// 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 EnvironmentDefinitionsGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, string environmentDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(environmentDefinitionName),environmentDefinitionName); + await eventListener.AssertMinimumLength(nameof(environmentDefinitionName),environmentDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(environmentDefinitionName),environmentDefinitionName,63); + await eventListener.AssertRegEx(nameof(environmentDefinitionName),environmentDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// List environment definitions in the catalog. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentDefinitionsListByCatalog(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/environmentDefinitions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EnvironmentDefinitionsListByCatalog_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List environment definitions in the catalog. + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentDefinitionsListByCatalogViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/catalogs/(?[^/]+)/environmentDefinitions$", 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.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/catalogs/" + + catalogName + + "/environmentDefinitions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EnvironmentDefinitionsListByCatalog_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentDefinitionsListByCatalog_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// 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 EnvironmentDefinitionsListByCatalog_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Creates or updates an environment type. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the environment type. + /// Represents an Environment Type. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentTypesCreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/environmentTypes/" + + global::System.Uri.EscapeDataString(environmentTypeName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EnvironmentTypesCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// Creates or updates an environment type. + /// + /// Represents an Environment Type. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentTypesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/environmentTypes/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var environmentTypeName = _match.Groups["environmentTypeName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/environmentTypes/" + + environmentTypeName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EnvironmentTypesCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + } + } + + /// 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 201 (Created). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentTypesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the environment type. + /// Represents an Environment Type. + /// 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 EnvironmentTypesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); + await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); + await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); + await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes an environment type. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the environment type. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentTypesDelete(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/environmentTypes/" + + global::System.Uri.EscapeDataString(environmentTypeName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EnvironmentTypesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes an environment type. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentTypesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/environmentTypes/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var environmentTypeName = _match.Groups["environmentTypeName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/environmentTypes/" + + environmentTypeName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EnvironmentTypesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// 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 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentTypesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the environment type. + /// 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 EnvironmentTypesDelete_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); + await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); + await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); + await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Gets an environment type. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the environment type. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentTypesGet(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/environmentTypes/" + + global::System.Uri.EscapeDataString(environmentTypeName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EnvironmentTypesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets an environment type. + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentTypesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/environmentTypes/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var environmentTypeName = _match.Groups["environmentTypeName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/environmentTypes/" + + environmentTypeName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EnvironmentTypesGet_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentTypesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The name of the environment type. + /// 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 EnvironmentTypesGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); + await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); + await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); + await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Lists environment types for the devcenter. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the devcenter. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentTypesListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/environmentTypes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EnvironmentTypesListByDevCenter_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists environment types for the devcenter. + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentTypesListByDevCenterViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/environmentTypes$", 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.DevCenter/devcenters/{devCenterName}/environmentTypes'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/environmentTypes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EnvironmentTypesListByDevCenter_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 EnvironmentTypesListByDevCenter_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; } } } @@ -8946,19 +11497,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the Catalog. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 EnvironmentDefinitionsListByCatalog_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string catalogName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task EnvironmentTypesListByDevCenter_Validate(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -8971,21 +11521,16 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(catalogName),catalogName); - await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); - await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); - await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Creates or updates an environment type. + /// Partially updates an environment type. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the environment type. - /// Represents an Environment Type. + /// Updatable environment type properties. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -8993,9 +11538,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesCreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentTypesUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9017,7 +11562,7 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -9026,15 +11571,14 @@ public partial class DevCenter request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EnvironmentTypesCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + await this.EnvironmentTypesUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Creates or updates an environment type. + /// Partially updates an environment type. /// - /// Represents an Environment Type. + /// Updatable environment type properties. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -9042,9 +11586,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentTypesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9079,7 +11623,7 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -9088,14 +11632,13 @@ public partial class DevCenter request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EnvironmentTypesCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + await this.EnvironmentTypesUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -9103,7 +11646,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentTypesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentTypesUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9121,19 +11664,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - case global::System.Net.HttpStatusCode.Created: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9149,19 +11686,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the environment type. - /// Represents an Environment Type. + /// Updatable environment type properties. /// 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 EnvironmentTypesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task EnvironmentTypesUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -9183,13 +11720,13 @@ public partial class DevCenter } } - /// Deletes an environment type. + /// Creates or updates a gallery. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the environment type. + /// The name of the gallery. + /// Represents a gallery. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -9197,9 +11734,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesDelete(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9211,8 +11748,8 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/devcenters/" + global::System.Uri.EscapeDataString(devCenterName) - + "/environmentTypes/" - + global::System.Uri.EscapeDataString(environmentTypeName) + + "/galleries/" + + global::System.Uri.EscapeDataString(galleryName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9221,19 +11758,23 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EnvironmentTypesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.GalleriesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Deletes an environment type. + /// Creates or updates a gallery. /// + /// Represents a gallery. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -9241,25 +11782,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/environmentTypes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/galleries/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var devCenterName = _match.Groups["devCenterName"].Value; - var environmentTypeName = _match.Groups["environmentTypeName"].Value; + var galleryName = _match.Groups["galleryName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -9268,8 +11809,8 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/devcenters/" + devCenterName - + "/environmentTypes/" - + environmentTypeName + + "/galleries/" + + galleryName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9278,19 +11819,22 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EnvironmentTypesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.GalleriesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -9298,7 +11842,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentTypesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9309,6 +11853,102 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -9316,19 +11956,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Gallery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9344,18 +11978,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the environment type. + /// The name of the gallery. + /// Represents a gallery. /// 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 EnvironmentTypesDelete_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -9368,19 +12003,22 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); - await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); - await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); - await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(galleryName),galleryName); + await eventListener.AssertMinimumLength(nameof(galleryName),galleryName,3); + await eventListener.AssertMaximumLength(nameof(galleryName),galleryName,63); + await eventListener.AssertRegEx(nameof(galleryName),galleryName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Gets an environment type. + /// Deletes a gallery resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the environment type. + /// The name of the gallery. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -9388,9 +12026,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesGet(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesDelete(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9402,8 +12040,8 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/devcenters/" + global::System.Uri.EscapeDataString(devCenterName) - + "/environmentTypes/" - + global::System.Uri.EscapeDataString(environmentTypeName) + + "/galleries/" + + global::System.Uri.EscapeDataString(galleryName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9412,18 +12050,19 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EnvironmentTypesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleriesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Gets an environment type. + /// Deletes a gallery resource. /// /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -9431,25 +12070,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/environmentTypes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/galleries/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var devCenterName = _match.Groups["devCenterName"].Value; - var environmentTypeName = _match.Groups["environmentTypeName"].Value; + var galleryName = _match.Groups["galleryName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -9458,8 +12097,8 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/devcenters/" + devCenterName - + "/environmentTypes/" - + environmentTypeName + + "/galleries/" + + galleryName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9468,18 +12107,19 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EnvironmentTypesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleriesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// 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 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -9487,7 +12127,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentTypesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleriesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9498,6 +12138,103 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -9505,13 +12242,19 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9527,18 +12270,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the environment type. + /// The name of the gallery. /// 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 EnvironmentTypesGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleriesDelete_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -9551,18 +12294,18 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); - await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); - await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); - await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(galleryName),galleryName); + await eventListener.AssertMinimumLength(nameof(galleryName),galleryName,3); + await eventListener.AssertMaximumLength(nameof(galleryName),galleryName,63); + await eventListener.AssertRegEx(nameof(galleryName),galleryName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Lists environment types for the devcenter. + /// Gets a gallery /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the gallery. /// 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). @@ -9571,9 +12314,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesGet(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9585,11 +12328,10 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/devcenters/" + global::System.Uri.EscapeDataString(devCenterName) - + "/environmentTypes" + + "/galleries/" + + global::System.Uri.EscapeDataString(galleryName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -9601,13 +12343,12 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EnvironmentTypesListByDevCenter_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleriesGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists environment types for the devcenter. + /// Gets a gallery /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -9616,24 +12357,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesListByDevCenterViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/environmentTypes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/galleries/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/environmentTypes'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var devCenterName = _match.Groups["devCenterName"].Value; + var galleryName = _match.Groups["galleryName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -9642,11 +12384,10 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/devcenters/" + devCenterName - + "/environmentTypes" + + "/galleries/" + + galleryName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -9658,11 +12399,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EnvironmentTypesListByDevCenter_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleriesGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -9672,7 +12413,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentTypesListByDevCenter_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleriesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9690,13 +12431,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Gallery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9712,18 +12453,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the gallery. /// 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 EnvironmentTypesListByDevCenter_Validate(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleriesGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -9736,15 +12477,18 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(galleryName),galleryName); + await eventListener.AssertMinimumLength(nameof(galleryName),galleryName,3); + await eventListener.AssertMaximumLength(nameof(galleryName),galleryName,63); + await eventListener.AssertRegEx(nameof(galleryName),galleryName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Partially updates an environment type. + /// Lists galleries for a devcenter. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the environment type. - /// Updatable environment type properties. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -9753,9 +12497,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9767,32 +12511,29 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/devcenters/" + global::System.Uri.EscapeDataString(devCenterName) - + "/environmentTypes/" - + global::System.Uri.EscapeDataString(environmentTypeName) + + "/galleries" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EnvironmentTypesUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleriesListByDevCenter_Call(request,onOk,onDefault,eventListener,sender); } } - /// Partially updates an environment type. + /// Lists galleries for a devcenter. /// - /// Updatable environment type properties. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -9801,25 +12542,24 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task GalleriesListByDevCenterViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/environmentTypes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/galleries$", 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.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var devCenterName = _match.Groups["devCenterName"].Value; - var environmentTypeName = _match.Groups["environmentTypeName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -9828,30 +12568,27 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/devcenters/" + devCenterName - + "/environmentTypes/" - + environmentTypeName + + "/galleries" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EnvironmentTypesUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.GalleriesListByDevCenter_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -9861,7 +12598,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentTypesUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task GalleriesListByDevCenter_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9879,13 +12616,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GalleryListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9901,19 +12638,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the environment type. - /// Updatable environment type properties. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 EnvironmentTypesUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task GalleriesListByDevCenter_Validate(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -9926,21 +12662,16 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); - await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); - await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); - await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Creates or updates a gallery. + /// Gets an image version. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. - /// Represents a gallery. + /// The name of the image. + /// The version of the image. /// 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). @@ -9949,9 +12680,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImageVersionsGet(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, string versionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9965,6 +12696,10 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(devCenterName) + "/galleries/" + global::System.Uri.EscapeDataString(galleryName) + + "/images/" + + global::System.Uri.EscapeDataString(imageName) + + "/versions/" + + global::System.Uri.EscapeDataString(versionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -9973,22 +12708,66 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ImageVersionsGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Creates or updates a gallery. + /// Gets an image version. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the image. + /// The version of the image. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ImageVersionsGetByProject(string subscriptionId, string resourceGroupName, string projectName, string imageName, string versionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/images/" + + global::System.Uri.EscapeDataString(imageName) + + "/versions/" + + global::System.Uri.EscapeDataString(versionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ImageVersionsGetByProject_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets an image version. /// - /// Represents a gallery. /// 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). @@ -9997,35 +12776,38 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImageVersionsGetByProjectViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/galleries/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var devCenterName = _match.Groups["devCenterName"].Value; - var galleryName = _match.Groups["galleryName"].Value; + var projectName = _match.Groups["projectName"].Value; + var imageName = _match.Groups["imageName"].Value; + var versionName = _match.Groups["versionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/devcenters/" - + devCenterName - + "/galleries/" - + galleryName + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/images/" + + imageName + + "/versions/" + + versionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10034,20 +12816,16 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ImageVersionsGetByProject_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -10057,7 +12835,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ImageVersionsGetByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10068,102 +12846,6 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -10171,13 +12853,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Gallery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10193,91 +12875,45 @@ public partial class DevCenter } /// - /// Validation method for method. Call this like the actual call, but you will get + /// Validation method for method. Call this like the actual call, but you will get /// validation events back. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the gallery. - /// Represents a gallery. - /// 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 GalleriesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); - await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); - await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); - await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertMinimumLength(nameof(galleryName),galleryName,3); - await eventListener.AssertMaximumLength(nameof(galleryName),galleryName,63); - await eventListener.AssertRegEx(nameof(galleryName),galleryName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// Deletes a gallery resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the gallery. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// The name of the project. + /// The name of the image. + /// The version of the image. /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 GalleriesDelete(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ImageVersionsGetByProject_Validate(string subscriptionId, string resourceGroupName, string projectName, string imageName, string versionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { - var apiVersion = @"2024-05-01-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.DevCenter/devcenters/" - + global::System.Uri.EscapeDataString(devCenterName) - + "/galleries/" - + global::System.Uri.EscapeDataString(galleryName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.GalleriesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageName),imageName); + await eventListener.AssertMinimumLength(nameof(imageName),imageName,3); + await eventListener.AssertMaximumLength(nameof(imageName),imageName,153); + await eventListener.AssertRegEx(nameof(imageName),imageName,@"^[a-zA-Z0-9~][a-zA-Z0-9-.~]{0,151}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(versionName),versionName); + await eventListener.AssertMinimumLength(nameof(versionName),versionName,5); + await eventListener.AssertMaximumLength(nameof(versionName),versionName,32); + await eventListener.AssertRegEx(nameof(versionName),versionName,@"^[0-9]{1,10}[.][0-9]{1,10}[.][0-9]{1,10}$"); } } - /// Deletes a gallery resource. + /// Gets an image version. /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -10285,18 +12921,18 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImageVersionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/galleries/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}/versions/{versionName}'"); } // replace URI parameters with values from identity @@ -10304,6 +12940,8 @@ public partial class DevCenter var resourceGroupName = _match.Groups["resourceGroupName"].Value; var devCenterName = _match.Groups["devCenterName"].Value; var galleryName = _match.Groups["galleryName"].Value; + var imageName = _match.Groups["imageName"].Value; + var versionName = _match.Groups["versionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -10314,6 +12952,10 @@ public partial class DevCenter + devCenterName + "/galleries/" + galleryName + + "/images/" + + imageName + + "/versions/" + + versionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10322,19 +12964,18 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ImageVersionsGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -10342,7 +12983,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ImageVersionsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10353,103 +12994,6 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -10457,19 +13001,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10485,18 +13023,20 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. + /// The name of the image. + /// The version of the image. /// 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 GalleriesDelete_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ImageVersionsGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, string versionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -10513,14 +13053,23 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(galleryName),galleryName,3); await eventListener.AssertMaximumLength(nameof(galleryName),galleryName,63); await eventListener.AssertRegEx(nameof(galleryName),galleryName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageName),imageName); + await eventListener.AssertMinimumLength(nameof(imageName),imageName,3); + await eventListener.AssertMaximumLength(nameof(imageName),imageName,80); + await eventListener.AssertRegEx(nameof(imageName),imageName,@"^[a-zA-Z0-9][a-zA-Z0-9-.]{0,78}[a-zA-Z0-9]$"); + await eventListener.AssertNotNull(nameof(versionName),versionName); + await eventListener.AssertMinimumLength(nameof(versionName),versionName,5); + await eventListener.AssertMaximumLength(nameof(versionName),versionName,32); + await eventListener.AssertRegEx(nameof(versionName),versionName,@"^[0-9]{1,10}[.][0-9]{1,10}[.][0-9]{1,10}$"); } } - /// Gets a gallery + /// Lists versions for an image. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. + /// The name of the image. /// 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). @@ -10529,9 +13078,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesGet(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImageVersionsListByImage(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10545,6 +13094,9 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(devCenterName) + "/galleries/" + global::System.Uri.EscapeDataString(galleryName) + + "/images/" + + global::System.Uri.EscapeDataString(imageName) + + "/versions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10558,11 +13110,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ImageVersionsListByImage_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets a gallery + /// Lists versions for an image. /// /// 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 @@ -10572,18 +13124,18 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImageVersionsListByImageViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/galleries/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/galleries/(?[^/]+)/images/(?[^/]+)/versions$", 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.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}/versions'"); } // replace URI parameters with values from identity @@ -10591,6 +13143,7 @@ public partial class DevCenter var resourceGroupName = _match.Groups["resourceGroupName"].Value; var devCenterName = _match.Groups["devCenterName"].Value; var galleryName = _match.Groups["galleryName"].Value; + var imageName = _match.Groups["imageName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -10601,6 +13154,9 @@ public partial class DevCenter + devCenterName + "/galleries/" + galleryName + + "/images/" + + imageName + + "/versions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10614,11 +13170,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ImageVersionsListByImage_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -10628,7 +13184,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ImageVersionsListByImage_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10646,13 +13202,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Gallery.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10668,18 +13224,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. + /// The name of the image. /// 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 GalleriesGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ImageVersionsListByImage_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -10696,14 +13253,18 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(galleryName),galleryName,3); await eventListener.AssertMaximumLength(nameof(galleryName),galleryName,63); await eventListener.AssertRegEx(nameof(galleryName),galleryName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageName),imageName); + await eventListener.AssertMinimumLength(nameof(imageName),imageName,3); + await eventListener.AssertMaximumLength(nameof(imageName),imageName,80); + await eventListener.AssertRegEx(nameof(imageName),imageName,@"^[a-zA-Z0-9][a-zA-Z0-9-.]{0,78}[a-zA-Z0-9]$"); } } - /// Lists galleries for a devcenter. + /// Lists versions for an image. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the project. + /// The name of the image. /// 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). @@ -10712,9 +13273,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImageVersionsListByProject(string subscriptionId, string resourceGroupName, string projectName, string imageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10724,13 +13285,13 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/devcenters/" - + global::System.Uri.EscapeDataString(devCenterName) - + "/galleries" + + "/providers/Microsoft.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/images/" + + global::System.Uri.EscapeDataString(imageName) + + "/versions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -10742,13 +13303,12 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesListByDevCenter_Call(request,onOk,onDefault,eventListener,sender); + await this.ImageVersionsListByProject_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists galleries for a devcenter. + /// Lists versions for an image. /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -10757,37 +13317,38 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task GalleriesListByDevCenterViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImageVersionsListByProjectViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/galleries$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/images/(?[^/]+)/versions$", 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.DevCenter/devcenters/{devCenterName}/galleries'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var devCenterName = _match.Groups["devCenterName"].Value; + var projectName = _match.Groups["projectName"].Value; + var imageName = _match.Groups["imageName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/devcenters/" - + devCenterName - + "/galleries" + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/images/" + + imageName + + "/versions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -10799,11 +13360,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.GalleriesListByDevCenter_Call(request,onOk,onDefault,eventListener,sender); + await this.ImageVersionsListByProject_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -10813,7 +13374,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task GalleriesListByDevCenter_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ImageVersionsListByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10831,13 +13392,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GalleryListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10853,18 +13414,18 @@ public partial class DevCenter } /// - /// Validation method for method. Call this like the actual call, but you will get + /// Validation method for method. Call this like the actual call, but you will get /// validation events back. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the project. + /// The name of the image. /// 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 GalleriesListByDevCenter_Validate(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ImageVersionsListByProject_Validate(string subscriptionId, string resourceGroupName, string projectName, string imageName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -10873,20 +13434,23 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); - await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); - await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); - await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageName),imageName); + await eventListener.AssertMinimumLength(nameof(imageName),imageName,3); + await eventListener.AssertMaximumLength(nameof(imageName),imageName,153); + await eventListener.AssertRegEx(nameof(imageName),imageName,@"^[a-zA-Z0-9~][a-zA-Z0-9-.~]{0,151}[a-zA-Z0-9]$"); } } - /// Gets an image version. + /// Gets a gallery image. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. /// The name of the gallery. /// The name of the image. - /// The version of the image. /// 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). @@ -10895,9 +13459,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ImageVersionsGet(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, string versionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImagesGet(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10913,8 +13477,6 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(galleryName) + "/images/" + global::System.Uri.EscapeDataString(imageName) - + "/versions/" - + global::System.Uri.EscapeDataString(versionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10928,11 +13490,57 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ImageVersionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ImagesGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets an image version. + /// Gets an image. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the image. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ImagesGetByProject(string subscriptionId, string resourceGroupName, string projectName, string imageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/images/" + + global::System.Uri.EscapeDataString(imageName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ImagesGetByProject_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets an image. /// /// 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 @@ -10942,41 +13550,35 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ImageVersionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImagesGetByProjectViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/galleries/(?[^/]+)/images/(?[^/]+)/versions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/images/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}/versions/{versionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var devCenterName = _match.Groups["devCenterName"].Value; - var galleryName = _match.Groups["galleryName"].Value; + var projectName = _match.Groups["projectName"].Value; var imageName = _match.Groups["imageName"].Value; - var versionName = _match.Groups["versionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/devcenters/" - + devCenterName - + "/galleries/" - + galleryName + + "/providers/Microsoft.DevCenter/projects/" + + projectName + "/images/" + imageName - + "/versions/" - + versionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -10990,11 +13592,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ImageVersionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ImagesGetByProject_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -11004,7 +13606,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ImageVersionsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ImagesGetByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -11022,13 +13624,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Image.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -11044,20 +13646,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the gallery. + /// The name of the project. /// The name of the image. - /// The version of the image. /// 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 ImageVersionsGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, string versionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ImagesGetByProject_Validate(string subscriptionId, string resourceGroupName, string projectName, string imageName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -11066,76 +13666,18 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); - await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); - await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); - await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertMinimumLength(nameof(galleryName),galleryName,3); - await eventListener.AssertMaximumLength(nameof(galleryName),galleryName,63); - await eventListener.AssertRegEx(nameof(galleryName),galleryName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); await eventListener.AssertNotNull(nameof(imageName),imageName); await eventListener.AssertMinimumLength(nameof(imageName),imageName,3); - await eventListener.AssertMaximumLength(nameof(imageName),imageName,80); - await eventListener.AssertRegEx(nameof(imageName),imageName,@"^[a-zA-Z0-9][a-zA-Z0-9-.]{0,78}[a-zA-Z0-9]$"); - await eventListener.AssertNotNull(nameof(versionName),versionName); - await eventListener.AssertMinimumLength(nameof(versionName),versionName,5); - await eventListener.AssertMaximumLength(nameof(versionName),versionName,32); - await eventListener.AssertRegEx(nameof(versionName),versionName,@"^[0-9]{1,10}[.][0-9]{1,10}[.][0-9]{1,10}$"); - } - } - - /// Lists versions for an image. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the gallery. - /// The name of the image. - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ImageVersionsListByImage(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) - { - var apiVersion = @"2024-05-01-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.DevCenter/devcenters/" - + global::System.Uri.EscapeDataString(devCenterName) - + "/galleries/" - + global::System.Uri.EscapeDataString(galleryName) - + "/images/" - + global::System.Uri.EscapeDataString(imageName) - + "/versions" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ImageVersionsListByImage_Call(request,onOk,onDefault,eventListener,sender); + await eventListener.AssertMaximumLength(nameof(imageName),imageName,153); + await eventListener.AssertRegEx(nameof(imageName),imageName,@"^[a-zA-Z0-9~][a-zA-Z0-9-.~]{0,151}[a-zA-Z0-9]$"); } } - /// Lists versions for an image. + /// Gets a gallery image. /// /// 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 @@ -11145,18 +13687,18 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ImageVersionsListByImageViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImagesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/galleries/(?[^/]+)/images/(?[^/]+)/versions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/galleries/(?[^/]+)/images/(?[^/]+)$", 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.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}/versions'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}'"); } // replace URI parameters with values from identity @@ -11177,7 +13719,6 @@ public partial class DevCenter + galleryName + "/images/" + imageName - + "/versions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -11191,11 +13732,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ImageVersionsListByImage_Call(request,onOk,onDefault,eventListener,sender); + await this.ImagesGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -11205,7 +13746,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ImageVersionsListByImage_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ImagesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -11223,13 +13764,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Image.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -11245,8 +13786,8 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. @@ -11257,7 +13798,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ImageVersionsListByImage_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ImagesGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -11281,12 +13822,11 @@ public partial class DevCenter } } - /// Gets a gallery image. + /// Lists images for a devcenter. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the gallery. - /// The name of the image. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -11295,9 +13835,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ImagesGet(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImagesListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11309,12 +13849,11 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/devcenters/" + global::System.Uri.EscapeDataString(devCenterName) - + "/galleries/" - + global::System.Uri.EscapeDataString(galleryName) - + "/images/" - + global::System.Uri.EscapeDataString(imageName) + + "/images" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -11326,12 +13865,13 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ImagesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ImagesListByDevCenter_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets a gallery image. + /// Lists images for a devcenter. /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -11340,26 +13880,24 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ImagesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImagesListByDevCenterViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/galleries/(?[^/]+)/images/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/images$", 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.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/images'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var devCenterName = _match.Groups["devCenterName"].Value; - var galleryName = _match.Groups["galleryName"].Value; - var imageName = _match.Groups["imageName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -11368,12 +13906,11 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/devcenters/" + devCenterName - + "/galleries/" - + galleryName - + "/images/" - + imageName + + "/images" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -11385,11 +13922,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ImagesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ImagesListByDevCenter_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -11399,7 +13936,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ImagesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ImagesListByDevCenter_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -11417,13 +13954,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Image.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -11439,19 +13976,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. - /// The name of the gallery. - /// The name of the image. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 ImagesGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, string imageName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ImagesListByDevCenter_Validate(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -11464,21 +14000,14 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertMinimumLength(nameof(galleryName),galleryName,3); - await eventListener.AssertMaximumLength(nameof(galleryName),galleryName,63); - await eventListener.AssertRegEx(nameof(galleryName),galleryName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(imageName),imageName); - await eventListener.AssertMinimumLength(nameof(imageName),imageName,3); - await eventListener.AssertMaximumLength(nameof(imageName),imageName,80); - await eventListener.AssertRegEx(nameof(imageName),imageName,@"^[a-zA-Z0-9][a-zA-Z0-9-.]{0,78}[a-zA-Z0-9]$"); } } - /// Lists images for a devcenter. + /// Lists images for a gallery. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the devcenter. + /// The name of the gallery. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 @@ -11488,9 +14017,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ImagesListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImagesListByGallery(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11502,6 +14031,8 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/devcenters/" + global::System.Uri.EscapeDataString(devCenterName) + + "/galleries/" + + global::System.Uri.EscapeDataString(galleryName) + "/images" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) @@ -11518,11 +14049,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ImagesListByDevCenter_Call(request,onOk,onDefault,eventListener,sender); + await this.ImagesListByGallery_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists images for a devcenter. + /// Lists images for a gallery. /// /// The maximum number of resources to return from the operation. Example: '$top=10'. /// a delegate that is called when the remote service returns 200 (OK). @@ -11533,24 +14064,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ImagesListByDevCenterViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImagesListByGalleryViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/images$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/galleries/(?[^/]+)/images$", 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.DevCenter/devcenters/{devCenterName}/images'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var devCenterName = _match.Groups["devCenterName"].Value; + var galleryName = _match.Groups["galleryName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -11559,6 +14091,8 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/devcenters/" + devCenterName + + "/galleries/" + + galleryName + "/images" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) @@ -11575,11 +14109,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ImagesListByDevCenter_Call(request,onOk,onDefault,eventListener,sender); + await this.ImagesListByGallery_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -11589,7 +14123,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ImagesListByDevCenter_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ImagesListByGallery_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -11607,13 +14141,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -11629,18 +14163,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the devcenter. + /// The name of the gallery. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 ImagesListByDevCenter_Validate(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ImagesListByGallery_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -11653,15 +14188,17 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(galleryName),galleryName); + await eventListener.AssertMinimumLength(nameof(galleryName),galleryName,3); + await eventListener.AssertMaximumLength(nameof(galleryName),galleryName,63); + await eventListener.AssertRegEx(nameof(galleryName),galleryName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Lists images for a gallery. + /// Lists images for a project. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the gallery. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the project. /// 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). @@ -11670,9 +14207,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ImagesListByGallery(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImagesListByProject(string subscriptionId, string resourceGroupName, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11682,15 +14219,11 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/devcenters/" - + global::System.Uri.EscapeDataString(devCenterName) - + "/galleries/" - + global::System.Uri.EscapeDataString(galleryName) + + "/providers/Microsoft.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + "/images" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -11702,13 +14235,12 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ImagesListByGallery_Call(request,onOk,onDefault,eventListener,sender); + await this.ImagesListByProject_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists images for a gallery. + /// Lists images for a project. /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -11717,40 +14249,35 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ImagesListByGalleryViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ImagesListByProjectViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/devcenters/(?[^/]+)/galleries/(?[^/]+)/images$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/images$", 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.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var devCenterName = _match.Groups["devCenterName"].Value; - var galleryName = _match.Groups["galleryName"].Value; + var projectName = _match.Groups["projectName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/devcenters/" - + devCenterName - + "/galleries/" - + galleryName + + "/providers/Microsoft.DevCenter/projects/" + + projectName + "/images" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -11762,11 +14289,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ImagesListByGallery_Call(request,onOk,onDefault,eventListener,sender); + await this.ImagesListByProject_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -11776,7 +14303,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ImagesListByGallery_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ImagesListByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -11794,13 +14321,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -11816,19 +14343,17 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the devcenter. - /// The name of the gallery. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the project. /// 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 ImagesListByGallery_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string galleryName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ImagesListByProject_Validate(string subscriptionId, string resourceGroupName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -11837,14 +14362,10 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); - await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); - await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); - await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); - await eventListener.AssertNotNull(nameof(galleryName),galleryName); - await eventListener.AssertMinimumLength(nameof(galleryName),galleryName,3); - await eventListener.AssertMaximumLength(nameof(galleryName),galleryName,63); - await eventListener.AssertRegEx(nameof(galleryName),galleryName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } @@ -11861,9 +14382,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string networkConnectionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string networkConnectionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11907,9 +14428,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11964,7 +14485,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NetworkConnectionsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NetworkConnectionsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -12078,13 +14599,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -12111,7 +14632,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NetworkConnectionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string networkConnectionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NetworkConnectionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string networkConnectionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -12142,9 +14663,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsDelete(string subscriptionId, string resourceGroupName, string networkConnectionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsDelete(string subscriptionId, string resourceGroupName, string networkConnectionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12184,9 +14705,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12238,7 +14759,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NetworkConnectionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NetworkConnectionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -12365,7 +14886,7 @@ public partial class DevCenter default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -12419,9 +14940,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsGet(string subscriptionId, string resourceGroupName, string networkConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsGet(string subscriptionId, string resourceGroupName, string networkConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12462,9 +14983,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsGetHealthDetails(string subscriptionId, string resourceGroupName, string networkConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsGetHealthDetails(string subscriptionId, string resourceGroupName, string networkConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12504,9 +15025,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsGetHealthDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsGetHealthDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12558,7 +15079,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NetworkConnectionsGetHealthDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NetworkConnectionsGetHealthDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -12576,13 +15097,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -12634,9 +15155,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12687,7 +15208,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NetworkConnectionsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NetworkConnectionsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -12705,13 +15226,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -12765,9 +15286,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsListByResourceGroup(string subscriptionId, string resourceGroupName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsListByResourceGroup(string subscriptionId, string resourceGroupName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12808,9 +15329,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsListByResourceGroupViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsListByResourceGroupViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12863,7 +15384,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NetworkConnectionsListByResourceGroup_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NetworkConnectionsListByResourceGroup_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -12881,13 +15402,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -12936,9 +15457,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsListBySubscription(string subscriptionId, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsListBySubscription(string subscriptionId, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12977,9 +15498,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsListBySubscriptionViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsListBySubscriptionViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13029,7 +15550,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NetworkConnectionsListBySubscription_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NetworkConnectionsListBySubscription_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -13047,13 +15568,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -13100,9 +15621,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsListHealthDetails(string subscriptionId, string resourceGroupName, int? Top, string networkConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsListHealthDetails(string subscriptionId, string resourceGroupName, int? Top, string networkConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13145,9 +15666,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsListHealthDetailsViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsListHealthDetailsViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13201,7 +15722,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NetworkConnectionsListHealthDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NetworkConnectionsListHealthDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -13219,13 +15740,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetailsListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetailsListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -13284,9 +15805,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, int? Top, string networkConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, int? Top, string networkConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13332,9 +15853,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsListOutboundNetworkDependenciesEndpointsViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsListOutboundNetworkDependenciesEndpointsViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13390,7 +15911,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NetworkConnectionsListOutboundNetworkDependenciesEndpoints_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NetworkConnectionsListOutboundNetworkDependenciesEndpoints_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -13408,13 +15929,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.OutboundEnvironmentEndpointCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.OutboundEnvironmentEndpointCollection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -13472,9 +15993,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsRunHealthChecks(string subscriptionId, string resourceGroupName, string networkConnectionName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsRunHealthChecks(string subscriptionId, string resourceGroupName, string networkConnectionName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13517,9 +16038,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsRunHealthChecksViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsRunHealthChecksViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13571,7 +16092,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NetworkConnectionsRunHealthChecks_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NetworkConnectionsRunHealthChecks_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -13692,7 +16213,7 @@ public partial class DevCenter default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -13747,9 +16268,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsUpdate(string subscriptionId, string resourceGroupName, string networkConnectionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsUpdate(string subscriptionId, string resourceGroupName, string networkConnectionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13793,9 +16314,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task NetworkConnectionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task NetworkConnectionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -13850,7 +16371,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NetworkConnectionsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task NetworkConnectionsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -13964,13 +16485,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -13997,7 +16518,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task NetworkConnectionsUpdate_Validate(string subscriptionId, string resourceGroupName, string networkConnectionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task NetworkConnectionsUpdate_Validate(string subscriptionId, string resourceGroupName, string networkConnectionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -14028,9 +16549,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationStatusesGet(string subscriptionId, string location, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationStatusesGet(string subscriptionId, string location, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14070,9 +16591,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationStatusesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationStatusesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14124,7 +16645,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationStatusesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationStatusesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -14142,19 +16663,19 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onAccepted(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -14200,9 +16721,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14236,9 +16757,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14281,7 +16802,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationsList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationsList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -14305,7 +16826,7 @@ public partial class DevCenter default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -14336,12 +16857,12 @@ public partial class DevCenter } } - /// Creates or updates a devcenter plan member resource + /// Creates or updates a machine pool /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. - /// The name of a devcenter plan member. - /// Represents a devcenter plan. + /// The name of the project. + /// Name of the pool. + /// Represents a machine pool /// 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). @@ -14350,9 +16871,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlanMembersCreateOrUpdate(string subscriptionId, string resourceGroupName, string planName, string memberName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PoolsCreateOrUpdate(string subscriptionId, string resourceGroupName, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14362,10 +16883,10 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/plans/" - + global::System.Uri.EscapeDataString(planName) - + "/members/" - + global::System.Uri.EscapeDataString(memberName) + + "/providers/Microsoft.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/pools/" + + global::System.Uri.EscapeDataString(poolName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -14383,13 +16904,13 @@ public partial class DevCenter request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlanMembersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.PoolsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Creates or updates a devcenter plan member resource + /// Creates or updates a machine pool /// - /// Represents a devcenter plan. + /// Represents a machine pool /// 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). @@ -14398,35 +16919,35 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlanMembersCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PoolsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/plans/(?[^/]+)/members/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/pools/(?[^/]+)$", 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.DevCenter/plans/{planName}/members/{memberName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var planName = _match.Groups["planName"].Value; - var memberName = _match.Groups["memberName"].Value; + var projectName = _match.Groups["projectName"].Value; + var poolName = _match.Groups["poolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/plans/" - + planName - + "/members/" - + memberName + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/pools/" + + poolName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -14444,11 +16965,11 @@ public partial class DevCenter request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlanMembersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.PoolsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -14458,7 +16979,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PlanMembersCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PoolsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -14572,13 +17093,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlanMember.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Pool.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -14594,19 +17115,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. - /// The name of a devcenter plan member. - /// Represents a devcenter plan. + /// The name of the project. + /// Name of the pool. + /// Represents a machine pool /// 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 PlanMembersCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string planName, string memberName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PoolsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -14615,24 +17136,24 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(planName),planName); - await eventListener.AssertMinimumLength(nameof(planName),planName,3); - await eventListener.AssertMaximumLength(nameof(planName),planName,63); - await eventListener.AssertRegEx(nameof(planName),planName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$"); - await eventListener.AssertNotNull(nameof(memberName),memberName); - await eventListener.AssertMinimumLength(nameof(memberName),memberName,3); - await eventListener.AssertMaximumLength(nameof(memberName),memberName,63); - await eventListener.AssertRegEx(nameof(memberName),memberName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$"); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(poolName),poolName); + await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); + await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); + await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Deletes a devcenter plan member + /// Deletes a machine pool /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. - /// The name of a devcenter plan member. + /// The name of the project. + /// Name of the pool. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled @@ -14642,9 +17163,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlanMembersDelete(string subscriptionId, string resourceGroupName, string planName, string memberName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PoolsDelete(string subscriptionId, string resourceGroupName, string projectName, string poolName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14654,10 +17175,10 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/plans/" - + global::System.Uri.EscapeDataString(planName) - + "/members/" - + global::System.Uri.EscapeDataString(memberName) + + "/providers/Microsoft.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/pools/" + + global::System.Uri.EscapeDataString(poolName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -14671,11 +17192,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlanMembersDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.PoolsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Deletes a devcenter plan member + /// Deletes a machine pool /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). @@ -14686,35 +17207,35 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlanMembersDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PoolsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/plans/(?[^/]+)/members/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/pools/(?[^/]+)$", 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.DevCenter/plans/{planName}/members/{memberName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var planName = _match.Groups["planName"].Value; - var memberName = _match.Groups["memberName"].Value; + var projectName = _match.Groups["projectName"].Value; + var poolName = _match.Groups["poolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/plans/" - + planName - + "/members/" - + memberName + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/pools/" + + poolName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -14728,11 +17249,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlanMembersDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.PoolsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// 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 204 (NoContent). @@ -14743,7 +17264,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PlanMembersDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PoolsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -14819,38 +17340,227 @@ public partial class DevCenter // 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.UndeclaredResponseException(_response); - } - } + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 name of the resource group. The name is case insensitive. + /// The name of the project. + /// Name of the pool. + /// 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 PoolsDelete_Validate(string subscriptionId, string resourceGroupName, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(poolName),poolName); + await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); + await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); + await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Gets a machine pool + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// Name of the pool. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 PoolsGet(string subscriptionId, string resourceGroupName, string projectName, string poolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/pools/" + + global::System.Uri.EscapeDataString(poolName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PoolsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets a machine pool + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 PoolsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/pools/(?[^/]+)$", 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.DevCenter/projects/{projectName}/pools/{poolName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var projectName = _match.Groups["projectName"].Value; + var poolName = _match.Groups["poolName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/pools/" + + poolName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // 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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // drop the old response - _response?.Dispose(); + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PoolsGet_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 PoolsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -14858,19 +17568,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Pool.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -14886,18 +17590,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. - /// The name of a devcenter plan member. + /// The name of the project. + /// Name of the pool. /// 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 PlanMembersDelete_Validate(string subscriptionId, string resourceGroupName, string planName, string memberName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PoolsGet_Validate(string subscriptionId, string resourceGroupName, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -14906,22 +17610,22 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(planName),planName); - await eventListener.AssertMinimumLength(nameof(planName),planName,3); - await eventListener.AssertMaximumLength(nameof(planName),planName,63); - await eventListener.AssertRegEx(nameof(planName),planName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$"); - await eventListener.AssertNotNull(nameof(memberName),memberName); - await eventListener.AssertMinimumLength(nameof(memberName),memberName,3); - await eventListener.AssertMaximumLength(nameof(memberName),memberName,63); - await eventListener.AssertRegEx(nameof(memberName),memberName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$"); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(poolName),poolName); + await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); + await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); + await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Gets a devcenter plan member. + /// Lists pools for a project /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. - /// The name of a devcenter plan member. + /// The name of the project. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -14930,9 +17634,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlanMembersGet(string subscriptionId, string resourceGroupName, string planName, string memberName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PoolsListByProject(string subscriptionId, string resourceGroupName, string projectName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -14942,12 +17646,13 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/plans/" - + global::System.Uri.EscapeDataString(planName) - + "/members/" - + global::System.Uri.EscapeDataString(memberName) + + "/providers/Microsoft.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/pools" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -14959,12 +17664,13 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlanMembersGet_Call(request,onOk,onDefault,eventListener,sender); + await this.PoolsListByProject_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets a devcenter plan member. + /// Lists pools for a project /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -14973,37 +17679,37 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlanMembersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PoolsListByProjectViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/plans/(?[^/]+)/members/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/pools$", 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.DevCenter/plans/{planName}/members/{memberName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var planName = _match.Groups["planName"].Value; - var memberName = _match.Groups["memberName"].Value; + var projectName = _match.Groups["projectName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/plans/" - + planName - + "/members/" - + memberName + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/pools" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -15015,11 +17721,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlanMembersGet_Call(request,onOk,onDefault,eventListener,sender); + await this.PoolsListByProject_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -15029,7 +17735,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PlanMembersGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PoolsListByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -15047,13 +17753,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlanMember.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -15069,18 +17775,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. - /// The name of a devcenter plan member. + /// The name of the project. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 PlanMembersGet_Validate(string subscriptionId, string resourceGroupName, string planName, string memberName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PoolsListByProject_Validate(string subscriptionId, string resourceGroupName, string projectName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -15089,22 +17795,18 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(planName),planName); - await eventListener.AssertMinimumLength(nameof(planName),planName,3); - await eventListener.AssertMaximumLength(nameof(planName),planName,63); - await eventListener.AssertRegEx(nameof(planName),planName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$"); - await eventListener.AssertNotNull(nameof(memberName),memberName); - await eventListener.AssertMinimumLength(nameof(memberName),memberName,3); - await eventListener.AssertMaximumLength(nameof(memberName),memberName,63); - await eventListener.AssertRegEx(nameof(memberName),memberName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$"); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Lists all of the members assigned to a devcenter plan. + /// Triggers a refresh of the pool status. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the project. + /// Name of the pool. /// 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). @@ -15113,9 +17815,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlanMembersList(string subscriptionId, string resourceGroupName, string planName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PoolsRunHealthChecks(string subscriptionId, string resourceGroupName, string projectName, string poolName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15125,31 +17827,30 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/plans/" - + global::System.Uri.EscapeDataString(planName) - + "/members" + + "/providers/Microsoft.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/pools/" + + global::System.Uri.EscapeDataString(poolName) + + "/runHealthChecks" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlanMembersList_Call(request,onOk,onDefault,eventListener,sender); + await this.PoolsRunHealthChecks_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists all of the members assigned to a devcenter plan. + /// Triggers a refresh of the pool status. /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -15158,73 +17859,171 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlanMembersListViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PoolsRunHealthChecksViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/plans/(?[^/]+)/members$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/pools/(?[^/]+)/runHealthChecks$", 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.DevCenter/plans/{planName}/members'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/runHealthChecks'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var planName = _match.Groups["planName"].Value; + var projectName = _match.Groups["projectName"].Value; + var poolName = _match.Groups["poolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/plans/" - + planName - + "/members" + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/pools/" + + poolName + + "/runHealthChecks" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PoolsRunHealthChecks_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 PoolsRunHealthChecks_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.PlanMembersList_Call(request,onOk,onDefault,eventListener,sender); - } - } + // drop the old response + _response?.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 PlanMembersList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -15232,13 +18031,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanMembersListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -15254,18 +18053,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the project. + /// Name of the pool. /// 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 PlanMembersList_Validate(string subscriptionId, string resourceGroupName, string planName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task PoolsRunHealthChecks_Validate(string subscriptionId, string resourceGroupName, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -15274,19 +18073,23 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(planName),planName); - await eventListener.AssertMinimumLength(nameof(planName),planName,3); - await eventListener.AssertMaximumLength(nameof(planName),planName,63); - await eventListener.AssertRegEx(nameof(planName),planName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$"); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(poolName),poolName); + await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); + await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); + await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Partially updates a devcenter plan. + /// Partially updates a machine pool /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. - /// The name of a devcenter plan member. - /// Updatable devcenter plan properties. + /// The name of the project. + /// Name of the pool. + /// Represents a machine pool /// 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). @@ -15295,9 +18098,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlanMembersUpdate(string subscriptionId, string resourceGroupName, string planName, string memberName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PoolsUpdate(string subscriptionId, string resourceGroupName, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15307,10 +18110,10 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/plans/" - + global::System.Uri.EscapeDataString(planName) - + "/members/" - + global::System.Uri.EscapeDataString(memberName) + + "/providers/Microsoft.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/pools/" + + global::System.Uri.EscapeDataString(poolName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -15328,13 +18131,13 @@ public partial class DevCenter request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlanMembersUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.PoolsUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Partially updates a devcenter plan. + /// Partially updates a machine pool /// - /// Updatable devcenter plan properties. + /// Represents a machine pool /// 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). @@ -15343,35 +18146,35 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlanMembersUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task PoolsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/plans/(?[^/]+)/members/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/pools/(?[^/]+)$", 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.DevCenter/plans/{planName}/members/{memberName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var planName = _match.Groups["planName"].Value; - var memberName = _match.Groups["memberName"].Value; + var projectName = _match.Groups["projectName"].Value; + var poolName = _match.Groups["poolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/plans/" - + planName - + "/members/" - + memberName + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/pools/" + + poolName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -15389,11 +18192,11 @@ public partial class DevCenter request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlanMembersUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.PoolsUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -15403,7 +18206,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PlanMembersUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task PoolsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -15478,38 +18281,224 @@ public partial class DevCenter // 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.UndeclaredResponseException(_response); - } - } + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Pool.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 name of the resource group. The name is case insensitive. + /// The name of the project. + /// Name of the pool. + /// Represents a machine pool + /// 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 PoolsUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(poolName),poolName); + await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); + await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); + await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Gets an allowed environment type. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the environment type. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ProjectAllowedEnvironmentTypesGet(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/allowedEnvironmentTypes/" + + global::System.Uri.EscapeDataString(environmentTypeName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProjectAllowedEnvironmentTypesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets an allowed environment type. + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ProjectAllowedEnvironmentTypesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/allowedEnvironmentTypes/(?[^/]+)$", 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.DevCenter/projects/{projectName}/allowedEnvironmentTypes/{environmentTypeName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var projectName = _match.Groups["projectName"].Value; + var environmentTypeName = _match.Groups["environmentTypeName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/allowedEnvironmentTypes/" + + environmentTypeName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // 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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // drop the old response - _response?.Dispose(); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProjectAllowedEnvironmentTypesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ProjectAllowedEnvironmentTypesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -15517,13 +18506,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlanMember.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -15539,19 +18528,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. - /// The name of a devcenter plan member. - /// Updatable devcenter plan properties. + /// The name of the project. + /// The name of the environment type. /// 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 PlanMembersUpdate_Validate(string subscriptionId, string resourceGroupName, string planName, string memberName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectAllowedEnvironmentTypesGet_Validate(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -15560,24 +18548,22 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(planName),planName); - await eventListener.AssertMinimumLength(nameof(planName),planName,3); - await eventListener.AssertMaximumLength(nameof(planName),planName,63); - await eventListener.AssertRegEx(nameof(planName),planName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$"); - await eventListener.AssertNotNull(nameof(memberName),memberName); - await eventListener.AssertMinimumLength(nameof(memberName),memberName,3); - await eventListener.AssertMaximumLength(nameof(memberName),memberName,63); - await eventListener.AssertRegEx(nameof(memberName),memberName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); + await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); + await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); + await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Creates or updates a devcenter plan resource + /// Lists allowed environment types for a project. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. - /// Represents a devcenter plan. + /// The name of the project. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -15586,9 +18572,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlansCreateOrUpdate(string subscriptionId, string resourceGroupName, string planName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectAllowedEnvironmentTypesList(string subscriptionId, string resourceGroupName, string projectName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15598,32 +18584,31 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/plans/" - + global::System.Uri.EscapeDataString(planName) + + "/providers/Microsoft.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/allowedEnvironmentTypes" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlansCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectAllowedEnvironmentTypesList_Call(request,onOk,onDefault,eventListener,sender); } } - /// Creates or updates a devcenter plan resource + /// Lists allowed environment types for a project. /// - /// Represents a devcenter plan. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -15632,54 +18617,53 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlansCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectAllowedEnvironmentTypesListViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/plans/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/allowedEnvironmentTypes$", 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.DevCenter/plans/{planName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var planName = _match.Groups["planName"].Value; + var projectName = _match.Groups["projectName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/plans/" - + planName + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/allowedEnvironmentTypes" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlansCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectAllowedEnvironmentTypesList_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -15689,7 +18673,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PlansCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectAllowedEnvironmentTypesList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -15700,102 +18684,6 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -15803,13 +18691,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlan.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentTypeListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -15825,18 +18713,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. - /// Represents a devcenter plan. + /// The name of the project. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 PlansCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string planName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectAllowedEnvironmentTypesList_Validate(string subscriptionId, string resourceGroupName, string projectName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -15845,21 +18733,21 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(planName),planName); - await eventListener.AssertMinimumLength(nameof(planName),planName,3); - await eventListener.AssertMaximumLength(nameof(planName),planName,63); - await eventListener.AssertRegEx(nameof(planName),planName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Deletes a devcenter plan + /// Cancels the specified build for an image definition. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -15867,9 +18755,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlansDelete(string subscriptionId, string resourceGroupName, string planName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionBuildCancel(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -15879,8 +18767,15 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/plans/" - + global::System.Uri.EscapeDataString(planName) + + "/providers/Microsoft.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions/" + + global::System.Uri.EscapeDataString(imageDefinitionName) + + "/builds/" + + global::System.Uri.EscapeDataString(buildName) + + "/cancel" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -15889,19 +18784,18 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlansDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ProjectCatalogImageDefinitionBuildCancel_Call(request,onOk,onDefault,eventListener,sender); } } - /// Deletes a devcenter plan + /// Cancels the specified build for an image definition. /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -15909,32 +18803,42 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlansDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionBuildCancelViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/plans/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions/(?[^/]+)/builds/(?[^/]+)/cancel$", 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.DevCenter/plans/{planName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/cancel'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var planName = _match.Groups["planName"].Value; + var projectName = _match.Groups["projectName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageDefinitionName = _match.Groups["imageDefinitionName"].Value; + var buildName = _match.Groups["buildName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/plans/" - + planName + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/catalogs/" + + catalogName + + "/imageDefinitions/" + + imageDefinitionName + + "/builds/" + + buildName + + "/cancel" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -15943,19 +18847,20 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlansDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ProjectCatalogImageDefinitionBuildCancel_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -15963,7 +18868,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PlansDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionBuildCancel_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -16078,19 +18983,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\cloudtest\.autorest\@autorest_powershell@3.0.522\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -16106,17 +19005,20 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. /// 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 PlansDelete_Validate(string subscriptionId, string resourceGroupName, string planName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionBuildCancel_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -16125,17 +19027,32 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(planName),planName); - await eventListener.AssertMinimumLength(nameof(planName),planName,3); - await eventListener.AssertMaximumLength(nameof(planName),planName,63); - await eventListener.AssertRegEx(nameof(planName),planName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$"); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageDefinitionName),imageDefinitionName); + await eventListener.AssertMinimumLength(nameof(imageDefinitionName),imageDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(imageDefinitionName),imageDefinitionName,63); + await eventListener.AssertRegEx(nameof(imageDefinitionName),imageDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(buildName),buildName); + await eventListener.AssertMinimumLength(nameof(buildName),buildName,3); + await eventListener.AssertMaximumLength(nameof(buildName),buildName,63); + await eventListener.AssertRegEx(nameof(buildName),buildName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Gets a devcenter plan. + /// Gets a build for a specified image definition. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. /// 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). @@ -16144,9 +19061,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlansGet(string subscriptionId, string resourceGroupName, string planName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionBuildGet(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16156,8 +19073,14 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/plans/" - + global::System.Uri.EscapeDataString(planName) + + "/providers/Microsoft.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions/" + + global::System.Uri.EscapeDataString(imageDefinitionName) + + "/builds/" + + global::System.Uri.EscapeDataString(buildName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16171,11 +19094,64 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlansGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogImageDefinitionBuildGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets Build details + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ProjectCatalogImageDefinitionBuildGetBuildDetails(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions/" + + global::System.Uri.EscapeDataString(imageDefinitionName) + + "/builds/" + + global::System.Uri.EscapeDataString(buildName) + + "/getBuildDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProjectCatalogImageDefinitionBuildGetBuildDetails_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets a devcenter plan. + /// Gets Build details /// /// 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 @@ -16185,32 +19161,42 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlansGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionBuildGetBuildDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/plans/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions/(?[^/]+)/builds/(?[^/]+)/getBuildDetails$", 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.DevCenter/plans/{planName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/getBuildDetails'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var planName = _match.Groups["planName"].Value; + var projectName = _match.Groups["projectName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageDefinitionName = _match.Groups["imageDefinitionName"].Value; + var buildName = _match.Groups["buildName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/plans/" - + planName + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/catalogs/" + + catalogName + + "/imageDefinitions/" + + imageDefinitionName + + "/builds/" + + buildName + + "/getBuildDetails" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16219,16 +19205,18 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlansGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogImageDefinitionBuildGetBuildDetails_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -16238,7 +19226,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PlansGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionBuildGetBuildDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -16256,13 +19244,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlan.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -16278,17 +19266,20 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. /// 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 PlansGet_Validate(string subscriptionId, string resourceGroupName, string planName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionBuildGetBuildDetails_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -16297,60 +19288,27 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(planName),planName); - await eventListener.AssertMinimumLength(nameof(planName),planName,3); - await eventListener.AssertMaximumLength(nameof(planName),planName,63); - await eventListener.AssertRegEx(nameof(planName),planName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$"); - } - } - - /// Lists all devcenter plans in a resource group. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The maximum number of resources to return from the operation. Example: '$top=10'. - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 PlansListByResourceGroup(string subscriptionId, string resourceGroupName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) - { - var apiVersion = @"2024-05-01-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.DevCenter/plans" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.PlansListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageDefinitionName),imageDefinitionName); + await eventListener.AssertMinimumLength(nameof(imageDefinitionName),imageDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(imageDefinitionName),imageDefinitionName,63); + await eventListener.AssertRegEx(nameof(imageDefinitionName),imageDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(buildName),buildName); + await eventListener.AssertMinimumLength(nameof(buildName),buildName,3); + await eventListener.AssertMaximumLength(nameof(buildName),buildName,63); + await eventListener.AssertRegEx(nameof(buildName),buildName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Lists all devcenter plans in a resource group. + /// Gets a build for a specified image definition. /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -16359,34 +19317,43 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlansListByResourceGroupViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionBuildGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/plans$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions/(?[^/]+)/builds/(?[^/]+)$", 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.DevCenter/plans'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var projectName = _match.Groups["projectName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageDefinitionName = _match.Groups["imageDefinitionName"].Value; + var buildName = _match.Groups["buildName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/plans" + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/catalogs/" + + catalogName + + "/imageDefinitions/" + + imageDefinitionName + + "/builds/" + + buildName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -16398,11 +19365,13 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlansListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogImageDefinitionBuildGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -16412,7 +19381,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PlansListByResourceGroup_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionBuildGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -16430,13 +19399,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuild.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -16452,17 +19421,20 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. + /// The ID of the Image Definition Build. /// 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 PlansListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionBuildGet_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, string buildName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -16471,12 +19443,31 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageDefinitionName),imageDefinitionName); + await eventListener.AssertMinimumLength(nameof(imageDefinitionName),imageDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(imageDefinitionName),imageDefinitionName,63); + await eventListener.AssertRegEx(nameof(imageDefinitionName),imageDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(buildName),buildName); + await eventListener.AssertMinimumLength(nameof(buildName),buildName,3); + await eventListener.AssertMaximumLength(nameof(buildName),buildName,63); + await eventListener.AssertRegEx(nameof(buildName),buildName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Lists all devcenter plans in a subscription. + /// Lists builds for a specified image definition. /// The ID of the target subscription. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. /// 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). @@ -16485,9 +19476,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlansListBySubscription(string subscriptionId, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionBuildsListByImageDefinition(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16495,11 +19486,17 @@ public partial class DevCenter var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.DevCenter/plans" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions/" + + global::System.Uri.EscapeDataString(imageDefinitionName) + + "/builds" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -16511,13 +19508,12 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlansListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogImageDefinitionBuildsListByImageDefinition_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists all devcenter plans in a subscription. + /// Lists builds for a specified image definition. /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -16526,31 +19522,41 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlansListBySubscriptionViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionBuildsListByImageDefinitionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/plans$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions/(?[^/]+)/builds$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/plans'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var projectName = _match.Groups["projectName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageDefinitionName = _match.Groups["imageDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.DevCenter/plans" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/catalogs/" + + catalogName + + "/imageDefinitions/" + + imageDefinitionName + + "/builds" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -16562,11 +19568,13 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlansListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogImageDefinitionBuildsListByImageDefinition_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -16576,7 +19584,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PlansListBySubscription_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionBuildsListByImageDefinition_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -16594,13 +19602,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -16616,29 +19624,48 @@ public partial class DevCenter } /// - /// 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 maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. /// 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 PlansListBySubscription_Validate(string subscriptionId, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionBuildsListByImageDefinition_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageDefinitionName),imageDefinitionName); + await eventListener.AssertMinimumLength(nameof(imageDefinitionName),imageDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(imageDefinitionName),imageDefinitionName,63); + await eventListener.AssertRegEx(nameof(imageDefinitionName),imageDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Partially updates a devcenter plan. + /// Builds an image for the specified Image Definition. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. - /// Updatable devcenter plan properties. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. /// 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). @@ -16647,9 +19674,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlansUpdate(string subscriptionId, string resourceGroupName, string planName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionsBuildImage(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16659,8 +19686,13 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/plans/" - + global::System.Uri.EscapeDataString(planName) + + "/providers/Microsoft.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions/" + + global::System.Uri.EscapeDataString(imageDefinitionName) + + "/buildImage" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16669,22 +19701,17 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlansUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogImageDefinitionsBuildImage_Call(request,onOk,onDefault,eventListener,sender); } } - /// Partially updates a devcenter plan. + /// Builds an image for the specified Image Definition. /// - /// Updatable devcenter plan properties. /// 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). @@ -16693,32 +19720,39 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PlansUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionsBuildImageViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/plans/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions/(?[^/]+)/buildImage$", 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.DevCenter/plans/{planName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/buildImage'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var planName = _match.Groups["planName"].Value; + var projectName = _match.Groups["projectName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageDefinitionName = _match.Groups["imageDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/plans/" - + planName + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/catalogs/" + + catalogName + + "/imageDefinitions/" + + imageDefinitionName + + "/buildImage" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16727,20 +19761,18 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PlansUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogImageDefinitionsBuildImage_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -16750,7 +19782,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PlansUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionsBuildImage_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -16764,6 +19796,7 @@ public partial class DevCenter // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"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 ) @@ -16847,7 +19880,7 @@ public partial class DevCenter } // 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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); // drop the old response _response?.Dispose(); @@ -16864,13 +19897,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlan.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\cloudtest\.autorest\@autorest_powershell@3.0.522\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -16886,18 +19919,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the devcenter plan. - /// Updatable devcenter plan properties. + /// The name of the project. + /// The name of the Catalog. + /// The name of the Image Definition. /// 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 PlansUpdate_Validate(string subscriptionId, string resourceGroupName, string planName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionsBuildImage_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -16906,21 +19940,27 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(planName),planName); - await eventListener.AssertMinimumLength(nameof(planName),planName,3); - await eventListener.AssertMaximumLength(nameof(planName),planName,63); - await eventListener.AssertRegEx(nameof(planName),planName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageDefinitionName),imageDefinitionName); + await eventListener.AssertMinimumLength(nameof(imageDefinitionName),imageDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(imageDefinitionName),imageDefinitionName,63); + await eventListener.AssertRegEx(nameof(imageDefinitionName),imageDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Creates or updates a machine pool + /// Gets an Image Definition from the catalog /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. - /// Name of the pool. - /// Represents a machine pool + /// The name of the Catalog. + /// The name of the Image Definition. /// 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). @@ -16929,9 +19969,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PoolsCreateOrUpdate(string subscriptionId, string resourceGroupName, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionsGetByProjectCatalog(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -16943,8 +19983,10 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/pools/" - + global::System.Uri.EscapeDataString(poolName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions/" + + global::System.Uri.EscapeDataString(imageDefinitionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -16953,22 +19995,17 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PoolsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogImageDefinitionsGetByProjectCatalog_Call(request,onOk,onDefault,eventListener,sender); } } - /// Creates or updates a machine pool + /// Gets an Image Definition from the catalog /// - /// Represents a machine pool /// 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). @@ -16977,25 +20014,26 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PoolsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionsGetByProjectCatalogViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/pools/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions/(?[^/]+)$", 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.DevCenter/projects/{projectName}/pools/{poolName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; - var poolName = _match.Groups["poolName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageDefinitionName = _match.Groups["imageDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -17004,8 +20042,10 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/projects/" + projectName - + "/pools/" - + poolName + + "/catalogs/" + + catalogName + + "/imageDefinitions/" + + imageDefinitionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -17014,20 +20054,18 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PoolsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogImageDefinitionsGetByProjectCatalog_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -17037,7 +20075,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PoolsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionsGetByProjectCatalog_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -17048,102 +20086,6 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -17151,13 +20093,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Pool.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -17173,19 +20115,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. - /// Name of the pool. - /// Represents a machine pool + /// The name of the Catalog. + /// The name of the Image Definition. /// 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 PoolsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionsGetByProjectCatalog_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -17198,22 +20140,24 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(poolName),poolName); - await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); - await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); - await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageDefinitionName),imageDefinitionName); + await eventListener.AssertMinimumLength(nameof(imageDefinitionName),imageDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(imageDefinitionName),imageDefinitionName,63); + await eventListener.AssertRegEx(nameof(imageDefinitionName),imageDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Deletes a machine pool + /// Gets Image Definition error details /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. - /// Name of the pool. + /// The name of the Catalog. + /// The name of the Image Definition. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -17221,9 +20165,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PoolsDelete(string subscriptionId, string resourceGroupName, string projectName, string poolName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionsGetErrorDetails(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17235,8 +20179,11 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/pools/" - + global::System.Uri.EscapeDataString(poolName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions/" + + global::System.Uri.EscapeDataString(imageDefinitionName) + + "/getErrorDetails" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -17245,19 +20192,18 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PoolsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ProjectCatalogImageDefinitionsGetErrorDetails_Call(request,onOk,onDefault,eventListener,sender); } } - /// Deletes a machine pool + /// Gets Image Definition error details /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -17265,25 +20211,26 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PoolsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionsGetErrorDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/pools/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions/(?[^/]+)/getErrorDetails$", 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.DevCenter/projects/{projectName}/pools/{poolName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/getErrorDetails'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; - var poolName = _match.Groups["poolName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var imageDefinitionName = _match.Groups["imageDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -17292,8 +20239,11 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/projects/" + projectName - + "/pools/" - + poolName + + "/catalogs/" + + catalogName + + "/imageDefinitions/" + + imageDefinitionName + + "/getErrorDetails" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -17302,134 +20252,38 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PoolsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); - } - } - - /// 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 204 (NoContent). - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 PoolsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); + await this.ProjectCatalogImageDefinitionsGetErrorDetails_Call(request,onOk,onDefault,eventListener,sender); + } + } - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ProjectCatalogImageDefinitionsGetErrorDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -17437,19 +20291,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogResourceValidationErrorDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -17465,18 +20313,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. - /// Name of the pool. + /// The name of the Catalog. + /// The name of the Image Definition. /// 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 PoolsDelete_Validate(string subscriptionId, string resourceGroupName, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionsGetErrorDetails_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string imageDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -17489,18 +20338,23 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(poolName),poolName); - await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); - await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); - await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageDefinitionName),imageDefinitionName); + await eventListener.AssertMinimumLength(nameof(imageDefinitionName),imageDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(imageDefinitionName),imageDefinitionName,63); + await eventListener.AssertRegEx(nameof(imageDefinitionName),imageDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Gets a machine pool + /// List Image Definitions in the catalog. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. - /// Name of the pool. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -17509,9 +20363,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PoolsGet(string subscriptionId, string resourceGroupName, string projectName, string poolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionsListByProjectCatalog(string subscriptionId, string resourceGroupName, string projectName, string catalogName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17523,10 +20377,13 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/pools/" - + global::System.Uri.EscapeDataString(poolName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/imageDefinitions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -17538,12 +20395,13 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PoolsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogImageDefinitionsListByProjectCatalog_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets a machine pool + /// List Image Definitions in the catalog. /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -17552,25 +20410,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PoolsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionsListByProjectCatalogViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/pools/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/imageDefinitions$", 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.DevCenter/projects/{projectName}/pools/{poolName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; - var poolName = _match.Groups["poolName"].Value; + var catalogName = _match.Groups["catalogName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -17579,10 +20437,13 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/projects/" + projectName - + "/pools/" - + poolName + + "/catalogs/" + + catalogName + + "/imageDefinitions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -17594,11 +20455,13 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PoolsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogImageDefinitionsListByProjectCatalog_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -17608,7 +20471,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PoolsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionsListByProjectCatalog_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -17626,13 +20489,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Pool.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -17648,18 +20511,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. - /// Name of the pool. + /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 PoolsGet_Validate(string subscriptionId, string resourceGroupName, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectCatalogImageDefinitionsListByProjectCatalog_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -17672,18 +20536,18 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(poolName),poolName); - await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); - await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); - await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Lists pools for a project + /// Connects a project catalog to enable syncing. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the Catalog. /// 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). @@ -17692,9 +20556,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PoolsListByProject(string subscriptionId, string resourceGroupName, string projectName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogsConnect(string subscriptionId, string resourceGroupName, string projectName, string catalogName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17706,29 +20570,28 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/pools" + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/connect" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PoolsListByProject_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogsConnect_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists pools for a project + /// Connects a project catalog to enable syncing. /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -17737,24 +20600,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PoolsListByProjectViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogsConnectViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/pools$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/connect$", 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.DevCenter/projects/{projectName}/pools'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/connect'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; + var catalogName = _match.Groups["catalogName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -17763,27 +20627,27 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/projects/" + projectName - + "/pools" + + "/catalogs/" + + catalogName + + "/connect" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PoolsListByProject_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogsConnect_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -17793,7 +20657,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PoolsListByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectCatalogsConnect_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -17804,6 +20668,103 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -17811,13 +20772,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -17833,18 +20794,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the Catalog. /// 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 PoolsListByProject_Validate(string subscriptionId, string resourceGroupName, string projectName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectCatalogsConnect_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -17857,14 +20818,19 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Triggers a refresh of the pool status. + /// Creates or updates a project catalog. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. - /// Name of the pool. + /// The name of the Catalog. + /// Represents a catalog. /// 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). @@ -17873,9 +20839,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PoolsRunHealthChecks(string subscriptionId, string resourceGroupName, string projectName, string poolName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogsCreateOrUpdate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -17887,9 +20853,8 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/pools/" - + global::System.Uri.EscapeDataString(poolName) - + "/runHealthChecks" + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -17898,17 +20863,22 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PoolsRunHealthChecks_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Triggers a refresh of the pool status. + /// Creates or updates a project catalog. /// + /// Represents a catalog. /// 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). @@ -17917,25 +20887,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PoolsRunHealthChecksViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/pools/(?[^/]+)/runHealthChecks$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)$", 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.DevCenter/projects/{projectName}/pools/{poolName}/runHealthChecks'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; - var poolName = _match.Groups["poolName"].Value; + var catalogName = _match.Groups["catalogName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -17944,9 +20914,8 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/projects/" + projectName - + "/pools/" - + poolName - + "/runHealthChecks" + + "/catalogs/" + + catalogName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -17955,16 +20924,20 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PoolsRunHealthChecks_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -17974,7 +20947,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PoolsRunHealthChecks_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectCatalogsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -17988,7 +20961,6 @@ public partial class DevCenter // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: azure-async-operation - var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"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 ) @@ -18072,7 +21044,7 @@ public partial class DevCenter } // 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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); // drop the old response _response?.Dispose(); @@ -18089,13 +21061,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -18111,18 +21083,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. - /// Name of the pool. + /// The name of the Catalog. + /// Represents a catalog. /// 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 PoolsRunHealthChecks_Validate(string subscriptionId, string resourceGroupName, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectCatalogsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -18135,20 +21108,22 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(poolName),poolName); - await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); - await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); - await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Partially updates a machine pool + /// Deletes a project catalog resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. - /// Name of the pool. - /// Represents a machine pool + /// The name of the Catalog. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -18156,9 +21131,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PoolsUpdate(string subscriptionId, string resourceGroupName, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogsDelete(string subscriptionId, string resourceGroupName, string projectName, string catalogName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -18170,8 +21145,8 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/pools/" - + global::System.Uri.EscapeDataString(poolName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -18180,23 +21155,19 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PoolsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Partially updates a machine pool + /// Deletes a project catalog resource. /// - /// Represents a machine pool /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -18204,25 +21175,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task PoolsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/pools/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)$", 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.DevCenter/projects/{projectName}/pools/{poolName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; - var poolName = _match.Groups["poolName"].Value; + var catalogName = _match.Groups["catalogName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -18231,8 +21202,8 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/projects/" + projectName - + "/pools/" - + poolName + + "/catalogs/" + + catalogName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -18241,22 +21212,19 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.PoolsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// 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 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -18264,7 +21232,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task PoolsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectCatalogsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -18278,6 +21246,7 @@ public partial class DevCenter // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"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 ) @@ -18361,7 +21330,7 @@ public partial class DevCenter } // 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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); // drop the old response _response?.Dispose(); @@ -18378,13 +21347,19 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Pool.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -18400,19 +21375,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. - /// Name of the pool. - /// Represents a machine pool + /// The name of the Catalog. /// 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 PoolsUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectCatalogsDelete_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -18425,20 +21399,18 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(poolName),poolName); - await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); - await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); - await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Gets an allowed environment type. + /// Gets an associated project catalog. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. - /// The name of the environment type. + /// The name of the Catalog. /// 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). @@ -18447,9 +21419,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectAllowedEnvironmentTypesGet(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogsGet(string subscriptionId, string resourceGroupName, string projectName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -18461,8 +21433,8 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/allowedEnvironmentTypes/" - + global::System.Uri.EscapeDataString(environmentTypeName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -18476,11 +21448,58 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectAllowedEnvironmentTypesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogsGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets an allowed environment type. + /// Gets project catalog synchronization error details + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ProjectCatalogsGetSyncErrorDetails(string subscriptionId, string resourceGroupName, string projectName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/getSyncErrorDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProjectCatalogsGetSyncErrorDetails_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets project catalog synchronization error details /// /// 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 @@ -18490,25 +21509,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectAllowedEnvironmentTypesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogsGetSyncErrorDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/allowedEnvironmentTypes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/getSyncErrorDetails$", 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.DevCenter/projects/{projectName}/allowedEnvironmentTypes/{environmentTypeName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/getSyncErrorDetails'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; - var environmentTypeName = _match.Groups["environmentTypeName"].Value; + var catalogName = _match.Groups["catalogName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -18517,8 +21536,9 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/projects/" + projectName - + "/allowedEnvironmentTypes/" - + environmentTypeName + + "/catalogs/" + + catalogName + + "/getSyncErrorDetails" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -18527,16 +21547,16 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectAllowedEnvironmentTypesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogsGetSyncErrorDetails_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -18546,7 +21566,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectAllowedEnvironmentTypesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectCatalogsGetSyncErrorDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -18564,13 +21584,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SyncErrorDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -18586,87 +21606,39 @@ public partial class DevCenter } /// - /// Validation method for method. Call this like the actual call, but you + /// Validation method for method. Call this like the actual call, but you /// will get validation events back. /// /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the project. - /// The name of the environment type. - /// 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 ProjectAllowedEnvironmentTypesGet_Validate(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); - await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); - await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); - await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); - await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); - await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - } - } - - /// Lists allowed environment types for a project. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the project. - /// The maximum number of resources to return from the operation. Example: '$top=10'. - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ProjectAllowedEnvironmentTypesList(string subscriptionId, string resourceGroupName, string projectName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) - { - var apiVersion = @"2024-05-01-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.DevCenter/projects/" - + global::System.Uri.EscapeDataString(projectName) - + "/allowedEnvironmentTypes" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ProjectAllowedEnvironmentTypesList_Call(request,onOk,onDefault,eventListener,sender); + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the Catalog. + /// 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 ProjectCatalogsGetSyncErrorDetails_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Lists allowed environment types for a project. + /// Gets an associated project catalog. /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -18675,24 +21647,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectAllowedEnvironmentTypesListViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/allowedEnvironmentTypes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)$", 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.DevCenter/projects/{projectName}/allowedEnvironmentTypes'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; + var catalogName = _match.Groups["catalogName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -18701,11 +21674,10 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/projects/" + projectName - + "/allowedEnvironmentTypes" + + "/catalogs/" + + catalogName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -18717,11 +21689,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectAllowedEnvironmentTypesList_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogsGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -18731,7 +21703,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectAllowedEnvironmentTypesList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectCatalogsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -18749,13 +21721,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentTypeListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -18771,18 +21743,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the Catalog. /// 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 ProjectAllowedEnvironmentTypesList_Validate(string subscriptionId, string resourceGroupName, string projectName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectCatalogsGet_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -18795,14 +21767,18 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Connects a project catalog to enable syncing. + /// Lists the catalogs associated with a project. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. - /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -18811,9 +21787,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsConnect(string subscriptionId, string resourceGroupName, string projectName, string catalogName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogsList(string subscriptionId, string resourceGroupName, string projectName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -18825,28 +21801,29 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/catalogs/" - + global::System.Uri.EscapeDataString(catalogName) - + "/connect" + + "/catalogs" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsConnect_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogsList_Call(request,onOk,onDefault,eventListener,sender); } } - /// Connects a project catalog to enable syncing. + /// Lists the catalogs associated with a project. /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -18855,25 +21832,24 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsConnectViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogsListViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/connect$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs$", 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.DevCenter/projects/{projectName}/catalogs/{catalogName}/connect'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; - var catalogName = _match.Groups["catalogName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -18882,27 +21858,27 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/projects/" + projectName - + "/catalogs/" - + catalogName - + "/connect" + + "/catalogs" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsConnect_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogsList_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -18912,7 +21888,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectCatalogsConnect_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectCatalogsList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -18923,103 +21899,6 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -19027,13 +21906,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -19049,18 +21928,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. - /// The name of the Catalog. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 ProjectCatalogsConnect_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectCatalogsList_Validate(string subscriptionId, string resourceGroupName, string projectName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -19073,19 +21952,15 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(catalogName),catalogName); - await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); - await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); - await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Creates or updates a project catalog. + /// Partially updates a project catalog. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the Catalog. - /// Represents a catalog. + /// Updatable project catalog properties. /// 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). @@ -19094,9 +21969,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsCreateOrUpdate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogsPatch(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -19118,7 +21993,7 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -19127,13 +22002,13 @@ public partial class DevCenter request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogsPatch_Call(request,onOk,onDefault,eventListener,sender); } } - /// Creates or updates a project catalog. + /// Partially updates a project catalog. /// - /// Represents a catalog. + /// Updatable project catalog properties. /// 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). @@ -19142,9 +22017,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogsPatchViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -19179,7 +22054,7 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -19188,11 +22063,11 @@ public partial class DevCenter request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectCatalogsPatch_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -19202,7 +22077,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectCatalogsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectCatalogsPatch_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -19316,13 +22191,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -19338,19 +22213,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the Catalog. - /// Represents a catalog. + /// Updatable project catalog properties. /// 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 ProjectCatalogsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectCatalogsPatch_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -19372,13 +22247,12 @@ public partial class DevCenter } } - /// Deletes a project catalog resource. + /// Syncs templates for a template source. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the Catalog. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -19386,9 +22260,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsDelete(string subscriptionId, string resourceGroupName, string projectName, string catalogName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogsSync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -19402,6 +22276,7 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(projectName) + "/catalogs/" + global::System.Uri.EscapeDataString(catalogName) + + "/sync" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -19410,19 +22285,18 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ProjectCatalogsSync_Call(request,onOk,onDefault,eventListener,sender); } } - /// Deletes a project catalog resource. + /// Syncs templates for a template source. /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -19430,18 +22304,18 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectCatalogsSyncViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/sync$", 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.DevCenter/projects/{projectName}/catalogs/{catalogName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/sync'"); } // replace URI parameters with values from identity @@ -19459,6 +22333,7 @@ public partial class DevCenter + projectName + "/catalogs/" + catalogName + + "/sync" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -19467,19 +22342,18 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ProjectCatalogsSync_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -19487,7 +22361,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectCatalogsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectCatalogsSync_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -19605,16 +22479,10 @@ public partial class DevCenter await onOk(_response); break; } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -19630,7 +22498,7 @@ public partial class DevCenter } /// - /// 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. @@ -19641,7 +22509,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectCatalogsDelete_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectCatalogsSync_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -19661,11 +22529,12 @@ public partial class DevCenter } } - /// Gets an associated project catalog. + /// Gets an environment definition from the catalog. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the Catalog. + /// The name of the Environment Definition. /// 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). @@ -19674,9 +22543,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsGet(string subscriptionId, string resourceGroupName, string projectName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsGet(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -19690,6 +22559,8 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(projectName) + "/catalogs/" + global::System.Uri.EscapeDataString(catalogName) + + "/environmentDefinitions/" + + global::System.Uri.EscapeDataString(environmentDefinitionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -19703,15 +22574,16 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectEnvironmentDefinitionsGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets project catalog synchronization error details + /// Gets Environment Definition error details /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the Catalog. + /// The name of the Environment Definition. /// 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). @@ -19720,9 +22592,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsGetSyncErrorDetails(string subscriptionId, string resourceGroupName, string projectName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsGetErrorDetails(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -19736,7 +22608,9 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(projectName) + "/catalogs/" + global::System.Uri.EscapeDataString(catalogName) - + "/getSyncErrorDetails" + + "/environmentDefinitions/" + + global::System.Uri.EscapeDataString(environmentDefinitionName) + + "/getErrorDetails" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -19750,11 +22624,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsGetSyncErrorDetails_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectEnvironmentDefinitionsGetErrorDetails_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets project catalog synchronization error details + /// Gets Environment Definition error details /// /// 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 @@ -19764,18 +22638,18 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsGetSyncErrorDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsGetErrorDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/getSyncErrorDetails$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/environmentDefinitions/(?[^/]+)/getErrorDetails$", 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.DevCenter/projects/{projectName}/catalogs/{catalogName}/getSyncErrorDetails'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails'"); } // replace URI parameters with values from identity @@ -19783,6 +22657,7 @@ public partial class DevCenter var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; var catalogName = _match.Groups["catalogName"].Value; + var environmentDefinitionName = _match.Groups["environmentDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -19793,7 +22668,9 @@ public partial class DevCenter + projectName + "/catalogs/" + catalogName - + "/getSyncErrorDetails" + + "/environmentDefinitions/" + + environmentDefinitionName + + "/getErrorDetails" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -19807,11 +22684,13 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsGetSyncErrorDetails_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectEnvironmentDefinitionsGetErrorDetails_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -19821,7 +22700,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectCatalogsGetSyncErrorDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsGetErrorDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -19839,13 +22718,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SyncErrorDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogResourceValidationErrorDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -19861,18 +22740,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the Catalog. + /// The name of the Environment Definition. /// 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 ProjectCatalogsGetSyncErrorDetails_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsGetErrorDetails_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -19889,10 +22769,14 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(environmentDefinitionName),environmentDefinitionName); + await eventListener.AssertMinimumLength(nameof(environmentDefinitionName),environmentDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(environmentDefinitionName),environmentDefinitionName,63); + await eventListener.AssertRegEx(nameof(environmentDefinitionName),environmentDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Gets an associated project catalog. + /// Gets an environment definition from the catalog. /// /// 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 @@ -19902,18 +22786,18 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/environmentDefinitions/(?[^/]+)$", 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.DevCenter/projects/{projectName}/catalogs/{catalogName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}'"); } // replace URI parameters with values from identity @@ -19921,6 +22805,7 @@ public partial class DevCenter var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; var catalogName = _match.Groups["catalogName"].Value; + var environmentDefinitionName = _match.Groups["environmentDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -19931,6 +22816,8 @@ public partial class DevCenter + projectName + "/catalogs/" + catalogName + + "/environmentDefinitions/" + + environmentDefinitionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -19944,11 +22831,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectEnvironmentDefinitionsGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -19958,7 +22845,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectCatalogsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -19976,13 +22863,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -19998,18 +22885,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. /// The name of the Catalog. + /// The name of the Environment Definition. /// 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 ProjectCatalogsGet_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsGet_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -20026,14 +22914,18 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(environmentDefinitionName),environmentDefinitionName); + await eventListener.AssertMinimumLength(nameof(environmentDefinitionName),environmentDefinitionName,3); + await eventListener.AssertMaximumLength(nameof(environmentDefinitionName),environmentDefinitionName,63); + await eventListener.AssertRegEx(nameof(environmentDefinitionName),environmentDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Lists the catalogs associated with a project. + /// Lists the environment definitions in this project catalog. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the Catalog. /// 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). @@ -20042,9 +22934,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsList(string subscriptionId, string resourceGroupName, string projectName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsList(string subscriptionId, string resourceGroupName, string projectName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -20056,11 +22948,11 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/catalogs" + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/environmentDefinitions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -20072,13 +22964,12 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsList_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectEnvironmentDefinitionsList_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists the catalogs associated with a project. + /// Lists the environment definitions in this project catalog. /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -20087,24 +22978,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsListViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/catalogs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/environmentDefinitions$", 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.DevCenter/projects/{projectName}/catalogs'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; + var catalogName = _match.Groups["catalogName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -20113,11 +23005,11 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/projects/" + projectName - + "/catalogs" + + "/catalogs/" + + catalogName + + "/environmentDefinitions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -20129,11 +23021,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsList_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectEnvironmentDefinitionsList_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -20143,7 +23035,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectCatalogsList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -20161,13 +23053,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -20183,18 +23075,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. - /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// The name of the Catalog. /// 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 ProjectCatalogsList_Validate(string subscriptionId, string resourceGroupName, string projectName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsList_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -20207,16 +23099,21 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Partially updates a project catalog. + /// Creates or updates a project environment type. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. - /// The name of the Catalog. - /// Updatable project catalog properties. + /// The name of the environment type. + /// Represents a Project Environment Type. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -20224,9 +23121,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsPatch(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesCreateOrUpdate(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -20238,8 +23135,8 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/catalogs/" - + global::System.Uri.EscapeDataString(catalogName) + + "/environmentTypes/" + + global::System.Uri.EscapeDataString(environmentTypeName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -20248,7 +23145,7 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -20257,14 +23154,15 @@ public partial class DevCenter request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsPatch_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectEnvironmentTypesCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); } } - /// Partially updates a project catalog. + /// Creates or updates a project environment type. /// - /// Updatable project catalog properties. + /// Represents a Project Environment Type. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -20272,25 +23170,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsPatchViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/environmentTypes/(?[^/]+)$", 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.DevCenter/projects/{projectName}/catalogs/{catalogName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; - var catalogName = _match.Groups["catalogName"].Value; + var environmentTypeName = _match.Groups["environmentTypeName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -20299,8 +23197,8 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/projects/" + projectName - + "/catalogs/" - + catalogName + + "/environmentTypes/" + + environmentTypeName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -20309,7 +23207,7 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -20318,127 +23216,34 @@ public partial class DevCenter request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsPatch_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectEnvironmentTypesCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); } } - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ProjectCatalogsPatch_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } + /// + /// 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 201 (Created). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ProjectEnvironmentTypesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -20446,13 +23251,19 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -20468,19 +23279,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. - /// The name of the Catalog. - /// Updatable project catalog properties. + /// The name of the environment type. + /// Represents a Project Environment Type. /// 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 ProjectCatalogsPatch_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectEnvironmentTypesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -20493,21 +23304,22 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(catalogName),catalogName); - await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); - await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); - await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); + await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); + await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); + await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Syncs templates for a template source. + /// Deletes a project environment type. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. - /// The name of the Catalog. + /// The name of the environment type. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -20515,9 +23327,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsSync(string subscriptionId, string resourceGroupName, string projectName, string catalogName, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesDelete(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -20529,9 +23341,8 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/catalogs/" - + global::System.Uri.EscapeDataString(catalogName) - + "/sync" + + "/environmentTypes/" + + global::System.Uri.EscapeDataString(environmentTypeName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -20540,18 +23351,19 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsSync_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectEnvironmentTypesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Syncs templates for a template source. + /// Deletes a project environment type. /// /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -20559,25 +23371,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectCatalogsSyncViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/sync$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/environmentTypes/(?[^/]+)$", 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.DevCenter/projects/{projectName}/catalogs/{catalogName}/sync'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; - var catalogName = _match.Groups["catalogName"].Value; + var environmentTypeName = _match.Groups["environmentTypeName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -20586,9 +23398,8 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/projects/" + projectName - + "/catalogs/" - + catalogName - + "/sync" + + "/environmentTypes/" + + environmentTypeName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -20597,18 +23408,19 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectCatalogsSync_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectEnvironmentTypesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// 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 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -20616,7 +23428,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectCatalogsSync_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectEnvironmentTypesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -20627,103 +23439,6 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: azure-async-operation - var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -20734,10 +23449,16 @@ public partial class DevCenter await onOk(_response); break; } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -20750,95 +23471,45 @@ public partial class DevCenter 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 name of the resource group. The name is case insensitive. - /// The name of the project. - /// The name of the Catalog. - /// 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 ProjectCatalogsSync_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); - await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); - await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(catalogName),catalogName); - await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); - await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); - await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - } - } - - /// Gets an environment definition from the catalog. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the project. - /// The name of the Catalog. - /// The name of the Environment Definition. - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ProjectEnvironmentDefinitionsGet(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) - { - var apiVersion = @"2024-05-01-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.DevCenter/projects/" - + global::System.Uri.EscapeDataString(projectName) - + "/catalogs/" - + global::System.Uri.EscapeDataString(catalogName) - + "/environmentDefinitions/" - + global::System.Uri.EscapeDataString(environmentDefinitionName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ProjectEnvironmentDefinitionsGet_Call(request,onOk,onDefault,eventListener,sender); + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The name of the environment type. + /// 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 ProjectEnvironmentTypesDelete_Validate(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); + await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); + await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); + await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Gets Environment Definition error details + /// Gets a project environment type. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. - /// The name of the Catalog. - /// The name of the Environment Definition. + /// The name of the environment type. /// 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). @@ -20847,9 +23518,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsGetErrorDetails(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesGet(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -20861,11 +23532,8 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/catalogs/" - + global::System.Uri.EscapeDataString(catalogName) - + "/environmentDefinitions/" - + global::System.Uri.EscapeDataString(environmentDefinitionName) - + "/getErrorDetails" + + "/environmentTypes/" + + global::System.Uri.EscapeDataString(environmentTypeName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -20874,16 +23542,16 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectEnvironmentDefinitionsGetErrorDetails_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectEnvironmentTypesGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets Environment Definition error details + /// Gets a project environment type. /// /// 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 @@ -20893,26 +23561,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsGetErrorDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/environmentDefinitions/(?[^/]+)/getErrorDetails$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/environmentTypes/(?[^/]+)$", 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.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; - var catalogName = _match.Groups["catalogName"].Value; - var environmentDefinitionName = _match.Groups["environmentDefinitionName"].Value; + var environmentTypeName = _match.Groups["environmentTypeName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -20921,11 +23588,8 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/projects/" + projectName - + "/catalogs/" - + catalogName - + "/environmentDefinitions/" - + environmentDefinitionName - + "/getErrorDetails" + + "/environmentTypes/" + + environmentTypeName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -20934,18 +23598,16 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectEnvironmentDefinitionsGetErrorDetails_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectEnvironmentTypesGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// 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 @@ -20955,7 +23617,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsGetErrorDetails_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectEnvironmentTypesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -20973,13 +23635,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogResourceValidationErrorDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -20995,19 +23657,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. - /// The name of the Catalog. - /// The name of the Environment Definition. + /// The name of the environment type. /// 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 ProjectEnvironmentDefinitionsGetErrorDetails_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectEnvironmentTypesGet_Validate(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -21020,19 +23681,63 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(catalogName),catalogName); - await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); - await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); - await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(environmentDefinitionName),environmentDefinitionName); - await eventListener.AssertMinimumLength(nameof(environmentDefinitionName),environmentDefinitionName,3); - await eventListener.AssertMaximumLength(nameof(environmentDefinitionName),environmentDefinitionName,63); - await eventListener.AssertRegEx(nameof(environmentDefinitionName),environmentDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); + await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); + await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); + await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Gets an environment definition from the catalog. + /// Lists environment types for a project. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ProjectEnvironmentTypesList(string subscriptionId, string resourceGroupName, string projectName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/environmentTypes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProjectEnvironmentTypesList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists environment types for a project. /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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). @@ -21041,26 +23746,24 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesListViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/environmentDefinitions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/environmentTypes$", 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.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; - var catalogName = _match.Groups["catalogName"].Value; - var environmentDefinitionName = _match.Groups["environmentDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -21069,12 +23772,11 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/projects/" + projectName - + "/catalogs/" - + catalogName - + "/environmentDefinitions/" - + environmentDefinitionName + + "/environmentTypes" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == Top ? global::System.String.Empty : "$top=" + global::System.Uri.EscapeDataString(Top.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -21086,11 +23788,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectEnvironmentDefinitionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectEnvironmentTypesList_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -21100,7 +23802,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectEnvironmentTypesList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -21118,13 +23820,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -21140,19 +23842,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. - /// The name of the Catalog. - /// The name of the Environment Definition. + /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 ProjectEnvironmentDefinitionsGet_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, string environmentDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectEnvironmentTypesList_Validate(string subscriptionId, string resourceGroupName, string projectName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -21165,22 +23866,15 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(catalogName),catalogName); - await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); - await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); - await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(environmentDefinitionName),environmentDefinitionName); - await eventListener.AssertMinimumLength(nameof(environmentDefinitionName),environmentDefinitionName,3); - await eventListener.AssertMaximumLength(nameof(environmentDefinitionName),environmentDefinitionName,63); - await eventListener.AssertRegEx(nameof(environmentDefinitionName),environmentDefinitionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Lists the environment definitions in this project catalog. + /// Partially updates a project environment type. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the project. - /// The name of the Catalog. + /// The name of the environment type. + /// Updatable project environment type properties. /// 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). @@ -21189,9 +23883,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsList(string subscriptionId, string resourceGroupName, string projectName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesUpdate(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21203,9 +23897,8 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.DevCenter/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/catalogs/" - + global::System.Uri.EscapeDataString(catalogName) - + "/environmentDefinitions" + + "/environmentTypes/" + + global::System.Uri.EscapeDataString(environmentTypeName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -21214,17 +23907,22 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectEnvironmentDefinitionsList_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectEnvironmentTypesUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists the environment definitions in this project catalog. + /// Partially updates a project environment type. /// + /// Updatable project environment type properties. /// 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). @@ -21233,25 +23931,25 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/catalogs/(?[^/]+)/environmentDefinitions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/projects/(?[^/]+)/environmentTypes/(?[^/]+)$", 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.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var projectName = _match.Groups["projectName"].Value; - var catalogName = _match.Groups["catalogName"].Value; + var environmentTypeName = _match.Groups["environmentTypeName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -21260,9 +23958,8 @@ public partial class DevCenter + resourceGroupName + "/providers/Microsoft.DevCenter/projects/" + projectName - + "/catalogs/" - + catalogName - + "/environmentDefinitions" + + "/environmentTypes/" + + environmentTypeName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -21271,16 +23968,20 @@ public partial class DevCenter // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectEnvironmentDefinitionsList_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectEnvironmentTypesUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -21290,7 +23991,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectEnvironmentDefinitionsList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectEnvironmentTypesUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -21308,13 +24009,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -21330,18 +24031,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the project. - /// The name of the Catalog. + /// The name of the environment type. + /// Updatable project environment type properties. /// 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 ProjectEnvironmentDefinitionsList_Validate(string subscriptionId, string resourceGroupName, string projectName, string catalogName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectEnvironmentTypesUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -21354,21 +24056,22 @@ public partial class DevCenter await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(catalogName),catalogName); - await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); - await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); - await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); + await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); + await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); + await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Creates or updates a project environment type. + /// Creates or updates an project policy. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the project. - /// The name of the environment type. - /// Represents a Project Environment Type. + /// The name of the devcenter. + /// The name of the project policy. + /// Represents an project policy. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -21376,9 +24079,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesCreateOrUpdate(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectPoliciesCreateOrUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21388,10 +24091,10 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/projects/" - + global::System.Uri.EscapeDataString(projectName) - + "/environmentTypes/" - + global::System.Uri.EscapeDataString(environmentTypeName) + + "/providers/Microsoft.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/projectPolicies/" + + global::System.Uri.EscapeDataString(projectPolicyName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -21409,15 +24112,14 @@ public partial class DevCenter request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectEnvironmentTypesCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + await this.ProjectPoliciesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Creates or updates a project environment type. + /// Creates or updates an project policy. /// - /// Represents a Project Environment Type. + /// Represents an project policy. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -21425,35 +24127,35 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectPoliciesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/environmentTypes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/projectPolicies/(?[^/]+)$", 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.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var projectName = _match.Groups["projectName"].Value; - var environmentTypeName = _match.Groups["environmentTypeName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var projectPolicyName = _match.Groups["projectPolicyName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/projects/" - + projectName - + "/environmentTypes/" - + environmentTypeName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/projectPolicies/" + + projectPolicyName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -21471,16 +24173,13 @@ public partial class DevCenter request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectEnvironmentTypesCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); + await this.ProjectPoliciesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// 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 201 (Created). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -21488,7 +24187,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectEnvironmentTypesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectPoliciesCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -21499,6 +24198,102 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -21506,19 +24301,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - case global::System.Net.HttpStatusCode.Created: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicy.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -21534,19 +24323,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the project. - /// The name of the environment type. - /// Represents a Project Environment Type. + /// The name of the devcenter. + /// The name of the project policy. + /// Represents an project policy. /// 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 ProjectEnvironmentTypesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectPoliciesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -21555,24 +24344,24 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); - await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); - await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); - await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); - await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); - await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(projectPolicyName),projectPolicyName); + await eventListener.AssertMinimumLength(nameof(projectPolicyName),projectPolicyName,3); + await eventListener.AssertMaximumLength(nameof(projectPolicyName),projectPolicyName,63); + await eventListener.AssertRegEx(nameof(projectPolicyName),projectPolicyName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Deletes a project environment type. + /// Deletes an project policy. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the project. - /// The name of the environment type. + /// The name of the devcenter. + /// The name of the project policy. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled @@ -21582,9 +24371,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesDelete(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectPoliciesDelete(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21594,10 +24383,10 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/projects/" - + global::System.Uri.EscapeDataString(projectName) - + "/environmentTypes/" - + global::System.Uri.EscapeDataString(environmentTypeName) + + "/providers/Microsoft.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/projectPolicies/" + + global::System.Uri.EscapeDataString(projectPolicyName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -21611,11 +24400,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectEnvironmentTypesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ProjectPoliciesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Deletes a project environment type. + /// Deletes an project policy. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). @@ -21626,74 +24415,171 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectPoliciesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/environmentTypes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/projectPolicies/(?[^/]+)$", 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.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var projectName = _match.Groups["projectName"].Value; - var environmentTypeName = _match.Groups["environmentTypeName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var projectPolicyName = _match.Groups["projectPolicyName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/projects/" - + projectName - + "/environmentTypes/" - + environmentTypeName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/projectPolicies/" + + projectPolicyName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProjectPoliciesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// 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 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ProjectPoliciesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var _finalUri = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ProjectEnvironmentTypesDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); - } - } + // drop the old response + _response?.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 204 (NoContent). - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ProjectEnvironmentTypesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -21713,7 +24599,7 @@ public partial class DevCenter default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -21729,18 +24615,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the project. - /// The name of the environment type. + /// The name of the devcenter. + /// The name of the project policy. /// 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 ProjectEnvironmentTypesDelete_Validate(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectPoliciesDelete_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -21749,22 +24635,22 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); - await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); - await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); - await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); - await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); - await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(projectPolicyName),projectPolicyName); + await eventListener.AssertMinimumLength(nameof(projectPolicyName),projectPolicyName,3); + await eventListener.AssertMaximumLength(nameof(projectPolicyName),projectPolicyName,63); + await eventListener.AssertRegEx(nameof(projectPolicyName),projectPolicyName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Gets a project environment type. + /// Gets a specific project policy. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the project. - /// The name of the environment type. + /// The name of the devcenter. + /// The name of the project policy. /// 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). @@ -21773,9 +24659,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesGet(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectPoliciesGet(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21785,10 +24671,10 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/projects/" - + global::System.Uri.EscapeDataString(projectName) - + "/environmentTypes/" - + global::System.Uri.EscapeDataString(environmentTypeName) + + "/providers/Microsoft.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/projectPolicies/" + + global::System.Uri.EscapeDataString(projectPolicyName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -21802,11 +24688,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectEnvironmentTypesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectPoliciesGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets a project environment type. + /// Gets a specific project policy. /// /// 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 @@ -21816,35 +24702,35 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectPoliciesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/environmentTypes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/projectPolicies/(?[^/]+)$", 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.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var projectName = _match.Groups["projectName"].Value; - var environmentTypeName = _match.Groups["environmentTypeName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var projectPolicyName = _match.Groups["projectPolicyName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/projects/" - + projectName - + "/environmentTypes/" - + environmentTypeName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/projectPolicies/" + + projectPolicyName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -21858,11 +24744,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectEnvironmentTypesGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectPoliciesGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -21872,7 +24758,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectEnvironmentTypesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectPoliciesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -21890,13 +24776,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicy.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -21912,18 +24798,18 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the project. - /// The name of the environment type. + /// The name of the devcenter. + /// The name of the project policy. /// 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 ProjectEnvironmentTypesGet_Validate(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectPoliciesGet_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -21932,21 +24818,21 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); - await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); - await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); - await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); - await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); - await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(projectPolicyName),projectPolicyName); + await eventListener.AssertMinimumLength(nameof(projectPolicyName),projectPolicyName,3); + await eventListener.AssertMaximumLength(nameof(projectPolicyName),projectPolicyName,63); + await eventListener.AssertRegEx(nameof(projectPolicyName),projectPolicyName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Lists environment types for a project. + /// Lists all project policies in the dev center /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the project. + /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 @@ -21956,9 +24842,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesList(string subscriptionId, string resourceGroupName, string projectName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectPoliciesListByDevCenter(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -21968,9 +24854,9 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/projects/" - + global::System.Uri.EscapeDataString(projectName) - + "/environmentTypes" + + "/providers/Microsoft.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/projectPolicies" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + "&" @@ -21986,11 +24872,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectEnvironmentTypesList_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectPoliciesListByDevCenter_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists environment types for a project. + /// Lists all project policies in the dev center /// /// The maximum number of resources to return from the operation. Example: '$top=10'. /// a delegate that is called when the remote service returns 200 (OK). @@ -22001,33 +24887,33 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesListViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectPoliciesListByDevCenterViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/environmentTypes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/projectPolicies$", 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.DevCenter/projects/{projectName}/environmentTypes'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var projectName = _match.Groups["projectName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/projects/" - + projectName - + "/environmentTypes" + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/projectPolicies" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + "&" @@ -22043,11 +24929,11 @@ public partial class DevCenter await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectEnvironmentTypesList_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectPoliciesListByDevCenter_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -22057,7 +24943,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectEnvironmentTypesList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectPoliciesListByDevCenter_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -22075,13 +24961,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -22097,18 +24983,18 @@ public partial class DevCenter } /// - /// Validation method for method. Call this like the actual call, but you will + /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the project. + /// The name of the devcenter. /// The maximum number of resources to return from the operation. Example: '$top=10'. /// 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 ProjectEnvironmentTypesList_Validate(string subscriptionId, string resourceGroupName, string projectName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectPoliciesListByDevCenter_Validate(string subscriptionId, string resourceGroupName, string devCenterName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -22117,19 +25003,19 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); - await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); - await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); } } - /// Partially updates a project environment type. + /// Partially updates an project policy. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the project. - /// The name of the environment type. - /// Updatable project environment type properties. + /// The name of the devcenter. + /// The name of the project policy. + /// Updatable project policy properties. /// 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). @@ -22138,9 +25024,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesUpdate(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectPoliciesUpdate(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22150,10 +25036,10 @@ public partial class DevCenter + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.DevCenter/projects/" - + global::System.Uri.EscapeDataString(projectName) - + "/environmentTypes/" - + global::System.Uri.EscapeDataString(environmentTypeName) + + "/providers/Microsoft.DevCenter/devcenters/" + + global::System.Uri.EscapeDataString(devCenterName) + + "/projectPolicies/" + + global::System.Uri.EscapeDataString(projectPolicyName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -22171,13 +25057,13 @@ public partial class DevCenter request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectEnvironmentTypesUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectPoliciesUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Partially updates a project environment type. + /// Partially updates an project policy. /// - /// Updatable project environment type properties. + /// Updatable project policy properties. /// 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). @@ -22186,77 +25072,173 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectEnvironmentTypesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectPoliciesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/environmentTypes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.DevCenter/devcenters/(?[^/]+)/projectPolicies/(?[^/]+)$", 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.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var projectName = _match.Groups["projectName"].Value; - var environmentTypeName = _match.Groups["environmentTypeName"].Value; + var devCenterName = _match.Groups["devCenterName"].Value; + var projectPolicyName = _match.Groups["projectPolicyName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.DevCenter/projects/" - + projectName - + "/environmentTypes/" - + environmentTypeName + + "/providers/Microsoft.DevCenter/devcenters/" + + devCenterName + + "/projectPolicies/" + + projectPolicyName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProjectPoliciesUpdate_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ProjectPoliciesUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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; - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.UndeclaredResponseException(_response); + } + } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ProjectEnvironmentTypesUpdate_Call(request,onOk,onDefault,eventListener,sender); - } - } + // 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), Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get); - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ProjectEnvironmentTypesUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -22264,13 +25246,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicy.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -22286,19 +25268,19 @@ public partial class DevCenter } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the project. - /// The name of the environment type. - /// Updatable project environment type properties. + /// The name of the devcenter. + /// The name of the project policy. + /// Updatable project policy properties. /// 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 ProjectEnvironmentTypesUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, string environmentTypeName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectPoliciesUpdate_Validate(string subscriptionId, string resourceGroupName, string devCenterName, string projectPolicyName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -22307,14 +25289,14 @@ public partial class DevCenter await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); - await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); - await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); - await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); - await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); - await eventListener.AssertRegEx(nameof(environmentTypeName),environmentTypeName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(devCenterName),devCenterName); + await eventListener.AssertMinimumLength(nameof(devCenterName),devCenterName,3); + await eventListener.AssertMaximumLength(nameof(devCenterName),devCenterName,26); + await eventListener.AssertRegEx(nameof(devCenterName),devCenterName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,25}$"); + await eventListener.AssertNotNull(nameof(projectPolicyName),projectPolicyName); + await eventListener.AssertMinimumLength(nameof(projectPolicyName),projectPolicyName,3); + await eventListener.AssertMaximumLength(nameof(projectPolicyName),projectPolicyName,63); + await eventListener.AssertRegEx(nameof(projectPolicyName),projectPolicyName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } @@ -22333,9 +25315,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsCreateOrUpdate(string subscriptionId, string resourceGroupName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsCreateOrUpdate(string subscriptionId, string resourceGroupName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22379,9 +25361,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22436,7 +25418,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -22550,13 +25532,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -22583,7 +25565,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -22614,9 +25596,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsDelete(string subscriptionId, string resourceGroupName, string projectName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsDelete(string subscriptionId, string resourceGroupName, string projectName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22656,9 +25638,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22710,7 +25692,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -22837,7 +25819,7 @@ public partial class DevCenter default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -22891,9 +25873,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsGet(string subscriptionId, string resourceGroupName, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsGet(string subscriptionId, string resourceGroupName, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22934,9 +25916,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsGetInheritedSettings(string subscriptionId, string resourceGroupName, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsGetInheritedSettings(string subscriptionId, string resourceGroupName, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -22976,9 +25958,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsGetInheritedSettingsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsGetInheritedSettingsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23030,7 +26012,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectsGetInheritedSettings_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsGetInheritedSettings_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -23048,13 +26030,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.InheritedSettingsForProject.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.InheritedSettingsForProject.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -23106,9 +26088,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23159,7 +26141,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -23177,13 +26159,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -23237,9 +26219,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsListByResourceGroup(string subscriptionId, string resourceGroupName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsListByResourceGroup(string subscriptionId, string resourceGroupName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23280,9 +26262,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsListByResourceGroupViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsListByResourceGroupViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23333,7 +26315,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectsListByResourceGroup_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsListByResourceGroup_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -23351,13 +26333,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -23406,9 +26388,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsListBySubscription(string subscriptionId, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsListBySubscription(string subscriptionId, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23447,9 +26429,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsListBySubscriptionViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsListBySubscriptionViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23497,7 +26479,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectsListBySubscription_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsListBySubscription_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -23515,13 +26497,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -23568,9 +26550,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsUpdate(string subscriptionId, string resourceGroupName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsUpdate(string subscriptionId, string resourceGroupName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23614,9 +26596,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23671,7 +26653,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -23785,13 +26767,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -23818,7 +26800,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectsUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectsUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -23852,9 +26834,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SchedulesCreateOrUpdate(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchedulesCreateOrUpdate(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23905,9 +26887,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SchedulesCreateOrUpdateViaIdentity(global::System.String viaIdentity, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchedulesCreateOrUpdateViaIdentity(global::System.String viaIdentity, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -23970,7 +26952,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SchedulesCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SchedulesCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -24084,13 +27066,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Schedule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Schedule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -24120,7 +27102,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SchedulesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SchedulesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -24162,9 +27144,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SchedulesDelete(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? Top, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchedulesDelete(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? Top, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24211,9 +27193,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SchedulesDeleteViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchedulesDeleteViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24273,7 +27255,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SchedulesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SchedulesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -24400,7 +27382,7 @@ public partial class DevCenter default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -24468,9 +27450,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SchedulesGet(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchedulesGet(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24516,9 +27498,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SchedulesGetViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchedulesGetViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24577,7 +27559,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SchedulesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SchedulesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -24595,13 +27577,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Schedule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Schedule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -24668,9 +27650,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SchedulesListByPool(string subscriptionId, string resourceGroupName, string projectName, string poolName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchedulesListByPool(string subscriptionId, string resourceGroupName, string projectName, string poolName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24715,9 +27697,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SchedulesListByPoolViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchedulesListByPoolViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24774,7 +27756,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SchedulesListByPool_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SchedulesListByPool_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -24792,13 +27774,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -24862,9 +27844,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SchedulesUpdate(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchedulesUpdate(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24915,9 +27897,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SchedulesUpdateViaIdentity(global::System.String viaIdentity, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SchedulesUpdateViaIdentity(global::System.String viaIdentity, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -24980,7 +27962,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SchedulesUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SchedulesUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -25094,13 +28076,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Schedule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Schedule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -25130,7 +28112,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SchedulesUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SchedulesUpdate_Validate(string subscriptionId, string resourceGroupName, string projectName, string poolName, string scheduleName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -25156,6 +28138,180 @@ public partial class DevCenter } } + /// Lists SKUs available to the project + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the project. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 SkusListByProject(string subscriptionId, string resourceGroupName, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/listSkus" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SkusListByProject_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Lists SKUs available to the project + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 SkusListByProjectViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-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.DevCenter/projects/(?[^/]+)/listSkus$", 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.DevCenter/projects/{projectName}/listSkus'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var projectName = _match.Groups["projectName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.DevCenter/projects/" + + projectName + + "/listSkus" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SkusListByProject_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 SkusListByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SkuListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 name of the resource group. The name is case insensitive. + /// The name of the project. + /// 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 SkusListByProject_Validate(string subscriptionId, string resourceGroupName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + /// Lists the Microsoft.DevCenter SKUs available in a subscription /// The ID of the target subscription. /// The maximum number of resources to return from the operation. Example: '$top=10'. @@ -25167,9 +28323,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SkusListBySubscription(string subscriptionId, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SkusListBySubscription(string subscriptionId, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25208,9 +28364,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SkusListBySubscriptionViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SkusListBySubscriptionViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25258,7 +28414,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SkusListBySubscription_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SkusListBySubscription_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -25276,13 +28432,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SkuListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SkuListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -25329,9 +28485,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task UsagesListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UsagesListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25371,9 +28527,9 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task UsagesListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task UsagesListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -25422,7 +28578,7 @@ public partial class DevCenter /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task UsagesListByLocation_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task UsagesListByLocation_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -25440,13 +28596,13 @@ public partial class DevCenter case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ListUsagesResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ListUsagesResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Catalog.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Catalog.PowerShell.cs deleted file mode 100644 index 08777d6c0ce3..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Catalog.PowerShell.cs +++ /dev/null @@ -1,424 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Represents a catalog. - [System.ComponentModel.TypeConverter(typeof(CatalogTypeConverter))] - public partial class Catalog - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Catalog(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("GitHub")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); - } - if (content.Contains("AdoGit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); - } - if (content.Contains("SyncType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); - } - if (content.Contains("LastSyncStat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStat = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats) content.GetValueForProperty("LastSyncStat",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStat, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SyncStatsTypeConverter.ConvertFrom); - } - if (content.Contains("SyncState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).SyncState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState?) content.GetValueForProperty("SyncState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).SyncState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState.CreateFrom); - } - if (content.Contains("ConnectionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).ConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState?) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).ConnectionState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState.CreateFrom); - } - if (content.Contains("LastConnectionTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastConnectionTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectionTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastConnectionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastSyncTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncTime = (global::System.DateTime?) content.GetValueForProperty("LastSyncTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("GitHubUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubUri, global::System.Convert.ToString); - } - if (content.Contains("GitHubBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubBranch, global::System.Convert.ToString); - } - if (content.Contains("GitHubSecretIdentifier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); - } - if (content.Contains("GitHubPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubPath, global::System.Convert.ToString); - } - if (content.Contains("AdoGitUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitUri, global::System.Convert.ToString); - } - if (content.Contains("AdoGitBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitBranch, global::System.Convert.ToString); - } - if (content.Contains("AdoGitSecretIdentifier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); - } - if (content.Contains("AdoGitPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitPath, global::System.Convert.ToString); - } - if (content.Contains("LastSyncStatAdded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatAdded = (int?) content.GetValueForProperty("LastSyncStatAdded",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatAdded, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatUpdated")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatUpdated = (int?) content.GetValueForProperty("LastSyncStatUpdated",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatUpdated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatUnchanged")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatUnchanged = (int?) content.GetValueForProperty("LastSyncStatUnchanged",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatUnchanged, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatRemoved")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatRemoved = (int?) content.GetValueForProperty("LastSyncStatRemoved",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatRemoved, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatValidationError")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatValidationError = (int?) content.GetValueForProperty("LastSyncStatValidationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatValidationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatSynchronizationError")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatSynchronizationError = (int?) content.GetValueForProperty("LastSyncStatSynchronizationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatSynchronizationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatSyncedCatalogItemType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatSyncedCatalogItemType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("LastSyncStatSyncedCatalogItemType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatSyncedCatalogItemType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Catalog(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("GitHub")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); - } - if (content.Contains("AdoGit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); - } - if (content.Contains("SyncType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); - } - if (content.Contains("LastSyncStat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStat = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats) content.GetValueForProperty("LastSyncStat",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStat, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SyncStatsTypeConverter.ConvertFrom); - } - if (content.Contains("SyncState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).SyncState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState?) content.GetValueForProperty("SyncState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).SyncState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState.CreateFrom); - } - if (content.Contains("ConnectionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).ConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState?) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).ConnectionState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState.CreateFrom); - } - if (content.Contains("LastConnectionTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastConnectionTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectionTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastConnectionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastSyncTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncTime = (global::System.DateTime?) content.GetValueForProperty("LastSyncTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("GitHubUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubUri, global::System.Convert.ToString); - } - if (content.Contains("GitHubBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubBranch, global::System.Convert.ToString); - } - if (content.Contains("GitHubSecretIdentifier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); - } - if (content.Contains("GitHubPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).GitHubPath, global::System.Convert.ToString); - } - if (content.Contains("AdoGitUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitUri, global::System.Convert.ToString); - } - if (content.Contains("AdoGitBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitBranch, global::System.Convert.ToString); - } - if (content.Contains("AdoGitSecretIdentifier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); - } - if (content.Contains("AdoGitPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).AdoGitPath, global::System.Convert.ToString); - } - if (content.Contains("LastSyncStatAdded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatAdded = (int?) content.GetValueForProperty("LastSyncStatAdded",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatAdded, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatUpdated")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatUpdated = (int?) content.GetValueForProperty("LastSyncStatUpdated",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatUpdated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatUnchanged")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatUnchanged = (int?) content.GetValueForProperty("LastSyncStatUnchanged",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatUnchanged, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatRemoved")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatRemoved = (int?) content.GetValueForProperty("LastSyncStatRemoved",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatRemoved, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatValidationError")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatValidationError = (int?) content.GetValueForProperty("LastSyncStatValidationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatValidationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatSynchronizationError")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatSynchronizationError = (int?) content.GetValueForProperty("LastSyncStatSynchronizationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatSynchronizationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatSyncedCatalogItemType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatSyncedCatalogItemType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("LastSyncStatSyncedCatalogItemType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal)this).LastSyncStatSyncedCatalogItemType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Catalog(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Catalog(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Represents a catalog. - [System.ComponentModel.TypeConverter(typeof(CatalogTypeConverter))] - public partial interface ICatalog - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Catalog.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Catalog.TypeConverter.cs deleted file mode 100644 index 8e3d054299b9..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Catalog.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class CatalogTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return Catalog.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return Catalog.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return Catalog.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Catalog.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Catalog.cs deleted file mode 100644 index 9c1705f75e6a..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Catalog.cs +++ /dev/null @@ -1,490 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents a catalog. - public partial class Catalog : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(); - - /// Git branch. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string AdoGitBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitBranch = value ?? null; } - - /// The folder where the catalog items can be found inside the repository. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string AdoGitPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitPath = value ?? null; } - - /// - /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string AdoGitSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitSecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitSecretIdentifier = value ?? null; } - - /// Git URI. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string AdoGitUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitUri = value ?? null; } - - /// The connection state of the catalog. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState? ConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).ConnectionState; } - - /// Git branch. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string GitHubBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubBranch = value ?? null; } - - /// The folder where the catalog items can be found inside the repository. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string GitHubPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubPath = value ?? null; } - - /// - /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string GitHubSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubSecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubSecretIdentifier = value ?? null; } - - /// Git URI. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string GitHubUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubUri = value ?? null; } - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; } - - /// When the catalog was last connected. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public global::System.DateTime? LastConnectionTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastConnectionTime; } - - /// Count of catalog items added during synchronization. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? LastSyncStatAdded { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatAdded; } - - /// Count of catalog items removed during synchronization. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? LastSyncStatRemoved { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatRemoved; } - - /// Indicates catalog item types that were synced. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] LastSyncStatSyncedCatalogItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatSyncedCatalogItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatSyncedCatalogItemType = value ?? null /* arrayOf */; } - - /// Count of synchronization errors that occured during synchronization. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? LastSyncStatSynchronizationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatSynchronizationError; } - - /// Count of catalog items that were unchanged during synchronization. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? LastSyncStatUnchanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatUnchanged; } - - /// Count of catalog items updated during synchronization. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? LastSyncStatUpdated { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatUpdated; } - - /// Count of catalog items that had validation errors during synchronization. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? LastSyncStatValidationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatValidationError; } - - /// When the catalog was last synced. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public global::System.DateTime? LastSyncTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncTime; } - - /// Internal Acessors for AdoGit - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal.AdoGit { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGit; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGit = value; } - - /// Internal Acessors for ConnectionState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal.ConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).ConnectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).ConnectionState = value; } - - /// Internal Acessors for GitHub - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal.GitHub { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHub; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHub = value; } - - /// Internal Acessors for LastConnectionTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal.LastConnectionTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastConnectionTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastConnectionTime = value; } - - /// Internal Acessors for LastSyncStat - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal.LastSyncStat { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStat; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStat = value; } - - /// Internal Acessors for LastSyncStatAdded - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal.LastSyncStatAdded { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatAdded; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatAdded = value; } - - /// Internal Acessors for LastSyncStatRemoved - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal.LastSyncStatRemoved { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatRemoved; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatRemoved = value; } - - /// Internal Acessors for LastSyncStatSynchronizationError - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal.LastSyncStatSynchronizationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatSynchronizationError; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatSynchronizationError = value; } - - /// Internal Acessors for LastSyncStatUnchanged - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal.LastSyncStatUnchanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatUnchanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatUnchanged = value; } - - /// Internal Acessors for LastSyncStatUpdated - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal.LastSyncStatUpdated { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatUpdated; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatUpdated = value; } - - /// Internal Acessors for LastSyncStatValidationError - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal.LastSyncStatValidationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatValidationError; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncStatValidationError = value; } - - /// Internal Acessors for LastSyncTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal.LastSyncTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).LastSyncTime = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for SyncState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogInternal.SyncState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).SyncState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).SyncState = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogProperties _property; - - /// Catalog properties. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogProperties()); set => this._property = value; } - - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).ProvisioningState; } - - /// The synchronization state of the catalog. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState? SyncState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)Property).SyncState; } - - /// Indicates the type of sync that is configured for the catalog. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType? SyncType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).SyncType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).SyncType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType)""); } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).Tag = value ?? null /* model class */; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public Catalog() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// Represents a catalog. - public partial interface ICatalog : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource - { - /// Git branch. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Git branch.", - SerializedName = @"branch", - PossibleTypes = new [] { typeof(string) })] - string AdoGitBranch { get; set; } - /// The folder where the catalog items can be found inside the repository. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The folder where the catalog items can be found inside the repository.", - SerializedName = @"path", - PossibleTypes = new [] { typeof(string) })] - string AdoGitPath { get; set; } - /// - /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A reference to the Key Vault secret containing a security token to authenticate to a Git repository.", - SerializedName = @"secretIdentifier", - PossibleTypes = new [] { typeof(string) })] - string AdoGitSecretIdentifier { get; set; } - /// Git URI. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Git URI.", - SerializedName = @"uri", - PossibleTypes = new [] { typeof(string) })] - string AdoGitUri { get; set; } - /// The connection state of the catalog. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The connection state of the catalog.", - SerializedName = @"connectionState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState? ConnectionState { get; } - /// Git branch. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Git branch.", - SerializedName = @"branch", - PossibleTypes = new [] { typeof(string) })] - string GitHubBranch { get; set; } - /// The folder where the catalog items can be found inside the repository. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The folder where the catalog items can be found inside the repository.", - SerializedName = @"path", - PossibleTypes = new [] { typeof(string) })] - string GitHubPath { get; set; } - /// - /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A reference to the Key Vault secret containing a security token to authenticate to a Git repository.", - SerializedName = @"secretIdentifier", - PossibleTypes = new [] { typeof(string) })] - string GitHubSecretIdentifier { get; set; } - /// Git URI. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Git URI.", - SerializedName = @"uri", - PossibleTypes = new [] { typeof(string) })] - string GitHubUri { get; set; } - /// When the catalog was last connected. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"When the catalog was last connected.", - SerializedName = @"lastConnectionTime", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? LastConnectionTime { get; } - /// Count of catalog items added during synchronization. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Count of catalog items added during synchronization.", - SerializedName = @"added", - PossibleTypes = new [] { typeof(int) })] - int? LastSyncStatAdded { get; } - /// Count of catalog items removed during synchronization. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Count of catalog items removed during synchronization.", - SerializedName = @"removed", - PossibleTypes = new [] { typeof(int) })] - int? LastSyncStatRemoved { get; } - /// Indicates catalog item types that were synced. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates catalog item types that were synced.", - SerializedName = @"syncedCatalogItemTypes", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] LastSyncStatSyncedCatalogItemType { get; set; } - /// Count of synchronization errors that occured during synchronization. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Count of synchronization errors that occured during synchronization.", - SerializedName = @"synchronizationErrors", - PossibleTypes = new [] { typeof(int) })] - int? LastSyncStatSynchronizationError { get; } - /// Count of catalog items that were unchanged during synchronization. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Count of catalog items that were unchanged during synchronization.", - SerializedName = @"unchanged", - PossibleTypes = new [] { typeof(int) })] - int? LastSyncStatUnchanged { get; } - /// Count of catalog items updated during synchronization. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Count of catalog items updated during synchronization.", - SerializedName = @"updated", - PossibleTypes = new [] { typeof(int) })] - int? LastSyncStatUpdated { get; } - /// Count of catalog items that had validation errors during synchronization. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Count of catalog items that had validation errors during synchronization.", - SerializedName = @"validationErrors", - PossibleTypes = new [] { typeof(int) })] - int? LastSyncStatValidationError { get; } - /// When the catalog was last synced. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"When the catalog was last synced.", - SerializedName = @"lastSyncTime", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? LastSyncTime { get; } - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of the resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } - /// The synchronization state of the catalog. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The synchronization state of the catalog.", - SerializedName = @"syncState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState? SyncState { get; } - /// Indicates the type of sync that is configured for the catalog. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates the type of sync that is configured for the catalog.", - SerializedName = @"syncType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType? SyncType { get; set; } - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get; set; } - - } - /// Represents a catalog. - internal partial interface ICatalogInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal - { - /// Properties for an Azure DevOps catalog type. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog AdoGit { get; set; } - /// Git branch. - string AdoGitBranch { get; set; } - /// The folder where the catalog items can be found inside the repository. - string AdoGitPath { get; set; } - /// - /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - /// - string AdoGitSecretIdentifier { get; set; } - /// Git URI. - string AdoGitUri { get; set; } - /// The connection state of the catalog. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState? ConnectionState { get; set; } - /// Properties for a GitHub catalog type. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog GitHub { get; set; } - /// Git branch. - string GitHubBranch { get; set; } - /// The folder where the catalog items can be found inside the repository. - string GitHubPath { get; set; } - /// - /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - /// - string GitHubSecretIdentifier { get; set; } - /// Git URI. - string GitHubUri { get; set; } - /// When the catalog was last connected. - global::System.DateTime? LastConnectionTime { get; set; } - /// Stats of the latest synchronization. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats LastSyncStat { get; set; } - /// Count of catalog items added during synchronization. - int? LastSyncStatAdded { get; set; } - /// Count of catalog items removed during synchronization. - int? LastSyncStatRemoved { get; set; } - /// Indicates catalog item types that were synced. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] LastSyncStatSyncedCatalogItemType { get; set; } - /// Count of synchronization errors that occured during synchronization. - int? LastSyncStatSynchronizationError { get; set; } - /// Count of catalog items that were unchanged during synchronization. - int? LastSyncStatUnchanged { get; set; } - /// Count of catalog items updated during synchronization. - int? LastSyncStatUpdated { get; set; } - /// Count of catalog items that had validation errors during synchronization. - int? LastSyncStatValidationError { get; set; } - /// When the catalog was last synced. - global::System.DateTime? LastSyncTime { get; set; } - /// Catalog properties. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogProperties Property { get; set; } - /// The provisioning state of the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } - /// The synchronization state of the catalog. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState? SyncState { get; set; } - /// Indicates the type of sync that is configured for the catalog. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType? SyncType { get; set; } - /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Catalog.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Catalog.json.cs deleted file mode 100644 index 65fd524a444e..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Catalog.json.cs +++ /dev/null @@ -1,110 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents a catalog. - public partial class Catalog - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal Catalog(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogProperties.FromJson(__jsonProperties) : Property;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Catalog(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __resource?.ToJson(container, serializationMode); - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogProperties.PowerShell.cs deleted file mode 100644 index b17fd98a605b..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogProperties.PowerShell.cs +++ /dev/null @@ -1,336 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Properties of a catalog. - [System.ComponentModel.TypeConverter(typeof(CatalogPropertiesTypeConverter))] - public partial class CatalogProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal CatalogProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("LastSyncStat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStat = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats) content.GetValueForProperty("LastSyncStat",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStat, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SyncStatsTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("SyncState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).SyncState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState?) content.GetValueForProperty("SyncState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).SyncState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState.CreateFrom); - } - if (content.Contains("ConnectionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).ConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState?) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).ConnectionState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState.CreateFrom); - } - if (content.Contains("LastConnectionTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastConnectionTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectionTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastConnectionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastSyncTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncTime = (global::System.DateTime?) content.GetValueForProperty("LastSyncTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("GitHubUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri, global::System.Convert.ToString); - } - if (content.Contains("GitHubBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch, global::System.Convert.ToString); - } - if (content.Contains("GitHubSecretIdentifier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); - } - if (content.Contains("GitHubPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath, global::System.Convert.ToString); - } - if (content.Contains("AdoGitUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri, global::System.Convert.ToString); - } - if (content.Contains("AdoGitBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch, global::System.Convert.ToString); - } - if (content.Contains("AdoGitSecretIdentifier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); - } - if (content.Contains("AdoGitPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath, global::System.Convert.ToString); - } - if (content.Contains("GitHub")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); - } - if (content.Contains("AdoGit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); - } - if (content.Contains("SyncType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); - } - if (content.Contains("LastSyncStatAdded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatAdded = (int?) content.GetValueForProperty("LastSyncStatAdded",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatAdded, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatUpdated")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatUpdated = (int?) content.GetValueForProperty("LastSyncStatUpdated",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatUpdated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatUnchanged")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatUnchanged = (int?) content.GetValueForProperty("LastSyncStatUnchanged",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatUnchanged, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatRemoved")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatRemoved = (int?) content.GetValueForProperty("LastSyncStatRemoved",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatRemoved, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatValidationError")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatValidationError = (int?) content.GetValueForProperty("LastSyncStatValidationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatValidationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatSynchronizationError")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatSynchronizationError = (int?) content.GetValueForProperty("LastSyncStatSynchronizationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatSynchronizationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatSyncedCatalogItemType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatSyncedCatalogItemType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("LastSyncStatSyncedCatalogItemType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatSyncedCatalogItemType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal CatalogProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("LastSyncStat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStat = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats) content.GetValueForProperty("LastSyncStat",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStat, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SyncStatsTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("SyncState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).SyncState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState?) content.GetValueForProperty("SyncState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).SyncState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState.CreateFrom); - } - if (content.Contains("ConnectionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).ConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState?) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).ConnectionState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState.CreateFrom); - } - if (content.Contains("LastConnectionTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastConnectionTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectionTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastConnectionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastSyncTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncTime = (global::System.DateTime?) content.GetValueForProperty("LastSyncTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("GitHubUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri, global::System.Convert.ToString); - } - if (content.Contains("GitHubBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch, global::System.Convert.ToString); - } - if (content.Contains("GitHubSecretIdentifier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); - } - if (content.Contains("GitHubPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath, global::System.Convert.ToString); - } - if (content.Contains("AdoGitUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri, global::System.Convert.ToString); - } - if (content.Contains("AdoGitBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch, global::System.Convert.ToString); - } - if (content.Contains("AdoGitSecretIdentifier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); - } - if (content.Contains("AdoGitPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath, global::System.Convert.ToString); - } - if (content.Contains("GitHub")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); - } - if (content.Contains("AdoGit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); - } - if (content.Contains("SyncType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); - } - if (content.Contains("LastSyncStatAdded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatAdded = (int?) content.GetValueForProperty("LastSyncStatAdded",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatAdded, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatUpdated")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatUpdated = (int?) content.GetValueForProperty("LastSyncStatUpdated",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatUpdated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatUnchanged")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatUnchanged = (int?) content.GetValueForProperty("LastSyncStatUnchanged",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatUnchanged, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatRemoved")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatRemoved = (int?) content.GetValueForProperty("LastSyncStatRemoved",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatRemoved, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatValidationError")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatValidationError = (int?) content.GetValueForProperty("LastSyncStatValidationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatValidationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatSynchronizationError")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatSynchronizationError = (int?) content.GetValueForProperty("LastSyncStatSynchronizationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatSynchronizationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LastSyncStatSyncedCatalogItemType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatSyncedCatalogItemType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("LastSyncStatSyncedCatalogItemType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal)this).LastSyncStatSyncedCatalogItemType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CatalogProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CatalogProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Properties of a catalog. - [System.ComponentModel.TypeConverter(typeof(CatalogPropertiesTypeConverter))] - public partial interface ICatalogProperties - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdateProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdateProperties.PowerShell.cs deleted file mode 100644 index c99a4843efb0..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdateProperties.PowerShell.cs +++ /dev/null @@ -1,236 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// Properties of a catalog. These properties can be updated after the resource has been created. - /// - [System.ComponentModel.TypeConverter(typeof(CatalogUpdatePropertiesTypeConverter))] - public partial class CatalogUpdateProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal CatalogUpdateProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("GitHub")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); - } - if (content.Contains("AdoGit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); - } - if (content.Contains("SyncType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); - } - if (content.Contains("GitHubUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri, global::System.Convert.ToString); - } - if (content.Contains("GitHubBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch, global::System.Convert.ToString); - } - if (content.Contains("GitHubSecretIdentifier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); - } - if (content.Contains("GitHubPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath, global::System.Convert.ToString); - } - if (content.Contains("AdoGitUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri, global::System.Convert.ToString); - } - if (content.Contains("AdoGitBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch, global::System.Convert.ToString); - } - if (content.Contains("AdoGitSecretIdentifier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); - } - if (content.Contains("AdoGitPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath, 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 CatalogUpdateProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("GitHub")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); - } - if (content.Contains("AdoGit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); - } - if (content.Contains("SyncType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); - } - if (content.Contains("GitHubUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri, global::System.Convert.ToString); - } - if (content.Contains("GitHubBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch, global::System.Convert.ToString); - } - if (content.Contains("GitHubSecretIdentifier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); - } - if (content.Contains("GitHubPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath, global::System.Convert.ToString); - } - if (content.Contains("AdoGitUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri, global::System.Convert.ToString); - } - if (content.Contains("AdoGitBranch")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch, global::System.Convert.ToString); - } - if (content.Contains("AdoGitSecretIdentifier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); - } - if (content.Contains("AdoGitPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CatalogUpdateProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CatalogUpdateProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Properties of a catalog. These properties can be updated after the resource has been created. - [System.ComponentModel.TypeConverter(typeof(CatalogUpdatePropertiesTypeConverter))] - public partial interface ICatalogUpdateProperties - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.PowerShell.cs deleted file mode 100644 index e10e3002d5c5..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.PowerShell.cs +++ /dev/null @@ -1,248 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Represents a Task to be used in customizing a Dev Box. - [System.ComponentModel.TypeConverter(typeof(CustomizationTaskTypeConverter))] - public partial class CustomizationTask - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal CustomizationTask(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskPropertiesInputsTypeConverter.ConvertFrom); - } - if (content.Contains("Timeout")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).Timeout = (int?) content.GetValueForProperty("Timeout",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).Timeout, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ValidationStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal CustomizationTask(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskPropertiesInputsTypeConverter.ConvertFrom); - } - if (content.Contains("Timeout")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).Timeout = (int?) content.GetValueForProperty("Timeout",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).Timeout, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ValidationStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CustomizationTask(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CustomizationTask(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Represents a Task to be used in customizing a Dev Box. - [System.ComponentModel.TypeConverter(typeof(CustomizationTaskTypeConverter))] - public partial interface ICustomizationTask - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.TypeConverter.cs deleted file mode 100644 index 2aa1905e079d..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class CustomizationTaskTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return CustomizationTask.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return CustomizationTask.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return CustomizationTask.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.cs deleted file mode 100644 index 46d2a3538e2a..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.cs +++ /dev/null @@ -1,173 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents a Task to be used in customizing a Dev Box. - public partial class CustomizationTask : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(); - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; } - - /// Inputs to the task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs Input { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)Property).Input; } - - /// Internal Acessors for Input - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal.Input { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)Property).Input; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)Property).Input = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskProperties()); set { {_property = value;} } } - - /// Internal Acessors for Timeout - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal.Timeout { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)Property).Timeout; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)Property).Timeout = value; } - - /// Internal Acessors for ValidationStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInternal.ValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)Property).ValidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)Property).ValidationStatus = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskProperties _property; - - /// Task properties - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskProperties()); set => this._property = value; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// The default timeout for the task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? Timeout { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)Property).Timeout; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; } - - /// Validation status for the Task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)Property).ValidationStatus; } - - /// Creates an new instance. - public CustomizationTask() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// Represents a Task to be used in customizing a Dev Box. - public partial interface ICustomizationTask : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource - { - /// Inputs to the task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Inputs to the task.", - SerializedName = @"inputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs Input { get; } - /// The default timeout for the task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The default timeout for the task.", - SerializedName = @"timeout", - PossibleTypes = new [] { typeof(int) })] - int? Timeout { get; } - /// Validation status for the Task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Validation status for the Task.", - SerializedName = @"validationStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get; } - - } - /// Represents a Task to be used in customizing a Dev Box. - internal partial interface ICustomizationTaskInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal - { - /// Inputs to the task. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs Input { get; set; } - /// Task properties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskProperties Property { get; set; } - /// The default timeout for the task. - int? Timeout { get; set; } - /// Validation status for the Task. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.json.cs deleted file mode 100644 index 53e17af21e15..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.json.cs +++ /dev/null @@ -1,110 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents a Task to be used in customizing a Dev Box. - public partial class CustomizationTask - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal CustomizationTask(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskProperties.FromJson(__jsonProperties) : Property;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CustomizationTask(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __resource?.ToJson(container, serializationMode); - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinition.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinition.PowerShell.cs deleted file mode 100644 index 62de5ee72ce7..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinition.PowerShell.cs +++ /dev/null @@ -1,400 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Represents a definition for a Developer Machine. - [System.ComponentModel.TypeConverter(typeof(DevBoxDefinitionTypeConverter))] - public partial class DevBoxDefinition - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new DevBoxDefinition(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new DevBoxDefinition(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal DevBoxDefinition(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("ImageReference")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); - } - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SkuTypeConverter.ConvertFrom); - } - if (content.Contains("HibernateSupport")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("ImageReferenceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageReferenceId, global::System.Convert.ToString); - } - if (content.Contains("ImageReferenceExactVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuName, global::System.Convert.ToString); - } - if (content.Contains("SkuTier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); - } - if (content.Contains("SkuSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuSize, global::System.Convert.ToString); - } - if (content.Contains("SkuFamily")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuFamily, global::System.Convert.ToString); - } - if (content.Contains("SkuCapacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OSStorageType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).OSStorageType, global::System.Convert.ToString); - } - if (content.Contains("ImageValidationErrorDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails) content.GetValueForProperty("ImageValidationErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageValidationErrorDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("ActiveImageReference")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); - } - if (content.Contains("ImageValidationStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus?) content.GetValueForProperty("ImageValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus.CreateFrom); - } - if (content.Contains("ValidationStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); - } - if (content.Contains("ImageValidationErrorDetailCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailCode = (string) content.GetValueForProperty("ImageValidationErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailCode, global::System.Convert.ToString); - } - if (content.Contains("ImageValidationErrorDetailMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailMessage = (string) content.GetValueForProperty("ImageValidationErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailMessage, global::System.Convert.ToString); - } - if (content.Contains("ActiveImageReferenceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); - } - if (content.Contains("ActiveImageReferenceExactVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceExactVersion, 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 DevBoxDefinition(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("ImageReference")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); - } - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SkuTypeConverter.ConvertFrom); - } - if (content.Contains("HibernateSupport")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("ImageReferenceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageReferenceId, global::System.Convert.ToString); - } - if (content.Contains("ImageReferenceExactVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuName, global::System.Convert.ToString); - } - if (content.Contains("SkuTier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); - } - if (content.Contains("SkuSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuSize, global::System.Convert.ToString); - } - if (content.Contains("SkuFamily")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuFamily, global::System.Convert.ToString); - } - if (content.Contains("SkuCapacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OSStorageType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).OSStorageType, global::System.Convert.ToString); - } - if (content.Contains("ImageValidationErrorDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails) content.GetValueForProperty("ImageValidationErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageValidationErrorDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("ActiveImageReference")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); - } - if (content.Contains("ImageValidationStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus?) content.GetValueForProperty("ImageValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus.CreateFrom); - } - if (content.Contains("ValidationStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); - } - if (content.Contains("ImageValidationErrorDetailCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailCode = (string) content.GetValueForProperty("ImageValidationErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailCode, global::System.Convert.ToString); - } - if (content.Contains("ImageValidationErrorDetailMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailMessage = (string) content.GetValueForProperty("ImageValidationErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailMessage, global::System.Convert.ToString); - } - if (content.Contains("ActiveImageReferenceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); - } - if (content.Contains("ActiveImageReferenceExactVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceExactVersion, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Represents a definition for a Developer Machine. - [System.ComponentModel.TypeConverter(typeof(DevBoxDefinitionTypeConverter))] - public partial interface IDevBoxDefinition - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenter.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenter.PowerShell.cs deleted file mode 100644 index ed8f3d613ea0..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenter.PowerShell.cs +++ /dev/null @@ -1,416 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Represents a devcenter resource. - [System.ComponentModel.TypeConverter(typeof(DevCenterTypeConverter))] - public partial class DevCenter - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new DevCenter(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new DevCenter(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal DevCenter(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("ProjectCatalogSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("DevBoxProvisioningSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PlanId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).PlanId = (string) content.GetValueForProperty("PlanId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).PlanId, global::System.Convert.ToString); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("EncryptionCustomerManagedKeyEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("ProjectCatalogSettingCatalogItemSyncEnableStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); - } - if (content.Contains("NetworkSettingMicrosoftHostedNetworkEnableStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); - } - if (content.Contains("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); - } - if (content.Contains("CustomerManagedKeyEncryptionKeyIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("CustomerManagedKeyEncryptionKeyUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); - } - if (content.Contains("KeyEncryptionKeyIdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); - } - if (content.Contains("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); - } - if (content.Contains("KeyEncryptionKeyIdentityDelegatedIdentityClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, 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 DevCenter(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("ProjectCatalogSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("DevBoxProvisioningSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PlanId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).PlanId = (string) content.GetValueForProperty("PlanId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).PlanId, global::System.Convert.ToString); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("EncryptionCustomerManagedKeyEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("ProjectCatalogSettingCatalogItemSyncEnableStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); - } - if (content.Contains("NetworkSettingMicrosoftHostedNetworkEnableStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); - } - if (content.Contains("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); - } - if (content.Contains("CustomerManagedKeyEncryptionKeyIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("CustomerManagedKeyEncryptionKeyUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); - } - if (content.Contains("KeyEncryptionKeyIdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); - } - if (content.Contains("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); - } - if (content.Contains("KeyEncryptionKeyIdentityDelegatedIdentityClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Represents a devcenter resource. - [System.ComponentModel.TypeConverter(typeof(DevCenterTypeConverter))] - public partial interface IDevCenter - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlan.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlan.PowerShell.cs deleted file mode 100644 index 8d5f544465b7..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlan.PowerShell.cs +++ /dev/null @@ -1,296 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Represents a devcenter plan resource. - [System.ComponentModel.TypeConverter(typeof(DevCenterPlanTypeConverter))] - public partial class DevCenterPlan - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new DevCenterPlan(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new DevCenterPlan(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal DevCenterPlan(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SkuTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuName, global::System.Convert.ToString); - } - if (content.Contains("SkuTier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); - } - if (content.Contains("SkuSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuSize, global::System.Convert.ToString); - } - if (content.Contains("SkuFamily")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuFamily, global::System.Convert.ToString); - } - if (content.Contains("SkuCapacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal DevCenterPlan(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SkuTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuName, global::System.Convert.ToString); - } - if (content.Contains("SkuTier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); - } - if (content.Contains("SkuSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuSize, global::System.Convert.ToString); - } - if (content.Contains("SkuFamily")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuFamily, global::System.Convert.ToString); - } - if (content.Contains("SkuCapacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Represents a devcenter plan resource. - [System.ComponentModel.TypeConverter(typeof(DevCenterPlanTypeConverter))] - public partial interface IDevCenterPlan - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlan.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlan.TypeConverter.cs deleted file mode 100644 index 30c4d3671d72..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlan.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class DevCenterPlanTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return DevCenterPlan.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return DevCenterPlan.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return DevCenterPlan.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlan.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlan.cs deleted file mode 100644 index 2ab39174d1cf..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlan.cs +++ /dev/null @@ -1,260 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents a devcenter plan resource. - public partial class DevCenterPlan : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource(); - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id; } - - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Location = value ; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanPropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for Sku - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Sku()); set { {_sku = value;} } } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanProperties _property; - - /// Plan properties - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanProperties()); set => this._property = value; } - - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanPropertiesInternal)Property).ProvisioningState; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku _sku; - - /// The SKU for DevCenters created using this definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Sku()); set => this._sku = value; } - - /// - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the - /// resource this may be omitted. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Capacity = value ?? default(int); } - - /// - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Family = value ?? null; } - - /// The name of the SKU. E.g. P3. It is typically a letter+number code - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Name = value ?? null; } - - /// - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Size = value ?? null; } - - /// - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required - /// on a PUT. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type; } - - /// Creates an new instance. - public DevCenterPlan() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); - await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); - } - } - /// Represents a devcenter plan resource. - public partial interface IDevCenterPlan : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource - { - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of the resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } - /// - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the - /// resource this may be omitted. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", - SerializedName = @"capacity", - PossibleTypes = new [] { typeof(int) })] - int? SkuCapacity { get; set; } - /// - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", - SerializedName = @"family", - PossibleTypes = new [] { typeof(string) })] - string SkuFamily { get; set; } - /// The name of the SKU. E.g. P3. It is typically a letter+number code - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string SkuName { get; set; } - /// - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", - SerializedName = @"size", - PossibleTypes = new [] { typeof(string) })] - string SkuSize { get; set; } - /// - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required - /// on a PUT. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", - SerializedName = @"tier", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get; set; } - - } - /// Represents a devcenter plan resource. - internal partial interface IDevCenterPlanInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal - { - /// Plan properties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanProperties Property { get; set; } - /// The provisioning state of the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } - /// The SKU for DevCenters created using this definition. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku Sku { get; set; } - /// - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the - /// resource this may be omitted. - /// - int? SkuCapacity { get; set; } - /// - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - /// - string SkuFamily { get; set; } - /// The name of the SKU. E.g. P3. It is typically a letter+number code - string SkuName { get; set; } - /// - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - /// - string SkuSize { get; set; } - /// - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required - /// on a PUT. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlan.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlan.json.cs deleted file mode 100644 index d6212417bcf1..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlan.json.cs +++ /dev/null @@ -1,112 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents a devcenter plan resource. - public partial class DevCenterPlan - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal DevCenterPlan(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanProperties.FromJson(__jsonProperties) : Property;} - {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Sku.FromJson(__jsonSku) : Sku;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevCenterPlan(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __trackedResource?.ToJson(container, serializationMode); - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - AddIf( null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._sku.ToJson(null,serializationMode) : null, "sku" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlanMember.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlanMember.PowerShell.cs deleted file mode 100644 index 700d4a6dd311..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlanMember.PowerShell.cs +++ /dev/null @@ -1,266 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Represents a devcenter plan member resource. - [System.ComponentModel.TypeConverter(typeof(DevCenterPlanMemberTypeConverter))] - public partial class DevCenterPlanMember - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new DevCenterPlanMember(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new DevCenterPlanMember(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal DevCenterPlanMember(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanMemberPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("PropertiesTag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).PropertiesTag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("PropertiesTag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).PropertiesTag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("MemberId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).MemberId = (string) content.GetValueForProperty("MemberId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).MemberId, global::System.Convert.ToString); - } - if (content.Contains("MemberType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).MemberType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType?) content.GetValueForProperty("MemberType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).MemberType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal DevCenterPlanMember(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanMemberPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("PropertiesTag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).PropertiesTag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("PropertiesTag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).PropertiesTag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("MemberId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).MemberId = (string) content.GetValueForProperty("MemberId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).MemberId, global::System.Convert.ToString); - } - if (content.Contains("MemberType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).MemberType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType?) content.GetValueForProperty("MemberType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal)this).MemberType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Represents a devcenter plan member resource. - [System.ComponentModel.TypeConverter(typeof(DevCenterPlanMemberTypeConverter))] - public partial interface IDevCenterPlanMember - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlanMember.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlanMember.TypeConverter.cs deleted file mode 100644 index 0871af5a8364..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlanMember.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class DevCenterPlanMemberTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return DevCenterPlanMember.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return DevCenterPlanMember.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return DevCenterPlanMember.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlanMember.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlanMember.cs deleted file mode 100644 index 93438af72a52..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlanMember.cs +++ /dev/null @@ -1,198 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents a devcenter plan member resource. - public partial class DevCenterPlanMember : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(); - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; } - - /// The unique id of the member. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string MemberId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)Property).MemberId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)Property).MemberId = value ?? null; } - - /// The type of the member (user, group) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType? MemberType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)Property).MemberType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)Property).MemberType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType)""); } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanMemberProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMemberInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; } - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags PropertiesTag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)Property).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)Property).Tag = value ?? null /* model class */; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberProperties _property; - - /// Plan member properties - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanMemberProperties()); set => this._property = value; } - - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)Property).ProvisioningState; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags _tag; - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags()); set => this._tag = value; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public DevCenterPlanMember() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// Represents a devcenter plan member resource. - public partial interface IDevCenterPlanMember : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource - { - /// The unique id of the member. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The unique id of the member.", - SerializedName = @"memberId", - PossibleTypes = new [] { typeof(string) })] - string MemberId { get; set; } - /// The type of the member (user, group) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of the member (user, group)", - SerializedName = @"memberType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType? MemberType { get; set; } - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags PropertiesTag { get; set; } - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of the resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } - - } - /// Represents a devcenter plan member resource. - internal partial interface IDevCenterPlanMemberInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal - { - /// The unique id of the member. - string MemberId { get; set; } - /// The type of the member (user, group) - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType? MemberType { get; set; } - /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags PropertiesTag { get; set; } - /// Plan member properties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberProperties Property { get; set; } - /// The provisioning state of the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } - /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlanMember.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlanMember.json.cs deleted file mode 100644 index 05ec10e57413..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterPlanMember.json.cs +++ /dev/null @@ -1,112 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents a devcenter plan member resource. - public partial class DevCenterPlanMember - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal DevCenterPlanMember(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanMemberProperties.FromJson(__jsonProperties) : Property;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags.FromJson(__jsonTags) : Tag;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevCenterPlanMember(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __resource?.ToJson(container, serializationMode); - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdate.PowerShell.cs deleted file mode 100644 index 2efed2570682..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdate.PowerShell.cs +++ /dev/null @@ -1,322 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// The devcenter resource for partial updates. Properties not provided in the update request will not be changed. - /// - [System.ComponentModel.TypeConverter(typeof(DevCenterUpdateTypeConverter))] - public partial class DevCenterUpdate - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new DevCenterUpdate(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new DevCenterUpdate(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal DevCenterUpdate(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("ProjectCatalogSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("DevBoxProvisioningSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PlanId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).PlanId = (string) content.GetValueForProperty("PlanId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).PlanId, global::System.Convert.ToString); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("EncryptionCustomerManagedKeyEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("ProjectCatalogSettingCatalogItemSyncEnableStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); - } - if (content.Contains("NetworkSettingMicrosoftHostedNetworkEnableStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); - } - if (content.Contains("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); - } - if (content.Contains("CustomerManagedKeyEncryptionKeyIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("CustomerManagedKeyEncryptionKeyUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); - } - if (content.Contains("KeyEncryptionKeyIdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); - } - if (content.Contains("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); - } - if (content.Contains("KeyEncryptionKeyIdentityDelegatedIdentityClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, 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 DevCenterUpdate(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Encryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("ProjectCatalogSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("DevBoxProvisioningSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PlanId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).PlanId = (string) content.GetValueForProperty("PlanId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).PlanId, global::System.Convert.ToString); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("EncryptionCustomerManagedKeyEncryption")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); - } - if (content.Contains("ProjectCatalogSettingCatalogItemSyncEnableStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); - } - if (content.Contains("NetworkSettingMicrosoftHostedNetworkEnableStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); - } - if (content.Contains("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); - } - if (content.Contains("CustomerManagedKeyEncryptionKeyIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("CustomerManagedKeyEncryptionKeyUrl")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); - } - if (content.Contains("KeyEncryptionKeyIdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); - } - if (content.Contains("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); - } - if (content.Contains("KeyEncryptionKeyIdentityDelegatedIdentityClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The devcenter resource for partial updates. Properties not provided in the update request will not be changed. - [System.ComponentModel.TypeConverter(typeof(DevCenterUpdateTypeConverter))] - public partial interface IDevCenterUpdate - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.PowerShell.cs deleted file mode 100644 index 2dfd4d58ae90..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.PowerShell.cs +++ /dev/null @@ -1,258 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Represents an environment definition catalog item. - [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionTypeConverter))] - public partial class EnvironmentDefinition - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EnvironmentDefinition(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EnvironmentDefinition(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EnvironmentDefinition(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionParameterTypeConverter.ConvertFrom)); - } - if (content.Contains("TemplatePath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).TemplatePath = (string) content.GetValueForProperty("TemplatePath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).TemplatePath, global::System.Convert.ToString); - } - if (content.Contains("ValidationStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal EnvironmentDefinition(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionParameterTypeConverter.ConvertFrom)); - } - if (content.Contains("TemplatePath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).TemplatePath = (string) content.GetValueForProperty("TemplatePath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).TemplatePath, global::System.Convert.ToString); - } - if (content.Contains("ValidationStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Represents an environment definition catalog item. - [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionTypeConverter))] - public partial interface IEnvironmentDefinition - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.TypeConverter.cs deleted file mode 100644 index b60a8d5f06ea..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class EnvironmentDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return EnvironmentDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return EnvironmentDefinition.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return EnvironmentDefinition.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.cs deleted file mode 100644 index cd5f9aaa8774..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.cs +++ /dev/null @@ -1,190 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents an environment definition catalog item. - public partial class EnvironmentDefinition : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(); - - /// A short description of the environment definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)Property).Description; } - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; } - - /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal.Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)Property).Description = value; } - - /// Internal Acessors for Parameter - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal.Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)Property).Parameter = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionProperties()); set { {_property = value;} } } - - /// Internal Acessors for TemplatePath - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal.TemplatePath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)Property).TemplatePath; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)Property).TemplatePath = value; } - - /// Internal Acessors for ValidationStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionInternal.ValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)Property).ValidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)Property).ValidationStatus = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; } - - /// Input parameters passed to an environment. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter[] Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)Property).Parameter; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionProperties _property; - - /// Environment definition properties. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionProperties()); set => this._property = value; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// Path to the Environment Definition entrypoint file. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string TemplatePath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)Property).TemplatePath; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; } - - /// Validation status for the environment definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)Property).ValidationStatus; } - - /// Creates an new instance. - public EnvironmentDefinition() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// Represents an environment definition catalog item. - public partial interface IEnvironmentDefinition : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource - { - /// A short description of the environment definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A short description of the environment definition.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; } - /// Input parameters passed to an environment. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Input parameters passed to an environment.", - SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter[] Parameter { get; } - /// Path to the Environment Definition entrypoint file. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Path to the Environment Definition entrypoint file.", - SerializedName = @"templatePath", - PossibleTypes = new [] { typeof(string) })] - string TemplatePath { get; } - /// Validation status for the environment definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Validation status for the environment definition.", - SerializedName = @"validationStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get; } - - } - /// Represents an environment definition catalog item. - internal partial interface IEnvironmentDefinitionInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal - { - /// A short description of the environment definition. - string Description { get; set; } - /// Input parameters passed to an environment. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter[] Parameter { get; set; } - /// Environment definition properties. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionProperties Property { get; set; } - /// Path to the Environment Definition entrypoint file. - string TemplatePath { get; set; } - /// Validation status for the environment definition. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.json.cs deleted file mode 100644 index e2996a940ac1..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.json.cs +++ /dev/null @@ -1,110 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents an environment definition catalog item. - public partial class EnvironmentDefinition - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal EnvironmentDefinition(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionProperties.FromJson(__jsonProperties) : Property;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EnvironmentDefinition(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __resource?.ToJson(container, serializationMode); - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.PowerShell.cs deleted file mode 100644 index 6337007d91fa..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.PowerShell.cs +++ /dev/null @@ -1,186 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Properties of an Environment Definition parameter - [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionParameterTypeConverter))] - public partial class EnvironmentDefinitionParameter - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EnvironmentDefinitionParameter(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EnvironmentDefinitionParameter(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EnvironmentDefinitionParameter(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType.CreateFrom); - } - if (content.Contains("ReadOnly")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly = (bool?) content.GetValueForProperty("ReadOnly",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Required")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal EnvironmentDefinitionParameter(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType.CreateFrom); - } - if (content.Contains("ReadOnly")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly = (bool?) content.GetValueForProperty("ReadOnly",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Required")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Properties of an Environment Definition parameter - [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionParameterTypeConverter))] - public partial interface IEnvironmentDefinitionParameter - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.TypeConverter.cs deleted file mode 100644 index a7f9d2755100..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.TypeConverter.cs +++ /dev/null @@ -1,148 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class EnvironmentDefinitionParameterTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return EnvironmentDefinitionParameter.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return EnvironmentDefinitionParameter.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return EnvironmentDefinitionParameter.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.cs deleted file mode 100644 index 99a6f46cd4a8..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.cs +++ /dev/null @@ -1,166 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Properties of an Environment Definition parameter - public partial class EnvironmentDefinitionParameter : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal - { - - /// Backing field for property. - private string _description; - - /// Description of the parameter - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string Description { get => this._description; } - - /// Backing field for property. - private string _id; - - /// Unique ID of the parameter - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string Id { get => this._id; } - - /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal.Description { get => this._description; set { {_description = value;} } } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal.Id { get => this._id; set { {_id = value;} } } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal.Name { get => this._name; set { {_name = value;} } } - - /// Internal Acessors for ReadOnly - bool? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal.ReadOnly { get => this._readOnly; set { {_readOnly = value;} } } - - /// Internal Acessors for Required - bool? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal.Required { get => this._required; set { {_required = value;} } } - - /// Internal Acessors for Type - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal.Type { get => this._type; set { {_type = value;} } } - - /// Backing field for property. - private string _name; - - /// Display name of the parameter - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// Backing field for property. - private bool? _readOnly; - - /// - /// Whether or not this parameter is read-only. If true, default should have a value. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public bool? ReadOnly { get => this._readOnly; } - - /// Backing field for property. - private bool? _required; - - /// Whether or not this parameter is required - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public bool? Required { get => this._required; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType? _type; - - /// - /// A string of one of the basic JSON types (number, integer, array, object, boolean, string) - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType? Type { get => this._type; } - - /// Creates an new instance. - public EnvironmentDefinitionParameter() - { - - } - } - /// Properties of an Environment Definition parameter - public partial interface IEnvironmentDefinitionParameter : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable - { - /// Description of the parameter - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Description of the parameter", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; } - /// Unique ID of the parameter - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Unique ID of the parameter", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string Id { get; } - /// Display name of the parameter - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Display name of the parameter", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// - /// Whether or not this parameter is read-only. If true, default should have a value. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Whether or not this parameter is read-only. If true, default should have a value.", - SerializedName = @"readOnly", - PossibleTypes = new [] { typeof(bool) })] - bool? ReadOnly { get; } - /// Whether or not this parameter is required - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Whether or not this parameter is required", - SerializedName = @"required", - PossibleTypes = new [] { typeof(bool) })] - bool? Required { get; } - /// - /// A string of one of the basic JSON types (number, integer, array, object, boolean, string) - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A string of one of the basic JSON types (number, integer, array, object, boolean, string)", - SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType? Type { get; } - - } - /// Properties of an Environment Definition parameter - internal partial interface IEnvironmentDefinitionParameterInternal - - { - /// Description of the parameter - string Description { get; set; } - /// Unique ID of the parameter - string Id { get; set; } - /// Display name of the parameter - string Name { get; set; } - /// - /// Whether or not this parameter is read-only. If true, default should have a value. - /// - bool? ReadOnly { get; set; } - /// Whether or not this parameter is required - bool? Required { get; set; } - /// - /// A string of one of the basic JSON types (number, integer, array, object, boolean, string) - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType? Type { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.json.cs deleted file mode 100644 index 9613e7f1fc53..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.json.cs +++ /dev/null @@ -1,136 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Properties of an Environment Definition parameter - public partial class EnvironmentDefinitionParameter - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal EnvironmentDefinitionParameter(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_readOnly = If( json?.PropertyT("readOnly"), out var __jsonReadOnly) ? (bool?)__jsonReadOnly : ReadOnly;} - {_required = If( json?.PropertyT("required"), out var __jsonRequired) ? (bool?)__jsonRequired : Required;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EnvironmentDefinitionParameter(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != this._readOnly ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonBoolean((bool)this._readOnly) : null, "readOnly" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != this._required ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonBoolean((bool)this._required) : null, "required" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.PowerShell.cs deleted file mode 100644 index 4500caab10e2..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.PowerShell.cs +++ /dev/null @@ -1,248 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Represents an environment type. - [System.ComponentModel.TypeConverter(typeof(EnvironmentTypeTypeConverter))] - public partial class EnvironmentType - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EnvironmentType(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EnvironmentType(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EnvironmentType(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).DisplayName, 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 EnvironmentType(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal)this).DisplayName, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Represents an environment type. - [System.ComponentModel.TypeConverter(typeof(EnvironmentTypeTypeConverter))] - public partial interface IEnvironmentType - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.TypeConverter.cs deleted file mode 100644 index 81b425d16c54..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class EnvironmentTypeTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return EnvironmentType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return EnvironmentType.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return EnvironmentType.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.cs deleted file mode 100644 index 181c961dca17..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.cs +++ /dev/null @@ -1,170 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents an environment type. - public partial class EnvironmentType : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(); - - /// The display name of the environment type. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName = value ?? null; } - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypePropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeProperties _property; - - /// Properties of an environment type. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeProperties()); set => this._property = value; } - - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypePropertiesInternal)Property).ProvisioningState; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags _tag; - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags()); set => this._tag = value; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public EnvironmentType() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// Represents an environment type. - public partial interface IEnvironmentType : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource - { - /// The display name of the environment type. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The display name of the environment type.", - SerializedName = @"displayName", - PossibleTypes = new [] { typeof(string) })] - string DisplayName { get; set; } - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of the resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } - - } - /// Represents an environment type. - internal partial interface IEnvironmentTypeInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal - { - /// The display name of the environment type. - string DisplayName { get; set; } - /// Properties of an environment type. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeProperties Property { get; set; } - /// The provisioning state of the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } - /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.json.cs deleted file mode 100644 index 69a6bdaeb215..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.json.cs +++ /dev/null @@ -1,112 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents an environment type. - public partial class EnvironmentType - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal EnvironmentType(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeProperties.FromJson(__jsonProperties) : Property;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags.FromJson(__jsonTags) : Tag;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EnvironmentType(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __resource?.ToJson(container, serializationMode); - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Image.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Image.PowerShell.cs deleted file mode 100644 index 6ad7408b735b..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Image.PowerShell.cs +++ /dev/null @@ -1,328 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Represents an image. - [System.ComponentModel.TypeConverter(typeof(ImageTypeConverter))] - public partial class Image - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Image(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Image(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Image(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImagePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("HibernateSupport")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); - } - if (content.Contains("RecommendedMachineConfiguration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).RecommendedMachineConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration) content.GetValueForProperty("RecommendedMachineConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).RecommendedMachineConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.RecommendedMachineConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("Publisher")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Publisher, global::System.Convert.ToString); - } - if (content.Contains("Offer")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Offer = (string) content.GetValueForProperty("Offer",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Offer, global::System.Convert.ToString); - } - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Sku, global::System.Convert.ToString); - } - if (content.Contains("RecommendedMachineConfigurationMemory")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).RecommendedMachineConfigurationMemory = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationMemory",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).RecommendedMachineConfigurationMemory, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRangeTypeConverter.ConvertFrom); - } - if (content.Contains("RecommendedMachineConfigurationVCpUs")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).RecommendedMachineConfigurationVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).RecommendedMachineConfigurationVCpUs, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRangeTypeConverter.ConvertFrom); - } - if (content.Contains("MemoryMin")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MemoryMax")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("VCpUsMin")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("VCpUsMax")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Image(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImagePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("HibernateSupport")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); - } - if (content.Contains("RecommendedMachineConfiguration")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).RecommendedMachineConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration) content.GetValueForProperty("RecommendedMachineConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).RecommendedMachineConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.RecommendedMachineConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("Publisher")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Publisher, global::System.Convert.ToString); - } - if (content.Contains("Offer")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Offer = (string) content.GetValueForProperty("Offer",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Offer, global::System.Convert.ToString); - } - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).Sku, global::System.Convert.ToString); - } - if (content.Contains("RecommendedMachineConfigurationMemory")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).RecommendedMachineConfigurationMemory = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationMemory",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).RecommendedMachineConfigurationMemory, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRangeTypeConverter.ConvertFrom); - } - if (content.Contains("RecommendedMachineConfigurationVCpUs")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).RecommendedMachineConfigurationVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).RecommendedMachineConfigurationVCpUs, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRangeTypeConverter.ConvertFrom); - } - if (content.Contains("MemoryMin")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MemoryMax")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("VCpUsMin")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("VCpUsMax")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Represents an image. - [System.ComponentModel.TypeConverter(typeof(ImageTypeConverter))] - public partial interface IImage - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.PowerShell.cs deleted file mode 100644 index 74259aca06cb..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.PowerShell.cs +++ /dev/null @@ -1,152 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Image reference information - [System.ComponentModel.TypeConverter(typeof(ImageReferenceTypeConverter))] - public partial class ImageReference - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ImageReference(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ImageReference(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ImageReference(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("ExactVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)this).ExactVersion = (string) content.GetValueForProperty("ExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)this).ExactVersion, 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 ImageReference(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("ExactVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)this).ExactVersion = (string) content.GetValueForProperty("ExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)this).ExactVersion, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Image reference information - [System.ComponentModel.TypeConverter(typeof(ImageReferenceTypeConverter))] - public partial interface IImageReference - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.TypeConverter.cs deleted file mode 100644 index 43c8ed14c962..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ImageReferenceTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ImageReference.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ImageReference.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ImageReference.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.cs deleted file mode 100644 index 27a038e4b42b..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.cs +++ /dev/null @@ -1,86 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Image reference information - public partial class ImageReference : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal - { - - /// Backing field for property. - private string _exactVersion; - - /// - /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual - /// version in use. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string ExactVersion { get => this._exactVersion; } - - /// Backing field for property. - private string _id; - - /// - /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string Id { get => this._id; set => this._id = value; } - - /// Internal Acessors for ExactVersion - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal.ExactVersion { get => this._exactVersion; set { {_exactVersion = value;} } } - - /// Creates an new instance. - public ImageReference() - { - - } - } - /// Image reference information - public partial interface IImageReference : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable - { - /// - /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual - /// version in use. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", - SerializedName = @"exactVersion", - PossibleTypes = new [] { typeof(string) })] - string ExactVersion { get; } - /// - /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string Id { get; set; } - - } - /// Image reference information - internal partial interface IImageReferenceInternal - - { - /// - /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual - /// version in use. - /// - string ExactVersion { get; set; } - /// - /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. - /// - string Id { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.json.cs deleted file mode 100644 index fd88b47f2ce7..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.json.cs +++ /dev/null @@ -1,113 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Image reference information - public partial class ImageReference - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageReference(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal ImageReference(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_exactVersion = If( json?.PropertyT("exactVersion"), out var __jsonExactVersion) ? (string)__jsonExactVersion : (string)ExactVersion;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._exactVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._exactVersion.ToString()) : null, "exactVersion" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.PowerShell.cs deleted file mode 100644 index 08ddae96b9c2..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.PowerShell.cs +++ /dev/null @@ -1,256 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// The current status of an async operation - [System.ComponentModel.TypeConverter(typeof(OperationStatusTypeConverter))] - public partial class OperationStatus - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new OperationStatus(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new OperationStatus(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal OperationStatus(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatusInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatusInternal)this).ResourceId, global::System.Convert.ToString); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorDetailAutoGenerated[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom)); - } - if (content.Contains("AdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorDetailAutoGenerated) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("PercentComplete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).PercentComplete = (float?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).PercentComplete, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("StartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("EndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Operation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Operation = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResult[]) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Operation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.OperationStatusResultTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal OperationStatus(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatusInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatusInternal)this).ResourceId, global::System.Convert.ToString); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorDetailAutoGenerated[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom)); - } - if (content.Contains("AdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorDetailAutoGenerated) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("PercentComplete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).PercentComplete = (float?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).PercentComplete, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("StartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("EndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Operation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Operation = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResult[]) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Operation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.OperationStatusResultTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The current status of an async operation - [System.ComponentModel.TypeConverter(typeof(OperationStatusTypeConverter))] - public partial interface IOperationStatus - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.TypeConverter.cs deleted file mode 100644 index 6b71b77852dc..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class OperationStatusTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return OperationStatus.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return OperationStatus.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return OperationStatus.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.cs deleted file mode 100644 index 88e474322662..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.cs +++ /dev/null @@ -1,160 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// The current status of an async operation - public partial class OperationStatus : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatusInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResult __operationStatusResult = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.OperationStatusResult(); - - /// The error additional info. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).AdditionalInfo; } - - /// The error code. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Code; } - - /// The error details. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorDetailAutoGenerated[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Detail; } - - /// The end time of the operation. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).EndTime = value ?? default(global::System.DateTime); } - - /// If present, details of the operation error. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorDetailAutoGenerated Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Error = value ?? null /* model class */; } - - /// Fully qualified ID for the async operation. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Id = value ?? null; } - - /// The error message. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Message; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatusInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Any()); set { {_property = value;} } } - - /// Internal Acessors for ResourceId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatusInternal.ResourceId { get => this._resourceId; set { {_resourceId = value;} } } - - /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).AdditionalInfo = value; } - - /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Code = value; } - - /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorDetailAutoGenerated[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Detail = value; } - - /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Message = value; } - - /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Target = value; } - - /// Name of the async operation. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Name = value ?? null; } - - /// The operations list. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResult[] Operation { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Operation = value ?? null /* arrayOf */; } - - /// Percent of the operation that is complete. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public float? PercentComplete { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).PercentComplete; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).PercentComplete = value ?? default(float); } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny _property; - - /// Custom operation properties, populated only for a successful operation. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Any()); } - - /// Backing field for property. - private string _resourceId; - - /// The id of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string ResourceId { get => this._resourceId; } - - /// The start time of the operation. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).StartTime = value ?? default(global::System.DateTime); } - - /// Operation status. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Status = value ; } - - /// The error target. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Target; } - - /// Creates an new instance. - public OperationStatus() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__operationStatusResult), __operationStatusResult); - await eventListener.AssertObjectIsValid(nameof(__operationStatusResult), __operationStatusResult); - } - } - /// The current status of an async operation - public partial interface IOperationStatus : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResult - { - /// Custom operation properties, populated only for a successful operation. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Custom operation properties, populated only for a successful operation.", - SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny Property { get; } - /// The id of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The id of the resource.", - SerializedName = @"resourceId", - PossibleTypes = new [] { typeof(string) })] - string ResourceId { get; } - - } - /// The current status of an async operation - internal partial interface IOperationStatusInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal - { - /// Custom operation properties, populated only for a successful operation. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny Property { get; set; } - /// The id of the resource. - string ResourceId { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.json.cs deleted file mode 100644 index c4b270fa19d8..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.json.cs +++ /dev/null @@ -1,118 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// The current status of an async operation - public partial class OperationStatus - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new OperationStatus(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal OperationStatus(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __operationStatusResult = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.OperationStatusResult(json); - {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)ResourceId;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Any.FromJson(__jsonProperties) : Property;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __operationStatusResult?.ToJson(container, serializationMode); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._resourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._resourceId.ToString()) : null, "resourceId" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanListResult.PowerShell.cs deleted file mode 100644 index 79cdc87e647d..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanListResult.PowerShell.cs +++ /dev/null @@ -1,152 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Result of the list devcenter plans operation - [System.ComponentModel.TypeConverter(typeof(PlanListResultTypeConverter))] - public partial class PlanListResult - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new PlanListResult(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new PlanListResult(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal PlanListResult(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlanTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResultInternal)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 PlanListResult(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlanTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResultInternal)this).NextLink, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Result of the list devcenter plans operation - [System.ComponentModel.TypeConverter(typeof(PlanListResultTypeConverter))] - public partial interface IPlanListResult - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanListResult.TypeConverter.cs deleted file mode 100644 index 91150343ca2f..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanListResult.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class PlanListResultTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResult ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResult).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return PlanListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return PlanListResult.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return PlanListResult.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanListResult.cs deleted file mode 100644 index fa83c890d3cb..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanListResult.cs +++ /dev/null @@ -1,74 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Result of the list devcenter plans operation - public partial class PlanListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResultInternal - { - - /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResultInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// URL to get the next set of results if there are any. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan[] _value; - - /// Current page of results. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan[] Value { get => this._value; } - - /// Creates an new instance. - public PlanListResult() - { - - } - } - /// Result of the list devcenter plans operation - public partial interface IPlanListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable - { - /// URL to get the next set of results if there are any. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"URL to get the next set of results if there are any.", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; } - /// Current page of results. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Current page of results.", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan[] Value { get; } - - } - /// Result of the list devcenter plans operation - internal partial interface IPlanListResultInternal - - { - /// URL to get the next set of results if there are any. - string NextLink { get; set; } - /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanListResult.json.cs deleted file mode 100644 index d0990c9394d3..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanListResult.json.cs +++ /dev/null @@ -1,124 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Result of the list devcenter plans operation - public partial class PlanListResult - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResult. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResult. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new PlanListResult(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal PlanListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlan.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - if (null != this._value) - { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); - foreach( var __x in this._value ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("value",__w); - } - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberProperties.PowerShell.cs deleted file mode 100644 index fb38bc2661cf..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberProperties.PowerShell.cs +++ /dev/null @@ -1,170 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Properties of the devcenter plan member. - [System.ComponentModel.TypeConverter(typeof(PlanMemberPropertiesTypeConverter))] - public partial class PlanMemberProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new PlanMemberProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new PlanMemberProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal PlanMemberProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("MemberId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).MemberId = (string) content.GetValueForProperty("MemberId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).MemberId, global::System.Convert.ToString); - } - if (content.Contains("MemberType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).MemberType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType?) content.GetValueForProperty("MemberType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).MemberType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType.CreateFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal PlanMemberProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("MemberId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).MemberId = (string) content.GetValueForProperty("MemberId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).MemberId, global::System.Convert.ToString); - } - if (content.Contains("MemberType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).MemberType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType?) content.GetValueForProperty("MemberType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).MemberType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType.CreateFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Properties of the devcenter plan member. - [System.ComponentModel.TypeConverter(typeof(PlanMemberPropertiesTypeConverter))] - public partial interface IPlanMemberProperties - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberProperties.TypeConverter.cs deleted file mode 100644 index 3fb5800b9f07..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberProperties.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class PlanMemberPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberProperties ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberProperties).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return PlanMemberProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return PlanMemberProperties.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return PlanMemberProperties.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberProperties.cs deleted file mode 100644 index 7810e6caa864..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberProperties.cs +++ /dev/null @@ -1,105 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Properties of the devcenter plan member. - public partial class PlanMemberProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal - { - - /// Backing field for property. - private string _memberId; - - /// The unique id of the member. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string MemberId { get => this._memberId; set => this._memberId = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType? _memberType; - - /// The type of the member (user, group) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType? MemberType { get => this._memberType; set => this._memberType = value; } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; - - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags _tag; - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags()); set => this._tag = value; } - - /// Creates an new instance. - public PlanMemberProperties() - { - - } - } - /// Properties of the devcenter plan member. - public partial interface IPlanMemberProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable - { - /// The unique id of the member. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The unique id of the member.", - SerializedName = @"memberId", - PossibleTypes = new [] { typeof(string) })] - string MemberId { get; set; } - /// The type of the member (user, group) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of the member (user, group)", - SerializedName = @"memberType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType? MemberType { get; set; } - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of the resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } - - } - /// Properties of the devcenter plan member. - internal partial interface IPlanMemberPropertiesInternal - - { - /// The unique id of the member. - string MemberId { get; set; } - /// The type of the member (user, group) - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType? MemberType { get; set; } - /// The provisioning state of the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } - /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberProperties.json.cs deleted file mode 100644 index ee03ecb93855..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberProperties.json.cs +++ /dev/null @@ -1,117 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Properties of the devcenter plan member. - public partial class PlanMemberProperties - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberProperties. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberProperties. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new PlanMemberProperties(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal PlanMemberProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_memberId = If( json?.PropertyT("memberId"), out var __jsonMemberId) ? (string)__jsonMemberId : (string)MemberId;} - {_memberType = If( json?.PropertyT("memberType"), out var __jsonMemberType) ? (string)__jsonMemberType : (string)MemberType;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags.FromJson(__jsonTags) : Tag;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._memberId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._memberId.ToString()) : null, "memberId" ,container.Add ); - AddIf( null != (((object)this._memberType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._memberType.ToString()) : null, "memberType" ,container.Add ); - AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberUpdate.PowerShell.cs deleted file mode 100644 index ae8710b009b4..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberUpdate.PowerShell.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// The devcenter plan member resource for partial updates. Properties not provided in the update request will not be changed. - /// - [System.ComponentModel.TypeConverter(typeof(PlanMemberUpdateTypeConverter))] - public partial class PlanMemberUpdate - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new PlanMemberUpdate(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new PlanMemberUpdate(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal PlanMemberUpdate(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal PlanMemberUpdate(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The devcenter plan member resource for partial updates. Properties not provided in the update request will not be changed. - [System.ComponentModel.TypeConverter(typeof(PlanMemberUpdateTypeConverter))] - public partial interface IPlanMemberUpdate - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberUpdate.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberUpdate.TypeConverter.cs deleted file mode 100644 index 685453976749..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberUpdate.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class PlanMemberUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdate ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdate).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return PlanMemberUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return PlanMemberUpdate.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return PlanMemberUpdate.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberUpdate.cs deleted file mode 100644 index f7c9a151d567..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberUpdate.cs +++ /dev/null @@ -1,53 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// The devcenter plan member resource for partial updates. Properties not provided in the update request will not be changed. - /// - public partial class PlanMemberUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdate, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdateInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags _tag; - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags()); set => this._tag = value; } - - /// Creates an new instance. - public PlanMemberUpdate() - { - - } - } - /// The devcenter plan member resource for partial updates. Properties not provided in the update request will not be changed. - public partial interface IPlanMemberUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable - { - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } - - } - /// The devcenter plan member resource for partial updates. Properties not provided in the update request will not be changed. - internal partial interface IPlanMemberUpdateInternal - - { - /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberUpdate.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberUpdate.json.cs deleted file mode 100644 index 3cc44d9b22fe..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMemberUpdate.json.cs +++ /dev/null @@ -1,110 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// The devcenter plan member resource for partial updates. Properties not provided in the update request will not be changed. - /// - public partial class PlanMemberUpdate - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdate. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdate. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new PlanMemberUpdate(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal PlanMemberUpdate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags.FromJson(__jsonTags) : Tag;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMembersListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMembersListResult.PowerShell.cs deleted file mode 100644 index 88bdb8d985ee..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMembersListResult.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Result of the list devcenter plan members operation - [System.ComponentModel.TypeConverter(typeof(PlanMembersListResultTypeConverter))] - public partial class PlanMembersListResult - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new PlanMembersListResult(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new PlanMembersListResult(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal PlanMembersListResult(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlanMemberTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResultInternal)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 PlanMembersListResult(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlanMemberTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResultInternal)this).NextLink, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Result of the list devcenter plan members operation - [System.ComponentModel.TypeConverter(typeof(PlanMembersListResultTypeConverter))] - public partial interface IPlanMembersListResult - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMembersListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMembersListResult.TypeConverter.cs deleted file mode 100644 index cd9de294d9c2..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMembersListResult.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class PlanMembersListResultTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResult ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResult).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return PlanMembersListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return PlanMembersListResult.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return PlanMembersListResult.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMembersListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMembersListResult.cs deleted file mode 100644 index 7ea889daf811..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMembersListResult.cs +++ /dev/null @@ -1,74 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Result of the list devcenter plan members operation - public partial class PlanMembersListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResultInternal - { - - /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResultInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// URL to get the next set of results if there are any. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember[] _value; - - /// Current page of results. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember[] Value { get => this._value; } - - /// Creates an new instance. - public PlanMembersListResult() - { - - } - } - /// Result of the list devcenter plan members operation - public partial interface IPlanMembersListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable - { - /// URL to get the next set of results if there are any. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"URL to get the next set of results if there are any.", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; } - /// Current page of results. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Current page of results.", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember[] Value { get; } - - } - /// Result of the list devcenter plan members operation - internal partial interface IPlanMembersListResultInternal - - { - /// URL to get the next set of results if there are any. - string NextLink { get; set; } - /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMembersListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMembersListResult.json.cs deleted file mode 100644 index 621d1aa6ffd4..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanMembersListResult.json.cs +++ /dev/null @@ -1,124 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Result of the list devcenter plan members operation - public partial class PlanMembersListResult - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResult. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResult. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new PlanMembersListResult(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal PlanMembersListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlanMember.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - if (null != this._value) - { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); - foreach( var __x in this._value ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("value",__w); - } - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanProperties.PowerShell.cs deleted file mode 100644 index 5c44b842b933..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanProperties.PowerShell.cs +++ /dev/null @@ -1,144 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Properties of the devcenter plan. - [System.ComponentModel.TypeConverter(typeof(PlanPropertiesTypeConverter))] - public partial class PlanProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new PlanProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new PlanProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal PlanProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal PlanProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Properties of the devcenter plan. - [System.ComponentModel.TypeConverter(typeof(PlanPropertiesTypeConverter))] - public partial interface IPlanProperties - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanProperties.TypeConverter.cs deleted file mode 100644 index ad0e0dc8c1dd..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanProperties.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class PlanPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanProperties ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanProperties).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return PlanProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return PlanProperties.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return PlanProperties.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanProperties.cs deleted file mode 100644 index 81527add8190..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanProperties.cs +++ /dev/null @@ -1,54 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Properties of the devcenter plan. - public partial class PlanProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanPropertiesInternal - { - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; - - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } - - /// Creates an new instance. - public PlanProperties() - { - - } - } - /// Properties of the devcenter plan. - public partial interface IPlanProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable - { - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of the resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } - - } - /// Properties of the devcenter plan. - internal partial interface IPlanPropertiesInternal - - { - /// The provisioning state of the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanProperties.json.cs deleted file mode 100644 index 47d144bb22e8..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanProperties.json.cs +++ /dev/null @@ -1,111 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Properties of the devcenter plan. - public partial class PlanProperties - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanProperties. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanProperties. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new PlanProperties(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal PlanProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanUpdate.PowerShell.cs deleted file mode 100644 index 18ec1c25e819..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanUpdate.PowerShell.cs +++ /dev/null @@ -1,202 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// The devcenter plan resource for partial updates. Properties not provided in the update request will not be changed. - /// - [System.ComponentModel.TypeConverter(typeof(PlanUpdateTypeConverter))] - public partial class PlanUpdate - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new PlanUpdate(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new PlanUpdate(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal PlanUpdate(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SkuTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuName, global::System.Convert.ToString); - } - if (content.Contains("SkuTier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); - } - if (content.Contains("SkuSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuSize, global::System.Convert.ToString); - } - if (content.Contains("SkuFamily")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuFamily, global::System.Convert.ToString); - } - if (content.Contains("SkuCapacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal PlanUpdate(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SkuTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuName, global::System.Convert.ToString); - } - if (content.Contains("SkuTier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); - } - if (content.Contains("SkuSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuSize, global::System.Convert.ToString); - } - if (content.Contains("SkuFamily")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuFamily, global::System.Convert.ToString); - } - if (content.Contains("SkuCapacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The devcenter plan resource for partial updates. Properties not provided in the update request will not be changed. - [System.ComponentModel.TypeConverter(typeof(PlanUpdateTypeConverter))] - public partial interface IPlanUpdate - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanUpdate.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanUpdate.TypeConverter.cs deleted file mode 100644 index f6bcb20b358f..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanUpdate.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class PlanUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdate ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdate).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return PlanUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return PlanUpdate.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return PlanUpdate.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanUpdate.cs deleted file mode 100644 index bcee56ef3825..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanUpdate.cs +++ /dev/null @@ -1,175 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// The devcenter plan resource for partial updates. Properties not provided in the update request will not be changed. - /// - public partial class PlanUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdate, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(); - - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location = value ?? null; } - - /// Internal Acessors for Sku - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdateInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Sku()); set { {_sku = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku _sku; - - /// The SKU for DevCenters created using this definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Sku()); set => this._sku = value; } - - /// - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the - /// resource this may be omitted. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Capacity = value ?? default(int); } - - /// - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Family = value ?? null; } - - /// The name of the SKU. E.g. P3. It is typically a letter+number code - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Name = value ?? null; } - - /// - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Size = value ?? null; } - - /// - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required - /// on a PUT. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag = value ?? null /* model class */; } - - /// Creates an new instance. - public PlanUpdate() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__trackedResourceUpdate), __trackedResourceUpdate); - await eventListener.AssertObjectIsValid(nameof(__trackedResourceUpdate), __trackedResourceUpdate); - } - } - /// The devcenter plan resource for partial updates. Properties not provided in the update request will not be changed. - public partial interface IPlanUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate - { - /// - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the - /// resource this may be omitted. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", - SerializedName = @"capacity", - PossibleTypes = new [] { typeof(int) })] - int? SkuCapacity { get; set; } - /// - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", - SerializedName = @"family", - PossibleTypes = new [] { typeof(string) })] - string SkuFamily { get; set; } - /// The name of the SKU. E.g. P3. It is typically a letter+number code - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string SkuName { get; set; } - /// - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", - SerializedName = @"size", - PossibleTypes = new [] { typeof(string) })] - string SkuSize { get; set; } - /// - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required - /// on a PUT. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", - SerializedName = @"tier", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get; set; } - - } - /// The devcenter plan resource for partial updates. Properties not provided in the update request will not be changed. - internal partial interface IPlanUpdateInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal - { - /// The SKU for DevCenters created using this definition. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku Sku { get; set; } - /// - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the - /// resource this may be omitted. - /// - int? SkuCapacity { get; set; } - /// - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - /// - string SkuFamily { get; set; } - /// The name of the SKU. E.g. P3. It is typically a letter+number code - string SkuName { get; set; } - /// - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - /// - string SkuSize { get; set; } - /// - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required - /// on a PUT. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanUpdate.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanUpdate.json.cs deleted file mode 100644 index f2eeb3321bcf..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PlanUpdate.json.cs +++ /dev/null @@ -1,112 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// The devcenter plan resource for partial updates. Properties not provided in the update request will not be changed. - /// - public partial class PlanUpdate - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdate. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdate. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new PlanUpdate(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal PlanUpdate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(json); - {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Sku.FromJson(__jsonSku) : Sku;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __trackedResourceUpdate?.ToJson(container, serializationMode); - AddIf( null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._sku.ToJson(null,serializationMode) : null, "sku" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Pool.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Pool.PowerShell.cs deleted file mode 100644 index 48a75c74b0a1..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Pool.PowerShell.cs +++ /dev/null @@ -1,360 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// A pool of Virtual Machines. - [System.ComponentModel.TypeConverter(typeof(PoolTypeConverter))] - public partial class Pool - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Pool(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Pool(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Pool(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("LicenseType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); - } - if (content.Contains("HealthStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).HealthStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus?) content.GetValueForProperty("HealthStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).HealthStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("StopOnDisconnect")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("DevBoxDefinitionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); - } - if (content.Contains("NetworkConnectionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).NetworkConnectionName, global::System.Convert.ToString); - } - if (content.Contains("LocalAdministrator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); - } - if (content.Contains("SingleSignOnStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("VirtualNetworkType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); - } - if (content.Contains("ManagedVirtualNetworkRegion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("HealthStatusDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).HealthStatusDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail[]) content.GetValueForProperty("HealthStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).HealthStatusDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthStatusDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("DevBoxCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).DevBoxCount = (int?) content.GetValueForProperty("DevBoxCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).DevBoxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StopOnDisconnectStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); - } - if (content.Contains("StopOnDisconnectGracePeriodMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Pool(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("LicenseType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); - } - if (content.Contains("HealthStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).HealthStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus?) content.GetValueForProperty("HealthStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).HealthStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("StopOnDisconnect")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("DevBoxDefinitionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); - } - if (content.Contains("NetworkConnectionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).NetworkConnectionName, global::System.Convert.ToString); - } - if (content.Contains("LocalAdministrator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); - } - if (content.Contains("SingleSignOnStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("VirtualNetworkType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); - } - if (content.Contains("ManagedVirtualNetworkRegion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("HealthStatusDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).HealthStatusDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail[]) content.GetValueForProperty("HealthStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).HealthStatusDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthStatusDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("DevBoxCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).DevBoxCount = (int?) content.GetValueForProperty("DevBoxCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).DevBoxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StopOnDisconnectStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); - } - if (content.Contains("StopOnDisconnectGracePeriodMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// A pool of Virtual Machines. - [System.ComponentModel.TypeConverter(typeof(PoolTypeConverter))] - public partial interface IPool - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Pool.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Pool.TypeConverter.cs deleted file mode 100644 index 911a45b726fa..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Pool.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class PoolTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return Pool.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return Pool.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return Pool.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Pool.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Pool.cs deleted file mode 100644 index 9ac5b2230cd5..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Pool.cs +++ /dev/null @@ -1,404 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// A pool of Virtual Machines. - public partial class Pool : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource(); - - /// Indicates the number of provisioned Dev Boxes in this pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? DevBoxCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)Property).DevBoxCount; } - - /// Name of a Dev Box definition in parent Project of this Pool - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DevBoxDefinitionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionName = value ?? null; } - - /// The display name of the pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).DisplayName = value ?? null; } - - /// - /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)Property).HealthStatus; } - - /// - /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool - /// is in a non-healthy state - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail[] HealthStatusDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)Property).HealthStatusDetail; } - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id; } - - /// - /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).LicenseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).LicenseType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType)""); } - - /// - /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).LocalAdministrator; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).LocalAdministrator = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus)""); } - - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Location = value ; } - - /// - /// The regions of the managed virtual network (required when managedNetworkType is Managed). - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string[] ManagedVirtualNetworkRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).ManagedVirtualNetworkRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).ManagedVirtualNetworkRegion = value ?? null /* arrayOf */; } - - /// Internal Acessors for DevBoxCount - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal.DevBoxCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)Property).DevBoxCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)Property).DevBoxCount = value; } - - /// Internal Acessors for HealthStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal.HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)Property).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)Property).HealthStatus = value; } - - /// Internal Acessors for HealthStatusDetail - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal.HealthStatusDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)Property).HealthStatusDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)Property).HealthStatusDetail = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for StopOnDisconnect - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolInternal.StopOnDisconnect { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnect; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnect = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name; } - - /// Name of a Network Connection in parent Project of this Pool - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string NetworkConnectionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).NetworkConnectionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).NetworkConnectionName = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolProperties _property; - - /// Pool properties - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolProperties()); set => this._property = value; } - - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)Property).ProvisioningState; } - - /// - /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on - /// be enabled on the tenant. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).SingleSignOnStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).SingleSignOnStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus)""); } - - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? StopOnDisconnectGracePeriodMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectGracePeriodMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectGracePeriodMinute = value ?? default(int); } - - /// - /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus)""); } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type; } - - /// - /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).VirtualNetworkType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).VirtualNetworkType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType)""); } - - /// Creates an new instance. - public Pool() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); - await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); - } - } - /// A pool of Virtual Machines. - public partial interface IPool : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource - { - /// Indicates the number of provisioned Dev Boxes in this pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Indicates the number of provisioned Dev Boxes in this pool.", - SerializedName = @"devBoxCount", - PossibleTypes = new [] { typeof(int) })] - int? DevBoxCount { get; } - /// Name of a Dev Box definition in parent Project of this Pool - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Name of a Dev Box definition in parent Project of this Pool", - SerializedName = @"devBoxDefinitionName", - PossibleTypes = new [] { typeof(string) })] - string DevBoxDefinitionName { get; set; } - /// The display name of the pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The display name of the pool.", - SerializedName = @"displayName", - PossibleTypes = new [] { typeof(string) })] - string DisplayName { get; set; } - /// - /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes.", - SerializedName = @"healthStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? HealthStatus { get; } - /// - /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool - /// is in a non-healthy state - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool is in a non-healthy state", - SerializedName = @"healthStatusDetails", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail[] HealthStatusDetail { get; } - /// - /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created.", - SerializedName = @"licenseType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get; set; } - /// - /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box.", - SerializedName = @"localAdministrator", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get; set; } - /// - /// The regions of the managed virtual network (required when managedNetworkType is Managed). - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The regions of the managed virtual network (required when managedNetworkType is Managed).", - SerializedName = @"managedVirtualNetworkRegions", - PossibleTypes = new [] { typeof(string) })] - string[] ManagedVirtualNetworkRegion { get; set; } - /// Name of a Network Connection in parent Project of this Pool - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Name of a Network Connection in parent Project of this Pool", - SerializedName = @"networkConnectionName", - PossibleTypes = new [] { typeof(string) })] - string NetworkConnectionName { get; set; } - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of the resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } - /// - /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on - /// be enabled on the tenant. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on be enabled on the tenant.", - SerializedName = @"singleSignOnStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get; set; } - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The specified time in minutes to wait before stopping a Dev Box once disconnect is detected.", - SerializedName = @"gracePeriodMinutes", - PossibleTypes = new [] { typeof(int) })] - int? StopOnDisconnectGracePeriodMinute { get; set; } - /// - /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled.", - SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } - /// - /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network.", - SerializedName = @"virtualNetworkType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get; set; } - - } - /// A pool of Virtual Machines. - internal partial interface IPoolInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal - { - /// Indicates the number of provisioned Dev Boxes in this pool. - int? DevBoxCount { get; set; } - /// Name of a Dev Box definition in parent Project of this Pool - string DevBoxDefinitionName { get; set; } - /// The display name of the pool. - string DisplayName { get; set; } - /// - /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? HealthStatus { get; set; } - /// - /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool - /// is in a non-healthy state - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail[] HealthStatusDetail { get; set; } - /// - /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get; set; } - /// - /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get; set; } - /// - /// The regions of the managed virtual network (required when managedNetworkType is Managed). - /// - string[] ManagedVirtualNetworkRegion { get; set; } - /// Name of a Network Connection in parent Project of this Pool - string NetworkConnectionName { get; set; } - /// Pool properties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolProperties Property { get; set; } - /// The provisioning state of the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } - /// - /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on - /// be enabled on the tenant. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get; set; } - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration StopOnDisconnect { get; set; } - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. - /// - int? StopOnDisconnectGracePeriodMinute { get; set; } - /// - /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } - /// - /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Pool.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Pool.json.cs deleted file mode 100644 index 640d40115d5c..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Pool.json.cs +++ /dev/null @@ -1,110 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// A pool of Virtual Machines. - public partial class Pool - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Pool(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal Pool(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolProperties.FromJson(__jsonProperties) : Property;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __trackedResource?.ToJson(container, serializationMode); - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolProperties.PowerShell.cs deleted file mode 100644 index 9c24a9759af6..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolProperties.PowerShell.cs +++ /dev/null @@ -1,256 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Properties of a Pool - [System.ComponentModel.TypeConverter(typeof(PoolPropertiesTypeConverter))] - public partial class PoolProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new PoolProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new PoolProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal PoolProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("HealthStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).HealthStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus?) content.GetValueForProperty("HealthStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).HealthStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus.CreateFrom); - } - if (content.Contains("HealthStatusDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).HealthStatusDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail[]) content.GetValueForProperty("HealthStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).HealthStatusDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthStatusDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("DevBoxCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).DevBoxCount = (int?) content.GetValueForProperty("DevBoxCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).DevBoxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("StopOnDisconnectStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); - } - if (content.Contains("StopOnDisconnectGracePeriodMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StopOnDisconnect")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("DevBoxDefinitionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); - } - if (content.Contains("NetworkConnectionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName, global::System.Convert.ToString); - } - if (content.Contains("LicenseType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); - } - if (content.Contains("LocalAdministrator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); - } - if (content.Contains("SingleSignOnStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("VirtualNetworkType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); - } - if (content.Contains("ManagedVirtualNetworkRegion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__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 PoolProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("HealthStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).HealthStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus?) content.GetValueForProperty("HealthStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).HealthStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus.CreateFrom); - } - if (content.Contains("HealthStatusDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).HealthStatusDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail[]) content.GetValueForProperty("HealthStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).HealthStatusDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthStatusDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("DevBoxCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).DevBoxCount = (int?) content.GetValueForProperty("DevBoxCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).DevBoxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("StopOnDisconnectStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); - } - if (content.Contains("StopOnDisconnectGracePeriodMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StopOnDisconnect")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("DevBoxDefinitionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); - } - if (content.Contains("NetworkConnectionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName, global::System.Convert.ToString); - } - if (content.Contains("LicenseType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); - } - if (content.Contains("LocalAdministrator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); - } - if (content.Contains("SingleSignOnStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("VirtualNetworkType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); - } - if (content.Contains("ManagedVirtualNetworkRegion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Properties of a Pool - [System.ComponentModel.TypeConverter(typeof(PoolPropertiesTypeConverter))] - public partial interface IPoolProperties - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolProperties.cs deleted file mode 100644 index 1b0353de7b85..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolProperties.cs +++ /dev/null @@ -1,207 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Properties of a Pool - public partial class PoolProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties __poolUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolUpdateProperties(); - - /// Backing field for property. - private int? _devBoxCount; - - /// Indicates the number of provisioned Dev Boxes in this pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public int? DevBoxCount { get => this._devBoxCount; } - - /// Name of a Dev Box definition in parent Project of this Pool - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string DevBoxDefinitionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxDefinitionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxDefinitionName = value ?? null; } - - /// The display name of the pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DisplayName = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? _healthStatus; - - /// - /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? HealthStatus { get => this._healthStatus; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail[] _healthStatusDetail; - - /// - /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool - /// is in a non-healthy state - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail[] HealthStatusDetail { get => this._healthStatusDetail; } - - /// - /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).LicenseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).LicenseType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType)""); } - - /// - /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).LocalAdministrator; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).LocalAdministrator = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus)""); } - - /// - /// The regions of the managed virtual network (required when managedNetworkType is Managed). - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string[] ManagedVirtualNetworkRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ManagedVirtualNetworkRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ManagedVirtualNetworkRegion = value ?? null /* arrayOf */; } - - /// Internal Acessors for DevBoxCount - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal.DevBoxCount { get => this._devBoxCount; set { {_devBoxCount = value;} } } - - /// Internal Acessors for HealthStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal.HealthStatus { get => this._healthStatus; set { {_healthStatus = value;} } } - - /// Internal Acessors for HealthStatusDetail - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal.HealthStatusDetail { get => this._healthStatusDetail; set { {_healthStatusDetail = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Name of a Network Connection in parent Project of this Pool - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string NetworkConnectionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).NetworkConnectionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).NetworkConnectionName = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; - - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } - - /// - /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on - /// be enabled on the tenant. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).SingleSignOnStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).SingleSignOnStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus)""); } - - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration StopOnDisconnect { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnDisconnect; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnDisconnect = value ?? null /* model class */; } - - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public int? StopOnDisconnectGracePeriodMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnDisconnectGracePeriodMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnDisconnectGracePeriodMinute = value ?? default(int); } - - /// - /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnDisconnectStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnDisconnectStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus)""); } - - /// - /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).VirtualNetworkType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).VirtualNetworkType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType)""); } - - /// Creates an new instance. - public PoolProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__poolUpdateProperties), __poolUpdateProperties); - await eventListener.AssertObjectIsValid(nameof(__poolUpdateProperties), __poolUpdateProperties); - } - } - /// Properties of a Pool - public partial interface IPoolProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties - { - /// Indicates the number of provisioned Dev Boxes in this pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Indicates the number of provisioned Dev Boxes in this pool.", - SerializedName = @"devBoxCount", - PossibleTypes = new [] { typeof(int) })] - int? DevBoxCount { get; } - /// - /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes.", - SerializedName = @"healthStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? HealthStatus { get; } - /// - /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool - /// is in a non-healthy state - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool is in a non-healthy state", - SerializedName = @"healthStatusDetails", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail[] HealthStatusDetail { get; } - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of the resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } - - } - /// Properties of a Pool - internal partial interface IPoolPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal - { - /// Indicates the number of provisioned Dev Boxes in this pool. - int? DevBoxCount { get; set; } - /// - /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? HealthStatus { get; set; } - /// - /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool - /// is in a non-healthy state - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail[] HealthStatusDetail { get; set; } - /// The provisioning state of the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdate.PowerShell.cs deleted file mode 100644 index eca723746800..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdate.PowerShell.cs +++ /dev/null @@ -1,250 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// The pool properties for partial update. Properties not provided in the update request will not be changed. - /// - [System.ComponentModel.TypeConverter(typeof(PoolUpdateTypeConverter))] - public partial class PoolUpdate - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new PoolUpdate(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new PoolUpdate(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal PoolUpdate(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("LicenseType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); - } - if (content.Contains("StopOnDisconnect")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("DevBoxDefinitionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); - } - if (content.Contains("NetworkConnectionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).NetworkConnectionName, global::System.Convert.ToString); - } - if (content.Contains("LocalAdministrator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); - } - if (content.Contains("SingleSignOnStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("VirtualNetworkType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); - } - if (content.Contains("ManagedVirtualNetworkRegion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("StopOnDisconnectStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); - } - if (content.Contains("StopOnDisconnectGracePeriodMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal PoolUpdate(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("LicenseType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); - } - if (content.Contains("StopOnDisconnect")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("DevBoxDefinitionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); - } - if (content.Contains("NetworkConnectionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).NetworkConnectionName, global::System.Convert.ToString); - } - if (content.Contains("LocalAdministrator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); - } - if (content.Contains("SingleSignOnStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("VirtualNetworkType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); - } - if (content.Contains("ManagedVirtualNetworkRegion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("StopOnDisconnectStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); - } - if (content.Contains("StopOnDisconnectGracePeriodMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The pool properties for partial update. Properties not provided in the update request will not be changed. - [System.ComponentModel.TypeConverter(typeof(PoolUpdateTypeConverter))] - public partial interface IPoolUpdate - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdate.cs deleted file mode 100644 index 7aaee43be885..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdate.cs +++ /dev/null @@ -1,265 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// The pool properties for partial update. Properties not provided in the update request will not be changed. - /// - public partial class PoolUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdate, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(); - - /// Name of a Dev Box definition in parent Project of this Pool - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DevBoxDefinitionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionName = value ?? null; } - - /// The display name of the pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).DisplayName = value ?? null; } - - /// - /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).LicenseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).LicenseType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType)""); } - - /// - /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).LocalAdministrator; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).LocalAdministrator = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus)""); } - - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location = value ?? null; } - - /// - /// The regions of the managed virtual network (required when managedNetworkType is Managed). - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string[] ManagedVirtualNetworkRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).ManagedVirtualNetworkRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).ManagedVirtualNetworkRegion = value ?? null /* arrayOf */; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolUpdateProperties()); set { {_property = value;} } } - - /// Internal Acessors for StopOnDisconnect - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateInternal.StopOnDisconnect { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnect; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnect = value; } - - /// Name of a Network Connection in parent Project of this Pool - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string NetworkConnectionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).NetworkConnectionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).NetworkConnectionName = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties _property; - - /// Properties of a pool to be updated. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolUpdateProperties()); set => this._property = value; } - - /// - /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on - /// be enabled on the tenant. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).SingleSignOnStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).SingleSignOnStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus)""); } - - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? StopOnDisconnectGracePeriodMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectGracePeriodMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectGracePeriodMinute = value ?? default(int); } - - /// - /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus)""); } - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag = value ?? null /* model class */; } - - /// - /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).VirtualNetworkType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)Property).VirtualNetworkType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType)""); } - - /// Creates an new instance. - public PoolUpdate() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__trackedResourceUpdate), __trackedResourceUpdate); - await eventListener.AssertObjectIsValid(nameof(__trackedResourceUpdate), __trackedResourceUpdate); - } - } - /// The pool properties for partial update. Properties not provided in the update request will not be changed. - public partial interface IPoolUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate - { - /// Name of a Dev Box definition in parent Project of this Pool - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Name of a Dev Box definition in parent Project of this Pool", - SerializedName = @"devBoxDefinitionName", - PossibleTypes = new [] { typeof(string) })] - string DevBoxDefinitionName { get; set; } - /// The display name of the pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The display name of the pool.", - SerializedName = @"displayName", - PossibleTypes = new [] { typeof(string) })] - string DisplayName { get; set; } - /// - /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created.", - SerializedName = @"licenseType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get; set; } - /// - /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box.", - SerializedName = @"localAdministrator", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get; set; } - /// - /// The regions of the managed virtual network (required when managedNetworkType is Managed). - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The regions of the managed virtual network (required when managedNetworkType is Managed).", - SerializedName = @"managedVirtualNetworkRegions", - PossibleTypes = new [] { typeof(string) })] - string[] ManagedVirtualNetworkRegion { get; set; } - /// Name of a Network Connection in parent Project of this Pool - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Name of a Network Connection in parent Project of this Pool", - SerializedName = @"networkConnectionName", - PossibleTypes = new [] { typeof(string) })] - string NetworkConnectionName { get; set; } - /// - /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on - /// be enabled on the tenant. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on be enabled on the tenant.", - SerializedName = @"singleSignOnStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get; set; } - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The specified time in minutes to wait before stopping a Dev Box once disconnect is detected.", - SerializedName = @"gracePeriodMinutes", - PossibleTypes = new [] { typeof(int) })] - int? StopOnDisconnectGracePeriodMinute { get; set; } - /// - /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled.", - SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } - /// - /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network.", - SerializedName = @"virtualNetworkType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get; set; } - - } - /// The pool properties for partial update. Properties not provided in the update request will not be changed. - internal partial interface IPoolUpdateInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal - { - /// Name of a Dev Box definition in parent Project of this Pool - string DevBoxDefinitionName { get; set; } - /// The display name of the pool. - string DisplayName { get; set; } - /// - /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get; set; } - /// - /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get; set; } - /// - /// The regions of the managed virtual network (required when managedNetworkType is Managed). - /// - string[] ManagedVirtualNetworkRegion { get; set; } - /// Name of a Network Connection in parent Project of this Pool - string NetworkConnectionName { get; set; } - /// Properties of a pool to be updated. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties Property { get; set; } - /// - /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on - /// be enabled on the tenant. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get; set; } - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration StopOnDisconnect { get; set; } - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. - /// - int? StopOnDisconnectGracePeriodMinute { get; set; } - /// - /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } - /// - /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdateProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdateProperties.PowerShell.cs deleted file mode 100644 index f4bd75e1af56..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdateProperties.PowerShell.cs +++ /dev/null @@ -1,228 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// Properties of a Pool. These properties can be updated after the resource has been created. - /// - [System.ComponentModel.TypeConverter(typeof(PoolUpdatePropertiesTypeConverter))] - public partial class PoolUpdateProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new PoolUpdateProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new PoolUpdateProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal PoolUpdateProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StopOnDisconnect")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("DevBoxDefinitionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); - } - if (content.Contains("NetworkConnectionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName, global::System.Convert.ToString); - } - if (content.Contains("LicenseType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); - } - if (content.Contains("LocalAdministrator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); - } - if (content.Contains("SingleSignOnStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("VirtualNetworkType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); - } - if (content.Contains("ManagedVirtualNetworkRegion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("StopOnDisconnectStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); - } - if (content.Contains("StopOnDisconnectGracePeriodMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal PoolUpdateProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StopOnDisconnect")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("DevBoxDefinitionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); - } - if (content.Contains("NetworkConnectionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName, global::System.Convert.ToString); - } - if (content.Contains("LicenseType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); - } - if (content.Contains("LocalAdministrator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); - } - if (content.Contains("SingleSignOnStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("VirtualNetworkType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); - } - if (content.Contains("ManagedVirtualNetworkRegion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("StopOnDisconnectStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); - } - if (content.Contains("StopOnDisconnectGracePeriodMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Properties of a Pool. These properties can be updated after the resource has been created. - [System.ComponentModel.TypeConverter(typeof(PoolUpdatePropertiesTypeConverter))] - public partial interface IPoolUpdateProperties - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdateProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdateProperties.cs deleted file mode 100644 index 38adb7a65d27..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdateProperties.cs +++ /dev/null @@ -1,257 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// Properties of a Pool. These properties can be updated after the resource has been created. - /// - public partial class PoolUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal - { - - /// Backing field for property. - private string _devBoxDefinitionName; - - /// Name of a Dev Box definition in parent Project of this Pool - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string DevBoxDefinitionName { get => this._devBoxDefinitionName; set => this._devBoxDefinitionName = value; } - - /// Backing field for property. - private string _displayName; - - /// The display name of the pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string DisplayName { get => this._displayName; set => this._displayName = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? _licenseType; - - /// - /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get => this._licenseType; set => this._licenseType = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? _localAdministrator; - - /// - /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get => this._localAdministrator; set => this._localAdministrator = value; } - - /// Backing field for property. - private string[] _managedVirtualNetworkRegion; - - /// - /// The regions of the managed virtual network (required when managedNetworkType is Managed). - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string[] ManagedVirtualNetworkRegion { get => this._managedVirtualNetworkRegion; set => this._managedVirtualNetworkRegion = value; } - - /// Internal Acessors for StopOnDisconnect - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdatePropertiesInternal.StopOnDisconnect { get => (this._stopOnDisconnect = this._stopOnDisconnect ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.StopOnDisconnectConfiguration()); set { {_stopOnDisconnect = value;} } } - - /// Backing field for property. - private string _networkConnectionName; - - /// Name of a Network Connection in parent Project of this Pool - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string NetworkConnectionName { get => this._networkConnectionName; set => this._networkConnectionName = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? _singleSignOnStatus; - - /// - /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on - /// be enabled on the tenant. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get => this._singleSignOnStatus; set => this._singleSignOnStatus = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration _stopOnDisconnect; - - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration StopOnDisconnect { get => (this._stopOnDisconnect = this._stopOnDisconnect ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.StopOnDisconnectConfiguration()); set => this._stopOnDisconnect = value; } - - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? StopOnDisconnectGracePeriodMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).GracePeriodMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).GracePeriodMinute = value ?? default(int); } - - /// - /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus)""); } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? _virtualNetworkType; - - /// - /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get => this._virtualNetworkType; set => this._virtualNetworkType = value; } - - /// Creates an new instance. - public PoolUpdateProperties() - { - - } - } - /// Properties of a Pool. These properties can be updated after the resource has been created. - public partial interface IPoolUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable - { - /// Name of a Dev Box definition in parent Project of this Pool - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Name of a Dev Box definition in parent Project of this Pool", - SerializedName = @"devBoxDefinitionName", - PossibleTypes = new [] { typeof(string) })] - string DevBoxDefinitionName { get; set; } - /// The display name of the pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The display name of the pool.", - SerializedName = @"displayName", - PossibleTypes = new [] { typeof(string) })] - string DisplayName { get; set; } - /// - /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created.", - SerializedName = @"licenseType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get; set; } - /// - /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box.", - SerializedName = @"localAdministrator", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get; set; } - /// - /// The regions of the managed virtual network (required when managedNetworkType is Managed). - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The regions of the managed virtual network (required when managedNetworkType is Managed).", - SerializedName = @"managedVirtualNetworkRegions", - PossibleTypes = new [] { typeof(string) })] - string[] ManagedVirtualNetworkRegion { get; set; } - /// Name of a Network Connection in parent Project of this Pool - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Name of a Network Connection in parent Project of this Pool", - SerializedName = @"networkConnectionName", - PossibleTypes = new [] { typeof(string) })] - string NetworkConnectionName { get; set; } - /// - /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on - /// be enabled on the tenant. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on be enabled on the tenant.", - SerializedName = @"singleSignOnStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get; set; } - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The specified time in minutes to wait before stopping a Dev Box once disconnect is detected.", - SerializedName = @"gracePeriodMinutes", - PossibleTypes = new [] { typeof(int) })] - int? StopOnDisconnectGracePeriodMinute { get; set; } - /// - /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled.", - SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } - /// - /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network.", - SerializedName = @"virtualNetworkType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get; set; } - - } - /// Properties of a Pool. These properties can be updated after the resource has been created. - internal partial interface IPoolUpdatePropertiesInternal - - { - /// Name of a Dev Box definition in parent Project of this Pool - string DevBoxDefinitionName { get; set; } - /// The display name of the pool. - string DisplayName { get; set; } - /// - /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get; set; } - /// - /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get; set; } - /// - /// The regions of the managed virtual network (required when managedNetworkType is Managed). - /// - string[] ManagedVirtualNetworkRegion { get; set; } - /// Name of a Network Connection in parent Project of this Pool - string NetworkConnectionName { get; set; } - /// - /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on - /// be enabled on the tenant. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get; set; } - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration StopOnDisconnect { get; set; } - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. - /// - int? StopOnDisconnectGracePeriodMinute { get; set; } - /// - /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } - /// - /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Project.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Project.PowerShell.cs deleted file mode 100644 index 26cbeecf78ca..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Project.PowerShell.cs +++ /dev/null @@ -1,344 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Represents a project resource. - [System.ComponentModel.TypeConverter(typeof(ProjectTypeConverter))] - public partial class Project - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Project(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Project(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Project(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("CatalogSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("DevCenterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).DevCenterId, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("MaxDevBoxesPerUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("DevCenterUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).DevCenterUri = (string) content.GetValueForProperty("DevCenterUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).DevCenterUri, global::System.Convert.ToString); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("CatalogSettingCatalogItemSyncType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Project(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("CatalogSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("DevCenterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).DevCenterId, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("MaxDevBoxesPerUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("DevCenterUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).DevCenterUri = (string) content.GetValueForProperty("DevCenterUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).DevCenterUri, global::System.Convert.ToString); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("CatalogSettingCatalogItemSyncType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Represents a project resource. - [System.ComponentModel.TypeConverter(typeof(ProjectTypeConverter))] - public partial interface IProject - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Project.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Project.TypeConverter.cs deleted file mode 100644 index 683a92b7a74b..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Project.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ProjectTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return Project.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return Project.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return Project.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Project.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Project.cs deleted file mode 100644 index e226587af618..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Project.cs +++ /dev/null @@ -1,353 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents a project resource. - public partial class Project : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource(); - - /// Indicates catalog item types that can be synced. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).CatalogSettingCatalogItemSyncType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).CatalogSettingCatalogItemSyncType = value ?? null /* arrayOf */; } - - /// Description of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).Description = value ?? null; } - - /// Resource Id of an associated DevCenter - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DevCenterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).DevCenterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).DevCenterId = value ?? null; } - - /// The URI of the Dev Center resource this project is associated with. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DevCenterUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal)Property).DevCenterUri; } - - /// The display name of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).DisplayName = value ?? null; } - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity _identity; - - /// Managed identity properties - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; } - - /// - /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; } - - /// - /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType)""); } - - /// - /// 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } - - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Location = value ; } - - /// - /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This - /// will have no effect on existing Dev Boxes when reduced. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? MaxDevBoxesPerUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).MaxDevBoxesPerUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).MaxDevBoxesPerUser = value ?? default(int); } - - /// Internal Acessors for CatalogSetting - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal.CatalogSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).CatalogSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).CatalogSetting = value; } - - /// Internal Acessors for DevCenterUri - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal.DevCenterUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal)Property).DevCenterUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal)Property).DevCenterUri = value; } - - /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } - - /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } - - /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectProperties _property; - - /// Properties of a project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectProperties()); set => this._property = value; } - - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal)Property).ProvisioningState; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type; } - - /// Creates an new instance. - public Project() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); - await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); - } - } - /// Represents a project resource. - public partial interface IProject : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource - { - /// Indicates catalog item types that can be synced. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates catalog item types that can be synced.", - SerializedName = @"catalogItemSyncTypes", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get; set; } - /// Description of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Description of the project.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// Resource Id of an associated DevCenter - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource Id of an associated DevCenter", - SerializedName = @"devCenterId", - PossibleTypes = new [] { typeof(string) })] - string DevCenterId { get; set; } - /// The URI of the Dev Center resource this project is associated with. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The URI of the Dev Center resource this project is associated with.", - SerializedName = @"devCenterUri", - PossibleTypes = new [] { typeof(string) })] - string DevCenterUri { get; } - /// The display name of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The display name of the project.", - SerializedName = @"displayName", - PossibleTypes = new [] { typeof(string) })] - string DisplayName { get; set; } - /// - /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - 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). - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType? 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } - /// - /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This - /// will have no effect on existing Dev Boxes when reduced. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced.", - SerializedName = @"maxDevBoxesPerUser", - PossibleTypes = new [] { typeof(int) })] - int? MaxDevBoxesPerUser { get; set; } - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of the resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } - - } - /// Represents a project resource. - internal partial interface IProjectInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal - { - /// Settings to be used when associating a project with a catalog. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings CatalogSetting { get; set; } - /// Indicates catalog item types that can be synced. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get; set; } - /// Description of the project. - string Description { get; set; } - /// Resource Id of an associated DevCenter - string DevCenterId { get; set; } - /// The URI of the Dev Center resource this project is associated with. - string DevCenterUri { get; set; } - /// The display name of the project. - string DisplayName { get; set; } - /// Managed identity properties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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). - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType? 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. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } - /// - /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This - /// will have no effect on existing Dev Boxes when reduced. - /// - int? MaxDevBoxesPerUser { get; set; } - /// Properties of a project. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectProperties Property { get; set; } - /// The provisioning state of the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Project.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Project.json.cs deleted file mode 100644 index 9070ead4ba9d..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Project.json.cs +++ /dev/null @@ -1,112 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents a project resource. - public partial class Project - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Project(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal Project(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectProperties.FromJson(__jsonProperties) : Property;} - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity.FromJson(__jsonIdentity) : Identity;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __trackedResource?.ToJson(container, serializationMode); - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentType.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentType.PowerShell.cs deleted file mode 100644 index b0b6445d9a4a..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentType.PowerShell.cs +++ /dev/null @@ -1,346 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Represents an environment type. - [System.ComponentModel.TypeConverter(typeof(ProjectEnvironmentTypeTypeConverter))] - public partial class ProjectEnvironmentType - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ProjectEnvironmentType(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ProjectEnvironmentType(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ProjectEnvironmentType(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("CreatorRoleAssignment")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); - } - if (content.Contains("DeploymentTargetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).DeploymentTargetId, global::System.Convert.ToString); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); - } - if (content.Contains("UserRoleAssignment")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); - } - if (content.Contains("EnvironmentCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).EnvironmentCount = (int?) content.GetValueForProperty("EnvironmentCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).EnvironmentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("CreatorRoleAssignmentRole")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ProjectEnvironmentType(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("CreatorRoleAssignment")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); - } - if (content.Contains("DeploymentTargetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).DeploymentTargetId, global::System.Convert.ToString); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); - } - if (content.Contains("UserRoleAssignment")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); - } - if (content.Contains("EnvironmentCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).EnvironmentCount = (int?) content.GetValueForProperty("EnvironmentCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).EnvironmentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("CreatorRoleAssignmentRole")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Represents an environment type. - [System.ComponentModel.TypeConverter(typeof(ProjectEnvironmentTypeTypeConverter))] - public partial interface IProjectEnvironmentType - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectProperties.PowerShell.cs deleted file mode 100644 index bbc49868bbb0..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectProperties.PowerShell.cs +++ /dev/null @@ -1,200 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Properties of a project. - [System.ComponentModel.TypeConverter(typeof(ProjectPropertiesTypeConverter))] - public partial class ProjectProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ProjectProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ProjectProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ProjectProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("DevCenterUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal)this).DevCenterUri = (string) content.GetValueForProperty("DevCenterUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal)this).DevCenterUri, global::System.Convert.ToString); - } - if (content.Contains("CatalogSettingCatalogItemSyncType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); - } - if (content.Contains("CatalogSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("DevCenterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DevCenterId, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("MaxDevBoxesPerUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DisplayName, 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 ProjectProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("DevCenterUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal)this).DevCenterUri = (string) content.GetValueForProperty("DevCenterUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal)this).DevCenterUri, global::System.Convert.ToString); - } - if (content.Contains("CatalogSettingCatalogItemSyncType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); - } - if (content.Contains("CatalogSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("DevCenterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DevCenterId, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("MaxDevBoxesPerUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Properties of a project. - [System.ComponentModel.TypeConverter(typeof(ProjectPropertiesTypeConverter))] - public partial interface IProjectProperties - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectProperties.TypeConverter.cs deleted file mode 100644 index b73261644153..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectProperties.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ProjectPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectProperties ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectProperties).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ProjectProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ProjectProperties.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ProjectProperties.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectProperties.cs deleted file mode 100644 index 651ce62b6dc1..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectProperties.cs +++ /dev/null @@ -1,120 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Properties of a project. - public partial class ProjectProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties __projectUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectUpdateProperties(); - - /// Settings to be used when associating a project with a catalog. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings CatalogSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).CatalogSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).CatalogSetting = value ?? null /* model class */; } - - /// Indicates catalog item types that can be synced. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).CatalogSettingCatalogItemSyncType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).CatalogSettingCatalogItemSyncType = value ?? null /* arrayOf */; } - - /// Description of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).Description = value ?? null; } - - /// Resource Id of an associated DevCenter - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string DevCenterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DevCenterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DevCenterId = value ?? null; } - - /// Backing field for property. - private string _devCenterUri; - - /// The URI of the Dev Center resource this project is associated with. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string DevCenterUri { get => this._devCenterUri; } - - /// The display name of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DisplayName = value ?? null; } - - /// - /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This - /// will have no effect on existing Dev Boxes when reduced. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public int? MaxDevBoxesPerUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).MaxDevBoxesPerUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).MaxDevBoxesPerUser = value ?? default(int); } - - /// Internal Acessors for DevCenterUri - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal.DevCenterUri { get => this._devCenterUri; set { {_devCenterUri = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; - - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } - - /// Creates an new instance. - public ProjectProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__projectUpdateProperties), __projectUpdateProperties); - await eventListener.AssertObjectIsValid(nameof(__projectUpdateProperties), __projectUpdateProperties); - } - } - /// Properties of a project. - public partial interface IProjectProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties - { - /// The URI of the Dev Center resource this project is associated with. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The URI of the Dev Center resource this project is associated with.", - SerializedName = @"devCenterUri", - PossibleTypes = new [] { typeof(string) })] - string DevCenterUri { get; } - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of the resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } - - } - /// Properties of a project. - internal partial interface IProjectPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal - { - /// The URI of the Dev Center resource this project is associated with. - string DevCenterUri { get; set; } - /// The provisioning state of the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectProperties.json.cs deleted file mode 100644 index 0c66dd64d8e5..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectProperties.json.cs +++ /dev/null @@ -1,118 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Properties of a project. - public partial class ProjectProperties - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectProperties. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectProperties. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectProperties(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal ProjectProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __projectUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectUpdateProperties(json); - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_devCenterUri = If( json?.PropertyT("devCenterUri"), out var __jsonDevCenterUri) ? (string)__jsonDevCenterUri : (string)DevCenterUri;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __projectUpdateProperties?.ToJson(container, serializationMode); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._devCenterUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._devCenterUri.ToString()) : null, "devCenterUri" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdate.PowerShell.cs deleted file mode 100644 index e3598896e27a..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdate.PowerShell.cs +++ /dev/null @@ -1,250 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// The project properties for partial update. Properties not provided in the update request will not be changed. - /// - [System.ComponentModel.TypeConverter(typeof(ProjectUpdateTypeConverter))] - public partial class ProjectUpdate - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ProjectUpdate(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ProjectUpdate(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ProjectUpdate(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("CatalogSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("DevCenterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).DevCenterId, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("MaxDevBoxesPerUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("CatalogSettingCatalogItemSyncType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ProjectUpdate(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("CatalogSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("DevCenterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).DevCenterId, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("MaxDevBoxesPerUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("CatalogSettingCatalogItemSyncType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The project properties for partial update. Properties not provided in the update request will not be changed. - [System.ComponentModel.TypeConverter(typeof(ProjectUpdateTypeConverter))] - public partial interface IProjectUpdate - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdate.cs deleted file mode 100644 index df6cb7f78375..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdate.cs +++ /dev/null @@ -1,263 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// The project properties for partial update. Properties not provided in the update request will not be changed. - /// - public partial class ProjectUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdate, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(); - - /// Indicates catalog item types that can be synced. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).CatalogSettingCatalogItemSyncType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).CatalogSettingCatalogItemSyncType = value ?? null /* arrayOf */; } - - /// Description of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).Description = value ?? null; } - - /// Resource Id of an associated DevCenter - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DevCenterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).DevCenterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).DevCenterId = value ?? null; } - - /// The display name of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).DisplayName = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity _identity; - - /// Managed identity properties - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; } - - /// - /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; } - - /// - /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType)""); } - - /// - /// 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } - - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location = value ?? null; } - - /// - /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This - /// will have no effect on existing Dev Boxes when reduced. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? MaxDevBoxesPerUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).MaxDevBoxesPerUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).MaxDevBoxesPerUser = value ?? default(int); } - - /// Internal Acessors for CatalogSetting - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal.CatalogSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).CatalogSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)Property).CatalogSetting = value; } - - /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } - - /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } - - /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectUpdateProperties()); set { {_property = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties _property; - - /// Properties of a project to be updated. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectUpdateProperties()); set => this._property = value; } - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag = value ?? null /* model class */; } - - /// Creates an new instance. - public ProjectUpdate() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__trackedResourceUpdate), __trackedResourceUpdate); - await eventListener.AssertObjectIsValid(nameof(__trackedResourceUpdate), __trackedResourceUpdate); - } - } - /// The project properties for partial update. Properties not provided in the update request will not be changed. - public partial interface IProjectUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate - { - /// Indicates catalog item types that can be synced. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates catalog item types that can be synced.", - SerializedName = @"catalogItemSyncTypes", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get; set; } - /// Description of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Description of the project.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// Resource Id of an associated DevCenter - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource Id of an associated DevCenter", - SerializedName = @"devCenterId", - PossibleTypes = new [] { typeof(string) })] - string DevCenterId { get; set; } - /// The display name of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The display name of the project.", - SerializedName = @"displayName", - PossibleTypes = new [] { typeof(string) })] - string DisplayName { get; set; } - /// - /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - 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). - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType? 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } - /// - /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This - /// will have no effect on existing Dev Boxes when reduced. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced.", - SerializedName = @"maxDevBoxesPerUser", - PossibleTypes = new [] { typeof(int) })] - int? MaxDevBoxesPerUser { get; set; } - - } - /// The project properties for partial update. Properties not provided in the update request will not be changed. - internal partial interface IProjectUpdateInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal - { - /// Settings to be used when associating a project with a catalog. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings CatalogSetting { get; set; } - /// Indicates catalog item types that can be synced. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get; set; } - /// Description of the project. - string Description { get; set; } - /// Resource Id of an associated DevCenter - string DevCenterId { get; set; } - /// The display name of the project. - string DisplayName { get; set; } - /// Managed identity properties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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). - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType? 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. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } - /// - /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This - /// will have no effect on existing Dev Boxes when reduced. - /// - int? MaxDevBoxesPerUser { get; set; } - /// Properties of a project to be updated. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties Property { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdateProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdateProperties.PowerShell.cs deleted file mode 100644 index f923c9c87603..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdateProperties.PowerShell.cs +++ /dev/null @@ -1,188 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// Properties of a project. These properties can be updated after the resource has been created. - /// - [System.ComponentModel.TypeConverter(typeof(ProjectUpdatePropertiesTypeConverter))] - public partial class ProjectUpdateProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ProjectUpdateProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ProjectUpdateProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ProjectUpdateProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CatalogSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("DevCenterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DevCenterId, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("MaxDevBoxesPerUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("CatalogSettingCatalogItemSyncType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ProjectUpdateProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CatalogSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("DevCenterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DevCenterId, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("MaxDevBoxesPerUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("CatalogSettingCatalogItemSyncType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Properties of a project. These properties can be updated after the resource has been created. - [System.ComponentModel.TypeConverter(typeof(ProjectUpdatePropertiesTypeConverter))] - public partial interface IProjectUpdateProperties - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdateProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdateProperties.TypeConverter.cs deleted file mode 100644 index 3a3643255a87..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdateProperties.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ProjectUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ProjectUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ProjectUpdateProperties.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ProjectUpdateProperties.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdateProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdateProperties.cs deleted file mode 100644 index 21d0364f6973..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdateProperties.cs +++ /dev/null @@ -1,139 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// Properties of a project. These properties can be updated after the resource has been created. - /// - public partial class ProjectUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings _catalogSetting; - - /// Settings to be used when associating a project with a catalog. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings CatalogSetting { get => (this._catalogSetting = this._catalogSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectCatalogSettings()); set => this._catalogSetting = value; } - - /// Indicates catalog item types that can be synced. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettingsInternal)CatalogSetting).CatalogItemSyncType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettingsInternal)CatalogSetting).CatalogItemSyncType = value ?? null /* arrayOf */; } - - /// Backing field for property. - private string _description; - - /// Description of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string Description { get => this._description; set => this._description = value; } - - /// Backing field for property. - private string _devCenterId; - - /// Resource Id of an associated DevCenter - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string DevCenterId { get => this._devCenterId; set => this._devCenterId = value; } - - /// Backing field for property. - private string _displayName; - - /// The display name of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string DisplayName { get => this._displayName; set => this._displayName = value; } - - /// Backing field for property. - private int? _maxDevBoxesPerUser; - - /// - /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This - /// will have no effect on existing Dev Boxes when reduced. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public int? MaxDevBoxesPerUser { get => this._maxDevBoxesPerUser; set => this._maxDevBoxesPerUser = value; } - - /// Internal Acessors for CatalogSetting - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdatePropertiesInternal.CatalogSetting { get => (this._catalogSetting = this._catalogSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectCatalogSettings()); set { {_catalogSetting = value;} } } - - /// Creates an new instance. - public ProjectUpdateProperties() - { - - } - } - /// Properties of a project. These properties can be updated after the resource has been created. - public partial interface IProjectUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable - { - /// Indicates catalog item types that can be synced. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates catalog item types that can be synced.", - SerializedName = @"catalogItemSyncTypes", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get; set; } - /// Description of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Description of the project.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// Resource Id of an associated DevCenter - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource Id of an associated DevCenter", - SerializedName = @"devCenterId", - PossibleTypes = new [] { typeof(string) })] - string DevCenterId { get; set; } - /// The display name of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The display name of the project.", - SerializedName = @"displayName", - PossibleTypes = new [] { typeof(string) })] - string DisplayName { get; set; } - /// - /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This - /// will have no effect on existing Dev Boxes when reduced. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced.", - SerializedName = @"maxDevBoxesPerUser", - PossibleTypes = new [] { typeof(int) })] - int? MaxDevBoxesPerUser { get; set; } - - } - /// Properties of a project. These properties can be updated after the resource has been created. - internal partial interface IProjectUpdatePropertiesInternal - - { - /// Settings to be used when associating a project with a catalog. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings CatalogSetting { get; set; } - /// Indicates catalog item types that can be synced. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get; set; } - /// Description of the project. - string Description { get; set; } - /// Resource Id of an associated DevCenter - string DevCenterId { get; set; } - /// The display name of the project. - string DisplayName { get; set; } - /// - /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This - /// will have no effect on existing Dev Boxes when reduced. - /// - int? MaxDevBoxesPerUser { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdateProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdateProperties.json.cs deleted file mode 100644 index 3c119e3d2506..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdateProperties.json.cs +++ /dev/null @@ -1,118 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// Properties of a project. These properties can be updated after the resource has been created. - /// - public partial class ProjectUpdateProperties - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectUpdateProperties(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal ProjectUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_catalogSetting = If( json?.PropertyT("catalogSettings"), out var __jsonCatalogSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectCatalogSettings.FromJson(__jsonCatalogSettings) : CatalogSetting;} - {_devCenterId = If( json?.PropertyT("devCenterId"), out var __jsonDevCenterId) ? (string)__jsonDevCenterId : (string)DevCenterId;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_maxDevBoxesPerUser = If( json?.PropertyT("maxDevBoxesPerUser"), out var __jsonMaxDevBoxesPerUser) ? (int?)__jsonMaxDevBoxesPerUser : MaxDevBoxesPerUser;} - {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != this._catalogSetting ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._catalogSetting.ToJson(null,serializationMode) : null, "catalogSettings" ,container.Add ); - AddIf( null != (((object)this._devCenterId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._devCenterId.ToString()) : null, "devCenterId" ,container.Add ); - AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); - AddIf( null != this._maxDevBoxesPerUser ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNumber((int)this._maxDevBoxesPerUser) : null, "maxDevBoxesPerUser" ,container.Add ); - AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Schedule.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Schedule.PowerShell.cs deleted file mode 100644 index b65baf4b9932..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Schedule.PowerShell.cs +++ /dev/null @@ -1,288 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Represents a Schedule to execute a task. - [System.ComponentModel.TypeConverter(typeof(ScheduleTypeConverter))] - public partial class Schedule - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Schedule(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Schedule(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Schedule(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SchedulePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("PropertiesType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).PropertiesType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("PropertiesType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).PropertiesType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); - } - if (content.Contains("Frequency")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); - } - if (content.Contains("Time")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Time, global::System.Convert.ToString); - } - if (content.Contains("TimeZone")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).TimeZone, global::System.Convert.ToString); - } - if (content.Contains("State")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Schedule(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SchedulePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("PropertiesType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).PropertiesType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("PropertiesType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).PropertiesType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); - } - if (content.Contains("Frequency")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); - } - if (content.Contains("Time")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).Time, global::System.Convert.ToString); - } - if (content.Contains("TimeZone")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).TimeZone, global::System.Convert.ToString); - } - if (content.Contains("State")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Represents a Schedule to execute a task. - [System.ComponentModel.TypeConverter(typeof(ScheduleTypeConverter))] - public partial interface ISchedule - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Schedule.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Schedule.TypeConverter.cs deleted file mode 100644 index c6ceb35aa3bd..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Schedule.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ScheduleTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return Schedule.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return Schedule.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return Schedule.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Schedule.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Schedule.cs deleted file mode 100644 index 74f992e098b9..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Schedule.cs +++ /dev/null @@ -1,237 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents a Schedule to execute a task. - public partial class Schedule : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(); - - /// The frequency of this scheduled task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency? Frequency { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).Frequency; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).Frequency = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency)""); } - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; } - - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)Property).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)Property).Location = value ?? null; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedulePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedulePropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; } - - /// Supported type this scheduled task represents. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType? PropertiesType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType)""); } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleProperties _property; - - /// Properties of a Schedule resource - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleProperties()); set => this._property = value; } - - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedulePropertiesInternal)Property).ProvisioningState; } - - /// Indicates whether or not this scheduled task is enabled. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus? State { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).State; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).State = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus)""); } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)Property).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)Property).Tag = value ?? null /* model class */; } - - /// The target time to trigger the action. The format is HH:MM. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string Time { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).Time; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).Time = value ?? null; } - - /// The IANA timezone id at which the schedule should execute. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string TimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).TimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).TimeZone = value ?? null; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public Schedule() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// Represents a Schedule to execute a task. - public partial interface ISchedule : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource - { - /// The frequency of this scheduled task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The frequency of this scheduled task.", - SerializedName = @"frequency", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency? Frequency { get; set; } - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - string Location { get; set; } - /// Supported type this scheduled task represents. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Supported type this scheduled task represents.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType? PropertiesType { get; set; } - /// The provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of the resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } - /// Indicates whether or not this scheduled task is enabled. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether or not this scheduled task is enabled.", - SerializedName = @"state", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus? State { get; set; } - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } - /// The target time to trigger the action. The format is HH:MM. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The target time to trigger the action. The format is HH:MM.", - SerializedName = @"time", - PossibleTypes = new [] { typeof(string) })] - string Time { get; set; } - /// The IANA timezone id at which the schedule should execute. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The IANA timezone id at which the schedule should execute.", - SerializedName = @"timeZone", - PossibleTypes = new [] { typeof(string) })] - string TimeZone { get; set; } - - } - /// Represents a Schedule to execute a task. - internal partial interface IScheduleInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal - { - /// The frequency of this scheduled task. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency? Frequency { get; set; } - /// The geo-location where the resource lives - string Location { get; set; } - /// Supported type this scheduled task represents. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType? PropertiesType { get; set; } - /// Properties of a Schedule resource - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleProperties Property { get; set; } - /// The provisioning state of the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } - /// Indicates whether or not this scheduled task is enabled. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus? State { get; set; } - /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } - /// The target time to trigger the action. The format is HH:MM. - string Time { get; set; } - /// The IANA timezone id at which the schedule should execute. - string TimeZone { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Schedule.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Schedule.json.cs deleted file mode 100644 index cc5abd5a59b8..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Schedule.json.cs +++ /dev/null @@ -1,110 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Represents a Schedule to execute a task. - public partial class Schedule - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Schedule(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal Schedule(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleProperties.FromJson(__jsonProperties) : Property;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __resource?.ToJson(container, serializationMode); - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.PowerShell.cs deleted file mode 100644 index a29d831b9d93..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - [System.ComponentModel.TypeConverter(typeof(StopOnDisconnectConfigurationTypeConverter))] - public partial class StopOnDisconnectConfiguration - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new StopOnDisconnectConfiguration(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new StopOnDisconnectConfiguration(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal StopOnDisconnectConfiguration(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); - } - if (content.Contains("GracePeriodMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute = (int?) content.GetValueForProperty("GracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal StopOnDisconnectConfiguration(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); - } - if (content.Contains("GracePeriodMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute = (int?) content.GetValueForProperty("GracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - [System.ComponentModel.TypeConverter(typeof(StopOnDisconnectConfigurationTypeConverter))] - public partial interface IStopOnDisconnectConfiguration - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.TypeConverter.cs deleted file mode 100644 index 9819d78b73f4..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class StopOnDisconnectConfigurationTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return StopOnDisconnectConfiguration.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return StopOnDisconnectConfiguration.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return StopOnDisconnectConfiguration.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.cs deleted file mode 100644 index 5b83de371e57..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.cs +++ /dev/null @@ -1,80 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - public partial class StopOnDisconnectConfiguration : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal - { - - /// Backing field for property. - private int? _gracePeriodMinute; - - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public int? GracePeriodMinute { get => this._gracePeriodMinute; set => this._gracePeriodMinute = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? _status; - - /// - /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? Status { get => this._status; set => this._status = value; } - - /// Creates an new instance. - public StopOnDisconnectConfiguration() - { - - } - } - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - public partial interface IStopOnDisconnectConfiguration : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable - { - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The specified time in minutes to wait before stopping a Dev Box once disconnect is detected.", - SerializedName = @"gracePeriodMinutes", - PossibleTypes = new [] { typeof(int) })] - int? GracePeriodMinute { get; set; } - /// - /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled.", - SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? Status { get; set; } - - } - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - internal partial interface IStopOnDisconnectConfigurationInternal - - { - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. - /// - int? GracePeriodMinute { get; set; } - /// - /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? Status { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.json.cs deleted file mode 100644 index 924883349aec..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.json.cs +++ /dev/null @@ -1,110 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - public partial class StopOnDisconnectConfiguration - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IStopOnDisconnectConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new StopOnDisconnectConfiguration(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal StopOnDisconnectConfiguration(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_gracePeriodMinute = If( json?.PropertyT("gracePeriodMinutes"), out var __jsonGracePeriodMinutes) ? (int?)__jsonGracePeriodMinutes : GracePeriodMinute;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); - AddIf( null != this._gracePeriodMinute ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNumber((int)this._gracePeriodMinute) : null, "gracePeriodMinutes" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.PowerShell.cs new file mode 100644 index 000000000000..11b63e0872f9 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Active hours configuration. + [System.ComponentModel.TypeConverter(typeof(ActiveHoursConfigurationTypeConverter))] + public partial class ActiveHoursConfiguration + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ActiveHoursConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("KeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).KeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus?) content.GetValueForProperty("KeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).KeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("AutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).AutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus?) content.GetValueForProperty("AutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).AutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("DefaultTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).DefaultTimeZone = (string) content.GetValueForProperty("DefaultTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).DefaultTimeZone, global::System.Convert.ToString); + } + if (content.Contains("DefaultStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).DefaultStartTimeHour = (int?) content.GetValueForProperty("DefaultStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).DefaultStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DefaultEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).DefaultEndTimeHour = (int?) content.GetValueForProperty("DefaultEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).DefaultEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ActiveHoursConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("KeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).KeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus?) content.GetValueForProperty("KeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).KeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("AutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).AutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus?) content.GetValueForProperty("AutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).AutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("DefaultTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).DefaultTimeZone = (string) content.GetValueForProperty("DefaultTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).DefaultTimeZone, global::System.Convert.ToString); + } + if (content.Contains("DefaultStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).DefaultStartTimeHour = (int?) content.GetValueForProperty("DefaultStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).DefaultStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DefaultEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).DefaultEndTimeHour = (int?) content.GetValueForProperty("DefaultEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).DefaultEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ActiveHoursConfiguration(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ActiveHoursConfiguration(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Active hours configuration. + [System.ComponentModel.TypeConverter(typeof(ActiveHoursConfigurationTypeConverter))] + public partial interface IActiveHoursConfiguration + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.TypeConverter.cs new file mode 100644 index 000000000000..c80cf73929ee --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ActiveHoursConfigurationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ActiveHoursConfiguration.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ActiveHoursConfiguration.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ActiveHoursConfiguration.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.cs new file mode 100644 index 000000000000..e4d687e5879d --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Active hours configuration. + public partial class ActiveHoursConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus? _autoStartEnableStatus; + + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus? AutoStartEnableStatus { get => this._autoStartEnableStatus; set => this._autoStartEnableStatus = value; } + + /// Backing field for property. + private int? _defaultEndTimeHour; + + /// The default end time of the active hours + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public int? DefaultEndTimeHour { get => this._defaultEndTimeHour; set => this._defaultEndTimeHour = value; } + + /// Backing field for property. + private int? _defaultStartTimeHour; + + /// The default start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public int? DefaultStartTimeHour { get => this._defaultStartTimeHour; set => this._defaultStartTimeHour = value; } + + /// Backing field for property. + private string _defaultTimeZone; + + /// The default IANA timezone id of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string DefaultTimeZone { get => this._defaultTimeZone; set => this._defaultTimeZone = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus? _keepAwakeEnableStatus; + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus? KeepAwakeEnableStatus { get => this._keepAwakeEnableStatus; set => this._keepAwakeEnableStatus = value; } + + /// Creates an new instance. + public ActiveHoursConfiguration() + { + + } + } + /// Active hours configuration. + public partial interface IActiveHoursConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be automatically started at commencement of active hours.", + SerializedName = @"autoStartEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus? AutoStartEnableStatus { get; set; } + /// The default end time of the active hours + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default end time of the active hours", + SerializedName = @"defaultEndTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? DefaultEndTimeHour { get; set; } + /// The default start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default start time of the active hours.", + SerializedName = @"defaultStartTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? DefaultStartTimeHour { get; set; } + /// The default IANA timezone id of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default IANA timezone id of the active hours.", + SerializedName = @"defaultTimeZone", + PossibleTypes = new [] { typeof(string) })] + string DefaultTimeZone { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be kept awake during active hours.", + SerializedName = @"keepAwakeEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus? KeepAwakeEnableStatus { get; set; } + + } + /// Active hours configuration. + internal partial interface IActiveHoursConfigurationInternal + + { + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus? AutoStartEnableStatus { get; set; } + /// The default end time of the active hours + int? DefaultEndTimeHour { get; set; } + /// The default start time of the active hours. + int? DefaultStartTimeHour { get; set; } + /// The default IANA timezone id of the active hours. + string DefaultTimeZone { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus? KeepAwakeEnableStatus { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.json.cs new file mode 100644 index 000000000000..bde9b861e4fe --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Active hours configuration. + public partial class ActiveHoursConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ActiveHoursConfiguration(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_keepAwakeEnableStatus = If( json?.PropertyT("keepAwakeEnableStatus"), out var __jsonKeepAwakeEnableStatus) ? (string)__jsonKeepAwakeEnableStatus : (string)KeepAwakeEnableStatus;} + {_autoStartEnableStatus = If( json?.PropertyT("autoStartEnableStatus"), out var __jsonAutoStartEnableStatus) ? (string)__jsonAutoStartEnableStatus : (string)AutoStartEnableStatus;} + {_defaultTimeZone = If( json?.PropertyT("defaultTimeZone"), out var __jsonDefaultTimeZone) ? (string)__jsonDefaultTimeZone : (string)DefaultTimeZone;} + {_defaultStartTimeHour = If( json?.PropertyT("defaultStartTimeHour"), out var __jsonDefaultStartTimeHour) ? (int?)__jsonDefaultStartTimeHour : DefaultStartTimeHour;} + {_defaultEndTimeHour = If( json?.PropertyT("defaultEndTimeHour"), out var __jsonDefaultEndTimeHour) ? (int?)__jsonDefaultEndTimeHour : DefaultEndTimeHour;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ActiveHoursConfiguration(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._keepAwakeEnableStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._keepAwakeEnableStatus.ToString()) : null, "keepAwakeEnableStatus" ,container.Add ); + AddIf( null != (((object)this._autoStartEnableStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._autoStartEnableStatus.ToString()) : null, "autoStartEnableStatus" ,container.Add ); + AddIf( null != (((object)this._defaultTimeZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._defaultTimeZone.ToString()) : null, "defaultTimeZone" ,container.Add ); + AddIf( null != this._defaultStartTimeHour ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNumber((int)this._defaultStartTimeHour) : null, "defaultStartTimeHour" ,container.Add ); + AddIf( null != this._defaultEndTimeHour ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNumber((int)this._defaultEndTimeHour) : null, "defaultEndTimeHour" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentType.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentType.PowerShell.cs similarity index 77% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentType.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentType.PowerShell.cs index 1be1c54f621e..bf6bcd111297 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentType.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentType.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class AllowedEnvironmentType partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,61 +70,61 @@ internal AllowedEnvironmentType(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentTypePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentTypePropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal)this).DisplayName, 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. @@ -139,83 +139,83 @@ internal AllowedEnvironmentType(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentTypePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentTypePropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal)this).DisplayName, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AllowedEnvironmentType(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AllowedEnvironmentType(content); } @@ -225,7 +225,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentType.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentType.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentType.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentType.TypeConverter.cs index 89fa17832fbb..062cae5ec8a4 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentType.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentType.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentType.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentType.cs similarity index 76% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentType.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentType.cs index b90fd9501a1e..70050bde57c0 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentType.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentType.cs @@ -3,102 +3,102 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Represents an allowed environment type. public partial class AllowedEnvironmentType : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); /// The display name of the allowed environment type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal)Property).DisplayName; } + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal)Property).DisplayName; } /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } /// Internal Acessors for DisplayName - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal.DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal)Property).DisplayName = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal.DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal)Property).DisplayName = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentTypeProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentTypeProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeProperties _property; /// Properties of an allowed environment type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentTypeProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentTypeProperties()); set => this._property = value; } /// The provisioning state of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal)Property).ProvisioningState; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } /// Creates an new instance. public AllowedEnvironmentType() @@ -121,7 +121,7 @@ public AllowedEnvironmentType() /// Represents an allowed environment type. public partial interface IAllowedEnvironmentType : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource { /// The display name of the allowed environment type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -143,12 +143,12 @@ public partial interface IAllowedEnvironmentType : } /// Represents an allowed environment type. internal partial interface IAllowedEnvironmentTypeInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal { /// The display name of the allowed environment type. string DisplayName { get; set; } /// Properties of an allowed environment type. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeProperties Property { get; set; } /// The provisioning state of the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentType.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentType.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentType.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentType.json.cs index 194200612ae7..26e7f86bf0cd 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentType.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentType.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AllowedEnvironmentType(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Run { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentTypeProperties.FromJson(__jsonProperties) : Property;} + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentTypeProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new AllowedEnvironmentType(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeListResult.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeListResult.PowerShell.cs index 516080432f40..f6d1dfb1d1b5 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class AllowedEnvironmentTypeListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,17 +70,17 @@ internal AllowedEnvironmentTypeListResult(global::System.Collections.IDictionary // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentTypeTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentTypeTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResultInternal)this).NextLink, 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. @@ -95,39 +95,39 @@ internal AllowedEnvironmentTypeListResult(global::System.Management.Automation.P // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentTypeTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentTypeTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AllowedEnvironmentTypeListResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AllowedEnvironmentTypeListResult(content); } @@ -137,7 +137,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeListResult.TypeConverter.cs index 161f30fb99fa..56bbad82ad09 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeListResult.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeListResult.cs index d9b1135f49fe..050a2d02d995 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Result of the allowed environment type list operation. public partial class AllowedEnvironmentTypeListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class AllowedEnvironmentTypeListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType[] Value { get => this._value; } /// Creates an new instance. public AllowedEnvironmentTypeListResult() @@ -57,8 +57,8 @@ public partial interface IAllowedEnvironmentTypeListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType[] Value { get; } } /// Result of the allowed environment type list operation. @@ -68,7 +68,7 @@ internal partial interface IAllowedEnvironmentTypeListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeListResult.json.cs index 60e37e04e679..3af97963b8f6 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AllowedEnvironmentTypeListResult(Microsoft.Azure.PowerShell.Cmdlets.Dev { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AllowedEnvironmentType.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AllowedEnvironmentType.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new AllowedEnvironmentTypeListResult(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeProperties.PowerShell.cs similarity index 89% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeProperties.PowerShell.cs index 29c5ee13ae10..a70eed3d1442 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class AllowedEnvironmentTypeProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,17 +70,17 @@ internal AllowedEnvironmentTypeProperties(global::System.Collections.IDictionary // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal)this).DisplayName, 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. @@ -95,39 +95,39 @@ internal AllowedEnvironmentTypeProperties(global::System.Management.Automation.P // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal)this).DisplayName, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AllowedEnvironmentTypeProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AllowedEnvironmentTypeProperties(content); } @@ -137,7 +137,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeProperties.TypeConverter.cs index 65427a7c3e64..e139e278b5b3 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeProperties.cs similarity index 93% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeProperties.cs index 327d10012210..5c49625853a8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties of an allowed environment type. public partial class AllowedEnvironmentTypeProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal { /// Backing field for property. @@ -21,10 +21,10 @@ public partial class AllowedEnvironmentTypeProperties : public string DisplayName { get => this._displayName; } /// Internal Acessors for DisplayName - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal.DisplayName { get => this._displayName; set { {_displayName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal.DisplayName { get => this._displayName; set { {_displayName = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeProperties.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeProperties.json.cs index c108dd9ac025..b6d5a3dcd172 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AllowedEnvironmentTypeProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AllowedEnvironmentTypeProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -71,13 +71,13 @@ internal AllowedEnvironmentTypeProperties(Microsoft.Azure.PowerShell.Cmdlets.Dev } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new AllowedEnvironmentTypeProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnection.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnection.PowerShell.cs similarity index 77% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnection.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnection.PowerShell.cs index 06e83befa665..20c530082936 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnection.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnection.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class AttachedNetworkConnection partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,73 +70,73 @@ internal AttachedNetworkConnection(global::System.Collections.IDictionary conten // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnectionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnectionPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("NetworkConnectionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionId = (string) content.GetValueForProperty("NetworkConnectionId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionId = (string) content.GetValueForProperty("NetworkConnectionId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionId, global::System.Convert.ToString); } if (content.Contains("NetworkConnectionLocation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionLocation = (string) content.GetValueForProperty("NetworkConnectionLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionLocation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionLocation = (string) content.GetValueForProperty("NetworkConnectionLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionLocation, global::System.Convert.ToString); } if (content.Contains("HealthCheckStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); } if (content.Contains("DomainJoinType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType?) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType?) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); } 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. @@ -151,95 +151,95 @@ internal AttachedNetworkConnection(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnectionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnectionPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("NetworkConnectionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionId = (string) content.GetValueForProperty("NetworkConnectionId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionId = (string) content.GetValueForProperty("NetworkConnectionId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionId, global::System.Convert.ToString); } if (content.Contains("NetworkConnectionLocation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionLocation = (string) content.GetValueForProperty("NetworkConnectionLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionLocation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionLocation = (string) content.GetValueForProperty("NetworkConnectionLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).NetworkConnectionLocation, global::System.Convert.ToString); } if (content.Contains("HealthCheckStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); } if (content.Contains("DomainJoinType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType?) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType?) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AttachedNetworkConnection(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AttachedNetworkConnection(content); } @@ -249,7 +249,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnection.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnection.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnection.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnection.TypeConverter.cs index 7949acd7fbe4..e551b0bcf4ce 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnection.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnection.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnection.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnection.cs similarity index 79% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnection.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnection.cs index de6abd654cc5..33cbfeb31a23 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnection.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnection.cs @@ -3,124 +3,124 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Represents an attached NetworkConnection. public partial class AttachedNetworkConnection : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); /// /// AAD Join type of the network. This is populated based on the referenced Network Connection. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType? DomainJoinType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)Property).DomainJoinType; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType? DomainJoinType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)Property).DomainJoinType; } /// Health check status values [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? HealthCheckStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)Property).HealthCheckStatus; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? HealthCheckStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)Property).HealthCheckStatus; } /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } /// Internal Acessors for DomainJoinType - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal.DomainJoinType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)Property).DomainJoinType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)Property).DomainJoinType = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal.DomainJoinType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)Property).DomainJoinType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)Property).DomainJoinType = value; } /// Internal Acessors for HealthCheckStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal.HealthCheckStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)Property).HealthCheckStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)Property).HealthCheckStatus = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal.HealthCheckStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)Property).HealthCheckStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)Property).HealthCheckStatus = value; } /// Internal Acessors for NetworkConnectionLocation - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal.NetworkConnectionLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)Property).NetworkConnectionLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)Property).NetworkConnectionLocation = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal.NetworkConnectionLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)Property).NetworkConnectionLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)Property).NetworkConnectionLocation = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnectionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnectionProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } /// The resource ID of the NetworkConnection you want to attach. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string NetworkConnectionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)Property).NetworkConnectionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)Property).NetworkConnectionId = value ?? null; } + public string NetworkConnectionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)Property).NetworkConnectionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)Property).NetworkConnectionId = value ?? null; } /// /// The geo-location where the NetworkConnection resource specified in 'networkConnectionResourceId' property lives. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string NetworkConnectionLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)Property).NetworkConnectionLocation; } + public string NetworkConnectionLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)Property).NetworkConnectionLocation; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionProperties _property; /// Attached NetworkConnection properties. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnectionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnectionProperties()); set => this._property = value; } /// The provisioning state of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)Property).ProvisioningState; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } /// Creates an new instance. public AttachedNetworkConnection() @@ -143,7 +143,7 @@ public AttachedNetworkConnection() /// Represents an attached NetworkConnection. public partial interface IAttachedNetworkConnection : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource { /// /// AAD Join type of the network. This is populated based on the referenced Network Connection. @@ -193,7 +193,7 @@ public partial interface IAttachedNetworkConnection : } /// Represents an attached NetworkConnection. internal partial interface IAttachedNetworkConnectionInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal { /// /// AAD Join type of the network. This is populated based on the referenced Network Connection. @@ -208,7 +208,7 @@ internal partial interface IAttachedNetworkConnectionInternal : /// string NetworkConnectionLocation { get; set; } /// Attached NetworkConnection properties. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionProperties Property { get; set; } /// The provisioning state of the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnection.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnection.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnection.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnection.json.cs index b9cbf07fae81..b3e95976bfbe 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnection.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnection.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AttachedNetworkConnection(Microsoft.Azure.PowerShell.Cmdlets.DevCenter. { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnectionProperties.FromJson(__jsonProperties) : Property;} + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnectionProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new AttachedNetworkConnection(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnectionProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnectionProperties.PowerShell.cs similarity index 86% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnectionProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnectionProperties.PowerShell.cs index 3d4df6a21384..8a4f0e6f8a03 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnectionProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnectionProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class AttachedNetworkConnectionProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,29 +70,29 @@ internal AttachedNetworkConnectionProperties(global::System.Collections.IDiction // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("NetworkConnectionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionId = (string) content.GetValueForProperty("NetworkConnectionId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionId = (string) content.GetValueForProperty("NetworkConnectionId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionId, global::System.Convert.ToString); } if (content.Contains("NetworkConnectionLocation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionLocation = (string) content.GetValueForProperty("NetworkConnectionLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionLocation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionLocation = (string) content.GetValueForProperty("NetworkConnectionLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionLocation, global::System.Convert.ToString); } if (content.Contains("HealthCheckStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); } if (content.Contains("DomainJoinType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType?) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType?) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); } 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. @@ -107,51 +107,51 @@ internal AttachedNetworkConnectionProperties(global::System.Management.Automatio // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("NetworkConnectionId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionId = (string) content.GetValueForProperty("NetworkConnectionId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionId = (string) content.GetValueForProperty("NetworkConnectionId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionId, global::System.Convert.ToString); } if (content.Contains("NetworkConnectionLocation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionLocation = (string) content.GetValueForProperty("NetworkConnectionLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionLocation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionLocation = (string) content.GetValueForProperty("NetworkConnectionLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).NetworkConnectionLocation, global::System.Convert.ToString); } if (content.Contains("HealthCheckStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); } if (content.Contains("DomainJoinType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType?) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType?) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AttachedNetworkConnectionProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AttachedNetworkConnectionProperties(content); } @@ -163,7 +163,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnectionProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnectionProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnectionProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnectionProperties.TypeConverter.cs index 2cfea8656823..320b0f966be2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnectionProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnectionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnectionProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnectionProperties.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnectionProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnectionProperties.cs index 4a6790eaedfd..041c5b7fda04 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnectionProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnectionProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties of an attached NetworkConnection. public partial class AttachedNetworkConnectionProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal { /// Backing field for property. @@ -30,16 +30,16 @@ public partial class AttachedNetworkConnectionProperties : public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? HealthCheckStatus { get => this._healthCheckStatus; } /// Internal Acessors for DomainJoinType - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal.DomainJoinType { get => this._domainJoinType; set { {_domainJoinType = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal.DomainJoinType { get => this._domainJoinType; set { {_domainJoinType = value;} } } /// Internal Acessors for HealthCheckStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal.HealthCheckStatus { get => this._healthCheckStatus; set { {_healthCheckStatus = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal.HealthCheckStatus { get => this._healthCheckStatus; set { {_healthCheckStatus = value;} } } /// Internal Acessors for NetworkConnectionLocation - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal.NetworkConnectionLocation { get => this._networkConnectionLocation; set { {_networkConnectionLocation = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal.NetworkConnectionLocation { get => this._networkConnectionLocation; set { {_networkConnectionLocation = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Backing field for property. private string _networkConnectionId; diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnectionProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnectionProperties.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnectionProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnectionProperties.json.cs index 7aa18f0b2572..f53cb57727f7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkConnectionProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkConnectionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -74,13 +74,13 @@ internal AttachedNetworkConnectionProperties(Microsoft.Azure.PowerShell.Cmdlets. } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnectionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnectionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new AttachedNetworkConnectionProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkListResult.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkListResult.PowerShell.cs index 202db9c51ae8..c173a972bd2f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class AttachedNetworkListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,17 +70,17 @@ internal AttachedNetworkListResult(global::System.Collections.IDictionary conten // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnectionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResultInternal)this).NextLink, 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. @@ -95,39 +95,39 @@ internal AttachedNetworkListResult(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnectionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AttachedNetworkListResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AttachedNetworkListResult(content); } @@ -137,7 +137,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkListResult.TypeConverter.cs index 102a793a4391..facc6a9baaee 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkListResult.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkListResult.cs index 4f847f0fc52b..8ffe7d873deb 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Results of the Attached Networks list operation. public partial class AttachedNetworkListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class AttachedNetworkListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection[] Value { get => this._value; } /// Creates an new instance. public AttachedNetworkListResult() @@ -57,8 +57,8 @@ public partial interface IAttachedNetworkListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection[] Value { get; } } /// Results of the Attached Networks list operation. @@ -68,7 +68,7 @@ internal partial interface IAttachedNetworkListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkListResult.json.cs index 82eea4dd1210..8c05753eeb9f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/AttachedNetworkListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AttachedNetworkListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AttachedNetworkListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter. { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnection.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnection.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new AttachedNetworkListResult(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AzureAiServicesSettings.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AzureAiServicesSettings.PowerShell.cs new file mode 100644 index 000000000000..da94300bd334 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AzureAiServicesSettings.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Configures Azure AI related services for the project. + [System.ComponentModel.TypeConverter(typeof(AzureAiServicesSettingsTypeConverter))] + public partial class AzureAiServicesSettings + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AzureAiServicesSettings(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AzureAiServicesMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettingsInternal)this).AzureAiServicesMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode?) content.GetValueForProperty("AzureAiServicesMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettingsInternal)this).AzureAiServicesMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureAiServicesSettings(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AzureAiServicesMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettingsInternal)this).AzureAiServicesMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode?) content.GetValueForProperty("AzureAiServicesMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettingsInternal)this).AzureAiServicesMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureAiServicesSettings(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureAiServicesSettings(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Configures Azure AI related services for the project. + [System.ComponentModel.TypeConverter(typeof(AzureAiServicesSettingsTypeConverter))] + public partial interface IAzureAiServicesSettings + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AzureAiServicesSettings.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AzureAiServicesSettings.TypeConverter.cs new file mode 100644 index 000000000000..695c281c8c37 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AzureAiServicesSettings.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AzureAiServicesSettingsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AzureAiServicesSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AzureAiServicesSettings.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AzureAiServicesSettings.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AzureAiServicesSettings.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AzureAiServicesSettings.cs new file mode 100644 index 000000000000..b25fa56996ad --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AzureAiServicesSettings.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Configures Azure AI related services for the project. + public partial class AzureAiServicesSettings : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettingsInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode? _azureAiServicesMode; + + /// The property indicates whether Azure AI services is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode? AzureAiServicesMode { get => this._azureAiServicesMode; set => this._azureAiServicesMode = value; } + + /// Creates an new instance. + public AzureAiServicesSettings() + { + + } + } + /// Configures Azure AI related services for the project. + public partial interface IAzureAiServicesSettings : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// The property indicates whether Azure AI services is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether Azure AI services is enabled.", + SerializedName = @"azureAiServicesMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode? AzureAiServicesMode { get; set; } + + } + /// Configures Azure AI related services for the project. + internal partial interface IAzureAiServicesSettingsInternal + + { + /// The property indicates whether Azure AI services is enabled. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode? AzureAiServicesMode { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AzureAiServicesSettings.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AzureAiServicesSettings.json.cs new file mode 100644 index 000000000000..5ac5c2523b46 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/AzureAiServicesSettings.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Configures Azure AI related services for the project. + public partial class AzureAiServicesSettings + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal AzureAiServicesSettings(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_azureAiServicesMode = If( json?.PropertyT("azureAiServicesMode"), out var __jsonAzureAiServicesMode) ? (string)__jsonAzureAiServicesMode : (string)AzureAiServicesMode;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new AzureAiServicesSettings(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._azureAiServicesMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._azureAiServicesMode.ToString()) : null, "azureAiServicesMode" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Capability.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Capability.PowerShell.cs similarity index 87% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Capability.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Capability.PowerShell.cs index 0b85fc14b4ca..32fa8935a001 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Capability.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Capability.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class Capability partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,17 +70,17 @@ internal Capability(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapabilityInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapabilityInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapabilityInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapabilityInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapabilityInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapabilityInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapabilityInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapabilityInternal)this).Value, 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. @@ -95,37 +95,37 @@ internal Capability(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapabilityInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapabilityInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapabilityInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapabilityInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapabilityInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapabilityInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapabilityInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapabilityInternal)this).Value, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Capability(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Capability(content); } @@ -135,7 +135,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Capability.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Capability.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Capability.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Capability.TypeConverter.cs index 8edc04311169..cf08b125e7f3 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Capability.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Capability.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Capability.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Capability.cs similarity index 93% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Capability.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Capability.cs index 1a331b357301..a3259b1b3a2f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Capability.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Capability.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// A name/value pair to describe a capability. public partial class Capability : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapabilityInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapabilityInternal { /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapabilityInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapabilityInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Value - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapabilityInternal.Value { get => this._value; set { {_value = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapabilityInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _name; diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Capability.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Capability.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Capability.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Capability.json.cs index 6a8d20ec8e2a..57a30b5508e8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Capability.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Capability.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -71,13 +71,13 @@ internal Capability(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.Js } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Capability(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Catalog.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Catalog.PowerShell.cs new file mode 100644 index 000000000000..49cf5a614f3a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Catalog.PowerShell.cs @@ -0,0 +1,424 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents a catalog. + [System.ComponentModel.TypeConverter(typeof(CatalogTypeConverter))] + public partial class Catalog + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Catalog(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("GitHub")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); + } + if (content.Contains("AdoGit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); + } + if (content.Contains("SyncType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); + } + if (content.Contains("LastSyncStat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStat = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats) content.GetValueForProperty("LastSyncStat",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStat, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SyncStatsTypeConverter.ConvertFrom); + } + if (content.Contains("SyncState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).SyncState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState?) content.GetValueForProperty("SyncState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).SyncState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState.CreateFrom); + } + if (content.Contains("ConnectionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).ConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState?) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).ConnectionState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState.CreateFrom); + } + if (content.Contains("LastConnectionTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastConnectionTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectionTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastConnectionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastSyncTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncTime = (global::System.DateTime?) content.GetValueForProperty("LastSyncTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("GitHubUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubUri, global::System.Convert.ToString); + } + if (content.Contains("GitHubBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubBranch, global::System.Convert.ToString); + } + if (content.Contains("GitHubSecretIdentifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); + } + if (content.Contains("GitHubPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubPath, global::System.Convert.ToString); + } + if (content.Contains("AdoGitUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitUri, global::System.Convert.ToString); + } + if (content.Contains("AdoGitBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitBranch, global::System.Convert.ToString); + } + if (content.Contains("AdoGitSecretIdentifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); + } + if (content.Contains("AdoGitPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitPath, global::System.Convert.ToString); + } + if (content.Contains("LastSyncStatAdded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatAdded = (int?) content.GetValueForProperty("LastSyncStatAdded",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatAdded, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatUpdated = (int?) content.GetValueForProperty("LastSyncStatUpdated",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatUpdated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatUnchanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatUnchanged = (int?) content.GetValueForProperty("LastSyncStatUnchanged",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatUnchanged, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatRemoved")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatRemoved = (int?) content.GetValueForProperty("LastSyncStatRemoved",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatRemoved, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatValidationError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatValidationError = (int?) content.GetValueForProperty("LastSyncStatValidationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatValidationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatSynchronizationError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatSynchronizationError = (int?) content.GetValueForProperty("LastSyncStatSynchronizationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatSynchronizationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatSyncedCatalogItemType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatSyncedCatalogItemType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("LastSyncStatSyncedCatalogItemType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatSyncedCatalogItemType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Catalog(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("GitHub")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); + } + if (content.Contains("AdoGit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); + } + if (content.Contains("SyncType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); + } + if (content.Contains("LastSyncStat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStat = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats) content.GetValueForProperty("LastSyncStat",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStat, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SyncStatsTypeConverter.ConvertFrom); + } + if (content.Contains("SyncState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).SyncState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState?) content.GetValueForProperty("SyncState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).SyncState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState.CreateFrom); + } + if (content.Contains("ConnectionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).ConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState?) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).ConnectionState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState.CreateFrom); + } + if (content.Contains("LastConnectionTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastConnectionTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectionTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastConnectionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastSyncTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncTime = (global::System.DateTime?) content.GetValueForProperty("LastSyncTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("GitHubUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubUri, global::System.Convert.ToString); + } + if (content.Contains("GitHubBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubBranch, global::System.Convert.ToString); + } + if (content.Contains("GitHubSecretIdentifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); + } + if (content.Contains("GitHubPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).GitHubPath, global::System.Convert.ToString); + } + if (content.Contains("AdoGitUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitUri, global::System.Convert.ToString); + } + if (content.Contains("AdoGitBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitBranch, global::System.Convert.ToString); + } + if (content.Contains("AdoGitSecretIdentifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); + } + if (content.Contains("AdoGitPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).AdoGitPath, global::System.Convert.ToString); + } + if (content.Contains("LastSyncStatAdded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatAdded = (int?) content.GetValueForProperty("LastSyncStatAdded",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatAdded, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatUpdated = (int?) content.GetValueForProperty("LastSyncStatUpdated",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatUpdated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatUnchanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatUnchanged = (int?) content.GetValueForProperty("LastSyncStatUnchanged",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatUnchanged, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatRemoved")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatRemoved = (int?) content.GetValueForProperty("LastSyncStatRemoved",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatRemoved, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatValidationError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatValidationError = (int?) content.GetValueForProperty("LastSyncStatValidationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatValidationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatSynchronizationError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatSynchronizationError = (int?) content.GetValueForProperty("LastSyncStatSynchronizationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatSynchronizationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatSyncedCatalogItemType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatSyncedCatalogItemType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("LastSyncStatSyncedCatalogItemType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal)this).LastSyncStatSyncedCatalogItemType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Catalog(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Catalog(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents a catalog. + [System.ComponentModel.TypeConverter(typeof(CatalogTypeConverter))] + public partial interface ICatalog + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Catalog.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Catalog.TypeConverter.cs new file mode 100644 index 000000000000..48a4685ceb01 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Catalog.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CatalogTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Catalog.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Catalog.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Catalog.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Catalog.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Catalog.cs new file mode 100644 index 000000000000..63edbe2c00d9 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Catalog.cs @@ -0,0 +1,490 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a catalog. + public partial class Catalog : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); + + /// Git branch. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string AdoGitBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitBranch = value ?? null; } + + /// The folder where the catalog items can be found inside the repository. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string AdoGitPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitPath = value ?? null; } + + /// + /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string AdoGitSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitSecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitSecretIdentifier = value ?? null; } + + /// Git URI. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string AdoGitUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitUri = value ?? null; } + + /// The connection state of the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState? ConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).ConnectionState; } + + /// Git branch. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string GitHubBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubBranch = value ?? null; } + + /// The folder where the catalog items can be found inside the repository. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string GitHubPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubPath = value ?? null; } + + /// + /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string GitHubSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubSecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubSecretIdentifier = value ?? null; } + + /// Git URI. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string GitHubUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubUri = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } + + /// When the catalog was last connected. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public global::System.DateTime? LastConnectionTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastConnectionTime; } + + /// Count of catalog items added during synchronization. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? LastSyncStatAdded { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatAdded; } + + /// Count of catalog items removed during synchronization. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? LastSyncStatRemoved { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatRemoved; } + + /// Indicates catalog item types that were synced. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] LastSyncStatSyncedCatalogItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatSyncedCatalogItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatSyncedCatalogItemType = value ?? null /* arrayOf */; } + + /// Count of synchronization errors that occured during synchronization. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? LastSyncStatSynchronizationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatSynchronizationError; } + + /// Count of catalog items that were unchanged during synchronization. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? LastSyncStatUnchanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatUnchanged; } + + /// Count of catalog items updated during synchronization. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? LastSyncStatUpdated { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatUpdated; } + + /// Count of catalog items that had validation errors during synchronization. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? LastSyncStatValidationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatValidationError; } + + /// When the catalog was last synced. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public global::System.DateTime? LastSyncTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncTime; } + + /// Internal Acessors for AdoGit + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal.AdoGit { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGit; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGit = value; } + + /// Internal Acessors for ConnectionState + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal.ConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).ConnectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).ConnectionState = value; } + + /// Internal Acessors for GitHub + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal.GitHub { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHub; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHub = value; } + + /// Internal Acessors for LastConnectionTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal.LastConnectionTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastConnectionTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastConnectionTime = value; } + + /// Internal Acessors for LastSyncStat + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal.LastSyncStat { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStat; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStat = value; } + + /// Internal Acessors for LastSyncStatAdded + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal.LastSyncStatAdded { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatAdded; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatAdded = value; } + + /// Internal Acessors for LastSyncStatRemoved + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal.LastSyncStatRemoved { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatRemoved; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatRemoved = value; } + + /// Internal Acessors for LastSyncStatSynchronizationError + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal.LastSyncStatSynchronizationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatSynchronizationError; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatSynchronizationError = value; } + + /// Internal Acessors for LastSyncStatUnchanged + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal.LastSyncStatUnchanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatUnchanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatUnchanged = value; } + + /// Internal Acessors for LastSyncStatUpdated + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal.LastSyncStatUpdated { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatUpdated; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatUpdated = value; } + + /// Internal Acessors for LastSyncStatValidationError + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal.LastSyncStatValidationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatValidationError; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncStatValidationError = value; } + + /// Internal Acessors for LastSyncTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal.LastSyncTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).LastSyncTime = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for SyncState + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogInternal.SyncState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).SyncState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).SyncState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogProperties _property; + + /// Catalog properties. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogProperties()); set => this._property = value; } + + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).ProvisioningState; } + + /// The synchronization state of the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState? SyncState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)Property).SyncState; } + + /// Indicates the type of sync that is configured for the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType? SyncType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).SyncType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).SyncType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType)""); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).Tag = value ?? null /* model class */; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public Catalog() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Represents a catalog. + public partial interface ICatalog : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource + { + /// Git branch. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Git branch.", + SerializedName = @"branch", + PossibleTypes = new [] { typeof(string) })] + string AdoGitBranch { get; set; } + /// The folder where the catalog items can be found inside the repository. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The folder where the catalog items can be found inside the repository.", + SerializedName = @"path", + PossibleTypes = new [] { typeof(string) })] + string AdoGitPath { get; set; } + /// + /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A reference to the Key Vault secret containing a security token to authenticate to a Git repository.", + SerializedName = @"secretIdentifier", + PossibleTypes = new [] { typeof(string) })] + string AdoGitSecretIdentifier { get; set; } + /// Git URI. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Git URI.", + SerializedName = @"uri", + PossibleTypes = new [] { typeof(string) })] + string AdoGitUri { get; set; } + /// The connection state of the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The connection state of the catalog.", + SerializedName = @"connectionState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState? ConnectionState { get; } + /// Git branch. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Git branch.", + SerializedName = @"branch", + PossibleTypes = new [] { typeof(string) })] + string GitHubBranch { get; set; } + /// The folder where the catalog items can be found inside the repository. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The folder where the catalog items can be found inside the repository.", + SerializedName = @"path", + PossibleTypes = new [] { typeof(string) })] + string GitHubPath { get; set; } + /// + /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A reference to the Key Vault secret containing a security token to authenticate to a Git repository.", + SerializedName = @"secretIdentifier", + PossibleTypes = new [] { typeof(string) })] + string GitHubSecretIdentifier { get; set; } + /// Git URI. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Git URI.", + SerializedName = @"uri", + PossibleTypes = new [] { typeof(string) })] + string GitHubUri { get; set; } + /// When the catalog was last connected. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"When the catalog was last connected.", + SerializedName = @"lastConnectionTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastConnectionTime { get; } + /// Count of catalog items added during synchronization. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Count of catalog items added during synchronization.", + SerializedName = @"added", + PossibleTypes = new [] { typeof(int) })] + int? LastSyncStatAdded { get; } + /// Count of catalog items removed during synchronization. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Count of catalog items removed during synchronization.", + SerializedName = @"removed", + PossibleTypes = new [] { typeof(int) })] + int? LastSyncStatRemoved { get; } + /// Indicates catalog item types that were synced. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates catalog item types that were synced.", + SerializedName = @"syncedCatalogItemTypes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] LastSyncStatSyncedCatalogItemType { get; set; } + /// Count of synchronization errors that occured during synchronization. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Count of synchronization errors that occured during synchronization.", + SerializedName = @"synchronizationErrors", + PossibleTypes = new [] { typeof(int) })] + int? LastSyncStatSynchronizationError { get; } + /// Count of catalog items that were unchanged during synchronization. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Count of catalog items that were unchanged during synchronization.", + SerializedName = @"unchanged", + PossibleTypes = new [] { typeof(int) })] + int? LastSyncStatUnchanged { get; } + /// Count of catalog items updated during synchronization. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Count of catalog items updated during synchronization.", + SerializedName = @"updated", + PossibleTypes = new [] { typeof(int) })] + int? LastSyncStatUpdated { get; } + /// Count of catalog items that had validation errors during synchronization. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Count of catalog items that had validation errors during synchronization.", + SerializedName = @"validationErrors", + PossibleTypes = new [] { typeof(int) })] + int? LastSyncStatValidationError { get; } + /// When the catalog was last synced. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"When the catalog was last synced.", + SerializedName = @"lastSyncTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastSyncTime { get; } + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } + /// The synchronization state of the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The synchronization state of the catalog.", + SerializedName = @"syncState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState? SyncState { get; } + /// Indicates the type of sync that is configured for the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the type of sync that is configured for the catalog.", + SerializedName = @"syncType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType? SyncType { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get; set; } + + } + /// Represents a catalog. + internal partial interface ICatalogInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal + { + /// Properties for an Azure DevOps catalog type. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog AdoGit { get; set; } + /// Git branch. + string AdoGitBranch { get; set; } + /// The folder where the catalog items can be found inside the repository. + string AdoGitPath { get; set; } + /// + /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + /// + string AdoGitSecretIdentifier { get; set; } + /// Git URI. + string AdoGitUri { get; set; } + /// The connection state of the catalog. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState? ConnectionState { get; set; } + /// Properties for a GitHub catalog type. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog GitHub { get; set; } + /// Git branch. + string GitHubBranch { get; set; } + /// The folder where the catalog items can be found inside the repository. + string GitHubPath { get; set; } + /// + /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + /// + string GitHubSecretIdentifier { get; set; } + /// Git URI. + string GitHubUri { get; set; } + /// When the catalog was last connected. + global::System.DateTime? LastConnectionTime { get; set; } + /// Stats of the latest synchronization. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats LastSyncStat { get; set; } + /// Count of catalog items added during synchronization. + int? LastSyncStatAdded { get; set; } + /// Count of catalog items removed during synchronization. + int? LastSyncStatRemoved { get; set; } + /// Indicates catalog item types that were synced. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] LastSyncStatSyncedCatalogItemType { get; set; } + /// Count of synchronization errors that occured during synchronization. + int? LastSyncStatSynchronizationError { get; set; } + /// Count of catalog items that were unchanged during synchronization. + int? LastSyncStatUnchanged { get; set; } + /// Count of catalog items updated during synchronization. + int? LastSyncStatUpdated { get; set; } + /// Count of catalog items that had validation errors during synchronization. + int? LastSyncStatValidationError { get; set; } + /// When the catalog was last synced. + global::System.DateTime? LastSyncTime { get; set; } + /// Catalog properties. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogProperties Property { get; set; } + /// The provisioning state of the resource. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } + /// The synchronization state of the catalog. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState? SyncState { get; set; } + /// Indicates the type of sync that is configured for the catalog. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType? SyncType { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Catalog.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Catalog.json.cs new file mode 100644 index 000000000000..546a0cd88777 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Catalog.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a catalog. + public partial class Catalog + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal Catalog(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Catalog(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogConflictError.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogConflictError.PowerShell.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogConflictError.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogConflictError.PowerShell.cs index 52b888874c9a..cc33a6d86937 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogConflictError.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogConflictError.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CatalogConflictError partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,17 +70,17 @@ internal CatalogConflictError(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Path")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictErrorInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictErrorInternal)this).Path, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictErrorInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictErrorInternal)this).Path, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictErrorInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictErrorInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictErrorInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictErrorInternal)this).Name, 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. @@ -95,39 +95,39 @@ internal CatalogConflictError(global::System.Management.Automation.PSObject cont // actually deserialize if (content.Contains("Path")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictErrorInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictErrorInternal)this).Path, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictErrorInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictErrorInternal)this).Path, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictErrorInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictErrorInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictErrorInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictErrorInternal)this).Name, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CatalogConflictError(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CatalogConflictError(content); } @@ -137,7 +137,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogConflictError.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogConflictError.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogConflictError.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogConflictError.TypeConverter.cs index 30d54aa97054..172c17475823 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogConflictError.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogConflictError.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogConflictError.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogConflictError.cs similarity index 93% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogConflictError.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogConflictError.cs index 849778d62617..7ce8e2bbee16 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogConflictError.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogConflictError.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// An individual conflict error. public partial class CatalogConflictError : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictErrorInternal { /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictErrorInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictErrorInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Path - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictErrorInternal.Path { get => this._path; set { {_path = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictErrorInternal.Path { get => this._path; set { {_path = value;} } } /// Backing field for property. private string _name; diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogConflictError.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogConflictError.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogConflictError.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogConflictError.json.cs index a0dcf949c5b4..e59b60561779 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogConflictError.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogConflictError.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -71,13 +71,13 @@ internal CatalogConflictError(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runti } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CatalogConflictError(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogErrorDetails.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogErrorDetails.PowerShell.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogErrorDetails.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogErrorDetails.PowerShell.cs index ec1f94971a7c..df6405e0f694 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogErrorDetails.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogErrorDetails.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CatalogErrorDetails partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,17 +70,17 @@ internal CatalogErrorDetails(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetailsInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetailsInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetailsInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetailsInternal)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. @@ -95,39 +95,39 @@ internal CatalogErrorDetails(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetailsInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetailsInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetailsInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetailsInternal)this).Message, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CatalogErrorDetails(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CatalogErrorDetails(content); } @@ -137,7 +137,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogErrorDetails.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogErrorDetails.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogErrorDetails.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogErrorDetails.TypeConverter.cs index 1751869f93d1..969f3921f219 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogErrorDetails.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogErrorDetails.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogErrorDetails.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogErrorDetails.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogErrorDetails.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogErrorDetails.cs index 3bd68b1d6ff5..1ab639b3f1f2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogErrorDetails.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogErrorDetails.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Catalog error details public partial class CatalogErrorDetails : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetailsInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetailsInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogErrorDetails.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogErrorDetails.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogErrorDetails.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogErrorDetails.json.cs index 71b722f7116e..c38cfc4a5aa4 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogErrorDetails.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogErrorDetails.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -71,13 +71,13 @@ internal CatalogErrorDetails(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtim } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CatalogErrorDetails(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogListResult.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogListResult.PowerShell.cs index 2a08a5e919c1..6956141f10a7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CatalogListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,17 +70,17 @@ internal CatalogListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResultInternal)this).NextLink, 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. @@ -95,37 +95,37 @@ internal CatalogListResult(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CatalogListResult(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CatalogListResult(content); } @@ -135,7 +135,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogListResult.TypeConverter.cs index a2997b84026e..d6d80a0afa87 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogListResult.cs similarity index 86% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogListResult.cs index 64052f2955dd..0ae47de272f2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Results of the catalog list operation. public partial class CatalogListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class CatalogListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog[] Value { get => this._value; } /// Creates an new instance. public CatalogListResult() @@ -57,8 +57,8 @@ public partial interface ICatalogListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog[] Value { get; } } /// Results of the catalog list operation. @@ -68,7 +68,7 @@ internal partial interface ICatalogListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogListResult.json.cs index 6427231a5901..75dc733cb27e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,19 +65,19 @@ internal CatalogListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime. { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Catalog.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Catalog.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CatalogListResult(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogProperties.PowerShell.cs new file mode 100644 index 000000000000..aeba03bf8d71 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogProperties.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Properties of a catalog. + [System.ComponentModel.TypeConverter(typeof(CatalogPropertiesTypeConverter))] + public partial class CatalogProperties + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CatalogProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LastSyncStat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStat = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats) content.GetValueForProperty("LastSyncStat",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStat, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SyncStatsTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("SyncState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).SyncState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState?) content.GetValueForProperty("SyncState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).SyncState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState.CreateFrom); + } + if (content.Contains("ConnectionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).ConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState?) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).ConnectionState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState.CreateFrom); + } + if (content.Contains("LastConnectionTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastConnectionTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectionTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastConnectionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastSyncTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncTime = (global::System.DateTime?) content.GetValueForProperty("LastSyncTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("GitHubUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri, global::System.Convert.ToString); + } + if (content.Contains("GitHubBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch, global::System.Convert.ToString); + } + if (content.Contains("GitHubSecretIdentifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); + } + if (content.Contains("GitHubPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath, global::System.Convert.ToString); + } + if (content.Contains("AdoGitUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri, global::System.Convert.ToString); + } + if (content.Contains("AdoGitBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch, global::System.Convert.ToString); + } + if (content.Contains("AdoGitSecretIdentifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); + } + if (content.Contains("AdoGitPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath, global::System.Convert.ToString); + } + if (content.Contains("GitHub")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); + } + if (content.Contains("AdoGit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); + } + if (content.Contains("SyncType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); + } + if (content.Contains("LastSyncStatAdded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatAdded = (int?) content.GetValueForProperty("LastSyncStatAdded",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatAdded, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatUpdated = (int?) content.GetValueForProperty("LastSyncStatUpdated",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatUpdated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatUnchanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatUnchanged = (int?) content.GetValueForProperty("LastSyncStatUnchanged",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatUnchanged, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatRemoved")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatRemoved = (int?) content.GetValueForProperty("LastSyncStatRemoved",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatRemoved, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatValidationError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatValidationError = (int?) content.GetValueForProperty("LastSyncStatValidationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatValidationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatSynchronizationError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatSynchronizationError = (int?) content.GetValueForProperty("LastSyncStatSynchronizationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatSynchronizationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatSyncedCatalogItemType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatSyncedCatalogItemType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("LastSyncStatSyncedCatalogItemType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatSyncedCatalogItemType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CatalogProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LastSyncStat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStat = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats) content.GetValueForProperty("LastSyncStat",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStat, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SyncStatsTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("SyncState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).SyncState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState?) content.GetValueForProperty("SyncState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).SyncState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState.CreateFrom); + } + if (content.Contains("ConnectionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).ConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState?) content.GetValueForProperty("ConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).ConnectionState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState.CreateFrom); + } + if (content.Contains("LastConnectionTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastConnectionTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectionTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastConnectionTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastSyncTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncTime = (global::System.DateTime?) content.GetValueForProperty("LastSyncTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("GitHubUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri, global::System.Convert.ToString); + } + if (content.Contains("GitHubBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch, global::System.Convert.ToString); + } + if (content.Contains("GitHubSecretIdentifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); + } + if (content.Contains("GitHubPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath, global::System.Convert.ToString); + } + if (content.Contains("AdoGitUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri, global::System.Convert.ToString); + } + if (content.Contains("AdoGitBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch, global::System.Convert.ToString); + } + if (content.Contains("AdoGitSecretIdentifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); + } + if (content.Contains("AdoGitPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath, global::System.Convert.ToString); + } + if (content.Contains("GitHub")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); + } + if (content.Contains("AdoGit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); + } + if (content.Contains("SyncType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); + } + if (content.Contains("LastSyncStatAdded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatAdded = (int?) content.GetValueForProperty("LastSyncStatAdded",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatAdded, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatUpdated = (int?) content.GetValueForProperty("LastSyncStatUpdated",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatUpdated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatUnchanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatUnchanged = (int?) content.GetValueForProperty("LastSyncStatUnchanged",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatUnchanged, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatRemoved")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatRemoved = (int?) content.GetValueForProperty("LastSyncStatRemoved",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatRemoved, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatValidationError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatValidationError = (int?) content.GetValueForProperty("LastSyncStatValidationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatValidationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatSynchronizationError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatSynchronizationError = (int?) content.GetValueForProperty("LastSyncStatSynchronizationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatSynchronizationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LastSyncStatSyncedCatalogItemType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatSyncedCatalogItemType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("LastSyncStatSyncedCatalogItemType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal)this).LastSyncStatSyncedCatalogItemType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CatalogProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CatalogProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Properties of a catalog. + [System.ComponentModel.TypeConverter(typeof(CatalogPropertiesTypeConverter))] + public partial interface ICatalogProperties + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogProperties.TypeConverter.cs index 36e2e68e3dfc..d5eceeb254dc 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogProperties.cs similarity index 83% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogProperties.cs index 0c673468cda8..9a330456fc9c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogProperties.cs @@ -3,43 +3,43 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties of a catalog. public partial class CatalogProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties __catalogUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdateProperties(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties __catalogUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdateProperties(); /// Properties for an Azure DevOps catalog type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog AdoGit { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGit; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGit = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog AdoGit { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGit; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGit = value ?? null /* model class */; } /// Git branch. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string AdoGitBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitBranch = value ?? null; } + public string AdoGitBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitBranch = value ?? null; } /// The folder where the catalog items can be found inside the repository. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string AdoGitPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitPath = value ?? null; } + public string AdoGitPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitPath = value ?? null; } /// /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string AdoGitSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitSecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitSecretIdentifier = value ?? null; } + public string AdoGitSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitSecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitSecretIdentifier = value ?? null; } /// Git URI. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string AdoGitUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitUri = value ?? null; } + public string AdoGitUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).AdoGitUri = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState? _connectionState; @@ -50,25 +50,25 @@ public partial class CatalogProperties : /// Properties for a GitHub catalog type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog GitHub { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHub; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHub = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog GitHub { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHub; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHub = value ?? null /* model class */; } /// Git branch. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string GitHubBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubBranch = value ?? null; } + public string GitHubBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubBranch = value ?? null; } /// The folder where the catalog items can be found inside the repository. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string GitHubPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubPath = value ?? null; } + public string GitHubPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubPath = value ?? null; } /// /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string GitHubSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubSecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubSecretIdentifier = value ?? null; } + public string GitHubSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubSecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubSecretIdentifier = value ?? null; } /// Git URI. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string GitHubUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubUri = value ?? null; } + public string GitHubUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).GitHubUri = value ?? null; } /// Backing field for property. private global::System.DateTime? _lastConnectionTime; @@ -78,39 +78,39 @@ public partial class CatalogProperties : public global::System.DateTime? LastConnectionTime { get => this._lastConnectionTime; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats _lastSyncStat; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats _lastSyncStat; /// Stats of the latest synchronization. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats LastSyncStat { get => (this._lastSyncStat = this._lastSyncStat ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SyncStats()); } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats LastSyncStat { get => (this._lastSyncStat = this._lastSyncStat ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SyncStats()); } /// Count of catalog items added during synchronization. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? LastSyncStatAdded { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).Added; } + public int? LastSyncStatAdded { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).Added; } /// Count of catalog items removed during synchronization. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? LastSyncStatRemoved { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).Removed; } + public int? LastSyncStatRemoved { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).Removed; } /// Indicates catalog item types that were synced. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] LastSyncStatSyncedCatalogItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).SyncedCatalogItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).SyncedCatalogItemType = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] LastSyncStatSyncedCatalogItemType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).SyncedCatalogItemType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).SyncedCatalogItemType = value ?? null /* arrayOf */; } /// Count of synchronization errors that occured during synchronization. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? LastSyncStatSynchronizationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).SynchronizationError; } + public int? LastSyncStatSynchronizationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).SynchronizationError; } /// Count of catalog items that were unchanged during synchronization. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? LastSyncStatUnchanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).Unchanged; } + public int? LastSyncStatUnchanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).Unchanged; } /// Count of catalog items updated during synchronization. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? LastSyncStatUpdated { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).Updated; } + public int? LastSyncStatUpdated { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).Updated; } /// Count of catalog items that had validation errors during synchronization. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? LastSyncStatValidationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).ValidationError; } + public int? LastSyncStatValidationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).ValidationError; } /// Backing field for property. private global::System.DateTime? _lastSyncTime; @@ -120,40 +120,40 @@ public partial class CatalogProperties : public global::System.DateTime? LastSyncTime { get => this._lastSyncTime; } /// Internal Acessors for ConnectionState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal.ConnectionState { get => this._connectionState; set { {_connectionState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal.ConnectionState { get => this._connectionState; set { {_connectionState = value;} } } /// Internal Acessors for LastConnectionTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal.LastConnectionTime { get => this._lastConnectionTime; set { {_lastConnectionTime = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal.LastConnectionTime { get => this._lastConnectionTime; set { {_lastConnectionTime = value;} } } /// Internal Acessors for LastSyncStat - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal.LastSyncStat { get => (this._lastSyncStat = this._lastSyncStat ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SyncStats()); set { {_lastSyncStat = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal.LastSyncStat { get => (this._lastSyncStat = this._lastSyncStat ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SyncStats()); set { {_lastSyncStat = value;} } } /// Internal Acessors for LastSyncStatAdded - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal.LastSyncStatAdded { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).Added; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).Added = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal.LastSyncStatAdded { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).Added; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).Added = value; } /// Internal Acessors for LastSyncStatRemoved - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal.LastSyncStatRemoved { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).Removed; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).Removed = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal.LastSyncStatRemoved { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).Removed; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).Removed = value; } /// Internal Acessors for LastSyncStatSynchronizationError - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal.LastSyncStatSynchronizationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).SynchronizationError; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).SynchronizationError = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal.LastSyncStatSynchronizationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).SynchronizationError; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).SynchronizationError = value; } /// Internal Acessors for LastSyncStatUnchanged - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal.LastSyncStatUnchanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).Unchanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).Unchanged = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal.LastSyncStatUnchanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).Unchanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).Unchanged = value; } /// Internal Acessors for LastSyncStatUpdated - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal.LastSyncStatUpdated { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).Updated; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).Updated = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal.LastSyncStatUpdated { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).Updated; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).Updated = value; } /// Internal Acessors for LastSyncStatValidationError - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal.LastSyncStatValidationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).ValidationError; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)LastSyncStat).ValidationError = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal.LastSyncStatValidationError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).ValidationError; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)LastSyncStat).ValidationError = value; } /// Internal Acessors for LastSyncTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal.LastSyncTime { get => this._lastSyncTime; set { {_lastSyncTime = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal.LastSyncTime { get => this._lastSyncTime; set { {_lastSyncTime = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for SyncState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogPropertiesInternal.SyncState { get => this._syncState; set { {_syncState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogPropertiesInternal.SyncState { get => this._syncState; set { {_syncState = value;} } } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; @@ -171,11 +171,11 @@ public partial class CatalogProperties : /// Indicates the type of sync that is configured for the catalog. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType? SyncType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).SyncType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).SyncType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType? SyncType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).SyncType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).SyncType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType)""); } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)__catalogUpdateProperties).Tag = value ?? null /* model class */; } /// Creates an new instance. public CatalogProperties() @@ -198,7 +198,7 @@ public CatalogProperties() /// Properties of a catalog. public partial interface ICatalogProperties : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties { /// The connection state of the catalog. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -300,14 +300,14 @@ public partial interface ICatalogProperties : } /// Properties of a catalog. internal partial interface ICatalogPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal { /// The connection state of the catalog. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogConnectionState? ConnectionState { get; set; } /// When the catalog was last connected. global::System.DateTime? LastConnectionTime { get; set; } /// Stats of the latest synchronization. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats LastSyncStat { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats LastSyncStat { get; set; } /// Count of catalog items added during synchronization. int? LastSyncStatAdded { get; set; } /// Count of catalog items removed during synchronization. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogProperties.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogProperties.json.cs index dc9ef9c4eab6..f3c66356fac7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,8 +65,8 @@ internal CatalogProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime. { return; } - __catalogUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdateProperties(json); - {_lastSyncStat = If( json?.PropertyT("lastSyncStats"), out var __jsonLastSyncStats) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.SyncStats.FromJson(__jsonLastSyncStats) : LastSyncStat;} + __catalogUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdateProperties(json); + {_lastSyncStat = If( json?.PropertyT("lastSyncStats"), out var __jsonLastSyncStats) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SyncStats.FromJson(__jsonLastSyncStats) : LastSyncStat;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} {_syncState = If( json?.PropertyT("syncState"), out var __jsonSyncState) ? (string)__jsonSyncState : (string)SyncState;} {_connectionState = If( json?.PropertyT("connectionState"), out var __jsonConnectionState) ? (string)__jsonConnectionState : (string)ConnectionState;} @@ -76,13 +76,13 @@ internal CatalogProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime. } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CatalogProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogResourceValidationErrorDetails.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogResourceValidationErrorDetails.PowerShell.cs similarity index 87% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogResourceValidationErrorDetails.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogResourceValidationErrorDetails.PowerShell.cs index 215b74325977..041a028be780 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogResourceValidationErrorDetails.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogResourceValidationErrorDetails.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -58,7 +58,7 @@ public partial class CatalogResourceValidationErrorDetails partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -73,13 +73,13 @@ internal CatalogResourceValidationErrorDetails(global::System.Collections.IDicti // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetailsInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails[]) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetailsInternal)this).Error, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogErrorDetailsTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetailsInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails[]) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetailsInternal)this).Error, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogErrorDetailsTypeConverter.ConvertFrom)); } 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. @@ -94,35 +94,35 @@ internal CatalogResourceValidationErrorDetails(global::System.Management.Automat // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetailsInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails[]) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetailsInternal)this).Error, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogErrorDetailsTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetailsInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails[]) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetailsInternal)this).Error, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogErrorDetailsTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CatalogResourceValidationErrorDetails(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CatalogResourceValidationErrorDetails(content); } @@ -135,7 +135,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogResourceValidationErrorDetails.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogResourceValidationErrorDetails.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogResourceValidationErrorDetails.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogResourceValidationErrorDetails.TypeConverter.cs index e6efd77d387f..df68ad51b0e7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogResourceValidationErrorDetails.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogResourceValidationErrorDetails.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogResourceValidationErrorDetails.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogResourceValidationErrorDetails.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogResourceValidationErrorDetails.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogResourceValidationErrorDetails.cs index 829a6774741d..fb9e926d78e0 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogResourceValidationErrorDetails.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogResourceValidationErrorDetails.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -12,19 +12,19 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// the validity of the Catalog resource. /// public partial class CatalogResourceValidationErrorDetails : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetailsInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetailsInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails[] _error; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails[] _error; /// Errors associated with resources synchronized from the catalog. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails[] Error { get => this._error; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails[] Error { get => this._error; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetailsInternal.Error { get => this._error; set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetailsInternal.Error { get => this._error; set { {_error = value;} } } /// Creates an new instance. public CatalogResourceValidationErrorDetails() @@ -43,8 +43,8 @@ public partial interface ICatalogResourceValidationErrorDetails : ReadOnly = true, Description = @"Errors associated with resources synchronized from the catalog.", SerializedName = @"errors", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails[] Error { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails[] Error { get; } } /// List of validator error details. Populated when changes are made to the resource or its dependent resources that impact @@ -53,7 +53,7 @@ internal partial interface ICatalogResourceValidationErrorDetailsInternal { /// Errors associated with resources synchronized from the catalog. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails[] Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails[] Error { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogResourceValidationErrorDetails.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogResourceValidationErrorDetails.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogResourceValidationErrorDetails.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogResourceValidationErrorDetails.json.cs index 2c636f22c90b..e4962b9b1267 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogResourceValidationErrorDetails.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogResourceValidationErrorDetails.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -68,18 +68,18 @@ internal CatalogResourceValidationErrorDetails(Microsoft.Azure.PowerShell.Cmdlet { return; } - {_error = If( json?.PropertyT("errors"), out var __jsonErrors) ? If( __jsonErrors as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogErrorDetails.FromJson(__u) )) ))() : null : Error;} + {_error = If( json?.PropertyT("errors"), out var __jsonErrors) ? If( __jsonErrors as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogErrorDetails.FromJson(__u) )) ))() : null : Error;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CatalogResourceValidationErrorDetails(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogSyncError.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogSyncError.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogSyncError.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogSyncError.PowerShell.cs index 94981e6238b6..a3774e2d84ef 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogSyncError.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogSyncError.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CatalogSyncError partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,17 +70,17 @@ internal CatalogSyncError(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Path")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncErrorInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncErrorInternal)this).Path, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncErrorInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncErrorInternal)this).Path, global::System.Convert.ToString); } if (content.Contains("ErrorDetail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncErrorInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails[]) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncErrorInternal)this).ErrorDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogErrorDetailsTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncErrorInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails[]) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncErrorInternal)this).ErrorDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogErrorDetailsTypeConverter.ConvertFrom)); } 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. @@ -95,37 +95,37 @@ internal CatalogSyncError(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Path")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncErrorInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncErrorInternal)this).Path, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncErrorInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncErrorInternal)this).Path, global::System.Convert.ToString); } if (content.Contains("ErrorDetail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncErrorInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails[]) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncErrorInternal)this).ErrorDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogErrorDetailsTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncErrorInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails[]) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncErrorInternal)this).ErrorDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogErrorDetailsTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CatalogSyncError(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CatalogSyncError(content); } @@ -135,7 +135,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogSyncError.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogSyncError.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogSyncError.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogSyncError.TypeConverter.cs index bd7b333b1a0e..0a84e572dbfb 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogSyncError.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogSyncError.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogSyncError.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogSyncError.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogSyncError.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogSyncError.cs index a0e7db9bfe08..62749b9b173c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogSyncError.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogSyncError.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// An individual synchronization error. public partial class CatalogSyncError : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncErrorInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails[] _errorDetail; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails[] _errorDetail; /// Errors associated with the file. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails[] ErrorDetail { get => this._errorDetail; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails[] ErrorDetail { get => this._errorDetail; } /// Internal Acessors for ErrorDetail - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncErrorInternal.ErrorDetail { get => this._errorDetail; set { {_errorDetail = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncErrorInternal.ErrorDetail { get => this._errorDetail; set { {_errorDetail = value;} } } /// Internal Acessors for Path - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncErrorInternal.Path { get => this._path; set { {_path = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncErrorInternal.Path { get => this._path; set { {_path = value;} } } /// Backing field for property. private string _path; @@ -49,8 +49,8 @@ public partial interface ICatalogSyncError : ReadOnly = true, Description = @"Errors associated with the file.", SerializedName = @"errorDetails", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails[] ErrorDetail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails[] ErrorDetail { get; } /// The path of the file the error is associated with. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, @@ -66,7 +66,7 @@ internal partial interface ICatalogSyncErrorInternal { /// Errors associated with the file. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails[] ErrorDetail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails[] ErrorDetail { get; set; } /// The path of the file the error is associated with. string Path { get; set; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogSyncError.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogSyncError.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogSyncError.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogSyncError.json.cs index 979d43562a77..4fcab4b6d6b9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogSyncError.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogSyncError.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -66,18 +66,18 @@ internal CatalogSyncError(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.J return; } {_path = If( json?.PropertyT("path"), out var __jsonPath) ? (string)__jsonPath : (string)Path;} - {_errorDetail = If( json?.PropertyT("errorDetails"), out var __jsonErrorDetails) ? If( __jsonErrorDetails as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogErrorDetails.FromJson(__u) )) ))() : null : ErrorDetail;} + {_errorDetail = If( json?.PropertyT("errorDetails"), out var __jsonErrorDetails) ? If( __jsonErrorDetails as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogErrorDetails.FromJson(__u) )) ))() : null : ErrorDetail;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CatalogSyncError(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdate.PowerShell.cs similarity index 75% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdate.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdate.PowerShell.cs index 733c4b7785a0..72b3dda16d7b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdate.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdate.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -57,7 +57,7 @@ public partial class CatalogUpdate partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -72,61 +72,61 @@ internal CatalogUpdate(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("GitHub")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); } if (content.Contains("AdoGit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); } if (content.Contains("SyncType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); } if (content.Contains("GitHubUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubUri, global::System.Convert.ToString); } if (content.Contains("GitHubBranch")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubBranch, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubBranch, global::System.Convert.ToString); } if (content.Contains("GitHubSecretIdentifier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); } if (content.Contains("GitHubPath")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubPath, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubPath, global::System.Convert.ToString); } if (content.Contains("AdoGitUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitUri, global::System.Convert.ToString); } if (content.Contains("AdoGitBranch")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitBranch, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitBranch, global::System.Convert.ToString); } if (content.Contains("AdoGitSecretIdentifier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); } if (content.Contains("AdoGitPath")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitPath, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitPath, 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. @@ -141,81 +141,81 @@ internal CatalogUpdate(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("GitHub")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); } if (content.Contains("AdoGit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalogTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); } if (content.Contains("SyncType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); } if (content.Contains("GitHubUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubUri, global::System.Convert.ToString); } if (content.Contains("GitHubBranch")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubBranch, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubBranch, global::System.Convert.ToString); } if (content.Contains("GitHubSecretIdentifier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); } if (content.Contains("GitHubPath")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).GitHubPath, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).GitHubPath, global::System.Convert.ToString); } if (content.Contains("AdoGitUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitUri, global::System.Convert.ToString); } if (content.Contains("AdoGitBranch")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitBranch, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitBranch, global::System.Convert.ToString); } if (content.Contains("AdoGitSecretIdentifier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); } if (content.Contains("AdoGitPath")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal)this).AdoGitPath, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal)this).AdoGitPath, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CatalogUpdate(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CatalogUpdate(content); } @@ -225,7 +225,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdate.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdate.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdate.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdate.TypeConverter.cs index c8d71523725b..6201bf867344 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdate.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdate.cs similarity index 82% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdate.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdate.cs index 7826db9823a6..3f96ce99be30 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdate.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdate.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,69 +11,69 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// The catalog's properties for partial update. Properties not provided in the update request will not be changed. /// public partial class CatalogUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal { /// Git branch. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string AdoGitBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitBranch = value ?? null; } + public string AdoGitBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitBranch = value ?? null; } /// The folder where the catalog items can be found inside the repository. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string AdoGitPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitPath = value ?? null; } + public string AdoGitPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitPath = value ?? null; } /// /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string AdoGitSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitSecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitSecretIdentifier = value ?? null; } + public string AdoGitSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitSecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitSecretIdentifier = value ?? null; } /// Git URI. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string AdoGitUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitUri = value ?? null; } + public string AdoGitUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGitUri = value ?? null; } /// Git branch. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string GitHubBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubBranch = value ?? null; } + public string GitHubBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubBranch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubBranch = value ?? null; } /// The folder where the catalog items can be found inside the repository. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string GitHubPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubPath = value ?? null; } + public string GitHubPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubPath = value ?? null; } /// /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string GitHubSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubSecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubSecretIdentifier = value ?? null; } + public string GitHubSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubSecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubSecretIdentifier = value ?? null; } /// Git URI. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string GitHubUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHubUri = value ?? null; } + public string GitHubUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHubUri = value ?? null; } /// Internal Acessors for AdoGit - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal.AdoGit { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGit; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).AdoGit = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal.AdoGit { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGit; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).AdoGit = value; } /// Internal Acessors for GitHub - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal.GitHub { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHub; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).GitHub = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal.GitHub { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHub; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).GitHub = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdateProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdateProperties()); set { {_property = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties _property; /// Catalog properties for update. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdateProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdateProperties()); set => this._property = value; } /// Indicates the type of sync that is configured for the catalog. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType? SyncType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).SyncType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).SyncType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType? SyncType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).SyncType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).SyncType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType)""); } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal)Property).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)Property).Tag = value ?? null /* model class */; } /// Creates an new instance. public CatalogUpdate() @@ -167,8 +167,8 @@ public partial interface ICatalogUpdate : ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get; set; } } /// The catalog's properties for partial update. Properties not provided in the update request will not be changed. @@ -176,7 +176,7 @@ internal partial interface ICatalogUpdateInternal { /// Properties for an Azure DevOps catalog type. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog AdoGit { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog AdoGit { get; set; } /// Git branch. string AdoGitBranch { get; set; } /// The folder where the catalog items can be found inside the repository. @@ -188,7 +188,7 @@ internal partial interface ICatalogUpdateInternal /// Git URI. string AdoGitUri { get; set; } /// Properties for a GitHub catalog type. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog GitHub { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog GitHub { get; set; } /// Git branch. string GitHubBranch { get; set; } /// The folder where the catalog items can be found inside the repository. @@ -200,11 +200,11 @@ internal partial interface ICatalogUpdateInternal /// Git URI. string GitHubUri { get; set; } /// Catalog properties for update. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties Property { get; set; } /// Indicates the type of sync that is configured for the catalog. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType? SyncType { get; set; } /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdate.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdate.json.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdate.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdate.json.cs index 883a2a8f539d..bf8c23207a9e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdate.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -67,18 +67,18 @@ internal CatalogUpdate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdateProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdateProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CatalogUpdate(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdateProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..e45eddfd47b7 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdateProperties.PowerShell.cs @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// Properties of a catalog. These properties can be updated after the resource has been created. + /// + [System.ComponentModel.TypeConverter(typeof(CatalogUpdatePropertiesTypeConverter))] + public partial class CatalogUpdateProperties + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CatalogUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GitHub")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); + } + if (content.Contains("AdoGit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); + } + if (content.Contains("SyncType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); + } + if (content.Contains("GitHubUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri, global::System.Convert.ToString); + } + if (content.Contains("GitHubBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch, global::System.Convert.ToString); + } + if (content.Contains("GitHubSecretIdentifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); + } + if (content.Contains("GitHubPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath, global::System.Convert.ToString); + } + if (content.Contains("AdoGitUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri, global::System.Convert.ToString); + } + if (content.Contains("AdoGitBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch, global::System.Convert.ToString); + } + if (content.Contains("AdoGitSecretIdentifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); + } + if (content.Contains("AdoGitPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath, 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 CatalogUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GitHub")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHub = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("GitHub",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHub, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); + } + if (content.Contains("AdoGit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog) content.GetValueForProperty("AdoGit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalogTypeConverter.ConvertFrom); + } + if (content.Contains("SyncType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).SyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType?) content.GetValueForProperty("SyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).SyncType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType.CreateFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdatePropertiesTagsTypeConverter.ConvertFrom); + } + if (content.Contains("GitHubUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri = (string) content.GetValueForProperty("GitHubUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubUri, global::System.Convert.ToString); + } + if (content.Contains("GitHubBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch = (string) content.GetValueForProperty("GitHubBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubBranch, global::System.Convert.ToString); + } + if (content.Contains("GitHubSecretIdentifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier = (string) content.GetValueForProperty("GitHubSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubSecretIdentifier, global::System.Convert.ToString); + } + if (content.Contains("GitHubPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath = (string) content.GetValueForProperty("GitHubPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).GitHubPath, global::System.Convert.ToString); + } + if (content.Contains("AdoGitUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri = (string) content.GetValueForProperty("AdoGitUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitUri, global::System.Convert.ToString); + } + if (content.Contains("AdoGitBranch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch = (string) content.GetValueForProperty("AdoGitBranch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitBranch, global::System.Convert.ToString); + } + if (content.Contains("AdoGitSecretIdentifier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier = (string) content.GetValueForProperty("AdoGitSecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitSecretIdentifier, global::System.Convert.ToString); + } + if (content.Contains("AdoGitPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath = (string) content.GetValueForProperty("AdoGitPath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal)this).AdoGitPath, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CatalogUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CatalogUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Properties of a catalog. These properties can be updated after the resource has been created. + [System.ComponentModel.TypeConverter(typeof(CatalogUpdatePropertiesTypeConverter))] + public partial interface ICatalogUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdateProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdateProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdateProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdateProperties.TypeConverter.cs index f1516fbbf9a6..ac0264e95840 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdateProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdateProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdateProperties.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdateProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdateProperties.cs index 459a739cfb31..9c20ef79e0f8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdateProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdateProperties.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,65 +11,65 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// Properties of a catalog. These properties can be updated after the resource has been created. /// public partial class CatalogUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog _adoGit; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog _adoGit; /// Properties for an Azure DevOps catalog type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog AdoGit { get => (this._adoGit = this._adoGit ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalog()); set => this._adoGit = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog AdoGit { get => (this._adoGit = this._adoGit ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalog()); set => this._adoGit = value; } /// Git branch. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string AdoGitBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)AdoGit).Branch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)AdoGit).Branch = value ?? null; } + public string AdoGitBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)AdoGit).Branch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)AdoGit).Branch = value ?? null; } /// The folder where the catalog items can be found inside the repository. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string AdoGitPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)AdoGit).Path; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)AdoGit).Path = value ?? null; } + public string AdoGitPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)AdoGit).Path; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)AdoGit).Path = value ?? null; } /// /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string AdoGitSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)AdoGit).SecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)AdoGit).SecretIdentifier = value ?? null; } + public string AdoGitSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)AdoGit).SecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)AdoGit).SecretIdentifier = value ?? null; } /// Git URI. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string AdoGitUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)AdoGit).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)AdoGit).Uri = value ?? null; } + public string AdoGitUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)AdoGit).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)AdoGit).Uri = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog _gitHub; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog _gitHub; /// Properties for a GitHub catalog type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog GitHub { get => (this._gitHub = this._gitHub ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalog()); set => this._gitHub = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog GitHub { get => (this._gitHub = this._gitHub ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalog()); set => this._gitHub = value; } /// Git branch. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string GitHubBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)GitHub).Branch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)GitHub).Branch = value ?? null; } + public string GitHubBranch { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)GitHub).Branch; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)GitHub).Branch = value ?? null; } /// The folder where the catalog items can be found inside the repository. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string GitHubPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)GitHub).Path; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)GitHub).Path = value ?? null; } + public string GitHubPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)GitHub).Path; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)GitHub).Path = value ?? null; } /// /// A reference to the Key Vault secret containing a security token to authenticate to a Git repository. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string GitHubSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)GitHub).SecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)GitHub).SecretIdentifier = value ?? null; } + public string GitHubSecretIdentifier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)GitHub).SecretIdentifier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)GitHub).SecretIdentifier = value ?? null; } /// Git URI. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string GitHubUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)GitHub).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)GitHub).Uri = value ?? null; } + public string GitHubUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)GitHub).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)GitHub).Uri = value ?? null; } /// Internal Acessors for AdoGit - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal.AdoGit { get => (this._adoGit = this._adoGit ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalog()); set { {_adoGit = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal.AdoGit { get => (this._adoGit = this._adoGit ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalog()); set { {_adoGit = value;} } } /// Internal Acessors for GitHub - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesInternal.GitHub { get => (this._gitHub = this._gitHub ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalog()); set { {_gitHub = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesInternal.GitHub { get => (this._gitHub = this._gitHub ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalog()); set { {_gitHub = value;} } } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType? _syncType; @@ -79,11 +79,11 @@ public partial class CatalogUpdateProperties : public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType? SyncType { get => this._syncType; set => this._syncType = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags _tag; /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdatePropertiesTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdatePropertiesTags()); set => this._tag = value; } /// Creates an new instance. public CatalogUpdateProperties() @@ -177,8 +177,8 @@ public partial interface ICatalogUpdateProperties : ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get; set; } } /// Properties of a catalog. These properties can be updated after the resource has been created. @@ -186,7 +186,7 @@ internal partial interface ICatalogUpdatePropertiesInternal { /// Properties for an Azure DevOps catalog type. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog AdoGit { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog AdoGit { get; set; } /// Git branch. string AdoGitBranch { get; set; } /// The folder where the catalog items can be found inside the repository. @@ -198,7 +198,7 @@ internal partial interface ICatalogUpdatePropertiesInternal /// Git URI. string AdoGitUri { get; set; } /// Properties for a GitHub catalog type. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog GitHub { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog GitHub { get; set; } /// Git branch. string GitHubBranch { get; set; } /// The folder where the catalog items can be found inside the repository. @@ -212,7 +212,7 @@ internal partial interface ICatalogUpdatePropertiesInternal /// Indicates the type of sync that is configured for the catalog. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType? SyncType { get; set; } /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdateProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdateProperties.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdateProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdateProperties.json.cs index f630975a8f9c..768f513fc26c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdateProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -67,21 +67,21 @@ internal CatalogUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Ru { return; } - {_gitHub = If( json?.PropertyT("gitHub"), out var __jsonGitHub) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalog.FromJson(__jsonGitHub) : GitHub;} - {_adoGit = If( json?.PropertyT("adoGit"), out var __jsonAdoGit) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GitCatalog.FromJson(__jsonAdoGit) : AdoGit;} + {_gitHub = If( json?.PropertyT("gitHub"), out var __jsonGitHub) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalog.FromJson(__jsonGitHub) : GitHub;} + {_adoGit = If( json?.PropertyT("adoGit"), out var __jsonAdoGit) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GitCatalog.FromJson(__jsonAdoGit) : AdoGit;} {_syncType = If( json?.PropertyT("syncType"), out var __jsonSyncType) ? (string)__jsonSyncType : (string)SyncType;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdatePropertiesTags.FromJson(__jsonTags) : Tag;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdatePropertiesTags.FromJson(__jsonTags) : Tag;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CatalogUpdateProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdatePropertiesTags.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdatePropertiesTags.PowerShell.cs similarity index 92% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdatePropertiesTags.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdatePropertiesTags.PowerShell.cs index 7f97035499fa..afeeb5a4066c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdatePropertiesTags.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdatePropertiesTags.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CatalogUpdatePropertiesTags partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -74,7 +74,7 @@ internal CatalogUpdatePropertiesTags(global::System.Collections.IDictionary cont } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -93,29 +93,29 @@ internal CatalogUpdatePropertiesTags(global::System.Management.Automation.PSObje } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CatalogUpdatePropertiesTags(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CatalogUpdatePropertiesTags(content); } @@ -125,7 +125,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdatePropertiesTags.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdatePropertiesTags.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdatePropertiesTags.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdatePropertiesTags.TypeConverter.cs index 0101a4bc8f36..a97124715148 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdatePropertiesTags.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdatePropertiesTags.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdatePropertiesTags.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdatePropertiesTags.cs similarity index 91% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdatePropertiesTags.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdatePropertiesTags.cs index 69112d3ee2ba..b742e8db8f09 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdatePropertiesTags.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdatePropertiesTags.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Resource tags. public partial class CatalogUpdatePropertiesTags : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTagsInternal { /// Creates an new instance. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdatePropertiesTags.dictionary.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdatePropertiesTags.dictionary.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdatePropertiesTags.dictionary.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdatePropertiesTags.dictionary.cs index 825f670bf78e..d1c470d05556 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdatePropertiesTags.dictionary.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdatePropertiesTags.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdatePropertiesTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdatePropertiesTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdatePropertiesTags.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdatePropertiesTags.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdatePropertiesTags.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdatePropertiesTags.json.cs index 2a58272ec471..8763ad17150e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CatalogUpdatePropertiesTags.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CatalogUpdatePropertiesTags.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -71,13 +71,13 @@ internal CatalogUpdatePropertiesTags(Microsoft.Azure.PowerShell.Cmdlets.DevCente } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CatalogUpdatePropertiesTags(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CheckScopedNameAvailabilityRequest.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CheckScopedNameAvailabilityRequest.PowerShell.cs similarity index 87% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CheckScopedNameAvailabilityRequest.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CheckScopedNameAvailabilityRequest.PowerShell.cs index 6d783384a3de..c2ed3813b5ad 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CheckScopedNameAvailabilityRequest.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CheckScopedNameAvailabilityRequest.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CheckScopedNameAvailabilityRequest partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,21 +70,21 @@ internal CheckScopedNameAvailabilityRequest(global::System.Collections.IDictiona // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequestInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequestInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequestInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequestInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequestInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequestInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequestInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequestInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Scope")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequestInternal)this).Scope = (string) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequestInternal)this).Scope, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequestInternal)this).Scope = (string) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequestInternal)this).Scope, 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. @@ -99,43 +99,43 @@ internal CheckScopedNameAvailabilityRequest(global::System.Management.Automation // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequestInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequestInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequestInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequestInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequestInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequestInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequestInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequestInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Scope")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequestInternal)this).Scope = (string) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequestInternal)this).Scope, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequestInternal)this).Scope = (string) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequestInternal)this).Scope, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CheckScopedNameAvailabilityRequest(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CheckScopedNameAvailabilityRequest(content); } @@ -147,7 +147,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequest FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CheckScopedNameAvailabilityRequest.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CheckScopedNameAvailabilityRequest.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CheckScopedNameAvailabilityRequest.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CheckScopedNameAvailabilityRequest.TypeConverter.cs index 9b25f87e09d7..a5a59930d466 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CheckScopedNameAvailabilityRequest.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CheckScopedNameAvailabilityRequest.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequest ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequest ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequest).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequest).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CheckScopedNameAvailabilityRequest.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CheckScopedNameAvailabilityRequest.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CheckScopedNameAvailabilityRequest.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CheckScopedNameAvailabilityRequest.cs index 52b3baca8e4f..17f3b6c00ae5 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CheckScopedNameAvailabilityRequest.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CheckScopedNameAvailabilityRequest.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// The scoped name check availability request body. public partial class CheckScopedNameAvailabilityRequest : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequest, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequestInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequest, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequestInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CheckScopedNameAvailabilityRequest.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CheckScopedNameAvailabilityRequest.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CheckScopedNameAvailabilityRequest.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CheckScopedNameAvailabilityRequest.json.cs index 47b3844b6595..64076c1466e4 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CheckScopedNameAvailabilityRequest.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CheckScopedNameAvailabilityRequest.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -72,13 +72,13 @@ internal CheckScopedNameAvailabilityRequest(Microsoft.Azure.PowerShell.Cmdlets.D } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequest. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequest. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequest. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequest. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CheckScopedNameAvailabilityRequest(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.PowerShell.cs new file mode 100644 index 000000000000..7897df12b778 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.PowerShell.cs @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents a Task to be used in customizing a Dev Box. + [System.ComponentModel.TypeConverter(typeof(CustomizationTaskTypeConverter))] + public partial class CustomizationTask + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CustomizationTask(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskPropertiesInputsTypeConverter.ConvertFrom); + } + if (content.Contains("Timeout")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).Timeout = (int?) content.GetValueForProperty("Timeout",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).Timeout, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CustomizationTask(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskPropertiesInputsTypeConverter.ConvertFrom); + } + if (content.Contains("Timeout")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).Timeout = (int?) content.GetValueForProperty("Timeout",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).Timeout, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomizationTask(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomizationTask(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents a Task to be used in customizing a Dev Box. + [System.ComponentModel.TypeConverter(typeof(CustomizationTaskTypeConverter))] + public partial interface ICustomizationTask + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.TypeConverter.cs new file mode 100644 index 000000000000..5fbb5b7bd0fd --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CustomizationTaskTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CustomizationTask.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CustomizationTask.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CustomizationTask.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.cs new file mode 100644 index 000000000000..22b5f4e623cc --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a Task to be used in customizing a Dev Box. + public partial class CustomizationTask : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } + + /// Inputs to the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs Input { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)Property).Input; } + + /// Internal Acessors for Input + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal.Input { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)Property).Input; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)Property).Input = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskProperties()); set { {_property = value;} } } + + /// Internal Acessors for Timeout + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal.Timeout { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)Property).Timeout; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)Property).Timeout = value; } + + /// Internal Acessors for ValidationStatus + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInternal.ValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)Property).ValidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)Property).ValidationStatus = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskProperties _property; + + /// Task properties + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskProperties()); set => this._property = value; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// The default timeout for the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? Timeout { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)Property).Timeout; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } + + /// Validation status for the Task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)Property).ValidationStatus; } + + /// Creates an new instance. + public CustomizationTask() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Represents a Task to be used in customizing a Dev Box. + public partial interface ICustomizationTask : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource + { + /// Inputs to the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Inputs to the task.", + SerializedName = @"inputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs Input { get; } + /// The default timeout for the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The default timeout for the task.", + SerializedName = @"timeout", + PossibleTypes = new [] { typeof(int) })] + int? Timeout { get; } + /// Validation status for the Task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Validation status for the Task.", + SerializedName = @"validationStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get; } + + } + /// Represents a Task to be used in customizing a Dev Box. + internal partial interface ICustomizationTaskInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal + { + /// Inputs to the task. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs Input { get; set; } + /// Task properties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskProperties Property { get; set; } + /// The default timeout for the task. + int? Timeout { get; set; } + /// Validation status for the Task. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.json.cs new file mode 100644 index 000000000000..5a6e5ff1a971 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a Task to be used in customizing a Dev Box. + public partial class CustomizationTask + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal CustomizationTask(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CustomizationTask(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskInput.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInput.PowerShell.cs similarity index 87% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskInput.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInput.PowerShell.cs index 152bcd2d94ca..a8dbe3dce5e5 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskInput.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInput.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CustomizationTaskInput partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,21 +70,21 @@ internal CustomizationTaskInput(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CustomizationTaskInputType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CustomizationTaskInputType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CustomizationTaskInputType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CustomizationTaskInputType.CreateFrom); } if (content.Contains("Required")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } 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. @@ -99,43 +99,43 @@ internal CustomizationTaskInput(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CustomizationTaskInputType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CustomizationTaskInputType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CustomizationTaskInputType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CustomizationTaskInputType.CreateFrom); } if (content.Contains("Required")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInput DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInput DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CustomizationTaskInput(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CustomizationTaskInput(content); } @@ -145,7 +145,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskInput.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInput.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskInput.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInput.TypeConverter.cs index a251d53b0b23..1496ca68fddf 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskInput.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInput.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInput ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInput ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInput).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInput).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskInput.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInput.cs similarity index 93% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskInput.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInput.cs index 5fedb7adb64b..e960d99c07d7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskInput.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInput.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Input for a Task. public partial class CustomizationTaskInput : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInput, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInput, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal { /// Backing field for property. @@ -21,13 +21,13 @@ public partial class CustomizationTaskInput : public string Description { get => this._description; } /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal.Description { get => this._description; set { {_description = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal.Description { get => this._description; set { {_description = value;} } } /// Internal Acessors for Required - bool? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal.Required { get => this._required; set { {_required = value;} } } + bool? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal.Required { get => this._required; set { {_required = value;} } } /// Internal Acessors for Type - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CustomizationTaskInputType? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInputInternal.Type { get => this._type; set { {_type = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CustomizationTaskInputType? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInputInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private bool? _required; diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskInput.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInput.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskInput.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInput.json.cs index 3a13ccc63535..1faf5c5ec3a9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskInput.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInput.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -72,13 +72,13 @@ internal CustomizationTaskInput(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Run } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInput. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInput. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInput. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInput. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CustomizationTaskInput(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInstance.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInstance.PowerShell.cs new file mode 100644 index 000000000000..84a9f133a60c --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInstance.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// A customization task to run. + [System.ComponentModel.TypeConverter(typeof(CustomizationTaskInstanceTypeConverter))] + public partial class CustomizationTaskInstance + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CustomizationTaskInstance(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DefinitionParametersItemTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Condition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).Condition = (string) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).Condition, 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 CustomizationTaskInstance(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DefinitionParametersItemTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Condition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).Condition = (string) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal)this).Condition, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomizationTaskInstance(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomizationTaskInstance(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A customization task to run. + [System.ComponentModel.TypeConverter(typeof(CustomizationTaskInstanceTypeConverter))] + public partial interface ICustomizationTaskInstance + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInstance.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInstance.TypeConverter.cs new file mode 100644 index 000000000000..d73348c893c6 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInstance.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CustomizationTaskInstanceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CustomizationTaskInstance.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CustomizationTaskInstance.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CustomizationTaskInstance.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInstance.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInstance.cs new file mode 100644 index 000000000000..b7c0e0bfd59c --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInstance.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// A customization task to run. + public partial class CustomizationTaskInstance : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstanceInternal + { + + /// Backing field for property. + private string _condition; + + /// An expression that must evaluate to true in order for the task to run. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Condition { get => this._condition; set => this._condition = value; } + + /// Backing field for property. + private string _displayName; + + /// Display name to help differentiate multiple instances of the same task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private string _name; + + /// Name of the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[] _parameter; + + /// Parameters for the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[] Parameter { get => this._parameter; set => this._parameter = value; } + + /// Backing field for property. + private int? _timeoutInSecond; + + /// Timeout, in seconds. Overrides any timeout provided on the task definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public int? TimeoutInSecond { get => this._timeoutInSecond; set => this._timeoutInSecond = value; } + + /// Creates an new instance. + public CustomizationTaskInstance() + { + + } + } + /// A customization task to run. + public partial interface ICustomizationTaskInstance : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// An expression that must evaluate to true in order for the task to run. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An expression that must evaluate to true in order for the task to run.", + SerializedName = @"condition", + PossibleTypes = new [] { typeof(string) })] + string Condition { get; set; } + /// Display name to help differentiate multiple instances of the same task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display name to help differentiate multiple instances of the same task.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Name of the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the task.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// Parameters for the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Parameters for the task.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[] Parameter { get; set; } + /// Timeout, in seconds. Overrides any timeout provided on the task definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Timeout, in seconds. Overrides any timeout provided on the task definition.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? TimeoutInSecond { get; set; } + + } + /// A customization task to run. + internal partial interface ICustomizationTaskInstanceInternal + + { + /// An expression that must evaluate to true in order for the task to run. + string Condition { get; set; } + /// Display name to help differentiate multiple instances of the same task. + string DisplayName { get; set; } + /// Name of the task. + string Name { get; set; } + /// Parameters for the task. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[] Parameter { get; set; } + /// Timeout, in seconds. Overrides any timeout provided on the task definition. + int? TimeoutInSecond { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInstance.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInstance.json.cs new file mode 100644 index 000000000000..5a2870ec7b2a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskInstance.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// A customization task to run. + public partial class CustomizationTaskInstance + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal CustomizationTaskInstance(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? If( __jsonParameters as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DefinitionParametersItem.FromJson(__u) )) ))() : null : Parameter;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (int?)__jsonTimeoutInSeconds : TimeoutInSecond;} + {_condition = If( json?.PropertyT("condition"), out var __jsonCondition) ? (string)__jsonCondition : (string)Condition;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CustomizationTaskInstance(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + if (null != this._parameter) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); + foreach( var __x in this._parameter ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("parameters",__w); + } + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != this._timeoutInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNumber((int)this._timeoutInSecond) : null, "timeoutInSeconds" ,container.Add ); + AddIf( null != (((object)this._condition)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._condition.ToString()) : null, "condition" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListResult.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListResult.PowerShell.cs index 53d441e16f85..93f79836cdfe 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CustomizationTaskListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,17 +70,17 @@ internal CustomizationTaskListResult(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResultInternal)this).NextLink, 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. @@ -95,39 +95,39 @@ internal CustomizationTaskListResult(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CustomizationTaskListResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CustomizationTaskListResult(content); } @@ -137,7 +137,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListResult.TypeConverter.cs index cb7a371d5701..d39131a88b76 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListResult.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListResult.cs index 17e4b735efe7..6170859fdf0f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Results of the Task list operation. public partial class CustomizationTaskListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class CustomizationTaskListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask[] Value { get => this._value; } /// Creates an new instance. public CustomizationTaskListResult() @@ -57,8 +57,8 @@ public partial interface ICustomizationTaskListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask[] Value { get; } } /// Results of the Task list operation. @@ -68,7 +68,7 @@ internal partial interface ICustomizationTaskListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListResult.json.cs index 3add989532f1..2ce01f0a2a39 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,19 +65,19 @@ internal CustomizationTaskListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCente { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTask.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTask.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CustomizationTaskListResult(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskProperties.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskProperties.PowerShell.cs index 81578ce34d15..64b6b45e9403 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CustomizationTaskProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,21 +70,21 @@ internal CustomizationTaskProperties(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("Input")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskPropertiesInputsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskPropertiesInputsTypeConverter.ConvertFrom); } if (content.Contains("Timeout")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)this).Timeout = (int?) content.GetValueForProperty("Timeout",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)this).Timeout, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)this).Timeout = (int?) content.GetValueForProperty("Timeout",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)this).Timeout, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("ValidationStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); } 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. @@ -99,43 +99,43 @@ internal CustomizationTaskProperties(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("Input")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskPropertiesInputsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskPropertiesInputsTypeConverter.ConvertFrom); } if (content.Contains("Timeout")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)this).Timeout = (int?) content.GetValueForProperty("Timeout",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)this).Timeout, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)this).Timeout = (int?) content.GetValueForProperty("Timeout",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)this).Timeout, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("ValidationStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CustomizationTaskProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CustomizationTaskProperties(content); } @@ -145,7 +145,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskProperties.TypeConverter.cs index e2cb01119900..13f058ef89b9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskProperties.cs similarity index 86% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskProperties.cs index a01d16405048..82d694b1b3e6 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskProperties.cs @@ -3,31 +3,31 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties of a Task. public partial class CustomizationTaskProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs _input; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs _input; /// Inputs to the task. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs Input { get => (this._input = this._input ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskPropertiesInputs()); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs Input { get => (this._input = this._input ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskPropertiesInputs()); } /// Internal Acessors for Input - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal.Input { get => (this._input = this._input ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskPropertiesInputs()); set { {_input = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal.Input { get => (this._input = this._input ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskPropertiesInputs()); set { {_input = value;} } } /// Internal Acessors for Timeout - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal.Timeout { get => this._timeout; set { {_timeout = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal.Timeout { get => this._timeout; set { {_timeout = value;} } } /// Internal Acessors for ValidationStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInternal.ValidationStatus { get => this._validationStatus; set { {_validationStatus = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInternal.ValidationStatus { get => this._validationStatus; set { {_validationStatus = value;} } } /// Backing field for property. private int? _timeout; @@ -59,8 +59,8 @@ public partial interface ICustomizationTaskProperties : ReadOnly = true, Description = @"Inputs to the task.", SerializedName = @"inputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs Input { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs Input { get; } /// The default timeout for the task. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, @@ -84,7 +84,7 @@ internal partial interface ICustomizationTaskPropertiesInternal { /// Inputs to the task. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs Input { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs Input { get; set; } /// The default timeout for the task. int? Timeout { get; set; } /// Validation status for the Task. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskProperties.json.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskProperties.json.cs index 8d3b7bf38b03..45f107e4054b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,20 +65,20 @@ internal CustomizationTaskProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCente { return; } - {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskPropertiesInputs.FromJson(__jsonInputs) : Input;} + {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskPropertiesInputs.FromJson(__jsonInputs) : Input;} {_timeout = If( json?.PropertyT("timeout"), out var __jsonTimeout) ? (int?)__jsonTimeout : Timeout;} {_validationStatus = If( json?.PropertyT("validationStatus"), out var __jsonValidationStatus) ? (string)__jsonValidationStatus : (string)ValidationStatus;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CustomizationTaskProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskPropertiesInputs.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskPropertiesInputs.PowerShell.cs similarity index 92% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskPropertiesInputs.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskPropertiesInputs.PowerShell.cs index 6894a3542375..763d1189170e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskPropertiesInputs.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskPropertiesInputs.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CustomizationTaskPropertiesInputs partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -74,7 +74,7 @@ internal CustomizationTaskPropertiesInputs(global::System.Collections.IDictionar } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -93,29 +93,29 @@ internal CustomizationTaskPropertiesInputs(global::System.Management.Automation. } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CustomizationTaskPropertiesInputs(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CustomizationTaskPropertiesInputs(content); } @@ -127,7 +127,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskPropertiesInputs.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskPropertiesInputs.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskPropertiesInputs.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskPropertiesInputs.TypeConverter.cs index 09f5f3d363d5..5165dd0d4e19 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskPropertiesInputs.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskPropertiesInputs.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskPropertiesInputs.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskPropertiesInputs.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskPropertiesInputs.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskPropertiesInputs.cs index f4456242ad65..96222a045eb8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskPropertiesInputs.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskPropertiesInputs.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Inputs to the task. public partial class CustomizationTaskPropertiesInputs : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputsInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputsInternal { /// Creates an new instance. @@ -22,7 +22,7 @@ public CustomizationTaskPropertiesInputs() /// Inputs to the task. public partial interface ICustomizationTaskPropertiesInputs : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray { } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskPropertiesInputs.dictionary.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskPropertiesInputs.dictionary.cs similarity index 81% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskPropertiesInputs.dictionary.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskPropertiesInputs.dictionary.cs index d6a9545ecd5b..67f6b2ce0947 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskPropertiesInputs.dictionary.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskPropertiesInputs.dictionary.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; public partial class CustomizationTaskPropertiesInputs : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - int Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + int Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInput this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInput this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } /// /// - public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInput value) => __additionalProperties.Add( key, value); + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInput value) => __additionalProperties.Add( key, value); public void Clear() => __additionalProperties.Clear(); @@ -40,7 +40,7 @@ public void CopyFrom(global::System.Collections.IDictionary source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -55,7 +55,7 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -66,10 +66,10 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// /// - public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskInput value) => __additionalProperties.TryGetValue( key, out value); + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInput value) => __additionalProperties.TryGetValue( key, out value); /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskPropertiesInputs source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskPropertiesInputs source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskPropertiesInputs.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskPropertiesInputs.json.cs similarity index 94% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskPropertiesInputs.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskPropertiesInputs.json.cs index 9fa156424b37..2fc0815c02cf 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskPropertiesInputs.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskPropertiesInputs.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -66,18 +66,18 @@ internal CustomizationTaskPropertiesInputs(Microsoft.Azure.PowerShell.Cmdlets.De { return; } - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CustomizationTaskInput.FromJson(j) ,exclusions ); + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskInput.FromJson(j) ,exclusions ); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskPropertiesInputs FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskPropertiesInputs FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new CustomizationTaskPropertiesInputs(json) : null; } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson { return container; } - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, container); + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, container); AfterToJson(ref container); return container; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DefinitionParametersItem.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DefinitionParametersItem.PowerShell.cs new file mode 100644 index 000000000000..cdfee01758f2 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DefinitionParametersItem.PowerShell.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(DefinitionParametersItemTypeConverter))] + public partial class DefinitionParametersItem + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DefinitionParametersItem(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItemInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItemInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItemInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItemInternal)this).Value, 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 DefinitionParametersItem(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItemInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItemInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItemInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItemInternal)this).Value, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DefinitionParametersItem(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DefinitionParametersItem(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(DefinitionParametersItemTypeConverter))] + public partial interface IDefinitionParametersItem + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DefinitionParametersItem.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DefinitionParametersItem.TypeConverter.cs new file mode 100644 index 000000000000..4e6c907ab0f3 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DefinitionParametersItem.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DefinitionParametersItemTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DefinitionParametersItem.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DefinitionParametersItem.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DefinitionParametersItem.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DefinitionParametersItem.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DefinitionParametersItem.cs new file mode 100644 index 000000000000..cc8280658bb0 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DefinitionParametersItem.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + public partial class DefinitionParametersItem : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItemInternal + { + + /// Backing field for property. + private string _name; + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _value; + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public DefinitionParametersItem() + { + + } + } + public partial interface IDefinitionParametersItem : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string Value { get; set; } + + } + internal partial interface IDefinitionParametersItemInternal + + { + string Name { get; set; } + + string Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DefinitionParametersItem.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DefinitionParametersItem.json.cs new file mode 100644 index 000000000000..6c50a8cba9cc --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DefinitionParametersItem.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + public partial class DefinitionParametersItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal DefinitionParametersItem(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DefinitionParametersItem(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAutoDeleteSettings.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAutoDeleteSettings.PowerShell.cs new file mode 100644 index 000000000000..01ade6c3dbf8 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAutoDeleteSettings.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Settings controlling the auto deletion of inactive dev boxes. + [System.ComponentModel.TypeConverter(typeof(DevBoxAutoDeleteSettingsTypeConverter))] + public partial class DevBoxAutoDeleteSettings + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DevBoxAutoDeleteSettings(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DevBoxAutoDeleteSettings(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DevBoxAutoDeleteSettings(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeleteMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)this).DeleteMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode?) content.GetValueForProperty("DeleteMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)this).DeleteMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode.CreateFrom); + } + if (content.Contains("InactiveThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)this).InactiveThreshold = (string) content.GetValueForProperty("InactiveThreshold",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)this).InactiveThreshold, global::System.Convert.ToString); + } + if (content.Contains("GracePeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)this).GracePeriod = (string) content.GetValueForProperty("GracePeriod",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)this).GracePeriod, 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 DevBoxAutoDeleteSettings(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DeleteMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)this).DeleteMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode?) content.GetValueForProperty("DeleteMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)this).DeleteMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode.CreateFrom); + } + if (content.Contains("InactiveThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)this).InactiveThreshold = (string) content.GetValueForProperty("InactiveThreshold",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)this).InactiveThreshold, global::System.Convert.ToString); + } + if (content.Contains("GracePeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)this).GracePeriod = (string) content.GetValueForProperty("GracePeriod",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)this).GracePeriod, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Settings controlling the auto deletion of inactive dev boxes. + [System.ComponentModel.TypeConverter(typeof(DevBoxAutoDeleteSettingsTypeConverter))] + public partial interface IDevBoxAutoDeleteSettings + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAutoDeleteSettings.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAutoDeleteSettings.TypeConverter.cs new file mode 100644 index 000000000000..1e1d3011349e --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAutoDeleteSettings.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DevBoxAutoDeleteSettingsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DevBoxAutoDeleteSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DevBoxAutoDeleteSettings.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DevBoxAutoDeleteSettings.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAutoDeleteSettings.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAutoDeleteSettings.cs new file mode 100644 index 000000000000..45efc0f90a7f --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAutoDeleteSettings.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Settings controlling the auto deletion of inactive dev boxes. + public partial class DevBoxAutoDeleteSettings : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode? _deleteMode; + + /// Indicates the delete mode for Dev Boxes within this project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode? DeleteMode { get => this._deleteMode; set => this._deleteMode = value; } + + /// Backing field for property. + private string _gracePeriod; + + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string GracePeriod { get => this._gracePeriod; set => this._gracePeriod = value; } + + /// Backing field for property. + private string _inactiveThreshold; + + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string InactiveThreshold { get => this._inactiveThreshold; set => this._inactiveThreshold = value; } + + /// Creates an new instance. + public DevBoxAutoDeleteSettings() + { + + } + } + /// Settings controlling the auto deletion of inactive dev boxes. + public partial interface IDevBoxAutoDeleteSettings : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// Indicates the delete mode for Dev Boxes within this project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the delete mode for Dev Boxes within this project.", + SerializedName = @"deleteMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode? DeleteMode { get; set; } + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"gracePeriod", + PossibleTypes = new [] { typeof(string) })] + string GracePeriod { get; set; } + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"inactiveThreshold", + PossibleTypes = new [] { typeof(string) })] + string InactiveThreshold { get; set; } + + } + /// Settings controlling the auto deletion of inactive dev boxes. + internal partial interface IDevBoxAutoDeleteSettingsInternal + + { + /// Indicates the delete mode for Dev Boxes within this project. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode? DeleteMode { get; set; } + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + string GracePeriod { get; set; } + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + string InactiveThreshold { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAutoDeleteSettings.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAutoDeleteSettings.json.cs new file mode 100644 index 000000000000..2e4963cd42b1 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAutoDeleteSettings.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Settings controlling the auto deletion of inactive dev boxes. + public partial class DevBoxAutoDeleteSettings + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal DevBoxAutoDeleteSettings(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_deleteMode = If( json?.PropertyT("deleteMode"), out var __jsonDeleteMode) ? (string)__jsonDeleteMode : (string)DeleteMode;} + {_inactiveThreshold = If( json?.PropertyT("inactiveThreshold"), out var __jsonInactiveThreshold) ? (string)__jsonInactiveThreshold : (string)InactiveThreshold;} + {_gracePeriod = If( json?.PropertyT("gracePeriod"), out var __jsonGracePeriod) ? (string)__jsonGracePeriod : (string)GracePeriod;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevBoxAutoDeleteSettings(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._deleteMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._deleteMode.ToString()) : null, "deleteMode" ,container.Add ); + AddIf( null != (((object)this._inactiveThreshold)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._inactiveThreshold.ToString()) : null, "inactiveThreshold" ,container.Add ); + AddIf( null != (((object)this._gracePeriod)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._gracePeriod.ToString()) : null, "gracePeriod" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinition.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinition.PowerShell.cs new file mode 100644 index 000000000000..b2ef6beaab4d --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinition.PowerShell.cs @@ -0,0 +1,400 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents a definition for a Developer Machine. + [System.ComponentModel.TypeConverter(typeof(DevBoxDefinitionTypeConverter))] + public partial class DevBoxDefinition + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DevBoxDefinition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DevBoxDefinition(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DevBoxDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("HibernateSupport")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSStorageType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).OSStorageType, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails) content.GetValueForProperty("ImageValidationErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ImageValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus?) content.GetValueForProperty("ImageValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus.CreateFrom); + } + if (content.Contains("ValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + } + if (content.Contains("ImageValidationErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailCode = (string) content.GetValueForProperty("ImageValidationErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailMessage = (string) content.GetValueForProperty("ImageValidationErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailMessage, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceExactVersion, 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 DevBoxDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("HibernateSupport")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSStorageType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).OSStorageType, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails) content.GetValueForProperty("ImageValidationErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ImageValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus?) content.GetValueForProperty("ImageValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus.CreateFrom); + } + if (content.Contains("ValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + } + if (content.Contains("ImageValidationErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailCode = (string) content.GetValueForProperty("ImageValidationErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailMessage = (string) content.GetValueForProperty("ImageValidationErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ImageValidationErrorDetailMessage, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal)this).ActiveImageReferenceExactVersion, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents a definition for a Developer Machine. + [System.ComponentModel.TypeConverter(typeof(DevBoxDefinitionTypeConverter))] + public partial interface IDevBoxDefinition + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinition.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinition.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinition.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinition.TypeConverter.cs index 76c8ab3148e4..662672eaba73 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinition.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinition.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinition.cs similarity index 82% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinition.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinition.cs index d980427bf7f9..0b024fcc427b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinition.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinition.cs @@ -3,213 +3,213 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Represents a definition for a Developer Machine. public partial class DevBoxDefinition : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResource(); /// /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual /// version in use. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ActiveImageReferenceExactVersion; } + public string ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ActiveImageReferenceExactVersion; } /// /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string ActiveImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ActiveImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ActiveImageReferenceId = value ?? null; } + public string ActiveImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ActiveImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ActiveImageReferenceId = value ?? null; } /// /// Indicates whether Dev Boxes created with this definition are capable of hibernation. Not all images are capable of supporting /// hibernation. To find out more see https://aka.ms/devbox/hibernate /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? HibernateSupport { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).HibernateSupport; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).HibernateSupport = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? HibernateSupport { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).HibernateSupport; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).HibernateSupport = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport)""); } /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id; } /// /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual /// version in use. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceExactVersion; } + public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceExactVersion; } /// /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceId = value ?? null; } + public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceId = value ?? null; } /// An identifier for the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string ImageValidationErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationErrorDetailCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationErrorDetailCode = value ?? null; } + public string ImageValidationErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationErrorDetailCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationErrorDetailCode = value ?? null; } /// A message describing the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string ImageValidationErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationErrorDetailMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationErrorDetailMessage = value ?? null; } + public string ImageValidationErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationErrorDetailMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationErrorDetailMessage = value ?? null; } /// Validation status of the configured image. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? ImageValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationStatus; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? ImageValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationStatus; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Location = value ; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Location = value ; } /// Internal Acessors for ActiveImageReference - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal.ActiveImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ActiveImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ActiveImageReference = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal.ActiveImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ActiveImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ActiveImageReference = value; } /// Internal Acessors for ActiveImageReferenceExactVersion - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal.ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ActiveImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ActiveImageReferenceExactVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal.ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ActiveImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ActiveImageReferenceExactVersion = value; } /// Internal Acessors for ImageReference - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal.ImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReference = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal.ImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReference = value; } /// Internal Acessors for ImageReferenceExactVersion - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceExactVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceExactVersion = value; } /// Internal Acessors for ImageValidationErrorDetail - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal.ImageValidationErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationErrorDetail = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal.ImageValidationErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationErrorDetail = value; } /// Internal Acessors for ImageValidationStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal.ImageValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationStatus = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal.ImageValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ImageValidationStatus = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Sku - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal.Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).Sku = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal.Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).Sku = value; } /// Internal Acessors for ValidationStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionInternal.ValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ValidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ValidationStatus = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionInternal.ValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ValidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ValidationStatus = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name; } /// /// The storage type used for the Operating System disk of Dev Boxes created using this definition. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string OSStorageType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).OSStorageType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).OSStorageType = value ?? null; } + public string OSStorageType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).OSStorageType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).OSStorageType = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionProperties _property; /// Dev Box definition properties [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionProperties()); set => this._property = value; } /// The provisioning state of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ProvisioningState; } /// /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the /// resource this may be omitted. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuCapacity = value ?? default(int); } + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuCapacity = value ?? default(int); } /// /// If the service has different generations of hardware, for the same SKU, then that can be captured here. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuFamily = value ?? null; } + public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuFamily = value ?? null; } /// The name of the SKU. E.g. P3. It is typically a letter+number code [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuName = value ?? null; } + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuName = value ?? null; } /// /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuSize = value ?? null; } + public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuSize = value ?? null; } /// /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required /// on a PUT. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuTier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuTier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuTier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuTier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type; } /// Validation status for the Dev Box Definition. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)Property).ValidationStatus; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)Property).ValidationStatus; } /// Creates an new instance. public DevBoxDefinition() @@ -232,7 +232,7 @@ public DevBoxDefinition() /// Represents a definition for a Developer Machine. public partial interface IDevBoxDefinition : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource { /// /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual @@ -391,12 +391,12 @@ public partial interface IDevBoxDefinition : } /// Represents a definition for a Developer Machine. internal partial interface IDevBoxDefinitionInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal { /// /// Image reference information for the currently active image (only populated during updates). /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference ActiveImageReference { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ActiveImageReference { get; set; } /// /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual /// version in use. @@ -412,7 +412,7 @@ internal partial interface IDevBoxDefinitionInternal : /// Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? HibernateSupport { get; set; } /// Image reference information. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference ImageReference { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ImageReference { get; set; } /// /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual /// version in use. @@ -425,7 +425,7 @@ internal partial interface IDevBoxDefinitionInternal : /// /// Details for image validator error. Populated when the image validation is not successful. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails ImageValidationErrorDetail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails ImageValidationErrorDetail { get; set; } /// An identifier for the error. string ImageValidationErrorDetailCode { get; set; } /// A message describing the error. @@ -437,11 +437,11 @@ internal partial interface IDevBoxDefinitionInternal : /// string OSStorageType { get; set; } /// Dev Box definition properties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionProperties Property { get; set; } /// The provisioning state of the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } /// The SKU for Dev Boxes created using this definition. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku Sku { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku Sku { get; set; } /// /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the /// resource this may be omitted. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinition.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinition.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinition.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinition.json.cs index 99f8b703b4c4..6c6643681f4e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinition.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,19 +65,19 @@ internal DevBoxDefinition(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.J { return; } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionProperties.FromJson(__jsonProperties) : Property;} + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevBoxDefinition(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionListResult.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionListResult.PowerShell.cs index 9e0f98ee5751..a56f0f859793 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevBoxDefinitionListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevBoxDefinitionListResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevBoxDefinitionListResult(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,17 +98,17 @@ internal DevBoxDefinitionListResult(global::System.Collections.IDictionary conte // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResultInternal)this).NextLink, 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. @@ -123,11 +123,11 @@ internal DevBoxDefinitionListResult(global::System.Management.Automation.PSObjec // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -137,7 +137,7 @@ internal DevBoxDefinitionListResult(global::System.Management.Automation.PSObjec /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionListResult.TypeConverter.cs index ca2b6e48367b..591d581e1252 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionListResult.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionListResult.cs index 7a69449261c8..d3f9063dd016 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Results of the Dev Box definition list operation. public partial class DevBoxDefinitionListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class DevBoxDefinitionListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition[] Value { get => this._value; } /// Creates an new instance. public DevBoxDefinitionListResult() @@ -57,8 +57,8 @@ public partial interface IDevBoxDefinitionListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition[] Value { get; } } /// Results of the Dev Box definition list operation. @@ -68,7 +68,7 @@ internal partial interface IDevBoxDefinitionListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionListResult.json.cs index 6fe5ba67ac22..39feed6db15c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,19 +65,19 @@ internal DevBoxDefinitionListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinition.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinition.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevBoxDefinitionListResult(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionProperties.PowerShell.cs similarity index 75% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionProperties.PowerShell.cs index fbb0dc2f4d25..517074fa313f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevBoxDefinitionProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevBoxDefinitionProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevBoxDefinitionProperties(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,89 +98,89 @@ internal DevBoxDefinitionProperties(global::System.Collections.IDictionary conte // actually deserialize if (content.Contains("ImageValidationErrorDetail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails) content.GetValueForProperty("ImageValidationErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageValidationErrorDetailsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails) content.GetValueForProperty("ImageValidationErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetailsTypeConverter.ConvertFrom); } if (content.Contains("ActiveImageReference")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("ImageValidationStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus?) content.GetValueForProperty("ImageValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus?) content.GetValueForProperty("ImageValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus.CreateFrom); } if (content.Contains("ValidationStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); } if (content.Contains("ImageReferenceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); } if (content.Contains("ImageReferenceExactVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); } if (content.Contains("SkuName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName, global::System.Convert.ToString); } if (content.Contains("SkuTier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); } if (content.Contains("SkuSize")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize, global::System.Convert.ToString); } if (content.Contains("SkuFamily")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily, global::System.Convert.ToString); } if (content.Contains("SkuCapacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("ImageReference")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); } if (content.Contains("Sku")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SkuTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); } if (content.Contains("OSStorageType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType, global::System.Convert.ToString); } if (content.Contains("HibernateSupport")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); } if (content.Contains("ImageValidationErrorDetailCode")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailCode = (string) content.GetValueForProperty("ImageValidationErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailCode = (string) content.GetValueForProperty("ImageValidationErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailCode, global::System.Convert.ToString); } if (content.Contains("ImageValidationErrorDetailMessage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailMessage = (string) content.GetValueForProperty("ImageValidationErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailMessage = (string) content.GetValueForProperty("ImageValidationErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailMessage, global::System.Convert.ToString); } if (content.Contains("ActiveImageReferenceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); } if (content.Contains("ActiveImageReferenceExactVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceExactVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceExactVersion, 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. @@ -195,83 +195,83 @@ internal DevBoxDefinitionProperties(global::System.Management.Automation.PSObjec // actually deserialize if (content.Contains("ImageValidationErrorDetail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails) content.GetValueForProperty("ImageValidationErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageValidationErrorDetailsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails) content.GetValueForProperty("ImageValidationErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetailsTypeConverter.ConvertFrom); } if (content.Contains("ActiveImageReference")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("ImageValidationStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus?) content.GetValueForProperty("ImageValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus?) content.GetValueForProperty("ImageValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus.CreateFrom); } if (content.Contains("ValidationStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); } if (content.Contains("ImageReferenceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); } if (content.Contains("ImageReferenceExactVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); } if (content.Contains("SkuName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName, global::System.Convert.ToString); } if (content.Contains("SkuTier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); } if (content.Contains("SkuSize")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize, global::System.Convert.ToString); } if (content.Contains("SkuFamily")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily, global::System.Convert.ToString); } if (content.Contains("SkuCapacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("ImageReference")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); } if (content.Contains("Sku")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SkuTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); } if (content.Contains("OSStorageType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType, global::System.Convert.ToString); } if (content.Contains("HibernateSupport")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); } if (content.Contains("ImageValidationErrorDetailCode")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailCode = (string) content.GetValueForProperty("ImageValidationErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailCode = (string) content.GetValueForProperty("ImageValidationErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailCode, global::System.Convert.ToString); } if (content.Contains("ImageValidationErrorDetailMessage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailMessage = (string) content.GetValueForProperty("ImageValidationErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailMessage = (string) content.GetValueForProperty("ImageValidationErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ImageValidationErrorDetailMessage, global::System.Convert.ToString); } if (content.Contains("ActiveImageReferenceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); } if (content.Contains("ActiveImageReferenceExactVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceExactVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal)this).ActiveImageReferenceExactVersion, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -281,7 +281,7 @@ internal DevBoxDefinitionProperties(global::System.Management.Automation.PSObjec /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionProperties.TypeConverter.cs index 52c48d015a96..a86ad2ffb771 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionProperties.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionProperties.cs index 232808c5884a..9925121d8368 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionProperties.cs @@ -3,84 +3,84 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties of a Dev Box definition. public partial class DevBoxDefinitionProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties __devBoxDefinitionUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionUpdateProperties(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties __devBoxDefinitionUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionUpdateProperties(); /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference _activeImageReference; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference _activeImageReference; /// /// Image reference information for the currently active image (only populated during updates). /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference ActiveImageReference { get => (this._activeImageReference = this._activeImageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReference()); } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ActiveImageReference { get => (this._activeImageReference = this._activeImageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); } /// /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual /// version in use. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)ActiveImageReference).ExactVersion; } + public string ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ActiveImageReference).ExactVersion; } /// /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string ActiveImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)ActiveImageReference).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)ActiveImageReference).Id = value ?? null; } + public string ActiveImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ActiveImageReference).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ActiveImageReference).Id = value ?? null; } /// /// Indicates whether Dev Boxes created with this definition are capable of hibernation. Not all images are capable of supporting /// hibernation. To find out more see https://aka.ms/devbox/hibernate /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? HibernateSupport { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).HibernateSupport; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).HibernateSupport = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? HibernateSupport { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).HibernateSupport; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).HibernateSupport = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport)""); } /// Image reference information. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference ImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).ImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).ImageReference = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).ImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).ImageReference = value ?? null /* model class */; } /// /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual /// version in use. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).ImageReferenceExactVersion; } + public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).ImageReferenceExactVersion; } /// /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).ImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).ImageReferenceId = value ?? null; } + public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).ImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).ImageReferenceId = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails _imageValidationErrorDetail; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails _imageValidationErrorDetail; /// /// Details for image validator error. Populated when the image validation is not successful. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails ImageValidationErrorDetail { get => (this._imageValidationErrorDetail = this._imageValidationErrorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageValidationErrorDetails()); } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails ImageValidationErrorDetail { get => (this._imageValidationErrorDetail = this._imageValidationErrorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetails()); } /// An identifier for the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string ImageValidationErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetailsInternal)ImageValidationErrorDetail).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetailsInternal)ImageValidationErrorDetail).Code = value ?? null; } + public string ImageValidationErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)ImageValidationErrorDetail).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)ImageValidationErrorDetail).Code = value ?? null; } /// A message describing the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string ImageValidationErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetailsInternal)ImageValidationErrorDetail).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetailsInternal)ImageValidationErrorDetail).Message = value ?? null; } + public string ImageValidationErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)ImageValidationErrorDetail).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)ImageValidationErrorDetail).Message = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? _imageValidationStatus; @@ -90,31 +90,31 @@ public partial class DevBoxDefinitionProperties : public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? ImageValidationStatus { get => this._imageValidationStatus; } /// Internal Acessors for ActiveImageReference - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal.ActiveImageReference { get => (this._activeImageReference = this._activeImageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReference()); set { {_activeImageReference = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal.ActiveImageReference { get => (this._activeImageReference = this._activeImageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); set { {_activeImageReference = value;} } } /// Internal Acessors for ActiveImageReferenceExactVersion - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal.ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)ActiveImageReference).ExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)ActiveImageReference).ExactVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal.ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ActiveImageReference).ExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ActiveImageReference).ExactVersion = value; } /// Internal Acessors for ImageValidationErrorDetail - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal.ImageValidationErrorDetail { get => (this._imageValidationErrorDetail = this._imageValidationErrorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageValidationErrorDetails()); set { {_imageValidationErrorDetail = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal.ImageValidationErrorDetail { get => (this._imageValidationErrorDetail = this._imageValidationErrorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetails()); set { {_imageValidationErrorDetail = value;} } } /// Internal Acessors for ImageValidationStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal.ImageValidationStatus { get => this._imageValidationStatus; set { {_imageValidationStatus = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal.ImageValidationStatus { get => this._imageValidationStatus; set { {_imageValidationStatus = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for ValidationStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionPropertiesInternal.ValidationStatus { get => this._validationStatus; set { {_validationStatus = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionPropertiesInternal.ValidationStatus { get => this._validationStatus; set { {_validationStatus = value;} } } /// Internal Acessors for ImageReferenceExactVersion - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).ImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).ImageReferenceExactVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).ImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).ImageReferenceExactVersion = value; } /// /// The storage type used for the Operating System disk of Dev Boxes created using this definition. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string OSStorageType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).OSStorageType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).OSStorageType = value ?? null; } + public string OSStorageType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).OSStorageType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).OSStorageType = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; @@ -125,37 +125,37 @@ public partial class DevBoxDefinitionProperties : /// The SKU for Dev Boxes created using this definition. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).Sku = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).Sku = value ?? null /* model class */; } /// /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the /// resource this may be omitted. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuCapacity = value ?? default(int); } + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuCapacity = value ?? default(int); } /// /// If the service has different generations of hardware, for the same SKU, then that can be captured here. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuFamily = value ?? null; } + public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuFamily = value ?? null; } /// The name of the SKU. E.g. P3. It is typically a letter+number code [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuName = value ?? null; } + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuName = value ?? null; } /// /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuSize = value ?? null; } + public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuSize = value ?? null; } /// /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required /// on a PUT. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuTier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuTier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuTier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)__devBoxDefinitionUpdateProperties).SkuTier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? _validationStatus; @@ -185,7 +185,7 @@ public DevBoxDefinitionProperties() /// Properties of a Dev Box definition. public partial interface IDevBoxDefinitionProperties : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties { /// /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual @@ -252,12 +252,12 @@ public partial interface IDevBoxDefinitionProperties : } /// Properties of a Dev Box definition. internal partial interface IDevBoxDefinitionPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal { /// /// Image reference information for the currently active image (only populated during updates). /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference ActiveImageReference { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ActiveImageReference { get; set; } /// /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual /// version in use. @@ -270,7 +270,7 @@ internal partial interface IDevBoxDefinitionPropertiesInternal : /// /// Details for image validator error. Populated when the image validation is not successful. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails ImageValidationErrorDetail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails ImageValidationErrorDetail { get; set; } /// An identifier for the error. string ImageValidationErrorDetailCode { get; set; } /// A message describing the error. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionProperties.json.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionProperties.json.cs index f0261bc0b729..93b4d3e70bca 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,9 +65,9 @@ internal DevBoxDefinitionProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter { return; } - __devBoxDefinitionUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionUpdateProperties(json); - {_imageValidationErrorDetail = If( json?.PropertyT("imageValidationErrorDetails"), out var __jsonImageValidationErrorDetails) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageValidationErrorDetails.FromJson(__jsonImageValidationErrorDetails) : ImageValidationErrorDetail;} - {_activeImageReference = If( json?.PropertyT("activeImageReference"), out var __jsonActiveImageReference) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReference.FromJson(__jsonActiveImageReference) : ActiveImageReference;} + __devBoxDefinitionUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionUpdateProperties(json); + {_imageValidationErrorDetail = If( json?.PropertyT("imageValidationErrorDetails"), out var __jsonImageValidationErrorDetails) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetails.FromJson(__jsonImageValidationErrorDetails) : ImageValidationErrorDetail;} + {_activeImageReference = If( json?.PropertyT("activeImageReference"), out var __jsonActiveImageReference) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference.FromJson(__jsonActiveImageReference) : ActiveImageReference;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} {_imageValidationStatus = If( json?.PropertyT("imageValidationStatus"), out var __jsonImageValidationStatus) ? (string)__jsonImageValidationStatus : (string)ImageValidationStatus;} {_validationStatus = If( json?.PropertyT("validationStatus"), out var __jsonValidationStatus) ? (string)__jsonValidationStatus : (string)ValidationStatus;} @@ -75,13 +75,13 @@ internal DevBoxDefinitionProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevBoxDefinitionProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdate.PowerShell.cs similarity index 75% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdate.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdate.PowerShell.cs index 76385408d22c..0aed99d18b12 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdate.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdate.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevBoxDefinitionUpdate partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevBoxDefinitionUpdate(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevBoxDefinitionUpdate(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,65 +98,65 @@ internal DevBoxDefinitionUpdate(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("ImageReference")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); } if (content.Contains("Sku")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SkuTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); } if (content.Contains("HibernateSupport")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); } if (content.Contains("OSStorageType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).OSStorageType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).OSStorageType, global::System.Convert.ToString); } if (content.Contains("ImageReferenceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceId, global::System.Convert.ToString); } if (content.Contains("ImageReferenceExactVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); } if (content.Contains("SkuName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuName, global::System.Convert.ToString); } if (content.Contains("SkuTier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); } if (content.Contains("SkuSize")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuSize, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuSize, global::System.Convert.ToString); } if (content.Contains("SkuFamily")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuFamily, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuFamily, global::System.Convert.ToString); } if (content.Contains("SkuCapacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -171,59 +171,59 @@ internal DevBoxDefinitionUpdate(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("ImageReference")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); } if (content.Contains("Sku")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SkuTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); } if (content.Contains("HibernateSupport")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); } if (content.Contains("OSStorageType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).OSStorageType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).OSStorageType, global::System.Convert.ToString); } if (content.Contains("ImageReferenceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceId, global::System.Convert.ToString); } if (content.Contains("ImageReferenceExactVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); } if (content.Contains("SkuName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuName, global::System.Convert.ToString); } if (content.Contains("SkuTier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); } if (content.Contains("SkuSize")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuSize, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuSize, global::System.Convert.ToString); } if (content.Contains("SkuFamily")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuFamily, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuFamily, global::System.Convert.ToString); } if (content.Contains("SkuCapacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } @@ -233,7 +233,7 @@ internal DevBoxDefinitionUpdate(global::System.Management.Automation.PSObject co /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdate.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdate.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdate.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdate.TypeConverter.cs index 240e231eab33..4d92ee55fa57 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdate.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdate.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdate.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdate.cs index 4deba0dd9f9a..c4af74dd2934 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdate.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdate.cs @@ -3,104 +3,104 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Partial update of a Dev Box definition resource. public partial class DevBoxDefinitionUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdate, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdate, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate(); /// /// Indicates whether Dev Boxes created with this definition are capable of hibernation. Not all images are capable of supporting /// hibernation. To find out more see https://aka.ms/devbox/hibernate /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? HibernateSupport { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).HibernateSupport; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).HibernateSupport = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? HibernateSupport { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).HibernateSupport; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).HibernateSupport = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport)""); } /// /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual /// version in use. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceExactVersion; } + public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceExactVersion; } /// /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceId = value ?? null; } + public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceId = value ?? null; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location = value ?? null; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location = value ?? null; } /// Internal Acessors for ImageReference - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal.ImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReference = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal.ImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReference = value; } /// Internal Acessors for ImageReferenceExactVersion - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceExactVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).ImageReferenceExactVersion = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionUpdateProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionUpdateProperties()); set { {_property = value;} } } /// Internal Acessors for Sku - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateInternal.Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).Sku = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateInternal.Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).Sku = value; } /// /// The storage type used for the Operating System disk of Dev Boxes created using this definition. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string OSStorageType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).OSStorageType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).OSStorageType = value ?? null; } + public string OSStorageType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).OSStorageType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).OSStorageType = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties _property; /// Properties of a Dev Box definition to be updated. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionUpdateProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionUpdateProperties()); set => this._property = value; } /// /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the /// resource this may be omitted. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuCapacity = value ?? default(int); } + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuCapacity = value ?? default(int); } /// /// If the service has different generations of hardware, for the same SKU, then that can be captured here. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuFamily = value ?? null; } + public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuFamily = value ?? null; } /// The name of the SKU. E.g. P3. It is typically a letter+number code [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuName = value ?? null; } + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuName = value ?? null; } /// /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuSize = value ?? null; } + public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuSize = value ?? null; } /// /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required /// on a PUT. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuTier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuTier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuTier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)Property).SkuTier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag = value ?? null /* model class */; } /// Creates an new instance. public DevBoxDefinitionUpdate() @@ -123,7 +123,7 @@ public DevBoxDefinitionUpdate() /// Partial update of a Dev Box definition resource. public partial interface IDevBoxDefinitionUpdate : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate { /// /// Indicates whether Dev Boxes created with this definition are capable of hibernation. Not all images are capable of supporting @@ -221,7 +221,7 @@ public partial interface IDevBoxDefinitionUpdate : } /// Partial update of a Dev Box definition resource. internal partial interface IDevBoxDefinitionUpdateInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal { /// /// Indicates whether Dev Boxes created with this definition are capable of hibernation. Not all images are capable of supporting @@ -229,7 +229,7 @@ internal partial interface IDevBoxDefinitionUpdateInternal : /// Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? HibernateSupport { get; set; } /// Image reference information. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference ImageReference { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ImageReference { get; set; } /// /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual /// version in use. @@ -244,9 +244,9 @@ internal partial interface IDevBoxDefinitionUpdateInternal : /// string OSStorageType { get; set; } /// Properties of a Dev Box definition to be updated. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties Property { get; set; } /// The SKU for Dev Boxes created using this definition. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku Sku { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku Sku { get; set; } /// /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the /// resource this may be omitted. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdate.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdate.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdate.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdate.json.cs index e878a188c051..c82b805d4c18 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdate.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,19 +65,19 @@ internal DevBoxDefinitionUpdate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Run { return; } - __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionUpdateProperties.FromJson(__jsonProperties) : Property;} + __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionUpdateProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevBoxDefinitionUpdate(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdateProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdateProperties.PowerShell.cs similarity index 78% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdateProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdateProperties.PowerShell.cs index 7cf33d874c23..ce0d5ac47660 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdateProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdateProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -57,35 +57,35 @@ public partial class DevBoxDefinitionUpdateProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevBoxDefinitionUpdateProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevBoxDefinitionUpdateProperties(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -100,53 +100,53 @@ internal DevBoxDefinitionUpdateProperties(global::System.Collections.IDictionary // actually deserialize if (content.Contains("ImageReference")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); } if (content.Contains("Sku")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SkuTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); } if (content.Contains("OSStorageType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType, global::System.Convert.ToString); } if (content.Contains("HibernateSupport")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); } if (content.Contains("ImageReferenceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); } if (content.Contains("ImageReferenceExactVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); } if (content.Contains("SkuName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName, global::System.Convert.ToString); } if (content.Contains("SkuTier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); } if (content.Contains("SkuSize")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize, global::System.Convert.ToString); } if (content.Contains("SkuFamily")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily, global::System.Convert.ToString); } if (content.Contains("SkuCapacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -161,47 +161,47 @@ internal DevBoxDefinitionUpdateProperties(global::System.Management.Automation.P // actually deserialize if (content.Contains("ImageReference")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); } if (content.Contains("Sku")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SkuTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); } if (content.Contains("OSStorageType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType = (string) content.GetValueForProperty("OSStorageType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).OSStorageType, global::System.Convert.ToString); } if (content.Contains("HibernateSupport")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); } if (content.Contains("ImageReferenceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); } if (content.Contains("ImageReferenceExactVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); } if (content.Contains("SkuName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuName, global::System.Convert.ToString); } if (content.Contains("SkuTier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); } if (content.Contains("SkuSize")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuSize, global::System.Convert.ToString); } if (content.Contains("SkuFamily")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuFamily, global::System.Convert.ToString); } if (content.Contains("SkuCapacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } @@ -211,7 +211,7 @@ internal DevBoxDefinitionUpdateProperties(global::System.Management.Automation.P /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdateProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdateProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdateProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdateProperties.TypeConverter.cs index 2fc27f72b49b..cad98dd5ce37 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdateProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdateProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdateProperties.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdateProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdateProperties.cs index d2d207ffbf46..d609c5e81c5d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdateProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdateProperties.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// Properties of a Dev Box definition. These properties can be updated after the resource has been created. /// public partial class DevBoxDefinitionUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal { /// Backing field for property. @@ -26,33 +26,33 @@ public partial class DevBoxDefinitionUpdateProperties : public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? HibernateSupport { get => this._hibernateSupport; set => this._hibernateSupport = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference _imageReference; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference _imageReference; /// Image reference information. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReference()); set => this._imageReference = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); set => this._imageReference = value; } /// /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual /// version in use. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).ExactVersion; } + public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).ExactVersion; } /// /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).Id = value ?? null; } + public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Id = value ?? null; } /// Internal Acessors for ImageReference - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal.ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReference()); set { {_imageReference = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal.ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); set { {_imageReference = value;} } } /// Internal Acessors for ImageReferenceExactVersion - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).ExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).ExactVersion = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).ExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).ExactVersion = value; } /// Internal Acessors for Sku - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdatePropertiesInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Sku()); set { {_sku = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdatePropertiesInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Sku()); set { {_sku = value;} } } /// Backing field for property. private string _oSStorageType; @@ -64,41 +64,41 @@ public partial class DevBoxDefinitionUpdateProperties : public string OSStorageType { get => this._oSStorageType; set => this._oSStorageType = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku _sku; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku _sku; /// The SKU for Dev Boxes created using this definition. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Sku()); set => this._sku = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Sku()); set => this._sku = value; } /// /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the /// resource this may be omitted. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Capacity = value ?? default(int); } + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Capacity = value ?? default(int); } /// /// If the service has different generations of hardware, for the same SKU, then that can be captured here. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Family = value ?? null; } + public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Family = value ?? null; } /// The name of the SKU. E.g. P3. It is typically a letter+number code [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Name = value ?? null; } + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Name = value ?? null; } /// /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Size = value ?? null; } + public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Size = value ?? null; } /// /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required /// on a PUT. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)Sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } /// Creates an new instance. public DevBoxDefinitionUpdateProperties() @@ -214,7 +214,7 @@ internal partial interface IDevBoxDefinitionUpdatePropertiesInternal /// Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? HibernateSupport { get; set; } /// Image reference information. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageReference ImageReference { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ImageReference { get; set; } /// /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual /// version in use. @@ -229,7 +229,7 @@ internal partial interface IDevBoxDefinitionUpdatePropertiesInternal /// string OSStorageType { get; set; } /// The SKU for Dev Boxes created using this definition. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku Sku { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku Sku { get; set; } /// /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the /// resource this may be omitted. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdateProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdateProperties.json.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdateProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdateProperties.json.cs index 10e24c0f9152..6c7271fc9944 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxDefinitionUpdateProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxDefinitionUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -67,21 +67,21 @@ internal DevBoxDefinitionUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Dev { return; } - {_imageReference = If( json?.PropertyT("imageReference"), out var __jsonImageReference) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageReference.FromJson(__jsonImageReference) : ImageReference;} - {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Sku.FromJson(__jsonSku) : Sku;} + {_imageReference = If( json?.PropertyT("imageReference"), out var __jsonImageReference) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference.FromJson(__jsonImageReference) : ImageReference;} + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Sku.FromJson(__jsonSku) : Sku;} {_oSStorageType = If( json?.PropertyT("osStorageType"), out var __jsonOSStorageType) ? (string)__jsonOSStorageType : (string)OSStorageType;} {_hibernateSupport = If( json?.PropertyT("hibernateSupport"), out var __jsonHibernateSupport) ? (string)__jsonHibernateSupport : (string)HibernateSupport;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevBoxDefinitionUpdateProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxProvisioningSettings.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxProvisioningSettings.PowerShell.cs similarity index 90% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxProvisioningSettings.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxProvisioningSettings.PowerShell.cs index 17031416890d..928372eae632 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxProvisioningSettings.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxProvisioningSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevBoxProvisioningSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevBoxProvisioningSettings(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevBoxProvisioningSettings(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,13 +98,13 @@ internal DevBoxProvisioningSettings(global::System.Collections.IDictionary conte // actually deserialize if (content.Contains("InstallAzureMonitorAgentEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettingsInternal)this).InstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("InstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettingsInternal)this).InstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettingsInternal)this).InstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("InstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettingsInternal)this).InstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); } 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. @@ -119,7 +119,7 @@ internal DevBoxProvisioningSettings(global::System.Management.Automation.PSObjec // actually deserialize if (content.Contains("InstallAzureMonitorAgentEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettingsInternal)this).InstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("InstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettingsInternal)this).InstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettingsInternal)this).InstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("InstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettingsInternal)this).InstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); } AfterDeserializePSObject(content); } @@ -129,7 +129,7 @@ internal DevBoxProvisioningSettings(global::System.Management.Automation.PSObjec /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxProvisioningSettings.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxProvisioningSettings.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxProvisioningSettings.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxProvisioningSettings.TypeConverter.cs index 821363bd05d0..6aad136cb000 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxProvisioningSettings.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxProvisioningSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxProvisioningSettings.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxProvisioningSettings.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxProvisioningSettings.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxProvisioningSettings.cs index 6aa05737ed70..42fd3ae2c8ae 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxProvisioningSettings.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxProvisioningSettings.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Provisioning settings that apply to all Dev Boxes created in this dev center public partial class DevBoxProvisioningSettings : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettingsInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxProvisioningSettings.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxProvisioningSettings.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxProvisioningSettings.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxProvisioningSettings.json.cs index d0550b3d8a68..e33eafe820da 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevBoxProvisioningSettings.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevBoxProvisioningSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -70,13 +70,13 @@ internal DevBoxProvisioningSettings(Microsoft.Azure.PowerShell.Cmdlets.DevCenter } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevBoxProvisioningSettings(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenter.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenter.PowerShell.cs new file mode 100644 index 000000000000..0dd5a934ef4d --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenter.PowerShell.cs @@ -0,0 +1,408 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents a devcenter resource. + [System.ComponentModel.TypeConverter(typeof(DevCenterTypeConverter))] + public partial class DevCenter + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DevCenter(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DevCenter(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DevCenter(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("ProjectCatalogSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("NetworkSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxProvisioningSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("EncryptionCustomerManagedKeyEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("ProjectCatalogSettingCatalogItemSyncEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); + } + if (content.Contains("NetworkSettingMicrosoftHostedNetworkEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); + } + if (content.Contains("CustomerManagedKeyEncryptionKeyIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("CustomerManagedKeyEncryptionKeyUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); + } + if (content.Contains("KeyEncryptionKeyIdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); + } + if (content.Contains("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); + } + if (content.Contains("KeyEncryptionKeyIdentityDelegatedIdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, 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 DevCenter(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("ProjectCatalogSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("NetworkSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxProvisioningSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("EncryptionCustomerManagedKeyEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("ProjectCatalogSettingCatalogItemSyncEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); + } + if (content.Contains("NetworkSettingMicrosoftHostedNetworkEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); + } + if (content.Contains("CustomerManagedKeyEncryptionKeyIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("CustomerManagedKeyEncryptionKeyUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); + } + if (content.Contains("KeyEncryptionKeyIdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); + } + if (content.Contains("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); + } + if (content.Contains("KeyEncryptionKeyIdentityDelegatedIdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents a devcenter resource. + [System.ComponentModel.TypeConverter(typeof(DevCenterTypeConverter))] + public partial interface IDevCenter + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenter.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenter.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenter.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenter.TypeConverter.cs index 1b9b2944dfbb..804dfc67a75b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenter.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenter.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenter.cs similarity index 83% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenter.cs index 7beedfccd059..e95d808ee821 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenter.cs @@ -3,44 +3,44 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Represents a devcenter resource. public partial class DevCenter : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResource(); /// /// key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 /// or https://contosovault.vault.azure.net/keys/contosokek. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string CustomerManagedKeyEncryptionKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyUrl = value ?? null; } + public string CustomerManagedKeyEncryptionKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyUrl = value ?? null; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus? DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus? DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus)""); } /// The display name of the devcenter. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).DisplayName = value ?? null; } /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity _identity; @@ -81,11 +81,11 @@ public partial class DevCenter : /// and userAssignedIdentity - internal use only. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string KeyEncryptionKeyIdentityDelegatedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityDelegatedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityDelegatedIdentityClientId = value ?? null; } + public string KeyEncryptionKeyIdentityDelegatedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityDelegatedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityDelegatedIdentityClientId = value ?? null; } /// Values can be systemAssignedIdentity or userAssignedIdentity [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType? KeyEncryptionKeyIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType? KeyEncryptionKeyIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType)""); } /// /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/ [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string KeyEncryptionKeyIdentityUserAssignedIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = value ?? null; } + public string KeyEncryptionKeyIdentityUserAssignedIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = value ?? null; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Location = value ; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Location = value ; } /// Internal Acessors for CustomerManagedKeyEncryptionKeyIdentity - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal.CustomerManagedKeyEncryptionKeyIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal.CustomerManagedKeyEncryptionKeyIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyIdentity = value; } /// Internal Acessors for DevBoxProvisioningSetting - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal.DevBoxProvisioningSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSetting = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal.DevBoxProvisioningSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSetting = value; } /// Internal Acessors for Encryption - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal.Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).Encryption = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal.Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).Encryption = value; } /// Internal Acessors for EncryptionCustomerManagedKeyEncryption - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal.EncryptionCustomerManagedKeyEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).EncryptionCustomerManagedKeyEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).EncryptionCustomerManagedKeyEncryption = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal.EncryptionCustomerManagedKeyEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).EncryptionCustomerManagedKeyEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).EncryptionCustomerManagedKeyEncryption = value; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } /// Internal Acessors for NetworkSetting - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal.NetworkSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSetting = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal.NetworkSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSetting = value; } /// Internal Acessors for ProjectCatalogSetting - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal.ProjectCatalogSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSetting = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal.ProjectCatalogSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSetting = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Uri - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterInternal.Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal)Property).DevCenterUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal)Property).DevCenterUri = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterInternal.Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal)Property).DevCenterUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal)Property).DevCenterUri = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name; } /// /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSettingMicrosoftHostedNetworkEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSettingMicrosoftHostedNetworkEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus)""); } - - /// Resource Id of an associated Plan - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string PlanId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).PlanId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).PlanId = value ?? null; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSettingMicrosoftHostedNetworkEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSettingMicrosoftHostedNetworkEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus)""); } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus? ProjectCatalogSettingCatalogItemSyncEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSettingCatalogItemSyncEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSettingCatalogItemSyncEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus? ProjectCatalogSettingCatalogItemSyncEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSettingCatalogItemSyncEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSettingCatalogItemSyncEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus)""); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProperties _property; /// DevCenter properties [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProperties()); set => this._property = value; } /// The provisioning state of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal)Property).ProvisioningState; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type; } /// The URI of the Dev Center. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal)Property).DevCenterUri; } + public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal)Property).DevCenterUri; } /// Creates an new instance. public DevCenter() @@ -243,7 +239,7 @@ public DevCenter() /// Represents a devcenter resource. public partial interface IDevCenter : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource { /// /// key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 @@ -358,14 +354,6 @@ public partial interface IDevCenter : SerializedName = @"microsoftHostedNetworkEnableStatus", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus) })] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get; set; } - /// Resource Id of an associated Plan - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource Id of an associated Plan", - SerializedName = @"planId", - PossibleTypes = new [] { typeof(string) })] - string PlanId { get; set; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// @@ -396,7 +384,7 @@ public partial interface IDevCenter : } /// Represents a devcenter resource. internal partial interface IDevCenterInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal { /// /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. @@ -410,7 +398,7 @@ internal partial interface IDevCenterInternal : /// /// Settings to be used in the provisioning of all Dev Boxes that belong to this dev center. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings DevBoxProvisioningSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings DevBoxProvisioningSetting { get; set; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// @@ -420,7 +408,7 @@ internal partial interface IDevCenterInternal : /// /// Encryption settings to be used for server-side encryption for proprietary content (such as catalogs, logs, customizations). /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption Encryption { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption Encryption { get; set; } /// All Customer-managed key encryption properties for the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption EncryptionCustomerManagedKeyEncryption { get; set; } /// Managed identity properties @@ -460,21 +448,19 @@ internal partial interface IDevCenterInternal : /// /// Network settings that will be enforced on network resources associated with the Dev Center. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings NetworkSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings NetworkSetting { get; set; } /// /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. /// Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get; set; } - /// Resource Id of an associated Plan - string PlanId { get; set; } /// Dev Center settings to be used when associating a project with a catalog. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings ProjectCatalogSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings ProjectCatalogSetting { get; set; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus? ProjectCatalogSettingCatalogItemSyncEnableStatus { get; set; } /// DevCenter properties - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProperties Property { get; set; } /// The provisioning state of the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } /// The URI of the Dev Center. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenter.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenter.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenter.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenter.json.cs index e5487b808d44..73bf93b22dce 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenter.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenter.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,20 +65,20 @@ internal DevCenter(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.Jso { return; } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProperties.FromJson(__jsonProperties) : Property;} + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProperties.FromJson(__jsonProperties) : Property;} {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity.FromJson(__jsonIdentity) : Identity;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevCenter(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSet.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSet.PowerShell.cs similarity index 76% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSet.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSet.PowerShell.cs index 61a0c011db81..0c2ea8c05ad2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSet.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSet.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevCenterEncryptionSet partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevCenterEncryptionSet(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevCenterEncryptionSet(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,93 +98,93 @@ internal DevCenterEncryptionSet(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Identity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("DevboxDisksEncryptionEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); } if (content.Contains("KeyEncryptionKeyUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).KeyEncryptionKeyUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).KeyEncryptionKeyUrl, global::System.Convert.ToString); } if (content.Contains("IdentityPrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityPrincipalId, global::System.Convert.ToString); } if (content.Contains("IdentityTenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityTenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityTenantId, global::System.Convert.ToString); } if (content.Contains("IdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); } if (content.Contains("IdentityUserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); } 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. @@ -199,87 +199,87 @@ internal DevCenterEncryptionSet(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Identity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("DevboxDisksEncryptionEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); } if (content.Contains("KeyEncryptionKeyUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).KeyEncryptionKeyUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).KeyEncryptionKeyUrl, global::System.Convert.ToString); } if (content.Contains("IdentityPrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityPrincipalId, global::System.Convert.ToString); } if (content.Contains("IdentityTenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityTenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityTenantId, global::System.Convert.ToString); } if (content.Contains("IdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); } if (content.Contains("IdentityUserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -289,7 +289,7 @@ internal DevCenterEncryptionSet(global::System.Management.Automation.PSObject co /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSet.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSet.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSet.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSet.TypeConverter.cs index f03326f1050a..93b51d7a672e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSet.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSet.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSet.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSet.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSet.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSet.cs index 524b7428c2dc..112f7b0b8bcb 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSet.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSet.cs @@ -3,34 +3,34 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Represents a devcenter encryption set resource. public partial class DevCenterEncryptionSet : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResource(); /// /// Devbox disk encryption enable or disable status. Indicates if Devbox disks encryption using DevCenter CMK is enabled or /// not. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus? DevboxDisksEncryptionEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).DevboxDisksEncryptionEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).DevboxDisksEncryptionEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus? DevboxDisksEncryptionEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).DevboxDisksEncryptionEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).DevboxDisksEncryptionEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus)""); } /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity _identity; @@ -70,93 +70,93 @@ public partial class DevCenterEncryptionSet : /// or https://contosovault.vault.azure.net/keys/contosokek. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string KeyEncryptionKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).KeyEncryptionKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).KeyEncryptionKeyUrl = value ?? null; } + public string KeyEncryptionKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).KeyEncryptionKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).KeyEncryptionKeyUrl = value ?? null; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Location = value ; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Location = value ; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetProperties _property; /// Properties of a devcenter encryption set. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetProperties()); set => this._property = value; } /// The provisioning state of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetPropertiesInternal)Property).ProvisioningState; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type; } /// Creates an new instance. public DevCenterEncryptionSet() @@ -179,7 +179,7 @@ public DevCenterEncryptionSet() /// Represents a devcenter encryption set resource. public partial interface IDevCenterEncryptionSet : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource { /// /// Devbox disk encryption enable or disable status. Indicates if Devbox disks encryption using DevCenter CMK is enabled or @@ -257,7 +257,7 @@ public partial interface IDevCenterEncryptionSet : } /// Represents a devcenter encryption set resource. internal partial interface IDevCenterEncryptionSetInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal { /// /// Devbox disk encryption enable or disable status. Indicates if Devbox disks encryption using DevCenter CMK is enabled or @@ -290,7 +290,7 @@ internal partial interface IDevCenterEncryptionSetInternal : /// string KeyEncryptionKeyUrl { get; set; } /// Properties of a devcenter encryption set. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetProperties Property { get; set; } /// The provisioning state of the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSet.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSet.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSet.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSet.json.cs index 140a3a30a983..3e80ae905018 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSet.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSet.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,20 +65,20 @@ internal DevCenterEncryptionSet(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Run { return; } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetProperties.FromJson(__jsonProperties) : Property;} + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetProperties.FromJson(__jsonProperties) : Property;} {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity.FromJson(__jsonIdentity) : Identity;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevCenterEncryptionSet(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetProperties.PowerShell.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetProperties.PowerShell.cs index 181048b64fb8..d325c1353d61 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevCenterEncryptionSetProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevCenterEncryptionSetProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevCenterEncryptionSetProperties(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,21 +98,21 @@ internal DevCenterEncryptionSetProperties(global::System.Collections.IDictionary // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("DevboxDisksEncryptionEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); } if (content.Contains("KeyEncryptionKeyUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl, 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. @@ -127,15 +127,15 @@ internal DevCenterEncryptionSetProperties(global::System.Management.Automation.P // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("DevboxDisksEncryptionEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); } if (content.Contains("KeyEncryptionKeyUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -145,7 +145,7 @@ internal DevCenterEncryptionSetProperties(global::System.Management.Automation.P /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetProperties.TypeConverter.cs index a960e8646e80..28d13d227379 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetProperties.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetProperties.cs index 9f51796d4909..6d18eca936f7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetProperties.cs @@ -3,38 +3,38 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties of the devcenter encryption set. public partial class DevCenterEncryptionSetProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetPropertiesInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties __devCenterEncryptionSetUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetUpdateProperties(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties __devCenterEncryptionSetUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetUpdateProperties(); /// /// Devbox disk encryption enable or disable status. Indicates if Devbox disks encryption using DevCenter CMK is enabled or /// not. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus? DevboxDisksEncryptionEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)__devCenterEncryptionSetUpdateProperties).DevboxDisksEncryptionEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)__devCenterEncryptionSetUpdateProperties).DevboxDisksEncryptionEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus? DevboxDisksEncryptionEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)__devCenterEncryptionSetUpdateProperties).DevboxDisksEncryptionEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)__devCenterEncryptionSetUpdateProperties).DevboxDisksEncryptionEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus)""); } /// /// Key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 /// or https://contosovault.vault.azure.net/keys/contosokek. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string KeyEncryptionKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)__devCenterEncryptionSetUpdateProperties).KeyEncryptionKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)__devCenterEncryptionSetUpdateProperties).KeyEncryptionKeyUrl = value ?? null; } + public string KeyEncryptionKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)__devCenterEncryptionSetUpdateProperties).KeyEncryptionKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)__devCenterEncryptionSetUpdateProperties).KeyEncryptionKeyUrl = value ?? null; } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; @@ -64,7 +64,7 @@ public DevCenterEncryptionSetProperties() /// Properties of the devcenter encryption set. public partial interface IDevCenterEncryptionSetProperties : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties { /// The provisioning state of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -78,7 +78,7 @@ public partial interface IDevCenterEncryptionSetProperties : } /// Properties of the devcenter encryption set. internal partial interface IDevCenterEncryptionSetPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal { /// The provisioning state of the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetProperties.json.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetProperties.json.cs index bd47449c6503..49f16a6f9625 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,19 +65,19 @@ internal DevCenterEncryptionSetProperties(Microsoft.Azure.PowerShell.Cmdlets.Dev { return; } - __devCenterEncryptionSetUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetUpdateProperties(json); + __devCenterEncryptionSetUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetUpdateProperties(json); {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevCenterEncryptionSetProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetUpdateProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetUpdateProperties.PowerShell.cs similarity index 89% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetUpdateProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetUpdateProperties.PowerShell.cs index d224d3d2b8e9..2b373c7be223 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetUpdateProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetUpdateProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -57,35 +57,35 @@ public partial class DevCenterEncryptionSetUpdateProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevCenterEncryptionSetUpdateProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevCenterEncryptionSetUpdateProperties(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -100,17 +100,17 @@ internal DevCenterEncryptionSetUpdateProperties(global::System.Collections.IDict // actually deserialize if (content.Contains("DevboxDisksEncryptionEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); } if (content.Contains("KeyEncryptionKeyUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl, 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. @@ -125,11 +125,11 @@ internal DevCenterEncryptionSetUpdateProperties(global::System.Management.Automa // actually deserialize if (content.Contains("DevboxDisksEncryptionEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); } if (content.Contains("KeyEncryptionKeyUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)this).KeyEncryptionKeyUrl, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -142,7 +142,7 @@ internal DevCenterEncryptionSetUpdateProperties(global::System.Management.Automa /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetUpdateProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetUpdateProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetUpdateProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetUpdateProperties.TypeConverter.cs index 9692721f41c7..72a840637392 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetUpdateProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetUpdateProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetUpdateProperties.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetUpdateProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetUpdateProperties.cs index 58c00677150b..8baa117ee3ff 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetUpdateProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetUpdateProperties.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// Properties of the devcenter encryption set. These properties can be updated after the resource has been created. /// public partial class DevCenterEncryptionSetUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetUpdateProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetUpdateProperties.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetUpdateProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetUpdateProperties.json.cs index c173ede43bd6..75aab55ea213 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterEncryptionSetUpdateProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterEncryptionSetUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -73,13 +73,13 @@ internal DevCenterEncryptionSetUpdateProperties(Microsoft.Azure.PowerShell.Cmdle } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevCenterEncryptionSetUpdateProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterListResult.PowerShell.cs similarity index 83% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterListResult.PowerShell.cs index 78f1a366eac7..2b0a204b45fa 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevCenterListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevCenterListResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevCenterListResult(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,17 +98,17 @@ internal DevCenterListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResultInternal)this).NextLink, 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. @@ -123,11 +123,11 @@ internal DevCenterListResult(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -137,7 +137,7 @@ internal DevCenterListResult(global::System.Management.Automation.PSObject conte /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterListResult.TypeConverter.cs index 7ab1d43ecb47..220040cc4267 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterListResult.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterListResult.cs index d007a04f5b6d..ac896133ecec 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Result of the list devcenters operation public partial class DevCenterListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class DevCenterListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter[] Value { get => this._value; } /// Creates an new instance. public DevCenterListResult() @@ -57,8 +57,8 @@ public partial interface IDevCenterListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter[] Value { get; } } /// Result of the list devcenters operation @@ -68,7 +68,7 @@ internal partial interface IDevCenterListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterListResult.json.cs index 55eb00196497..3e835e498d94 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,19 +65,19 @@ internal DevCenterListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtim { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenter.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenter.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevCenterListResult(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterNetworkSettings.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterNetworkSettings.PowerShell.cs similarity index 89% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterNetworkSettings.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterNetworkSettings.PowerShell.cs index efe152db5831..b74780a8aad4 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterNetworkSettings.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterNetworkSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevCenterNetworkSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevCenterNetworkSettings(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevCenterNetworkSettings(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,13 +98,13 @@ internal DevCenterNetworkSettings(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("MicrosoftHostedNetworkEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("MicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("MicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); } 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. @@ -119,7 +119,7 @@ internal DevCenterNetworkSettings(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("MicrosoftHostedNetworkEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("MicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("MicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); } AfterDeserializePSObject(content); } @@ -129,7 +129,7 @@ internal DevCenterNetworkSettings(global::System.Management.Automation.PSObject /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterNetworkSettings.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterNetworkSettings.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterNetworkSettings.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterNetworkSettings.TypeConverter.cs index fc6ac07dc1dc..9b47690a4b5f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterNetworkSettings.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterNetworkSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterNetworkSettings.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterNetworkSettings.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterNetworkSettings.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterNetworkSettings.cs index 0000bd56acd0..16f0ec9ffb44 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterNetworkSettings.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterNetworkSettings.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Network settings for the Dev Center. public partial class DevCenterNetworkSettings : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettingsInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterNetworkSettings.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterNetworkSettings.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterNetworkSettings.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterNetworkSettings.json.cs index df8b20fc42d2..3f9d92ad44c6 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterNetworkSettings.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterNetworkSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -70,13 +70,13 @@ internal DevCenterNetworkSettings(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.R } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevCenterNetworkSettings(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProjectCatalogSettings.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProjectCatalogSettings.PowerShell.cs similarity index 90% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProjectCatalogSettings.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProjectCatalogSettings.PowerShell.cs index 25cdab3d7246..cc8f6aab577f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProjectCatalogSettings.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProjectCatalogSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -57,35 +57,35 @@ public partial class DevCenterProjectCatalogSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevCenterProjectCatalogSettings(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevCenterProjectCatalogSettings(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -100,13 +100,13 @@ internal DevCenterProjectCatalogSettings(global::System.Collections.IDictionary // actually deserialize if (content.Contains("CatalogItemSyncEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettingsInternal)this).CatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("CatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettingsInternal)this).CatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettingsInternal)this).CatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("CatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettingsInternal)this).CatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); } 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. @@ -121,7 +121,7 @@ internal DevCenterProjectCatalogSettings(global::System.Management.Automation.PS // actually deserialize if (content.Contains("CatalogItemSyncEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettingsInternal)this).CatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("CatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettingsInternal)this).CatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettingsInternal)this).CatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("CatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettingsInternal)this).CatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); } AfterDeserializePSObject(content); } @@ -131,7 +131,7 @@ internal DevCenterProjectCatalogSettings(global::System.Management.Automation.PS /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProjectCatalogSettings.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProjectCatalogSettings.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProjectCatalogSettings.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProjectCatalogSettings.TypeConverter.cs index c0a91f45e855..163bf3ff756e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProjectCatalogSettings.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProjectCatalogSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProjectCatalogSettings.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProjectCatalogSettings.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProjectCatalogSettings.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProjectCatalogSettings.cs index 42544d0077c6..22ecaa781f69 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProjectCatalogSettings.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProjectCatalogSettings.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// Project catalog settings for project catalogs under a project associated to this dev center. /// public partial class DevCenterProjectCatalogSettings : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettingsInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProjectCatalogSettings.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProjectCatalogSettings.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProjectCatalogSettings.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProjectCatalogSettings.json.cs index cd1980f85cdc..0b8d0625e0b8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProjectCatalogSettings.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProjectCatalogSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -72,13 +72,13 @@ internal DevCenterProjectCatalogSettings(Microsoft.Azure.PowerShell.Cmdlets.DevC } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevCenterProjectCatalogSettings(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProperties.PowerShell.cs similarity index 76% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProperties.PowerShell.cs index ca3c9da67ed4..e8becf7845b5 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevCenterProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevCenterProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevCenterProperties(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,77 +98,73 @@ internal DevCenterProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("DevCenterUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal)this).DevCenterUri = (string) content.GetValueForProperty("DevCenterUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal)this).DevCenterUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal)this).DevCenterUri = (string) content.GetValueForProperty("DevCenterUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal)this).DevCenterUri, global::System.Convert.ToString); } if (content.Contains("EncryptionCustomerManagedKeyEncryption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); } if (content.Contains("ProjectCatalogSettingCatalogItemSyncEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); } if (content.Contains("NetworkSettingMicrosoftHostedNetworkEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); } if (content.Contains("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); } if (content.Contains("CustomerManagedKeyEncryptionKeyIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); } if (content.Contains("CustomerManagedKeyEncryptionKeyUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); } if (content.Contains("KeyEncryptionKeyIdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); } if (content.Contains("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); } if (content.Contains("KeyEncryptionKeyIdentityDelegatedIdentityClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, global::System.Convert.ToString); } if (content.Contains("Encryption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EncryptionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EncryptionTypeConverter.ConvertFrom); } if (content.Contains("ProjectCatalogSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); } if (content.Contains("NetworkSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); } if (content.Contains("DevBoxProvisioningSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PlanId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).PlanId = (string) content.GetValueForProperty("PlanId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).PlanId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName, 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. @@ -183,71 +179,67 @@ internal DevCenterProperties(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("DevCenterUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal)this).DevCenterUri = (string) content.GetValueForProperty("DevCenterUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal)this).DevCenterUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal)this).DevCenterUri = (string) content.GetValueForProperty("DevCenterUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal)this).DevCenterUri, global::System.Convert.ToString); } if (content.Contains("EncryptionCustomerManagedKeyEncryption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); } if (content.Contains("ProjectCatalogSettingCatalogItemSyncEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); } if (content.Contains("NetworkSettingMicrosoftHostedNetworkEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); } if (content.Contains("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); } if (content.Contains("CustomerManagedKeyEncryptionKeyIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); } if (content.Contains("CustomerManagedKeyEncryptionKeyUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); } if (content.Contains("KeyEncryptionKeyIdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); } if (content.Contains("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); } if (content.Contains("KeyEncryptionKeyIdentityDelegatedIdentityClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, global::System.Convert.ToString); } if (content.Contains("Encryption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EncryptionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EncryptionTypeConverter.ConvertFrom); } if (content.Contains("ProjectCatalogSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); } if (content.Contains("NetworkSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); } if (content.Contains("DevBoxProvisioningSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PlanId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).PlanId = (string) content.GetValueForProperty("PlanId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).PlanId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -257,7 +249,7 @@ internal DevCenterProperties(global::System.Management.Automation.PSObject conte /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProperties.TypeConverter.cs index 3d5d27ef188d..5be62d51d640 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProperties.cs similarity index 82% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProperties.cs index 0cdb50250397..86554a8c55de 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProperties.cs @@ -3,46 +3,46 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties of the devcenter. public partial class DevCenterProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties __devCenterUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterUpdateProperties(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties __devCenterUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterUpdateProperties(); /// /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity CustomerManagedKeyEncryptionKeyIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).CustomerManagedKeyEncryptionKeyIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).CustomerManagedKeyEncryptionKeyIdentity = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity CustomerManagedKeyEncryptionKeyIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).CustomerManagedKeyEncryptionKeyIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).CustomerManagedKeyEncryptionKeyIdentity = value ?? null /* model class */; } /// /// key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 /// or https://contosovault.vault.azure.net/keys/contosokek. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string CustomerManagedKeyEncryptionKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).CustomerManagedKeyEncryptionKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).CustomerManagedKeyEncryptionKeyUrl = value ?? null; } + public string CustomerManagedKeyEncryptionKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).CustomerManagedKeyEncryptionKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).CustomerManagedKeyEncryptionKeyUrl = value ?? null; } /// /// Settings to be used in the provisioning of all Dev Boxes that belong to this dev center. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings DevBoxProvisioningSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).DevBoxProvisioningSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).DevBoxProvisioningSetting = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings DevBoxProvisioningSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).DevBoxProvisioningSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).DevBoxProvisioningSetting = value ?? null /* model class */; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus? DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus? DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus)""); } /// Backing field for property. private string _devCenterUri; @@ -53,17 +53,17 @@ public partial class DevCenterProperties : /// The display name of the devcenter. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).DisplayName = value ?? null; } + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).DisplayName = value ?? null; } /// /// Encryption settings to be used for server-side encryption for proprietary content (such as catalogs, logs, customizations). /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).Encryption = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).Encryption = value ?? null /* model class */; } /// All Customer-managed key encryption properties for the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption EncryptionCustomerManagedKeyEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).EncryptionCustomerManagedKeyEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).EncryptionCustomerManagedKeyEncryption = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption EncryptionCustomerManagedKeyEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).EncryptionCustomerManagedKeyEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).EncryptionCustomerManagedKeyEncryption = value ?? null /* model class */; } /// /// delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/ [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string KeyEncryptionKeyIdentityDelegatedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).KeyEncryptionKeyIdentityDelegatedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).KeyEncryptionKeyIdentityDelegatedIdentityClientId = value ?? null; } + public string KeyEncryptionKeyIdentityDelegatedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).KeyEncryptionKeyIdentityDelegatedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).KeyEncryptionKeyIdentityDelegatedIdentityClientId = value ?? null; } /// Values can be systemAssignedIdentity or userAssignedIdentity [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType? KeyEncryptionKeyIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).KeyEncryptionKeyIdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).KeyEncryptionKeyIdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType? KeyEncryptionKeyIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).KeyEncryptionKeyIdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).KeyEncryptionKeyIdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType)""); } /// /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/ [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string KeyEncryptionKeyIdentityUserAssignedIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = value ?? null; } + public string KeyEncryptionKeyIdentityUserAssignedIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = value ?? null; } /// Internal Acessors for DevCenterUri - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal.DevCenterUri { get => this._devCenterUri; set { {_devCenterUri = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal.DevCenterUri { get => this._devCenterUri; set { {_devCenterUri = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// /// Network settings that will be enforced on network resources associated with the Dev Center. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings NetworkSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).NetworkSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).NetworkSetting = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings NetworkSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).NetworkSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).NetworkSetting = value ?? null /* model class */; } /// /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).NetworkSettingMicrosoftHostedNetworkEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).NetworkSettingMicrosoftHostedNetworkEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus)""); } - - /// Resource Id of an associated Plan - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string PlanId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).PlanId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).PlanId = value ?? null; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).NetworkSettingMicrosoftHostedNetworkEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).NetworkSettingMicrosoftHostedNetworkEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus)""); } /// Dev Center settings to be used when associating a project with a catalog. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings ProjectCatalogSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).ProjectCatalogSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).ProjectCatalogSetting = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings ProjectCatalogSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).ProjectCatalogSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).ProjectCatalogSetting = value ?? null /* model class */; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus? ProjectCatalogSettingCatalogItemSyncEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).ProjectCatalogSettingCatalogItemSyncEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).ProjectCatalogSettingCatalogItemSyncEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus? ProjectCatalogSettingCatalogItemSyncEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).ProjectCatalogSettingCatalogItemSyncEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)__devCenterUpdateProperties).ProjectCatalogSettingCatalogItemSyncEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus)""); } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; @@ -145,7 +141,7 @@ public DevCenterProperties() /// Properties of the devcenter. public partial interface IDevCenterProperties : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties { /// The URI of the Dev Center. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -167,7 +163,7 @@ public partial interface IDevCenterProperties : } /// Properties of the devcenter. internal partial interface IDevCenterPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal { /// The URI of the Dev Center. string DevCenterUri { get; set; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProperties.json.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProperties.json.cs index fb3fad8e38ef..eb6e77dffbc9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,20 +65,20 @@ internal DevCenterProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtim { return; } - __devCenterUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterUpdateProperties(json); + __devCenterUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterUpdateProperties(json); {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} {_devCenterUri = If( json?.PropertyT("devCenterUri"), out var __jsonDevCenterUri) ? (string)__jsonDevCenterUri : (string)DevCenterUri;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevCenterProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterSku.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterSku.PowerShell.cs similarity index 78% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterSku.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterSku.PowerShell.cs index 3fbf6047b252..a82e5035f8be 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterSku.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterSku.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,33 +55,33 @@ public partial class DevCenterSku partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevCenterSku(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevCenterSku(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,41 +96,41 @@ internal DevCenterSku(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ResourceType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal)this).ResourceType, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal)this).Location = (string[]) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal)this).Location, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal)this).Location = (string[]) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal)this).Location, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } if (content.Contains("Capability")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal)this).Capability = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability[]) content.GetValueForProperty("Capability",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal)this).Capability, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CapabilityTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal)this).Capability = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability[]) content.GetValueForProperty("Capability",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal)this).Capability, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CapabilityTypeConverter.ConvertFrom)); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Tier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); } if (content.Contains("Size")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Size, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Size, global::System.Convert.ToString); } if (content.Contains("Family")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Family = (string) content.GetValueForProperty("Family",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Family, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Family = (string) content.GetValueForProperty("Family",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Family, global::System.Convert.ToString); } if (content.Contains("Capacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -145,35 +145,35 @@ internal DevCenterSku(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("ResourceType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal)this).ResourceType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal)this).ResourceType = (string) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal)this).ResourceType, global::System.Convert.ToString); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal)this).Location = (string[]) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal)this).Location, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal)this).Location = (string[]) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal)this).Location, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } if (content.Contains("Capability")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal)this).Capability = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability[]) content.GetValueForProperty("Capability",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal)this).Capability, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CapabilityTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal)this).Capability = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability[]) content.GetValueForProperty("Capability",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal)this).Capability, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CapabilityTypeConverter.ConvertFrom)); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Tier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); } if (content.Contains("Size")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Size, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Size, global::System.Convert.ToString); } if (content.Contains("Family")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Family = (string) content.GetValueForProperty("Family",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Family, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Family = (string) content.GetValueForProperty("Family",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Family, global::System.Convert.ToString); } if (content.Contains("Capacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } @@ -183,7 +183,7 @@ internal DevCenterSku(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterSku.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterSku.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterSku.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterSku.TypeConverter.cs index d2379e2f2b1e..b8ae2cd9819f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterSku.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterSku.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterSku.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterSku.cs similarity index 83% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterSku.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterSku.cs index 53025b6cfec5..04288867d6e4 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterSku.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterSku.cs @@ -3,40 +3,40 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// The resource model definition representing SKU for DevCenter resources public partial class DevCenterSku : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku __sku = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Sku(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku __sku = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Sku(); /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability[] _capability; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability[] _capability; /// Collection of name/value pairs to describe the SKU capabilities. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability[] Capability { get => this._capability; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability[] Capability { get => this._capability; } /// /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the /// resource this may be omitted. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public int? Capacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)__sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)__sku).Capacity = value ?? default(int); } + public int? Capacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)__sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)__sku).Capacity = value ?? default(int); } /// /// If the service has different generations of hardware, for the same SKU, then that can be captured here. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Family { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)__sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)__sku).Family = value ?? null; } + public string Family { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)__sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)__sku).Family = value ?? null; } /// Backing field for property. private string[] _location; @@ -46,17 +46,17 @@ public partial class DevCenterSku : public string[] Location { get => this._location; } /// Internal Acessors for Capability - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal.Capability { get => this._capability; set { {_capability = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal.Capability { get => this._capability; set { {_capability = value;} } } /// Internal Acessors for Location - string[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal.Location { get => this._location; set { {_location = value;} } } + string[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal.Location { get => this._location; set { {_location = value;} } } /// Internal Acessors for ResourceType - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSkuInternal.ResourceType { get => this._resourceType; set { {_resourceType = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSkuInternal.ResourceType { get => this._resourceType; set { {_resourceType = value;} } } /// The name of the SKU. E.g. P3. It is typically a letter+number code [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)__sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)__sku).Name = value ; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)__sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)__sku).Name = value ; } /// Backing field for property. private string _resourceType; @@ -69,14 +69,14 @@ public partial class DevCenterSku : /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Size { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)__sku).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)__sku).Size = value ?? null; } + public string Size { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)__sku).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)__sku).Size = value ?? null; } /// /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required /// on a PUT. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? Tier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)__sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)__sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? Tier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)__sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)__sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } /// Creates an new instance. public DevCenterSku() @@ -99,7 +99,7 @@ public DevCenterSku() /// The resource model definition representing SKU for DevCenter resources public partial interface IDevCenterSku : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku { /// Collection of name/value pairs to describe the SKU capabilities. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -107,8 +107,8 @@ public partial interface IDevCenterSku : ReadOnly = true, Description = @"Collection of name/value pairs to describe the SKU capabilities.", SerializedName = @"capabilities", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability[] Capability { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability[] Capability { get; } /// SKU supported locations. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, @@ -129,10 +129,10 @@ public partial interface IDevCenterSku : } /// The resource model definition representing SKU for DevCenter resources internal partial interface IDevCenterSkuInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal { /// Collection of name/value pairs to describe the SKU capabilities. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability[] Capability { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability[] Capability { get; set; } /// SKU supported locations. string[] Location { get; set; } /// The name of the resource type diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterSku.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterSku.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterSku.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterSku.json.cs index 7b5dd5e6472c..59bae9cc8b4f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterSku.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterSku.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,21 +65,21 @@ internal DevCenterSku(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json. { return; } - __sku = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Sku(json); + __sku = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Sku(json); {_resourceType = If( json?.PropertyT("resourceType"), out var __jsonResourceType) ? (string)__jsonResourceType : (string)ResourceType;} {_location = If( json?.PropertyT("locations"), out var __jsonLocations) ? If( __jsonLocations as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Location;} - {_capability = If( json?.PropertyT("capabilities"), out var __jsonCapabilities) ? If( __jsonCapabilities as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICapability) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Capability.FromJson(__p) )) ))() : null : Capability;} + {_capability = If( json?.PropertyT("capabilities"), out var __jsonCapabilities) ? If( __jsonCapabilities as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICapability) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Capability.FromJson(__p) )) ))() : null : Capability;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevCenterSku(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdate.PowerShell.cs new file mode 100644 index 000000000000..7fea53dcdde4 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdate.PowerShell.cs @@ -0,0 +1,314 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// The devcenter resource for partial updates. Properties not provided in the update request will not be changed. + /// + [System.ComponentModel.TypeConverter(typeof(DevCenterUpdateTypeConverter))] + public partial class DevCenterUpdate + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DevCenterUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DevCenterUpdate(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DevCenterUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("ProjectCatalogSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("NetworkSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxProvisioningSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("EncryptionCustomerManagedKeyEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("ProjectCatalogSettingCatalogItemSyncEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); + } + if (content.Contains("NetworkSettingMicrosoftHostedNetworkEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); + } + if (content.Contains("CustomerManagedKeyEncryptionKeyIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("CustomerManagedKeyEncryptionKeyUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); + } + if (content.Contains("KeyEncryptionKeyIdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); + } + if (content.Contains("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); + } + if (content.Contains("KeyEncryptionKeyIdentityDelegatedIdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, 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 DevCenterUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Encryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("ProjectCatalogSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("NetworkSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxProvisioningSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("EncryptionCustomerManagedKeyEncryption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); + } + if (content.Contains("ProjectCatalogSettingCatalogItemSyncEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); + } + if (content.Contains("NetworkSettingMicrosoftHostedNetworkEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); + } + if (content.Contains("CustomerManagedKeyEncryptionKeyIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("CustomerManagedKeyEncryptionKeyUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); + } + if (content.Contains("KeyEncryptionKeyIdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); + } + if (content.Contains("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); + } + if (content.Contains("KeyEncryptionKeyIdentityDelegatedIdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The devcenter resource for partial updates. Properties not provided in the update request will not be changed. + [System.ComponentModel.TypeConverter(typeof(DevCenterUpdateTypeConverter))] + public partial interface IDevCenterUpdate + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdate.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdate.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdate.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdate.TypeConverter.cs index 0abf07f2a4c1..7e7fa352521c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdate.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdate.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdate.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdate.cs index 4b4fcc924554..eb9f4dc44746 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdate.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdate.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,32 +11,32 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// The devcenter resource for partial updates. Properties not provided in the update request will not be changed. /// public partial class DevCenterUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdate, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdate, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate(); /// /// key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 /// or https://contosovault.vault.azure.net/keys/contosokek. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string CustomerManagedKeyEncryptionKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyUrl = value ?? null; } + public string CustomerManagedKeyEncryptionKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyUrl = value ?? null; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus? DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus? DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus)""); } /// The display name of the devcenter. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).DisplayName = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity _identity; @@ -77,11 +77,11 @@ public partial class DevCenterUpdate : /// and userAssignedIdentity - internal use only. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string KeyEncryptionKeyIdentityDelegatedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityDelegatedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityDelegatedIdentityClientId = value ?? null; } + public string KeyEncryptionKeyIdentityDelegatedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityDelegatedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityDelegatedIdentityClientId = value ?? null; } /// Values can be systemAssignedIdentity or userAssignedIdentity [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType? KeyEncryptionKeyIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType? KeyEncryptionKeyIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType)""); } /// /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/ [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string KeyEncryptionKeyIdentityUserAssignedIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = value ?? null; } + public string KeyEncryptionKeyIdentityUserAssignedIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = value ?? null; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location = value ?? null; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location = value ?? null; } /// Internal Acessors for CustomerManagedKeyEncryptionKeyIdentity - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal.CustomerManagedKeyEncryptionKeyIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal.CustomerManagedKeyEncryptionKeyIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).CustomerManagedKeyEncryptionKeyIdentity = value; } /// Internal Acessors for DevBoxProvisioningSetting - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal.DevBoxProvisioningSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSetting = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal.DevBoxProvisioningSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).DevBoxProvisioningSetting = value; } /// Internal Acessors for Encryption - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal.Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).Encryption = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal.Encryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).Encryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).Encryption = value; } /// Internal Acessors for EncryptionCustomerManagedKeyEncryption - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal.EncryptionCustomerManagedKeyEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).EncryptionCustomerManagedKeyEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).EncryptionCustomerManagedKeyEncryption = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal.EncryptionCustomerManagedKeyEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).EncryptionCustomerManagedKeyEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).EncryptionCustomerManagedKeyEncryption = value; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } /// Internal Acessors for NetworkSetting - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal.NetworkSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSetting = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal.NetworkSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSetting = value; } /// Internal Acessors for ProjectCatalogSetting - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal.ProjectCatalogSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSetting = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal.ProjectCatalogSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSetting = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterUpdateProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterUpdateProperties()); set { {_property = value;} } } /// /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSettingMicrosoftHostedNetworkEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSettingMicrosoftHostedNetworkEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus)""); } - - /// Resource Id of an associated Plan - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string PlanId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).PlanId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).PlanId = value ?? null; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSettingMicrosoftHostedNetworkEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).NetworkSettingMicrosoftHostedNetworkEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus)""); } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus? ProjectCatalogSettingCatalogItemSyncEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSettingCatalogItemSyncEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSettingCatalogItemSyncEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus? ProjectCatalogSettingCatalogItemSyncEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSettingCatalogItemSyncEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)Property).ProjectCatalogSettingCatalogItemSyncEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus)""); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties _property; /// Properties of a Dev Center to be updated. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterUpdateProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterUpdateProperties()); set => this._property = value; } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag = value ?? null /* model class */; } /// Creates an new instance. public DevCenterUpdate() @@ -173,7 +169,7 @@ public DevCenterUpdate() /// The devcenter resource for partial updates. Properties not provided in the update request will not be changed. public partial interface IDevCenterUpdate : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate { /// /// key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 @@ -288,14 +284,6 @@ public partial interface IDevCenterUpdate : SerializedName = @"microsoftHostedNetworkEnableStatus", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus) })] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get; set; } - /// Resource Id of an associated Plan - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource Id of an associated Plan", - SerializedName = @"planId", - PossibleTypes = new [] { typeof(string) })] - string PlanId { get; set; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// @@ -310,7 +298,7 @@ public partial interface IDevCenterUpdate : } /// The devcenter resource for partial updates. Properties not provided in the update request will not be changed. internal partial interface IDevCenterUpdateInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal { /// /// All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. @@ -324,7 +312,7 @@ internal partial interface IDevCenterUpdateInternal : /// /// Settings to be used in the provisioning of all Dev Boxes that belong to this dev center. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings DevBoxProvisioningSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings DevBoxProvisioningSetting { get; set; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// @@ -334,7 +322,7 @@ internal partial interface IDevCenterUpdateInternal : /// /// Encryption settings to be used for server-side encryption for proprietary content (such as catalogs, logs, customizations). /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption Encryption { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption Encryption { get; set; } /// All Customer-managed key encryption properties for the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption EncryptionCustomerManagedKeyEncryption { get; set; } /// Managed identity properties @@ -374,21 +362,19 @@ internal partial interface IDevCenterUpdateInternal : /// /// Network settings that will be enforced on network resources associated with the Dev Center. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings NetworkSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings NetworkSetting { get; set; } /// /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. /// Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get; set; } - /// Resource Id of an associated Plan - string PlanId { get; set; } /// Dev Center settings to be used when associating a project with a catalog. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings ProjectCatalogSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings ProjectCatalogSetting { get; set; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus? ProjectCatalogSettingCatalogItemSyncEnableStatus { get; set; } /// Properties of a Dev Center to be updated. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties Property { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdate.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdate.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdate.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdate.json.cs index 98fcf0591174..260eaa8765e2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdate.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -67,20 +67,20 @@ internal DevCenterUpdate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Js { return; } - __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(json); + __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate(json); {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity.FromJson(__jsonIdentity) : Identity;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterUpdateProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterUpdateProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevCenterUpdate(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdateProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdateProperties.PowerShell.cs similarity index 77% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdateProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdateProperties.PowerShell.cs index 8249a2790f47..a759ba50b56d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdateProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdateProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -57,35 +57,35 @@ public partial class DevCenterUpdateProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevCenterUpdateProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevCenterUpdateProperties(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -100,69 +100,65 @@ internal DevCenterUpdateProperties(global::System.Collections.IDictionary conten // actually deserialize if (content.Contains("Encryption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EncryptionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EncryptionTypeConverter.ConvertFrom); } if (content.Contains("ProjectCatalogSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); } if (content.Contains("NetworkSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); } if (content.Contains("DevBoxProvisioningSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PlanId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).PlanId = (string) content.GetValueForProperty("PlanId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).PlanId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); } if (content.Contains("EncryptionCustomerManagedKeyEncryption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); } if (content.Contains("ProjectCatalogSettingCatalogItemSyncEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); } if (content.Contains("NetworkSettingMicrosoftHostedNetworkEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); } if (content.Contains("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); } if (content.Contains("CustomerManagedKeyEncryptionKeyIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); } if (content.Contains("CustomerManagedKeyEncryptionKeyUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); } if (content.Contains("KeyEncryptionKeyIdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); } if (content.Contains("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); } if (content.Contains("KeyEncryptionKeyIdentityDelegatedIdentityClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, 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. @@ -177,63 +173,59 @@ internal DevCenterUpdateProperties(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Encryption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EncryptionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).Encryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption) content.GetValueForProperty("Encryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).Encryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EncryptionTypeConverter.ConvertFrom); } if (content.Contains("ProjectCatalogSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); } if (content.Contains("NetworkSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterNetworkSettingsTypeConverter.ConvertFrom); } if (content.Contains("DevBoxProvisioningSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PlanId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).PlanId = (string) content.GetValueForProperty("PlanId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).PlanId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings) content.GetValueForProperty("DevBoxProvisioningSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxProvisioningSettingsTypeConverter.ConvertFrom); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); } if (content.Contains("EncryptionCustomerManagedKeyEncryption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("EncryptionCustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).EncryptionCustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); } if (content.Contains("ProjectCatalogSettingCatalogItemSyncEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); } if (content.Contains("NetworkSettingMicrosoftHostedNetworkEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); } if (content.Contains("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus?) content.GetValueForProperty("DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus.CreateFrom); } if (content.Contains("CustomerManagedKeyEncryptionKeyIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); } if (content.Contains("CustomerManagedKeyEncryptionKeyUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); } if (content.Contains("KeyEncryptionKeyIdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); } if (content.Contains("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); } if (content.Contains("KeyEncryptionKeyIdentityDelegatedIdentityClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -243,7 +235,7 @@ internal DevCenterUpdateProperties(global::System.Management.Automation.PSObject /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdateProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdateProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdateProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdateProperties.TypeConverter.cs index 1786f28245e1..e433534d1dda 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdateProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdateProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdateProperties.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdateProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdateProperties.cs index b52b33418ab4..ec62b8034d47 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdateProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdateProperties.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// Properties of the devcenter. These properties can be updated after the resource has been created. /// public partial class DevCenterUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal { /// @@ -20,22 +20,22 @@ public partial class DevCenterUpdateProperties : /// or https://contosovault.vault.azure.net/keys/contosokek. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string CustomerManagedKeyEncryptionKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)Encryption).CustomerManagedKeyEncryptionKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)Encryption).CustomerManagedKeyEncryptionKeyUrl = value ?? null; } + public string CustomerManagedKeyEncryptionKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)Encryption).CustomerManagedKeyEncryptionKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)Encryption).CustomerManagedKeyEncryptionKeyUrl = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings _devBoxProvisioningSetting; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings _devBoxProvisioningSetting; /// /// Settings to be used in the provisioning of all Dev Boxes that belong to this dev center. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings DevBoxProvisioningSetting { get => (this._devBoxProvisioningSetting = this._devBoxProvisioningSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxProvisioningSettings()); set => this._devBoxProvisioningSetting = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings DevBoxProvisioningSetting { get => (this._devBoxProvisioningSetting = this._devBoxProvisioningSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxProvisioningSettings()); set => this._devBoxProvisioningSetting = value; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus? DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettingsInternal)DevBoxProvisioningSetting).InstallAzureMonitorAgentEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettingsInternal)DevBoxProvisioningSetting).InstallAzureMonitorAgentEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus? DevBoxProvisioningSettingInstallAzureMonitorAgentEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettingsInternal)DevBoxProvisioningSetting).InstallAzureMonitorAgentEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettingsInternal)DevBoxProvisioningSetting).InstallAzureMonitorAgentEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.InstallAzureMonitorAgentEnableStatus)""); } /// Backing field for property. private string _displayName; @@ -45,13 +45,13 @@ public partial class DevCenterUpdateProperties : public string DisplayName { get => this._displayName; set => this._displayName = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption _encryption; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption _encryption; /// /// Encryption settings to be used for server-side encryption for proprietary content (such as catalogs, logs, customizations). /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Encryption()); set => this._encryption = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Encryption()); set => this._encryption = value; } /// /// delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/ [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string KeyEncryptionKeyIdentityDelegatedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)Encryption).KeyEncryptionKeyIdentityDelegatedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)Encryption).KeyEncryptionKeyIdentityDelegatedIdentityClientId = value ?? null; } + public string KeyEncryptionKeyIdentityDelegatedIdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)Encryption).KeyEncryptionKeyIdentityDelegatedIdentityClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)Encryption).KeyEncryptionKeyIdentityDelegatedIdentityClientId = value ?? null; } /// Values can be systemAssignedIdentity or userAssignedIdentity [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType? KeyEncryptionKeyIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)Encryption).KeyEncryptionKeyIdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)Encryption).KeyEncryptionKeyIdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType? KeyEncryptionKeyIdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)Encryption).KeyEncryptionKeyIdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)Encryption).KeyEncryptionKeyIdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType)""); } /// /// user assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/ [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string KeyEncryptionKeyIdentityUserAssignedIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)Encryption).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)Encryption).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = value ?? null; } + public string KeyEncryptionKeyIdentityUserAssignedIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)Encryption).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)Encryption).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = value ?? null; } /// Internal Acessors for CustomerManagedKeyEncryptionKeyIdentity - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal.CustomerManagedKeyEncryptionKeyIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)Encryption).CustomerManagedKeyEncryptionKeyIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)Encryption).CustomerManagedKeyEncryptionKeyIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal.CustomerManagedKeyEncryptionKeyIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)Encryption).CustomerManagedKeyEncryptionKeyIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)Encryption).CustomerManagedKeyEncryptionKeyIdentity = value; } /// Internal Acessors for DevBoxProvisioningSetting - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal.DevBoxProvisioningSetting { get => (this._devBoxProvisioningSetting = this._devBoxProvisioningSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxProvisioningSettings()); set { {_devBoxProvisioningSetting = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal.DevBoxProvisioningSetting { get => (this._devBoxProvisioningSetting = this._devBoxProvisioningSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxProvisioningSettings()); set { {_devBoxProvisioningSetting = value;} } } /// Internal Acessors for Encryption - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal.Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Encryption()); set { {_encryption = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal.Encryption { get => (this._encryption = this._encryption ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Encryption()); set { {_encryption = value;} } } /// Internal Acessors for EncryptionCustomerManagedKeyEncryption - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal.EncryptionCustomerManagedKeyEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)Encryption).CustomerManagedKeyEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)Encryption).CustomerManagedKeyEncryption = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal.EncryptionCustomerManagedKeyEncryption { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)Encryption).CustomerManagedKeyEncryption; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)Encryption).CustomerManagedKeyEncryption = value; } /// Internal Acessors for NetworkSetting - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal.NetworkSetting { get => (this._networkSetting = this._networkSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterNetworkSettings()); set { {_networkSetting = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal.NetworkSetting { get => (this._networkSetting = this._networkSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterNetworkSettings()); set { {_networkSetting = value;} } } /// Internal Acessors for ProjectCatalogSetting - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdatePropertiesInternal.ProjectCatalogSetting { get => (this._projectCatalogSetting = this._projectCatalogSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettings()); set { {_projectCatalogSetting = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdatePropertiesInternal.ProjectCatalogSetting { get => (this._projectCatalogSetting = this._projectCatalogSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettings()); set { {_projectCatalogSetting = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings _networkSetting; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings _networkSetting; /// /// Network settings that will be enforced on network resources associated with the Dev Center. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings NetworkSetting { get => (this._networkSetting = this._networkSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterNetworkSettings()); set => this._networkSetting = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings NetworkSetting { get => (this._networkSetting = this._networkSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterNetworkSettings()); set => this._networkSetting = value; } /// /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettingsInternal)NetworkSetting).MicrosoftHostedNetworkEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettingsInternal)NetworkSetting).MicrosoftHostedNetworkEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus)""); } - - /// Backing field for property. - private string _planId; - - /// Resource Id of an associated Plan - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string PlanId { get => this._planId; set => this._planId = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettingsInternal)NetworkSetting).MicrosoftHostedNetworkEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettingsInternal)NetworkSetting).MicrosoftHostedNetworkEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus)""); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings _projectCatalogSetting; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings _projectCatalogSetting; /// Dev Center settings to be used when associating a project with a catalog. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings ProjectCatalogSetting { get => (this._projectCatalogSetting = this._projectCatalogSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettings()); set => this._projectCatalogSetting = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings ProjectCatalogSetting { get => (this._projectCatalogSetting = this._projectCatalogSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettings()); set => this._projectCatalogSetting = value; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus? ProjectCatalogSettingCatalogItemSyncEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettingsInternal)ProjectCatalogSetting).CatalogItemSyncEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettingsInternal)ProjectCatalogSetting).CatalogItemSyncEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus? ProjectCatalogSettingCatalogItemSyncEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettingsInternal)ProjectCatalogSetting).CatalogItemSyncEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettingsInternal)ProjectCatalogSetting).CatalogItemSyncEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus)""); } /// Creates an new instance. public DevCenterUpdateProperties() @@ -207,14 +200,6 @@ public partial interface IDevCenterUpdateProperties : SerializedName = @"microsoftHostedNetworkEnableStatus", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus) })] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get; set; } - /// Resource Id of an associated Plan - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource Id of an associated Plan", - SerializedName = @"planId", - PossibleTypes = new [] { typeof(string) })] - string PlanId { get; set; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// @@ -243,7 +228,7 @@ internal partial interface IDevCenterUpdatePropertiesInternal /// /// Settings to be used in the provisioning of all Dev Boxes that belong to this dev center. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxProvisioningSettings DevBoxProvisioningSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxProvisioningSettings DevBoxProvisioningSetting { get; set; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// @@ -253,7 +238,7 @@ internal partial interface IDevCenterUpdatePropertiesInternal /// /// Encryption settings to be used for server-side encryption for proprietary content (such as catalogs, logs, customizations). /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption Encryption { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption Encryption { get; set; } /// All Customer-managed key encryption properties for the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption EncryptionCustomerManagedKeyEncryption { get; set; } /// @@ -273,15 +258,13 @@ internal partial interface IDevCenterUpdatePropertiesInternal /// /// Network settings that will be enforced on network resources associated with the Dev Center. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterNetworkSettings NetworkSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterNetworkSettings NetworkSetting { get; set; } /// /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. /// Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get; set; } - /// Resource Id of an associated Plan - string PlanId { get; set; } /// Dev Center settings to be used when associating a project with a catalog. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings ProjectCatalogSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings ProjectCatalogSetting { get; set; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdateProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdateProperties.json.cs similarity index 90% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdateProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdateProperties.json.cs index e153ca61fcdd..95ce0c203003 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/DevCenterUpdateProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/DevCenterUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -67,23 +67,22 @@ internal DevCenterUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter. { return; } - {_encryption = If( json?.PropertyT("encryption"), out var __jsonEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Encryption.FromJson(__jsonEncryption) : Encryption;} - {_projectCatalogSetting = If( json?.PropertyT("projectCatalogSettings"), out var __jsonProjectCatalogSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettings.FromJson(__jsonProjectCatalogSettings) : ProjectCatalogSetting;} - {_networkSetting = If( json?.PropertyT("networkSettings"), out var __jsonNetworkSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterNetworkSettings.FromJson(__jsonNetworkSettings) : NetworkSetting;} - {_devBoxProvisioningSetting = If( json?.PropertyT("devBoxProvisioningSettings"), out var __jsonDevBoxProvisioningSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxProvisioningSettings.FromJson(__jsonDevBoxProvisioningSettings) : DevBoxProvisioningSetting;} - {_planId = If( json?.PropertyT("planId"), out var __jsonPlanId) ? (string)__jsonPlanId : (string)PlanId;} + {_encryption = If( json?.PropertyT("encryption"), out var __jsonEncryption) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Encryption.FromJson(__jsonEncryption) : Encryption;} + {_projectCatalogSetting = If( json?.PropertyT("projectCatalogSettings"), out var __jsonProjectCatalogSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettings.FromJson(__jsonProjectCatalogSettings) : ProjectCatalogSetting;} + {_networkSetting = If( json?.PropertyT("networkSettings"), out var __jsonNetworkSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterNetworkSettings.FromJson(__jsonNetworkSettings) : NetworkSetting;} + {_devBoxProvisioningSetting = If( json?.PropertyT("devBoxProvisioningSettings"), out var __jsonDevBoxProvisioningSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxProvisioningSettings.FromJson(__jsonDevBoxProvisioningSettings) : DevBoxProvisioningSetting;} {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new DevCenterUpdateProperties(json) : null; } @@ -111,7 +110,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson AddIf( null != this._projectCatalogSetting ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._projectCatalogSetting.ToJson(null,serializationMode) : null, "projectCatalogSettings" ,container.Add ); AddIf( null != this._networkSetting ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._networkSetting.ToJson(null,serializationMode) : null, "networkSettings" ,container.Add ); AddIf( null != this._devBoxProvisioningSetting ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._devBoxProvisioningSetting.ToJson(null,serializationMode) : null, "devBoxProvisioningSettings" ,container.Add ); - AddIf( null != (((object)this._planId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._planId.ToString()) : null, "planId" ,container.Add ); AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Encryption.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Encryption.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Encryption.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Encryption.PowerShell.cs index 87a98b1a4530..7dcca0a49e95 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Encryption.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Encryption.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -54,33 +54,33 @@ public partial class Encryption partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Encryption(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Encryption(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -95,33 +95,33 @@ internal Encryption(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("CustomerManagedKeyEncryption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).CustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("CustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).CustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).CustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("CustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).CustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); } if (content.Contains("CustomerManagedKeyEncryptionKeyIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); } if (content.Contains("CustomerManagedKeyEncryptionKeyUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); } if (content.Contains("KeyEncryptionKeyIdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); } if (content.Contains("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); } if (content.Contains("KeyEncryptionKeyIdentityDelegatedIdentityClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, 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. @@ -136,27 +136,27 @@ internal Encryption(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("CustomerManagedKeyEncryption")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).CustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("CustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).CustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).CustomerManagedKeyEncryption = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption) content.GetValueForProperty("CustomerManagedKeyEncryption",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).CustomerManagedKeyEncryption, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionTypeConverter.ConvertFrom); } if (content.Contains("CustomerManagedKeyEncryptionKeyIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryptionKeyIdentityTypeConverter.ConvertFrom); } if (content.Contains("CustomerManagedKeyEncryptionKeyUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyUrl = (string) content.GetValueForProperty("CustomerManagedKeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).CustomerManagedKeyEncryptionKeyUrl, global::System.Convert.ToString); } if (content.Contains("KeyEncryptionKeyIdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType?) content.GetValueForProperty("KeyEncryptionKeyIdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.IdentityType.CreateFrom); } if (content.Contains("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityUserAssignedIdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId, global::System.Convert.ToString); } if (content.Contains("KeyEncryptionKeyIdentityDelegatedIdentityClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId = (string) content.GetValueForProperty("KeyEncryptionKeyIdentityDelegatedIdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal)this).KeyEncryptionKeyIdentityDelegatedIdentityClientId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -166,7 +166,7 @@ internal Encryption(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Encryption.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Encryption.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Encryption.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Encryption.TypeConverter.cs index c35de6f1c82a..8337a340a397 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Encryption.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Encryption.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Encryption.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Encryption.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Encryption.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Encryption.cs index f15d16c6d798..26039a93dcd1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Encryption.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Encryption.cs @@ -3,13 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; public partial class Encryption : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal { /// Backing field for property. @@ -47,10 +47,10 @@ public partial class Encryption : public string KeyEncryptionKeyIdentityUserAssignedIdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionInternal)CustomerManagedKeyEncryption).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionInternal)CustomerManagedKeyEncryption).KeyEncryptionKeyIdentityUserAssignedIdentityResourceId = value ?? null; } /// Internal Acessors for CustomerManagedKeyEncryption - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal.CustomerManagedKeyEncryption { get => (this._customerManagedKeyEncryption = this._customerManagedKeyEncryption ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryption()); set { {_customerManagedKeyEncryption = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryption Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal.CustomerManagedKeyEncryption { get => (this._customerManagedKeyEncryption = this._customerManagedKeyEncryption ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.CustomerManagedKeyEncryption()); set { {_customerManagedKeyEncryption = value;} } } /// Internal Acessors for CustomerManagedKeyEncryptionKeyIdentity - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionInternal.CustomerManagedKeyEncryptionKeyIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionInternal)CustomerManagedKeyEncryption).KeyEncryptionKeyIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionInternal)CustomerManagedKeyEncryption).KeyEncryptionKeyIdentity = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionKeyIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionInternal.CustomerManagedKeyEncryptionKeyIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionInternal)CustomerManagedKeyEncryption).KeyEncryptionKeyIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ICustomerManagedKeyEncryptionInternal)CustomerManagedKeyEncryption).KeyEncryptionKeyIdentity = value; } /// Creates an new instance. public Encryption() diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Encryption.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Encryption.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Encryption.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Encryption.json.cs index db05681fdb5a..456126213396 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Encryption.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Encryption.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -69,13 +69,13 @@ internal Encryption(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.Js } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryption FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryption FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Encryption(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetListResult.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetListResult.PowerShell.cs index 7bbae4237f9b..9d87cbbcbcdf 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EncryptionSetListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EncryptionSetListResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EncryptionSetListResult(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,17 +98,17 @@ internal EncryptionSetListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResultInternal)this).NextLink, 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. @@ -123,11 +123,11 @@ internal EncryptionSetListResult(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -137,7 +137,7 @@ internal EncryptionSetListResult(global::System.Management.Automation.PSObject c /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetListResult.TypeConverter.cs index d9871ff86659..9fdf30bbc283 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetListResult.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetListResult.cs index 8e22840a5daa..7dda7be13651 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Result of the list devcenter encryption set operation public partial class EncryptionSetListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class EncryptionSetListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet[] Value { get => this._value; } /// Creates an new instance. public EncryptionSetListResult() @@ -57,8 +57,8 @@ public partial interface IEncryptionSetListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet[] Value { get; } } /// Result of the list devcenter encryption set operation @@ -68,7 +68,7 @@ internal partial interface IEncryptionSetListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetListResult.json.cs index a6bbfdf1999b..910b5c3d9033 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,19 +65,19 @@ internal EncryptionSetListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Ru { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSet.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSet.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EncryptionSetListResult(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetUpdate.PowerShell.cs similarity index 78% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetUpdate.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetUpdate.PowerShell.cs index 4d0b26d53660..7f28c020db8b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetUpdate.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetUpdate.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -57,35 +57,35 @@ public partial class EncryptionSetUpdate partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EncryptionSetUpdate(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EncryptionSetUpdate(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -100,49 +100,49 @@ internal EncryptionSetUpdate(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Identity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("DevboxDisksEncryptionEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); } if (content.Contains("KeyEncryptionKeyUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).KeyEncryptionKeyUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).KeyEncryptionKeyUrl, global::System.Convert.ToString); } if (content.Contains("IdentityPrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); } if (content.Contains("IdentityTenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); } if (content.Contains("IdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); } if (content.Contains("IdentityUserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); } 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. @@ -157,43 +157,43 @@ internal EncryptionSetUpdate(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Identity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("DevboxDisksEncryptionEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).DevboxDisksEncryptionEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus?) content.GetValueForProperty("DevboxDisksEncryptionEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).DevboxDisksEncryptionEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus.CreateFrom); } if (content.Contains("KeyEncryptionKeyUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).KeyEncryptionKeyUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).KeyEncryptionKeyUrl = (string) content.GetValueForProperty("KeyEncryptionKeyUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).KeyEncryptionKeyUrl, global::System.Convert.ToString); } if (content.Contains("IdentityPrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); } if (content.Contains("IdentityTenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); } if (content.Contains("IdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); } if (content.Contains("IdentityUserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -203,7 +203,7 @@ internal EncryptionSetUpdate(global::System.Management.Automation.PSObject conte /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetUpdate.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetUpdate.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetUpdate.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetUpdate.TypeConverter.cs index d770be156006..6ba4f9c3fe7d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetUpdate.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetUpdate.cs similarity index 91% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetUpdate.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetUpdate.cs index 0346f321e364..563e485f119d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetUpdate.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetUpdate.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,22 +11,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// The devcenter encryption set resource for partial updates. Properties not provided in the update request will not be changed. /// public partial class EncryptionSetUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdate, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdate, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate(); /// /// Devbox disk encryption enable or disable status. Indicates if Devbox disks encryption using DevCenter CMK is enabled or /// not. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus? DevboxDisksEncryptionEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).DevboxDisksEncryptionEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).DevboxDisksEncryptionEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus? DevboxDisksEncryptionEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).DevboxDisksEncryptionEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).DevboxDisksEncryptionEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus)""); } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity _identity; @@ -66,34 +66,34 @@ public partial class EncryptionSetUpdate : /// or https://contosovault.vault.azure.net/keys/contosokek. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string KeyEncryptionKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).KeyEncryptionKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).KeyEncryptionKeyUrl = value ?? null; } + public string KeyEncryptionKeyUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).KeyEncryptionKeyUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdatePropertiesInternal)Property).KeyEncryptionKeyUrl = value ?? null; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location = value ?? null; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location = value ?? null; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetUpdateProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetUpdateProperties()); set { {_property = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties _property; /// Properties of a Dev Center encryption set to be updated. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetUpdateProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetUpdateProperties()); set => this._property = value; } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag = value ?? null /* model class */; } /// Creates an new instance. public EncryptionSetUpdate() @@ -116,7 +116,7 @@ public EncryptionSetUpdate() /// The devcenter encryption set resource for partial updates. Properties not provided in the update request will not be changed. public partial interface IEncryptionSetUpdate : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate { /// /// Devbox disk encryption enable or disable status. Indicates if Devbox disks encryption using DevCenter CMK is enabled or @@ -186,7 +186,7 @@ public partial interface IEncryptionSetUpdate : } /// The devcenter encryption set resource for partial updates. Properties not provided in the update request will not be changed. internal partial interface IEncryptionSetUpdateInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal { /// /// Devbox disk encryption enable or disable status. Indicates if Devbox disks encryption using DevCenter CMK is enabled or @@ -219,7 +219,7 @@ internal partial interface IEncryptionSetUpdateInternal : /// string KeyEncryptionKeyUrl { get; set; } /// Properties of a Dev Center encryption set to be updated. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSetUpdateProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSetUpdateProperties Property { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetUpdate.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetUpdate.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetUpdate.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetUpdate.json.cs index 2f770cda3527..d66c08a82ac1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EncryptionSetUpdate.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EncryptionSetUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -67,20 +67,20 @@ internal EncryptionSetUpdate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtim { return; } - __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSetUpdateProperties.FromJson(__jsonProperties) : Property;} + __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSetUpdateProperties.FromJson(__jsonProperties) : Property;} {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity.FromJson(__jsonIdentity) : Identity;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EncryptionSetUpdate(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDependency.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDependency.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDependency.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDependency.PowerShell.cs index 92971034c299..92748dfaa284 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDependency.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDependency.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EndpointDependency partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EndpointDependency(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EndpointDependency(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,21 +98,21 @@ internal EndpointDependency(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("DomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal)this).DomainName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal)this).DomainName, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("EndpointDetail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal)this).EndpointDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail[]) content.GetValueForProperty("EndpointDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal)this).EndpointDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EndpointDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal)this).EndpointDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail[]) content.GetValueForProperty("EndpointDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal)this).EndpointDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EndpointDetailTypeConverter.ConvertFrom)); } 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. @@ -127,15 +127,15 @@ internal EndpointDependency(global::System.Management.Automation.PSObject conten // actually deserialize if (content.Contains("DomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal)this).DomainName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal)this).DomainName, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("EndpointDetail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal)this).EndpointDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail[]) content.GetValueForProperty("EndpointDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal)this).EndpointDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EndpointDetailTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal)this).EndpointDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail[]) content.GetValueForProperty("EndpointDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal)this).EndpointDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EndpointDetailTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -145,7 +145,7 @@ internal EndpointDependency(global::System.Management.Automation.PSObject conten /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDependency.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDependency.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDependency.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDependency.TypeConverter.cs index f8495feb7273..ccdd2727ebb7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDependency.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDependency.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDependency.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDependency.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDependency.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDependency.cs index b4cb5d983100..c40c1f91ce70 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDependency.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDependency.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// A domain name and connection details used to access a dependency. public partial class EndpointDependency : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal { /// Backing field for property. @@ -32,20 +32,20 @@ public partial class EndpointDependency : public string DomainName { get => this._domainName; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail[] _endpointDetail; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail[] _endpointDetail; /// The list of connection details for this endpoint. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail[] EndpointDetail { get => this._endpointDetail; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail[] EndpointDetail { get => this._endpointDetail; } /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal.Description { get => this._description; set { {_description = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal.Description { get => this._description; set { {_description = value;} } } /// Internal Acessors for DomainName - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal.DomainName { get => this._domainName; set { {_domainName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal.DomainName { get => this._domainName; set { {_domainName = value;} } } /// Internal Acessors for EndpointDetail - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependencyInternal.EndpointDetail { get => this._endpointDetail; set { {_endpointDetail = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependencyInternal.EndpointDetail { get => this._endpointDetail; set { {_endpointDetail = value;} } } /// Creates an new instance. public EndpointDependency() @@ -83,8 +83,8 @@ public partial interface IEndpointDependency : ReadOnly = true, Description = @"The list of connection details for this endpoint.", SerializedName = @"endpointDetails", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail[] EndpointDetail { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail[] EndpointDetail { get; } } /// A domain name and connection details used to access a dependency. @@ -100,7 +100,7 @@ internal partial interface IEndpointDependencyInternal /// string DomainName { get; set; } /// The list of connection details for this endpoint. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail[] EndpointDetail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail[] EndpointDetail { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDependency.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDependency.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDependency.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDependency.json.cs index 4b692e9a2aeb..5693a3582e66 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDependency.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDependency.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -67,18 +67,18 @@ internal EndpointDependency(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime } {_domainName = If( json?.PropertyT("domainName"), out var __jsonDomainName) ? (string)__jsonDomainName : (string)DomainName;} {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_endpointDetail = If( json?.PropertyT("endpointDetails"), out var __jsonEndpointDetails) ? If( __jsonEndpointDetails as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EndpointDetail.FromJson(__u) )) ))() : null : EndpointDetail;} + {_endpointDetail = If( json?.PropertyT("endpointDetails"), out var __jsonEndpointDetails) ? If( __jsonEndpointDetails as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EndpointDetail.FromJson(__u) )) ))() : null : EndpointDetail;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EndpointDependency(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDetail.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDetail.PowerShell.cs similarity index 90% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDetail.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDetail.PowerShell.cs index ad2c0b2ee31c..1c25f2da8dbd 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDetail.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDetail.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,33 +55,33 @@ public partial class EndpointDetail partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EndpointDetail(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EndpointDetail(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,13 +96,13 @@ internal EndpointDetail(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Port")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetailInternal)this).Port = (int?) content.GetValueForProperty("Port",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetailInternal)this).Port, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetailInternal)this).Port = (int?) content.GetValueForProperty("Port",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetailInternal)this).Port, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -117,7 +117,7 @@ internal EndpointDetail(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Port")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetailInternal)this).Port = (int?) content.GetValueForProperty("Port",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetailInternal)this).Port, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetailInternal)this).Port = (int?) content.GetValueForProperty("Port",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetailInternal)this).Port, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } @@ -127,7 +127,7 @@ internal EndpointDetail(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDetail.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDetail.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDetail.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDetail.TypeConverter.cs index f24dce2a9e1c..09504da8dd49 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDetail.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDetail.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDetail.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDetail.cs similarity index 93% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDetail.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDetail.cs index fa99508526a3..2335349c687f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDetail.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDetail.cs @@ -3,18 +3,18 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Details about the connection between the Batch service and the endpoint. public partial class EndpointDetail : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetailInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetailInternal { /// Internal Acessors for Port - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetailInternal.Port { get => this._port; set { {_port = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetailInternal.Port { get => this._port; set { {_port = value;} } } /// Backing field for property. private int? _port; diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDetail.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDetail.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDetail.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDetail.json.cs index 965e7a7d1951..06a33210f9d1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EndpointDetail.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EndpointDetail.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -70,13 +70,13 @@ internal EndpointDetail(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Jso } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EndpointDetail(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.PowerShell.cs new file mode 100644 index 000000000000..07b9a613f33d --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.PowerShell.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents an environment definition catalog item. + [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionTypeConverter))] + public partial class EnvironmentDefinition + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EnvironmentDefinition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EnvironmentDefinition(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EnvironmentDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("TemplatePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).TemplatePath = (string) content.GetValueForProperty("TemplatePath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).TemplatePath, global::System.Convert.ToString); + } + if (content.Contains("ValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EnvironmentDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("TemplatePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).TemplatePath = (string) content.GetValueForProperty("TemplatePath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).TemplatePath, global::System.Convert.ToString); + } + if (content.Contains("ValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents an environment definition catalog item. + [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionTypeConverter))] + public partial interface IEnvironmentDefinition + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.TypeConverter.cs new file mode 100644 index 000000000000..9c916706ac64 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EnvironmentDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EnvironmentDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EnvironmentDefinition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EnvironmentDefinition.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.cs new file mode 100644 index 000000000000..b0d414b1e2c8 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents an environment definition catalog item. + public partial class EnvironmentDefinition : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); + + /// A short description of the environment definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)Property).Description; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Description + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal.Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)Property).Description = value; } + + /// Internal Acessors for Parameter + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal.Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)Property).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)Property).Parameter = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionProperties()); set { {_property = value;} } } + + /// Internal Acessors for TemplatePath + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal.TemplatePath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)Property).TemplatePath; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)Property).TemplatePath = value; } + + /// Internal Acessors for ValidationStatus + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionInternal.ValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)Property).ValidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)Property).ValidationStatus = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } + + /// Input parameters passed to an environment. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter[] Parameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)Property).Parameter; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionProperties _property; + + /// Environment definition properties. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionProperties()); set => this._property = value; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// Path to the Environment Definition entrypoint file. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string TemplatePath { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)Property).TemplatePath; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } + + /// Validation status for the environment definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)Property).ValidationStatus; } + + /// Creates an new instance. + public EnvironmentDefinition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Represents an environment definition catalog item. + public partial interface IEnvironmentDefinition : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource + { + /// A short description of the environment definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A short description of the environment definition.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; } + /// Input parameters passed to an environment. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Input parameters passed to an environment.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter[] Parameter { get; } + /// Path to the Environment Definition entrypoint file. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Path to the Environment Definition entrypoint file.", + SerializedName = @"templatePath", + PossibleTypes = new [] { typeof(string) })] + string TemplatePath { get; } + /// Validation status for the environment definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Validation status for the environment definition.", + SerializedName = @"validationStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get; } + + } + /// Represents an environment definition catalog item. + internal partial interface IEnvironmentDefinitionInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal + { + /// A short description of the environment definition. + string Description { get; set; } + /// Input parameters passed to an environment. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter[] Parameter { get; set; } + /// Environment definition properties. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionProperties Property { get; set; } + /// Path to the Environment Definition entrypoint file. + string TemplatePath { get; set; } + /// Validation status for the environment definition. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.json.cs new file mode 100644 index 000000000000..0ba83da37f47 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents an environment definition catalog item. + public partial class EnvironmentDefinition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal EnvironmentDefinition(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EnvironmentDefinition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionListResult.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionListResult.PowerShell.cs index d452d22f5f57..a68869c902fe 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EnvironmentDefinitionListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentDefinitionListResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentDefinitionListResult(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,17 +98,17 @@ internal EnvironmentDefinitionListResult(global::System.Collections.IDictionary // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResultInternal)this).NextLink, 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. @@ -123,11 +123,11 @@ internal EnvironmentDefinitionListResult(global::System.Management.Automation.PS // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -137,7 +137,7 @@ internal EnvironmentDefinitionListResult(global::System.Management.Automation.PS /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionListResult.TypeConverter.cs index eb1988e99df6..01c88264ef1a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionListResult.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionListResult.cs index 721d75e1bff7..a8c1cce68bf2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Results of the environment definition list operation. public partial class EnvironmentDefinitionListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class EnvironmentDefinitionListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition[] Value { get => this._value; } /// Creates an new instance. public EnvironmentDefinitionListResult() @@ -57,8 +57,8 @@ public partial interface IEnvironmentDefinitionListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition[] Value { get; } } /// Results of the environment definition list operation. @@ -68,7 +68,7 @@ internal partial interface IEnvironmentDefinitionListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionListResult.json.cs index c29385ab9dc1..20d7aaa55b15 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,19 +65,19 @@ internal EnvironmentDefinitionListResult(Microsoft.Azure.PowerShell.Cmdlets.DevC { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinition.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinition.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EnvironmentDefinitionListResult(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.PowerShell.cs new file mode 100644 index 000000000000..8e1accde768f --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Properties of an Environment Definition parameter + [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionParameterTypeConverter))] + public partial class EnvironmentDefinitionParameter + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EnvironmentDefinitionParameter(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EnvironmentDefinitionParameter(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EnvironmentDefinitionParameter(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType.CreateFrom); + } + if (content.Contains("ReadOnly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly = (bool?) content.GetValueForProperty("ReadOnly",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Required")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EnvironmentDefinitionParameter(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType.CreateFrom); + } + if (content.Contains("ReadOnly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly = (bool?) content.GetValueForProperty("ReadOnly",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Required")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Properties of an Environment Definition parameter + [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionParameterTypeConverter))] + public partial interface IEnvironmentDefinitionParameter + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.TypeConverter.cs new file mode 100644 index 000000000000..b2bf966f87fe --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EnvironmentDefinitionParameterTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EnvironmentDefinitionParameter.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EnvironmentDefinitionParameter.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EnvironmentDefinitionParameter.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.cs new file mode 100644 index 000000000000..7b015def4c1a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Properties of an Environment Definition parameter + public partial class EnvironmentDefinitionParameter : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal + { + + /// Backing field for property. + private string _description; + + /// Description of the parameter + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Description { get => this._description; } + + /// Backing field for property. + private string _id; + + /// Unique ID of the parameter + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Internal Acessors for Description + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal.Description { get => this._description; set { {_description = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for ReadOnly + bool? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal.ReadOnly { get => this._readOnly; set { {_readOnly = value;} } } + + /// Internal Acessors for Required + bool? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal.Required { get => this._required; set { {_required = value;} } } + + /// Internal Acessors for Type + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// Display name of the parameter + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private bool? _readOnly; + + /// + /// Whether or not this parameter is read-only. If true, default should have a value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public bool? ReadOnly { get => this._readOnly; } + + /// Backing field for property. + private bool? _required; + + /// Whether or not this parameter is required + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public bool? Required { get => this._required; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType? _type; + + /// + /// A string of one of the basic JSON types (number, integer, array, object, boolean, string) + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType? Type { get => this._type; } + + /// Creates an new instance. + public EnvironmentDefinitionParameter() + { + + } + } + /// Properties of an Environment Definition parameter + public partial interface IEnvironmentDefinitionParameter : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// Description of the parameter + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Description of the parameter", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; } + /// Unique ID of the parameter + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Unique ID of the parameter", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// Display name of the parameter + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Display name of the parameter", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// + /// Whether or not this parameter is read-only. If true, default should have a value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Whether or not this parameter is read-only. If true, default should have a value.", + SerializedName = @"readOnly", + PossibleTypes = new [] { typeof(bool) })] + bool? ReadOnly { get; } + /// Whether or not this parameter is required + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Whether or not this parameter is required", + SerializedName = @"required", + PossibleTypes = new [] { typeof(bool) })] + bool? Required { get; } + /// + /// A string of one of the basic JSON types (number, integer, array, object, boolean, string) + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A string of one of the basic JSON types (number, integer, array, object, boolean, string)", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType? Type { get; } + + } + /// Properties of an Environment Definition parameter + internal partial interface IEnvironmentDefinitionParameterInternal + + { + /// Description of the parameter + string Description { get; set; } + /// Unique ID of the parameter + string Id { get; set; } + /// Display name of the parameter + string Name { get; set; } + /// + /// Whether or not this parameter is read-only. If true, default should have a value. + /// + bool? ReadOnly { get; set; } + /// Whether or not this parameter is required + bool? Required { get; set; } + /// + /// A string of one of the basic JSON types (number, integer, array, object, boolean, string) + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ParameterType? Type { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.json.cs new file mode 100644 index 000000000000..c76606bb89ab --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.json.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Properties of an Environment Definition parameter + public partial class EnvironmentDefinitionParameter + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal EnvironmentDefinitionParameter(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_readOnly = If( json?.PropertyT("readOnly"), out var __jsonReadOnly) ? (bool?)__jsonReadOnly : ReadOnly;} + {_required = If( json?.PropertyT("required"), out var __jsonRequired) ? (bool?)__jsonRequired : Required;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EnvironmentDefinitionParameter(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._readOnly ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonBoolean((bool)this._readOnly) : null, "readOnly" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._required ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonBoolean((bool)this._required) : null, "required" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionProperties.PowerShell.cs similarity index 83% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionProperties.PowerShell.cs index 0afc7fe5eca0..e0cd4cb926cd 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EnvironmentDefinitionProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentDefinitionProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentDefinitionProperties(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,25 +98,25 @@ internal EnvironmentDefinitionProperties(global::System.Collections.IDictionary // actually deserialize if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionParameterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionParameterTypeConverter.ConvertFrom)); } if (content.Contains("TemplatePath")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).TemplatePath = (string) content.GetValueForProperty("TemplatePath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).TemplatePath, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).TemplatePath = (string) content.GetValueForProperty("TemplatePath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).TemplatePath, global::System.Convert.ToString); } if (content.Contains("ValidationStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); } 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. @@ -131,19 +131,19 @@ internal EnvironmentDefinitionProperties(global::System.Management.Automation.PS // actually deserialize if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionParameterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionParameterTypeConverter.ConvertFrom)); } if (content.Contains("TemplatePath")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).TemplatePath = (string) content.GetValueForProperty("TemplatePath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).TemplatePath, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).TemplatePath = (string) content.GetValueForProperty("TemplatePath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).TemplatePath, global::System.Convert.ToString); } if (content.Contains("ValidationStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); } AfterDeserializePSObject(content); } @@ -153,7 +153,7 @@ internal EnvironmentDefinitionProperties(global::System.Management.Automation.PS /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionProperties.TypeConverter.cs index ca0e880e5aba..46eb7b4499be 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionProperties.cs similarity index 89% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionProperties.cs index 8425a96d98fb..f6316be9f88a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties of an environment definition. public partial class EnvironmentDefinitionProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal { /// Backing field for property. @@ -21,23 +21,23 @@ public partial class EnvironmentDefinitionProperties : public string Description { get => this._description; } /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal.Description { get => this._description; set { {_description = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal.Description { get => this._description; set { {_description = value;} } } /// Internal Acessors for Parameter - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal.Parameter { get => this._parameter; set { {_parameter = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal.Parameter { get => this._parameter; set { {_parameter = value;} } } /// Internal Acessors for TemplatePath - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal.TemplatePath { get => this._templatePath; set { {_templatePath = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal.TemplatePath { get => this._templatePath; set { {_templatePath = value;} } } /// Internal Acessors for ValidationStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionPropertiesInternal.ValidationStatus { get => this._validationStatus; set { {_validationStatus = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionPropertiesInternal.ValidationStatus { get => this._validationStatus; set { {_validationStatus = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter[] _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter[] _parameter; /// Input parameters passed to an environment. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter[] Parameter { get => this._parameter; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter[] Parameter { get => this._parameter; } /// Backing field for property. private string _templatePath; @@ -77,8 +77,8 @@ public partial interface IEnvironmentDefinitionProperties : ReadOnly = true, Description = @"Input parameters passed to an environment.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter[] Parameter { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter[] Parameter { get; } /// Path to the Environment Definition entrypoint file. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, @@ -104,7 +104,7 @@ internal partial interface IEnvironmentDefinitionPropertiesInternal /// A short description of the environment definition. string Description { get; set; } /// Input parameters passed to an environment. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter[] Parameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter[] Parameter { get; set; } /// Path to the Environment Definition entrypoint file. string TemplatePath { get; set; } /// Validation status for the environment definition. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionProperties.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionProperties.json.cs index cc9a6ac6ce0b..b3889f2f7f00 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -66,20 +66,20 @@ internal EnvironmentDefinitionProperties(Microsoft.Azure.PowerShell.Cmdlets.DevC return; } {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? If( __jsonParameters as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionParameter) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentDefinitionParameter.FromJson(__u) )) ))() : null : Parameter;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? If( __jsonParameters as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionParameter) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentDefinitionParameter.FromJson(__u) )) ))() : null : Parameter;} {_templatePath = If( json?.PropertyT("templatePath"), out var __jsonTemplatePath) ? (string)__jsonTemplatePath : (string)TemplatePath;} {_validationStatus = If( json?.PropertyT("validationStatus"), out var __jsonValidationStatus) ? (string)__jsonValidationStatus : (string)ValidationStatus;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EnvironmentDefinitionProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentRole.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentRole.PowerShell.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentRole.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentRole.PowerShell.cs index 8c72e65b4052..9b3f183d309c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentRole.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentRole.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,33 +55,33 @@ public partial class EnvironmentRole partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRole DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRole DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentRole(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRole DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRole DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentRole(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,17 +96,17 @@ internal EnvironmentRole(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("RoleName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRoleInternal)this).RoleName = (string) content.GetValueForProperty("RoleName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRoleInternal)this).RoleName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRoleInternal)this).RoleName = (string) content.GetValueForProperty("RoleName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRoleInternal)this).RoleName, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRoleInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRoleInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRoleInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRoleInternal)this).Description, 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. @@ -121,11 +121,11 @@ internal EnvironmentRole(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("RoleName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRoleInternal)this).RoleName = (string) content.GetValueForProperty("RoleName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRoleInternal)this).RoleName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRoleInternal)this).RoleName = (string) content.GetValueForProperty("RoleName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRoleInternal)this).RoleName, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRoleInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRoleInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRoleInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRoleInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -135,7 +135,7 @@ internal EnvironmentRole(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRole FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRole FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentRole.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentRole.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentRole.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentRole.TypeConverter.cs index 411ac8ddf99a..b16c483b5e7e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentRole.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentRole.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRole ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRole ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRole).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRole).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentRole.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentRole.cs similarity index 94% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentRole.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentRole.cs index ef8e9461c69b..e719018628c8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentRole.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentRole.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// A role that can be assigned to a user. public partial class EnvironmentRole : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRole, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRoleInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRole, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRoleInternal { /// Backing field for property. @@ -21,10 +21,10 @@ public partial class EnvironmentRole : public string Description { get => this._description; } /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRoleInternal.Description { get => this._description; set { {_description = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRoleInternal.Description { get => this._description; set { {_description = value;} } } /// Internal Acessors for RoleName - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRoleInternal.RoleName { get => this._roleName; set { {_roleName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRoleInternal.RoleName { get => this._roleName; set { {_roleName = value;} } } /// Backing field for property. private string _roleName; diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentRole.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentRole.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentRole.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentRole.json.cs index 8d3468e1561c..9c1c2bf57bf0 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentRole.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentRole.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -71,13 +71,13 @@ internal EnvironmentRole(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Js } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRole. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRole. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRole. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRole. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRole FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRole FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EnvironmentRole(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.PowerShell.cs new file mode 100644 index 000000000000..b48a173531c9 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.PowerShell.cs @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents an environment type. + [System.ComponentModel.TypeConverter(typeof(EnvironmentTypeTypeConverter))] + public partial class EnvironmentType + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EnvironmentType(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EnvironmentType(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EnvironmentType(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).DisplayName, 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 EnvironmentType(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal)this).DisplayName, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents an environment type. + [System.ComponentModel.TypeConverter(typeof(EnvironmentTypeTypeConverter))] + public partial interface IEnvironmentType + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.TypeConverter.cs new file mode 100644 index 000000000000..4caa2e0ff6d6 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EnvironmentTypeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EnvironmentType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EnvironmentType.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EnvironmentType.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.cs new file mode 100644 index 000000000000..09d3770e868c --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents an environment type. + public partial class EnvironmentType : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); + + /// The display name of the environment type. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeProperties _property; + + /// Properties of an environment type. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeProperties()); set => this._property = value; } + + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypePropertiesInternal)Property).ProvisioningState; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Tags()); set => this._tag = value; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public EnvironmentType() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Represents an environment type. + public partial interface IEnvironmentType : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource + { + /// The display name of the environment type. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The display name of the environment type.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get; set; } + + } + /// Represents an environment type. + internal partial interface IEnvironmentTypeInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal + { + /// The display name of the environment type. + string DisplayName { get; set; } + /// Properties of an environment type. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeProperties Property { get; set; } + /// The provisioning state of the resource. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.json.cs new file mode 100644 index 000000000000..bae86d3cc4b7 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents an environment type. + public partial class EnvironmentType + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal EnvironmentType(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeProperties.FromJson(__jsonProperties) : Property;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Tags.FromJson(__jsonTags) : Tag;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EnvironmentType(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeListResult.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeListResult.PowerShell.cs index e377de4104bc..c85dff2e7dcb 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EnvironmentTypeListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentTypeListResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentTypeListResult(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,17 +98,17 @@ internal EnvironmentTypeListResult(global::System.Collections.IDictionary conten // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResultInternal)this).NextLink, 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. @@ -123,11 +123,11 @@ internal EnvironmentTypeListResult(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -137,7 +137,7 @@ internal EnvironmentTypeListResult(global::System.Management.Automation.PSObject /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeListResult.TypeConverter.cs index 465076511178..b5eb3e77d8ca 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeListResult.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeListResult.cs index 90b548ea4427..24ba6aeb39ed 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Result of the environment type list operation. public partial class EnvironmentTypeListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class EnvironmentTypeListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType[] Value { get => this._value; } /// Creates an new instance. public EnvironmentTypeListResult() @@ -57,8 +57,8 @@ public partial interface IEnvironmentTypeListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType[] Value { get; } } /// Result of the environment type list operation. @@ -68,7 +68,7 @@ internal partial interface IEnvironmentTypeListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeListResult.json.cs index f6945f8f1e46..ab94784043ae 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,19 +65,19 @@ internal EnvironmentTypeListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter. { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentType.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentType.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EnvironmentTypeListResult(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeProperties.PowerShell.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeProperties.PowerShell.cs index 1a06146a33b1..d2ea2c7e3d1f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EnvironmentTypeProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentTypeProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentTypeProperties(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,17 +98,17 @@ internal EnvironmentTypeProperties(global::System.Collections.IDictionary conten // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, 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. @@ -123,11 +123,11 @@ internal EnvironmentTypeProperties(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -137,7 +137,7 @@ internal EnvironmentTypeProperties(global::System.Management.Automation.PSObject /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeProperties.TypeConverter.cs index 4c2e26cd8d1d..0a074179a602 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeProperties.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeProperties.cs index 0b1a0dbab457..7ab61528bf5d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeProperties.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties of an environment type. public partial class EnvironmentTypeProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypePropertiesInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties __environmentTypeUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeUpdateProperties(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties __environmentTypeUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeUpdateProperties(); /// The display name of the environment type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal)__environmentTypeUpdateProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal)__environmentTypeUpdateProperties).DisplayName = value ?? null; } + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal)__environmentTypeUpdateProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal)__environmentTypeUpdateProperties).DisplayName = value ?? null; } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; @@ -54,7 +54,7 @@ public EnvironmentTypeProperties() /// Properties of an environment type. public partial interface IEnvironmentTypeProperties : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties { /// The provisioning state of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -68,7 +68,7 @@ public partial interface IEnvironmentTypeProperties : } /// Properties of an environment type. internal partial interface IEnvironmentTypePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal { /// The provisioning state of the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeProperties.json.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeProperties.json.cs index c2bb982b86ce..a99d8c6c1f51 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -65,19 +65,19 @@ internal EnvironmentTypeProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter. { return; } - __environmentTypeUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeUpdateProperties(json); + __environmentTypeUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeUpdateProperties(json); {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EnvironmentTypeProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdate.PowerShell.cs similarity index 81% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdate.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdate.PowerShell.cs index 0910365942b1..1a0dcfdcd3f8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdate.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdate.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -57,35 +57,35 @@ public partial class EnvironmentTypeUpdate partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentTypeUpdate(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentTypeUpdate(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -100,21 +100,21 @@ internal EnvironmentTypeUpdate(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateInternal)this).DisplayName, 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. @@ -129,15 +129,15 @@ internal EnvironmentTypeUpdate(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateInternal)this).DisplayName, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -147,7 +147,7 @@ internal EnvironmentTypeUpdate(global::System.Management.Automation.PSObject con /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdate.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdate.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdate.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdate.TypeConverter.cs index c3237847c549..27b60fc9c9c0 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdate.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdate.cs similarity index 81% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdate.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdate.cs index d58ddd18e5f3..d7312922665f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdate.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdate.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,30 +11,30 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// The environment type for partial update. Properties not provided in the update request will not be changed. /// public partial class EnvironmentTypeUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdate, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdate, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateInternal { /// The display name of the environment type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName = value ?? null; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeUpdateProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeUpdateProperties()); set { {_property = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties _property; /// Properties of an environment type to be updated. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeUpdateProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeUpdateProperties()); set => this._property = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags _tag; /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Tags()); set => this._tag = value; } /// Creates an new instance. public EnvironmentTypeUpdate() @@ -60,8 +60,8 @@ public partial interface IEnvironmentTypeUpdate : ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get; set; } } /// The environment type for partial update. Properties not provided in the update request will not be changed. @@ -71,9 +71,9 @@ internal partial interface IEnvironmentTypeUpdateInternal /// The display name of the environment type. string DisplayName { get; set; } /// Properties of an environment type to be updated. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties Property { get; set; } /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdate.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdate.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdate.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdate.json.cs index d3c0f9015782..1e84de7dee9e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdate.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -67,19 +67,19 @@ internal EnvironmentTypeUpdate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runt { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeUpdateProperties.FromJson(__jsonProperties) : Property;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags.FromJson(__jsonTags) : Tag;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeUpdateProperties.FromJson(__jsonProperties) : Property;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Tags.FromJson(__jsonTags) : Tag;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EnvironmentTypeUpdate(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdateProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdateProperties.PowerShell.cs similarity index 90% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdateProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdateProperties.PowerShell.cs index 0124c9e80455..b6b5f949a5e7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdateProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdateProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -57,35 +57,35 @@ public partial class EnvironmentTypeUpdateProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentTypeUpdateProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentTypeUpdateProperties(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -100,13 +100,13 @@ internal EnvironmentTypeUpdateProperties(global::System.Collections.IDictionary // actually deserialize if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, 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. @@ -121,7 +121,7 @@ internal EnvironmentTypeUpdateProperties(global::System.Management.Automation.PS // actually deserialize if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -131,7 +131,7 @@ internal EnvironmentTypeUpdateProperties(global::System.Management.Automation.PS /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdateProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdateProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdateProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdateProperties.TypeConverter.cs index d6fcd78b673c..d12c91d6f8bd 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdateProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdateProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdateProperties.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdateProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdateProperties.cs index fe6196fdc53c..110ffb018668 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdateProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdateProperties.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// Properties of an environment type. These properties can be updated after the resource has been created. /// public partial class EnvironmentTypeUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdatePropertiesInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdateProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdateProperties.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdateProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdateProperties.json.cs index d66edab36e7f..2e795a491f60 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeUpdateProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -72,13 +72,13 @@ internal EnvironmentTypeUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.DevC } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new EnvironmentTypeUpdateProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Gallery.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Gallery.PowerShell.cs similarity index 77% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Gallery.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Gallery.PowerShell.cs index f5c14e1a054c..9ce111fac052 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Gallery.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Gallery.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class Gallery partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Gallery(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Gallery(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,61 +103,61 @@ internal Gallery(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GalleryPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GalleryPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("ResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryInternal)this).ResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryInternal)this).ResourceId, 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. @@ -172,55 +172,55 @@ internal Gallery(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GalleryPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GalleryPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("ResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryInternal)this).ResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryInternal)this).ResourceId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Gallery.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Gallery.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Gallery.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Gallery.TypeConverter.cs index 549c4b740e18..8d4ae228320c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Gallery.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Gallery.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Gallery.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Gallery.cs similarity index 76% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Gallery.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Gallery.cs index 18fa0e8695c0..842b3a6ed5f1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Gallery.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Gallery.cs @@ -3,99 +3,99 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Represents a gallery. public partial class Gallery : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GalleryProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GalleryProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryProperties _property; /// Gallery properties. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GalleryProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GalleryProperties()); set => this._property = value; } /// The provisioning state of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryPropertiesInternal)Property).ProvisioningState; } /// The resource ID of the backing Azure Compute Gallery. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string ResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryPropertiesInternal)Property).GalleryResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryPropertiesInternal)Property).GalleryResourceId = value ?? null; } + public string ResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryPropertiesInternal)Property).GalleryResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryPropertiesInternal)Property).GalleryResourceId = value ?? null; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } /// Creates an new instance. public Gallery() @@ -118,7 +118,7 @@ public Gallery() /// Represents a gallery. public partial interface IGallery : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource { /// The provisioning state of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -140,10 +140,10 @@ public partial interface IGallery : } /// Represents a gallery. internal partial interface IGalleryInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal { /// Gallery properties. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryProperties Property { get; set; } /// The provisioning state of the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } /// The resource ID of the backing Azure Compute Gallery. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Gallery.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Gallery.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Gallery.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Gallery.json.cs index eb82a899165f..d8bf294b6c1a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Gallery.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Gallery.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Gallery partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Gallery(json) : null; } @@ -77,8 +77,8 @@ internal Gallery(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonO { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GalleryProperties.FromJson(__jsonProperties) : Property;} + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GalleryProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryListResult.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryListResult.PowerShell.cs index 15e206d37aff..ae9f5daa5b85 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class GalleryListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryListResult(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryListResult(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,17 +103,17 @@ internal GalleryListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GalleryTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GalleryTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResultInternal)this).NextLink, 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. @@ -128,11 +128,11 @@ internal GalleryListResult(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.GalleryTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.GalleryTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryListResult.TypeConverter.cs index 92f59f504e46..f12f1e8cf9aa 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryListResult.cs similarity index 86% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryListResult.cs index 3131f7d0fbd6..478ecc02fce2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Results of the gallery list operation. public partial class GalleryListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class GalleryListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery[] Value { get => this._value; } /// Creates an new instance. public GalleryListResult() @@ -57,8 +57,8 @@ public partial interface IGalleryListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery[] Value { get; } } /// Results of the gallery list operation. @@ -68,7 +68,7 @@ internal partial interface IGalleryListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryListResult.json.cs index 06ba5b085505..a77565798ce4 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class GalleryListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new GalleryListResult(json) : null; } @@ -77,7 +77,7 @@ internal GalleryListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime. { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Gallery.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Gallery.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryProperties.PowerShell.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryProperties.PowerShell.cs index f5bf1ebd5030..e567608fae1d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class GalleryProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GalleryProperties(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GalleryProperties(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,17 +103,17 @@ internal GalleryProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("GalleryResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryPropertiesInternal)this).GalleryResourceId = (string) content.GetValueForProperty("GalleryResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryPropertiesInternal)this).GalleryResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryPropertiesInternal)this).GalleryResourceId = (string) content.GetValueForProperty("GalleryResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryPropertiesInternal)this).GalleryResourceId, 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. @@ -128,11 +128,11 @@ internal GalleryProperties(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("GalleryResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryPropertiesInternal)this).GalleryResourceId = (string) content.GetValueForProperty("GalleryResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryPropertiesInternal)this).GalleryResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryPropertiesInternal)this).GalleryResourceId = (string) content.GetValueForProperty("GalleryResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryPropertiesInternal)this).GalleryResourceId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryProperties.TypeConverter.cs index 8d53aaad6555..32a1a4de9017 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryProperties.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryProperties.cs index 7f99eb93f02e..d9fb5e6d7a79 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties of a gallery. public partial class GalleryProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryPropertiesInternal { /// Backing field for property. @@ -21,7 +21,7 @@ public partial class GalleryProperties : public string GalleryResourceId { get => this._galleryResourceId; set => this._galleryResourceId = value; } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryProperties.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryProperties.json.cs index 96f296e5eaf8..32386914072a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GalleryProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GalleryProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class GalleryProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new GalleryProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GitCatalog.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GitCatalog.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GitCatalog.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GitCatalog.PowerShell.cs index 709784a70fda..282af740d1fb 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GitCatalog.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GitCatalog.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class GitCatalog partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new GitCatalog(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new GitCatalog(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,25 +103,25 @@ internal GitCatalog(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("Branch")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).Branch = (string) content.GetValueForProperty("Branch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).Branch, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).Branch = (string) content.GetValueForProperty("Branch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).Branch, global::System.Convert.ToString); } if (content.Contains("SecretIdentifier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).SecretIdentifier = (string) content.GetValueForProperty("SecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).SecretIdentifier, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).SecretIdentifier = (string) content.GetValueForProperty("SecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).SecretIdentifier, global::System.Convert.ToString); } if (content.Contains("Path")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).Path, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).Path, 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. @@ -136,19 +136,19 @@ internal GitCatalog(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("Branch")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).Branch = (string) content.GetValueForProperty("Branch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).Branch, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).Branch = (string) content.GetValueForProperty("Branch",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).Branch, global::System.Convert.ToString); } if (content.Contains("SecretIdentifier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).SecretIdentifier = (string) content.GetValueForProperty("SecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).SecretIdentifier, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).SecretIdentifier = (string) content.GetValueForProperty("SecretIdentifier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).SecretIdentifier, global::System.Convert.ToString); } if (content.Contains("Path")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal)this).Path, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal)this).Path, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GitCatalog.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GitCatalog.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GitCatalog.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GitCatalog.TypeConverter.cs index a745e32df419..d06b47d4c769 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GitCatalog.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GitCatalog.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GitCatalog.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GitCatalog.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GitCatalog.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GitCatalog.cs index 7c84bce24338..d3f66ac5c40a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GitCatalog.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GitCatalog.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties for a Git repository catalog. public partial class GitCatalog : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalogInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalogInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GitCatalog.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GitCatalog.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GitCatalog.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GitCatalog.json.cs index a4f352a13a2d..9b80158dfa5b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/GitCatalog.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/GitCatalog.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class GitCatalog partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGitCatalog FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGitCatalog FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new GitCatalog(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheck.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheck.PowerShell.cs similarity index 83% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheck.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheck.PowerShell.cs index daac531588c6..9d47ff3bf59d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheck.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheck.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class HealthCheck partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new HealthCheck(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new HealthCheck(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,37 +103,37 @@ internal HealthCheck(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).DisplayName, global::System.Convert.ToString); } if (content.Contains("StartDateTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).StartDateTime = (global::System.DateTime?) content.GetValueForProperty("StartDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).StartDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).StartDateTime = (global::System.DateTime?) content.GetValueForProperty("StartDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).StartDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndDateTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).EndDateTime = (global::System.DateTime?) content.GetValueForProperty("EndDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).EndDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).EndDateTime = (global::System.DateTime?) content.GetValueForProperty("EndDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).EndDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("ErrorType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).ErrorType = (string) content.GetValueForProperty("ErrorType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).ErrorType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).ErrorType = (string) content.GetValueForProperty("ErrorType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).ErrorType, global::System.Convert.ToString); } if (content.Contains("RecommendedAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).RecommendedAction = (string) content.GetValueForProperty("RecommendedAction",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).RecommendedAction, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).RecommendedAction = (string) content.GetValueForProperty("RecommendedAction",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).RecommendedAction, global::System.Convert.ToString); } if (content.Contains("AdditionalDetail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).AdditionalDetail, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).AdditionalDetail, 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. @@ -148,31 +148,31 @@ internal HealthCheck(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).DisplayName, global::System.Convert.ToString); } if (content.Contains("StartDateTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).StartDateTime = (global::System.DateTime?) content.GetValueForProperty("StartDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).StartDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).StartDateTime = (global::System.DateTime?) content.GetValueForProperty("StartDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).StartDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndDateTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).EndDateTime = (global::System.DateTime?) content.GetValueForProperty("EndDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).EndDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).EndDateTime = (global::System.DateTime?) content.GetValueForProperty("EndDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).EndDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("ErrorType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).ErrorType = (string) content.GetValueForProperty("ErrorType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).ErrorType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).ErrorType = (string) content.GetValueForProperty("ErrorType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).ErrorType, global::System.Convert.ToString); } if (content.Contains("RecommendedAction")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).RecommendedAction = (string) content.GetValueForProperty("RecommendedAction",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).RecommendedAction, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).RecommendedAction = (string) content.GetValueForProperty("RecommendedAction",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).RecommendedAction, global::System.Convert.ToString); } if (content.Contains("AdditionalDetail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal)this).AdditionalDetail, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal)this).AdditionalDetail, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheck.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheck.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheck.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheck.TypeConverter.cs index 32cbdd885ebc..1e239177fd74 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheck.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheck.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheck.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheck.cs similarity index 94% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheck.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheck.cs index bfe77b484e75..cffb56362b2c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheck.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheck.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// An individual health check item public partial class HealthCheck : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal { /// Backing field for property. @@ -42,25 +42,25 @@ public partial class HealthCheck : public string ErrorType { get => this._errorType; } /// Internal Acessors for AdditionalDetail - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal.AdditionalDetail { get => this._additionalDetail; set { {_additionalDetail = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal.AdditionalDetail { get => this._additionalDetail; set { {_additionalDetail = value;} } } /// Internal Acessors for DisplayName - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal.DisplayName { get => this._displayName; set { {_displayName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal.DisplayName { get => this._displayName; set { {_displayName = value;} } } /// Internal Acessors for EndDateTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal.EndDateTime { get => this._endDateTime; set { {_endDateTime = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal.EndDateTime { get => this._endDateTime; set { {_endDateTime = value;} } } /// Internal Acessors for ErrorType - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal.ErrorType { get => this._errorType; set { {_errorType = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal.ErrorType { get => this._errorType; set { {_errorType = value;} } } /// Internal Acessors for RecommendedAction - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal.RecommendedAction { get => this._recommendedAction; set { {_recommendedAction = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal.RecommendedAction { get => this._recommendedAction; set { {_recommendedAction = value;} } } /// Internal Acessors for StartDateTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal.StartDateTime { get => this._startDateTime; set { {_startDateTime = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal.StartDateTime { get => this._startDateTime; set { {_startDateTime = value;} } } /// Internal Acessors for Status - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckInternal.Status { get => this._status; set { {_status = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckInternal.Status { get => this._status; set { {_status = value;} } } /// Backing field for property. private string _recommendedAction; diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheck.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheck.json.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheck.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheck.json.cs index bdc50f82e50a..b2ceae9156c4 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheck.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheck.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class HealthCheck partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new HealthCheck(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetails.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetails.PowerShell.cs similarity index 76% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetails.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetails.PowerShell.cs index fdff3e80930b..9bbf4704e9f0 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetails.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetails.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class HealthCheckStatusDetails partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new HealthCheckStatusDetails(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new HealthCheckStatusDetails(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,65 +105,65 @@ internal HealthCheckStatusDetails(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetailsPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetailsPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("StartDateTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).StartDateTime = (global::System.DateTime?) content.GetValueForProperty("StartDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).StartDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).StartDateTime = (global::System.DateTime?) content.GetValueForProperty("StartDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).StartDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndDateTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).EndDateTime = (global::System.DateTime?) content.GetValueForProperty("EndDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).EndDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).EndDateTime = (global::System.DateTime?) content.GetValueForProperty("EndDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).EndDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("HealthCheck")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).HealthCheck = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck[]) content.GetValueForProperty("HealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).HealthCheck, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).HealthCheck = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck[]) content.GetValueForProperty("HealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).HealthCheck, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckTypeConverter.ConvertFrom)); } 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. @@ -178,59 +178,59 @@ internal HealthCheckStatusDetails(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetailsPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetailsPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("StartDateTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).StartDateTime = (global::System.DateTime?) content.GetValueForProperty("StartDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).StartDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).StartDateTime = (global::System.DateTime?) content.GetValueForProperty("StartDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).StartDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndDateTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).EndDateTime = (global::System.DateTime?) content.GetValueForProperty("EndDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).EndDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).EndDateTime = (global::System.DateTime?) content.GetValueForProperty("EndDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).EndDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("HealthCheck")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).HealthCheck = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck[]) content.GetValueForProperty("HealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal)this).HealthCheck, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).HealthCheck = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck[]) content.GetValueForProperty("HealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal)this).HealthCheck, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetails.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetails.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetails.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetails.TypeConverter.cs index 126575c67b07..3e17609a6d46 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetails.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetails.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetails.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetails.cs similarity index 75% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetails.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetails.cs index d5ff64b302fc..202f2f544853 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetails.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetails.cs @@ -3,109 +3,109 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Health Check details. public partial class HealthCheckStatusDetails : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); /// End time of last execution of the health checks. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public global::System.DateTime? EndDateTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).EndDateTime; } + public global::System.DateTime? EndDateTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).EndDateTime; } /// Details for each health check item. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck[] HealthCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).HealthCheck; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck[] HealthCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).HealthCheck; } /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } /// Internal Acessors for EndDateTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal.EndDateTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).EndDateTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).EndDateTime = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal.EndDateTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).EndDateTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).EndDateTime = value; } /// Internal Acessors for HealthCheck - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal.HealthCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).HealthCheck; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).HealthCheck = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal.HealthCheck { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).HealthCheck; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).HealthCheck = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetailsProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetailsProperties()); set { {_property = value;} } } /// Internal Acessors for StartDateTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsInternal.StartDateTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).StartDateTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).StartDateTime = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsInternal.StartDateTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).StartDateTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).StartDateTime = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsProperties _property; /// Health check status details properties. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetailsProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetailsProperties()); set => this._property = value; } /// Start time of last execution of the health checks. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public global::System.DateTime? StartDateTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).StartDateTime; } + public global::System.DateTime? StartDateTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)Property).StartDateTime; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } /// Creates an new instance. public HealthCheckStatusDetails() @@ -128,7 +128,7 @@ public HealthCheckStatusDetails() /// Health Check details. public partial interface IHealthCheckStatusDetails : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource { /// End time of last execution of the health checks. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -144,8 +144,8 @@ public partial interface IHealthCheckStatusDetails : ReadOnly = true, Description = @"Details for each health check item.", SerializedName = @"healthChecks", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck[] HealthCheck { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck[] HealthCheck { get; } /// Start time of last execution of the health checks. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, @@ -158,14 +158,14 @@ public partial interface IHealthCheckStatusDetails : } /// Health Check details. internal partial interface IHealthCheckStatusDetailsInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal { /// End time of last execution of the health checks. global::System.DateTime? EndDateTime { get; set; } /// Details for each health check item. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck[] HealthCheck { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck[] HealthCheck { get; set; } /// Health check status details properties. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsProperties Property { get; set; } /// Start time of last execution of the health checks. global::System.DateTime? StartDateTime { get; set; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetails.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetails.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetails.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetails.json.cs index 594fffdc3edf..45368e5a2ab2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetails.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetails.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class HealthCheckStatusDetails partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new HealthCheckStatusDetails(json) : null; } @@ -77,8 +77,8 @@ internal HealthCheckStatusDetails(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.R { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetailsProperties.FromJson(__jsonProperties) : Property;} + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetailsProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsListResult.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsListResult.PowerShell.cs index 3a1e40dcd067..26ac75c07625 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class HealthCheckStatusDetailsListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new HealthCheckStatusDetailsListResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new HealthCheckStatusDetailsListResult(content); } @@ -89,10 +89,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -107,17 +107,17 @@ internal HealthCheckStatusDetailsListResult(global::System.Collections.IDictiona // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetailsTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetailsTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResultInternal)this).NextLink, 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. @@ -132,11 +132,11 @@ internal HealthCheckStatusDetailsListResult(global::System.Management.Automation // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetailsTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetailsTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsListResult.TypeConverter.cs index 6a8028d3f010..b0764e867606 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsListResult.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsListResult.cs index e2a1e97f29a4..ce3fe7307924 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Result of the network health check list operation. public partial class HealthCheckStatusDetailsListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class HealthCheckStatusDetailsListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails[] Value { get => this._value; } /// Creates an new instance. public HealthCheckStatusDetailsListResult() @@ -57,8 +57,8 @@ public partial interface IHealthCheckStatusDetailsListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails[] Value { get; } } /// Result of the network health check list operation. @@ -68,7 +68,7 @@ internal partial interface IHealthCheckStatusDetailsListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsListResult.json.cs index 5572416a5a69..1cd956c37cdb 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class HealthCheckStatusDetailsListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new HealthCheckStatusDetailsListResult(json) : null; } @@ -77,7 +77,7 @@ internal HealthCheckStatusDetailsListResult(Microsoft.Azure.PowerShell.Cmdlets.D { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckStatusDetails.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckStatusDetails.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsProperties.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsProperties.PowerShell.cs index b0bb3296a8b1..309b19e2469a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class HealthCheckStatusDetailsProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new HealthCheckStatusDetailsProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new HealthCheckStatusDetailsProperties(content); } @@ -89,10 +89,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -107,21 +107,21 @@ internal HealthCheckStatusDetailsProperties(global::System.Collections.IDictiona // actually deserialize if (content.Contains("StartDateTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)this).StartDateTime = (global::System.DateTime?) content.GetValueForProperty("StartDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)this).StartDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)this).StartDateTime = (global::System.DateTime?) content.GetValueForProperty("StartDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)this).StartDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndDateTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)this).EndDateTime = (global::System.DateTime?) content.GetValueForProperty("EndDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)this).EndDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)this).EndDateTime = (global::System.DateTime?) content.GetValueForProperty("EndDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)this).EndDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("HealthCheck")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)this).HealthCheck = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck[]) content.GetValueForProperty("HealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)this).HealthCheck, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)this).HealthCheck = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck[]) content.GetValueForProperty("HealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)this).HealthCheck, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckTypeConverter.ConvertFrom)); } 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. @@ -136,15 +136,15 @@ internal HealthCheckStatusDetailsProperties(global::System.Management.Automation // actually deserialize if (content.Contains("StartDateTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)this).StartDateTime = (global::System.DateTime?) content.GetValueForProperty("StartDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)this).StartDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)this).StartDateTime = (global::System.DateTime?) content.GetValueForProperty("StartDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)this).StartDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndDateTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)this).EndDateTime = (global::System.DateTime?) content.GetValueForProperty("EndDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)this).EndDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)this).EndDateTime = (global::System.DateTime?) content.GetValueForProperty("EndDateTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)this).EndDateTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("HealthCheck")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)this).HealthCheck = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck[]) content.GetValueForProperty("HealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal)this).HealthCheck, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheckTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)this).HealthCheck = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck[]) content.GetValueForProperty("HealthCheck",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal)this).HealthCheck, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheckTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsProperties.TypeConverter.cs index 4b31c5ae8939..e3774df2c012 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsProperties.cs similarity index 87% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsProperties.cs index 9420b90b7c69..47fb1eb42769 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Health Check properties. public partial class HealthCheckStatusDetailsProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal { /// Backing field for property. @@ -21,20 +21,20 @@ public partial class HealthCheckStatusDetailsProperties : public global::System.DateTime? EndDateTime { get => this._endDateTime; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck[] _healthCheck; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck[] _healthCheck; /// Details for each health check item. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck[] HealthCheck { get => this._healthCheck; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck[] HealthCheck { get => this._healthCheck; } /// Internal Acessors for EndDateTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal.EndDateTime { get => this._endDateTime; set { {_endDateTime = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal.EndDateTime { get => this._endDateTime; set { {_endDateTime = value;} } } /// Internal Acessors for HealthCheck - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal.HealthCheck { get => this._healthCheck; set { {_healthCheck = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal.HealthCheck { get => this._healthCheck; set { {_healthCheck = value;} } } /// Internal Acessors for StartDateTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsPropertiesInternal.StartDateTime { get => this._startDateTime; set { {_startDateTime = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsPropertiesInternal.StartDateTime { get => this._startDateTime; set { {_startDateTime = value;} } } /// Backing field for property. private global::System.DateTime? _startDateTime; @@ -67,8 +67,8 @@ public partial interface IHealthCheckStatusDetailsProperties : ReadOnly = true, Description = @"Details for each health check item.", SerializedName = @"healthChecks", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck[] HealthCheck { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck[] HealthCheck { get; } /// Start time of last execution of the health checks. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, @@ -86,7 +86,7 @@ internal partial interface IHealthCheckStatusDetailsPropertiesInternal /// End time of last execution of the health checks. global::System.DateTime? EndDateTime { get; set; } /// Details for each health check item. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck[] HealthCheck { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck[] HealthCheck { get; set; } /// Start time of last execution of the health checks. global::System.DateTime? StartDateTime { get; set; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsProperties.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsProperties.json.cs index 28e272971551..f480cba7b1d4 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthCheckStatusDetailsProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthCheckStatusDetailsProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class HealthCheckStatusDetailsProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new HealthCheckStatusDetailsProperties(json) : null; } @@ -79,7 +79,7 @@ internal HealthCheckStatusDetailsProperties(Microsoft.Azure.PowerShell.Cmdlets.D } {_startDateTime = If( json?.PropertyT("startDateTime"), out var __jsonStartDateTime) ? global::System.DateTime.TryParse((string)__jsonStartDateTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartDateTimeValue) ? __jsonStartDateTimeValue : StartDateTime : StartDateTime;} {_endDateTime = If( json?.PropertyT("endDateTime"), out var __jsonEndDateTime) ? global::System.DateTime.TryParse((string)__jsonEndDateTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndDateTimeValue) ? __jsonEndDateTimeValue : EndDateTime : EndDateTime;} - {_healthCheck = If( json?.PropertyT("healthChecks"), out var __jsonHealthChecks) ? If( __jsonHealthChecks as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheck) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthCheck.FromJson(__u) )) ))() : null : HealthCheck;} + {_healthCheck = If( json?.PropertyT("healthChecks"), out var __jsonHealthChecks) ? If( __jsonHealthChecks as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheck) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthCheck.FromJson(__u) )) ))() : null : HealthCheck;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthStatusDetail.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthStatusDetail.PowerShell.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthStatusDetail.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthStatusDetail.PowerShell.cs index 4593e4cd543d..5198f2d42fbf 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthStatusDetail.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthStatusDetail.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class HealthStatusDetail partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new HealthStatusDetail(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new HealthStatusDetail(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,17 +105,17 @@ internal HealthStatusDetail(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetailInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetailInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetailInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetailInternal)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. @@ -130,11 +130,11 @@ internal HealthStatusDetail(global::System.Management.Automation.PSObject conten // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetailInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetailInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetailInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetailInternal)this).Message, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthStatusDetail.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthStatusDetail.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthStatusDetail.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthStatusDetail.TypeConverter.cs index e7f02dfd7b2e..24c8e13c7545 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthStatusDetail.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthStatusDetail.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthStatusDetail.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthStatusDetail.cs similarity index 93% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthStatusDetail.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthStatusDetail.cs index 6289db1c64e8..c0b04eee64aa 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthStatusDetail.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthStatusDetail.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Pool health status detail. public partial class HealthStatusDetail : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetailInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetailInternal { /// Backing field for property. @@ -30,10 +30,10 @@ public partial class HealthStatusDetail : public string Message { get => this._message; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetailInternal.Code { get => this._code; set { {_code = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetailInternal.Code { get => this._code; set { {_code = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetailInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetailInternal.Message { get => this._message; set { {_message = value;} } } /// Creates an new instance. public HealthStatusDetail() diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthStatusDetail.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthStatusDetail.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthStatusDetail.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthStatusDetail.json.cs index 5f2d28bc050d..9a5e30c4a1e8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/HealthStatusDetail.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/HealthStatusDetail.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class HealthStatusDetail partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new HealthStatusDetail(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Image.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Image.PowerShell.cs new file mode 100644 index 000000000000..cb107608ace2 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Image.PowerShell.cs @@ -0,0 +1,328 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents an image. + [System.ComponentModel.TypeConverter(typeof(ImageTypeConverter))] + public partial class Image + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Image(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Image(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Image(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImagePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("HibernateSupport")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); + } + if (content.Contains("RecommendedMachineConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).RecommendedMachineConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration) content.GetValueForProperty("RecommendedMachineConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).RecommendedMachineConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.RecommendedMachineConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Publisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Publisher, global::System.Convert.ToString); + } + if (content.Contains("Offer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Offer = (string) content.GetValueForProperty("Offer",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Offer, global::System.Convert.ToString); + } + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Sku, global::System.Convert.ToString); + } + if (content.Contains("RecommendedMachineConfigurationMemory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).RecommendedMachineConfigurationMemory = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationMemory",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).RecommendedMachineConfigurationMemory, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("RecommendedMachineConfigurationVCpUs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).RecommendedMachineConfigurationVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).RecommendedMachineConfigurationVCpUs, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("MemoryMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VCpUsMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VCpUsMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Image(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImagePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("HibernateSupport")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); + } + if (content.Contains("RecommendedMachineConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).RecommendedMachineConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration) content.GetValueForProperty("RecommendedMachineConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).RecommendedMachineConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.RecommendedMachineConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Publisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Publisher, global::System.Convert.ToString); + } + if (content.Contains("Offer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Offer = (string) content.GetValueForProperty("Offer",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Offer, global::System.Convert.ToString); + } + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).Sku, global::System.Convert.ToString); + } + if (content.Contains("RecommendedMachineConfigurationMemory")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).RecommendedMachineConfigurationMemory = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationMemory",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).RecommendedMachineConfigurationMemory, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("RecommendedMachineConfigurationVCpUs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).RecommendedMachineConfigurationVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).RecommendedMachineConfigurationVCpUs, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRangeTypeConverter.ConvertFrom); + } + if (content.Contains("MemoryMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VCpUsMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VCpUsMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents an image. + [System.ComponentModel.TypeConverter(typeof(ImageTypeConverter))] + public partial interface IImage + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Image.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Image.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Image.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Image.TypeConverter.cs index de7ae5682ffa..352723db155f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Image.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Image.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Image.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Image.cs similarity index 76% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Image.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Image.cs index e7e346b92f76..66583eed67a2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Image.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Image.cs @@ -3,170 +3,170 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Represents an image. public partial class Image : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); /// The description of the image. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).Description; } + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).Description; } /// /// Indicates whether this image has hibernate enabled. Not all images are capable of supporting hibernation. To find out /// more see https://aka.ms/devbox/hibernate /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? HibernateSupport { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).HibernateSupport; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? HibernateSupport { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).HibernateSupport; } /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } /// Maximum value. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).MemoryMax; } + public int? MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).MemoryMax; } /// Minimum value. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).MemoryMin; } + public int? MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).MemoryMin; } /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal.Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).Description = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal.Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).Description = value; } /// Internal Acessors for HibernateSupport - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal.HibernateSupport { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).HibernateSupport; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).HibernateSupport = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal.HibernateSupport { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).HibernateSupport; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).HibernateSupport = value; } /// Internal Acessors for MemoryMax - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal.MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).MemoryMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).MemoryMax = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal.MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).MemoryMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).MemoryMax = value; } /// Internal Acessors for MemoryMin - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal.MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).MemoryMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).MemoryMin = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal.MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).MemoryMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).MemoryMin = value; } /// Internal Acessors for Offer - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal.Offer { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).Offer; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).Offer = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal.Offer { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).Offer; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).Offer = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Publisher - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal.Publisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).Publisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).Publisher = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal.Publisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).Publisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).Publisher = value; } /// Internal Acessors for RecommendedMachineConfiguration - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal.RecommendedMachineConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).RecommendedMachineConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).RecommendedMachineConfiguration = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal.RecommendedMachineConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).RecommendedMachineConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).RecommendedMachineConfiguration = value; } /// Internal Acessors for RecommendedMachineConfigurationMemory - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal.RecommendedMachineConfigurationMemory { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).RecommendedMachineConfigurationMemory; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).RecommendedMachineConfigurationMemory = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal.RecommendedMachineConfigurationMemory { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).RecommendedMachineConfigurationMemory; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).RecommendedMachineConfigurationMemory = value; } /// Internal Acessors for RecommendedMachineConfigurationVCpUs - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal.RecommendedMachineConfigurationVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).RecommendedMachineConfigurationVCpUs; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).RecommendedMachineConfigurationVCpUs = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal.RecommendedMachineConfigurationVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).RecommendedMachineConfigurationVCpUs; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).RecommendedMachineConfigurationVCpUs = value; } /// Internal Acessors for Sku - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal.Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).Sku = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal.Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).Sku = value; } /// Internal Acessors for VCpUsMax - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal.VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).VCpUsMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).VCpUsMax = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal.VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).VCpUsMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).VCpUsMax = value; } /// Internal Acessors for VCpUsMin - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageInternal.VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).VCpUsMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).VCpUsMin = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageInternal.VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).VCpUsMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).VCpUsMin = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } /// The name of the image offer. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string Offer { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).Offer; } + public string Offer { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).Offer; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageProperties _property; /// Image properties. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageProperties()); set => this._property = value; } /// The provisioning state of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).ProvisioningState; } /// The publisher of the image. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string Publisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).Publisher; } + public string Publisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).Publisher; } /// The SKU name for the image. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).Sku; } + public string Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).Sku; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } /// Maximum value. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).VCpUsMax; } + public int? VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).VCpUsMax; } /// Minimum value. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)Property).VCpUsMin; } + public int? VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)Property).VCpUsMin; } /// Creates an new instance. public Image() @@ -189,7 +189,7 @@ public Image() /// Represents an image. public partial interface IImage : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource { /// The description of the image. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -278,7 +278,7 @@ public partial interface IImage : } /// Represents an image. internal partial interface IImageInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal { /// The description of the image. string Description { get; set; } @@ -294,17 +294,17 @@ internal partial interface IImageInternal : /// The name of the image offer. string Offer { get; set; } /// Image properties. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageProperties Property { get; set; } /// The provisioning state of the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } /// The publisher of the image. string Publisher { get; set; } /// The recommended machine configuration to use with the image. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration RecommendedMachineConfiguration { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration RecommendedMachineConfiguration { get; set; } /// Recommended memory range. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange RecommendedMachineConfigurationMemory { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange RecommendedMachineConfigurationMemory { get; set; } /// Recommended vCPU range. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange RecommendedMachineConfigurationVCpUs { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange RecommendedMachineConfigurationVCpUs { get; set; } /// The SKU name for the image. string Sku { get; set; } /// Maximum value. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Image.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Image.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Image.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Image.json.cs index 569c307c4d49..59ec5150a82f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Image.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Image.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Image partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Image(json) : null; } @@ -77,8 +77,8 @@ internal Image(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObj { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageProperties.FromJson(__jsonProperties) : Property;} + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageCreationErrorDetails.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageCreationErrorDetails.PowerShell.cs new file mode 100644 index 000000000000..ddd40347f529 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageCreationErrorDetails.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Image creation error details + [System.ComponentModel.TypeConverter(typeof(ImageCreationErrorDetailsTypeConverter))] + public partial class ImageCreationErrorDetails + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageCreationErrorDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageCreationErrorDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageCreationErrorDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)this).Message, 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 ImageCreationErrorDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Image creation error details + [System.ComponentModel.TypeConverter(typeof(ImageCreationErrorDetailsTypeConverter))] + public partial interface IImageCreationErrorDetails + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageCreationErrorDetails.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageCreationErrorDetails.TypeConverter.cs new file mode 100644 index 000000000000..4e6fe5596921 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageCreationErrorDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageCreationErrorDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageCreationErrorDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageCreationErrorDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageCreationErrorDetails.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageCreationErrorDetails.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageCreationErrorDetails.cs new file mode 100644 index 000000000000..d5164932b2e5 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageCreationErrorDetails.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Image creation error details + public partial class ImageCreationErrorDetails : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal + { + + /// Backing field for property. + private string _code; + + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Code { get => this._code; set => this._code = value; } + + /// Backing field for property. + private string _message; + + /// A message describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Creates an new instance. + public ImageCreationErrorDetails() + { + + } + } + /// Image creation error details + public partial interface IImageCreationErrorDetails : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An identifier for the error.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// A message describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A message describing the error.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + + } + /// Image creation error details + internal partial interface IImageCreationErrorDetailsInternal + + { + /// An identifier for the error. + string Code { get; set; } + /// A message describing the error. + string Message { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageCreationErrorDetails.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageCreationErrorDetails.json.cs new file mode 100644 index 000000000000..7129e8bd55da --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageCreationErrorDetails.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Image creation error details + public partial class ImageCreationErrorDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageCreationErrorDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ImageCreationErrorDetails(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinition.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinition.PowerShell.cs new file mode 100644 index 000000000000..fb9e1635ffa5 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinition.PowerShell.cs @@ -0,0 +1,408 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents a definition for an Image. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionTypeConverter))] + public partial class ImageDefinition + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageDefinition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageDefinition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("LatestBuild")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuild = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild) content.GetValueForProperty("LatestBuild",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuild, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.LatestImageBuildTypeConverter.ConvertFrom); + } + if (content.Contains("ImageValidationErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails) content.GetValueForProperty("ImageValidationErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("Extend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).Extend = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference) content.GetValueForProperty("Extend",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).Extend, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("FileUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).FileUrl = (string) content.GetValueForProperty("FileUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).FileUrl, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus?) content.GetValueForProperty("ImageValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus.CreateFrom); + } + if (content.Contains("ValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + } + if (content.Contains("AutoImageBuild")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).AutoImageBuild = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus?) content.GetValueForProperty("AutoImageBuild",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).AutoImageBuild, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus.CreateFrom); + } + if (content.Contains("Task")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).Task = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[]) content.GetValueForProperty("Task",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).Task, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskInstanceTypeConverter.ConvertFrom)); + } + if (content.Contains("UserTask")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).UserTask = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[]) content.GetValueForProperty("UserTask",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).UserTask, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskInstanceTypeConverter.ConvertFrom)); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationErrorDetailCode = (string) content.GetValueForProperty("ImageValidationErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationErrorDetailMessage = (string) content.GetValueForProperty("ImageValidationErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationErrorDetailMessage, global::System.Convert.ToString); + } + if (content.Contains("LatestBuildName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildName = (string) content.GetValueForProperty("LatestBuildName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildName, global::System.Convert.ToString); + } + if (content.Contains("LatestBuildStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildStartTime = (global::System.DateTime?) content.GetValueForProperty("LatestBuildStartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LatestBuildEndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildEndTime = (global::System.DateTime?) content.GetValueForProperty("LatestBuildEndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LatestBuildStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("LatestBuildStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ActiveImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("ExtendImageDefinition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ExtendImageDefinition = (string) content.GetValueForProperty("ExtendImageDefinition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ExtendImageDefinition, global::System.Convert.ToString); + } + if (content.Contains("ExtendParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ExtendParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[]) content.GetValueForProperty("ExtendParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ExtendParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DefinitionParametersItemTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ImageDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("LatestBuild")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuild = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild) content.GetValueForProperty("LatestBuild",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuild, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.LatestImageBuildTypeConverter.ConvertFrom); + } + if (content.Contains("ImageValidationErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails) content.GetValueForProperty("ImageValidationErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("Extend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).Extend = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference) content.GetValueForProperty("Extend",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).Extend, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("FileUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).FileUrl = (string) content.GetValueForProperty("FileUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).FileUrl, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus?) content.GetValueForProperty("ImageValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus.CreateFrom); + } + if (content.Contains("ValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + } + if (content.Contains("AutoImageBuild")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).AutoImageBuild = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus?) content.GetValueForProperty("AutoImageBuild",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).AutoImageBuild, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus.CreateFrom); + } + if (content.Contains("Task")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).Task = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[]) content.GetValueForProperty("Task",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).Task, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskInstanceTypeConverter.ConvertFrom)); + } + if (content.Contains("UserTask")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).UserTask = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[]) content.GetValueForProperty("UserTask",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).UserTask, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskInstanceTypeConverter.ConvertFrom)); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationErrorDetailCode = (string) content.GetValueForProperty("ImageValidationErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationErrorDetailMessage = (string) content.GetValueForProperty("ImageValidationErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ImageValidationErrorDetailMessage, global::System.Convert.ToString); + } + if (content.Contains("LatestBuildName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildName = (string) content.GetValueForProperty("LatestBuildName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildName, global::System.Convert.ToString); + } + if (content.Contains("LatestBuildStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildStartTime = (global::System.DateTime?) content.GetValueForProperty("LatestBuildStartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LatestBuildEndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildEndTime = (global::System.DateTime?) content.GetValueForProperty("LatestBuildEndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LatestBuildStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("LatestBuildStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).LatestBuildStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ActiveImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("ExtendImageDefinition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ExtendImageDefinition = (string) content.GetValueForProperty("ExtendImageDefinition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ExtendImageDefinition, global::System.Convert.ToString); + } + if (content.Contains("ExtendParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ExtendParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[]) content.GetValueForProperty("ExtendParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal)this).ExtendParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DefinitionParametersItemTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents a definition for an Image. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionTypeConverter))] + public partial interface IImageDefinition + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinition.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinition.TypeConverter.cs new file mode 100644 index 000000000000..fefcabf62b14 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageDefinition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageDefinition.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinition.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinition.cs new file mode 100644 index 000000000000..8e145c5214d7 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinition.cs @@ -0,0 +1,469 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a definition for an Image. + public partial class ImageDefinition : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ActiveImageReferenceExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ActiveImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ActiveImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ActiveImageReferenceId = value ?? null; } + + /// + /// Indicates if automatic image builds will be triggered for image definition updates + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus? AutoImageBuild { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).AutoImageBuild; } + + /// Name of the referenced Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ExtendImageDefinition { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ExtendImageDefinition; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ExtendImageDefinition = value ?? null; } + + /// Parameters for the referenced Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[] ExtendParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ExtendParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ExtendParameter = value ?? null /* arrayOf */; } + + /// The URL to the repository file containing the image definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string FileUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).FileUrl; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageReferenceExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageReferenceId = value ?? null; } + + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageValidationErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageValidationErrorDetailCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageValidationErrorDetailCode = value ?? null; } + + /// A message describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageValidationErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageValidationErrorDetailMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageValidationErrorDetailMessage = value ?? null; } + + /// Validation status of the configured image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? ImageValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageValidationStatus; } + + /// End time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public global::System.DateTime? LatestBuildEndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).LatestBuildEndTime; } + + /// Identifier of a build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string LatestBuildName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).LatestBuildName; } + + /// Start time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public global::System.DateTime? LatestBuildStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).LatestBuildStartTime; } + + /// The state of an Image Definition Build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? LatestBuildStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).LatestBuildStatus; } + + /// Internal Acessors for ActiveImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.ActiveImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ActiveImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ActiveImageReference = value; } + + /// Internal Acessors for ActiveImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ActiveImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ActiveImageReferenceExactVersion = value; } + + /// Internal Acessors for AutoImageBuild + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.AutoImageBuild { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).AutoImageBuild; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).AutoImageBuild = value; } + + /// Internal Acessors for Extend + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.Extend { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).Extend; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).Extend = value; } + + /// Internal Acessors for FileUrl + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.FileUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).FileUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).FileUrl = value; } + + /// Internal Acessors for ImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.ImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageReference = value; } + + /// Internal Acessors for ImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageReferenceExactVersion = value; } + + /// Internal Acessors for ImageValidationErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.ImageValidationErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageValidationErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageValidationErrorDetail = value; } + + /// Internal Acessors for ImageValidationStatus + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.ImageValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageValidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ImageValidationStatus = value; } + + /// Internal Acessors for LatestBuild + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.LatestBuild { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).LatestBuild; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).LatestBuild = value; } + + /// Internal Acessors for LatestBuildEndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.LatestBuildEndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).LatestBuildEndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).LatestBuildEndTime = value; } + + /// Internal Acessors for LatestBuildName + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.LatestBuildName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).LatestBuildName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).LatestBuildName = value; } + + /// Internal Acessors for LatestBuildStartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.LatestBuildStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).LatestBuildStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).LatestBuildStartTime = value; } + + /// Internal Acessors for LatestBuildStatus + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.LatestBuildStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).LatestBuildStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).LatestBuildStatus = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionProperties()); set { {_property = value;} } } + + /// Internal Acessors for ValidationStatus + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionInternal.ValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ValidationStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ValidationStatus = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionProperties _property; + + /// Image Definition properties + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionProperties()); set => this._property = value; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// Tasks to run at Dev Box provisioning time. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[] Task { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).Task; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).Task = value ?? null /* arrayOf */; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } + + /// Tasks to run when a user first logs into a Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[] UserTask { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).UserTask; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).UserTask = value ?? null /* arrayOf */; } + + /// Validation status for the Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)Property).ValidationStatus; } + + /// Creates an new instance. + public ImageDefinition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Represents a definition for an Image. + public partial interface IImageDefinition : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource + { + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ActiveImageReferenceExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ActiveImageReferenceId { get; set; } + /// + /// Indicates if automatic image builds will be triggered for image definition updates + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates if automatic image builds will be triggered for image definition updates", + SerializedName = @"autoImageBuild", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus? AutoImageBuild { get; } + /// Name of the referenced Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the referenced Image Definition.", + SerializedName = @"imageDefinition", + PossibleTypes = new [] { typeof(string) })] + string ExtendImageDefinition { get; set; } + /// Parameters for the referenced Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Parameters for the referenced Image Definition.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[] ExtendParameter { get; set; } + /// The URL to the repository file containing the image definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The URL to the repository file containing the image definition.", + SerializedName = @"fileUrl", + PossibleTypes = new [] { typeof(string) })] + string FileUrl { get; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceId { get; set; } + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An identifier for the error.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ImageValidationErrorDetailCode { get; set; } + /// A message describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A message describing the error.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ImageValidationErrorDetailMessage { get; set; } + /// Validation status of the configured image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Validation status of the configured image.", + SerializedName = @"imageValidationStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? ImageValidationStatus { get; } + /// End time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"End time of the task group.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LatestBuildEndTime { get; } + /// Identifier of a build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Identifier of a build.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string LatestBuildName { get; } + /// Start time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Start time of the task group.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LatestBuildStartTime { get; } + /// The state of an Image Definition Build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The state of an Image Definition Build.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? LatestBuildStatus { get; } + /// Tasks to run at Dev Box provisioning time. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Tasks to run at Dev Box provisioning time.", + SerializedName = @"tasks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[] Task { get; set; } + /// Tasks to run when a user first logs into a Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Tasks to run when a user first logs into a Dev Box.", + SerializedName = @"userTasks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[] UserTask { get; set; } + /// Validation status for the Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Validation status for the Image Definition.", + SerializedName = @"validationStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get; } + + } + /// Represents a definition for an Image. + internal partial interface IImageDefinitionInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal + { + /// + /// Image reference information for the currently active image (only populated during updates). + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ActiveImageReference { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ActiveImageReferenceExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string ActiveImageReferenceId { get; set; } + /// + /// Indicates if automatic image builds will be triggered for image definition updates + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus? AutoImageBuild { get; set; } + /// Another Image Definition that this one extends. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference Extend { get; set; } + /// Name of the referenced Image Definition. + string ExtendImageDefinition { get; set; } + /// Parameters for the referenced Image Definition. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[] ExtendParameter { get; set; } + /// The URL to the repository file containing the image definition. + string FileUrl { get; set; } + /// Image reference information. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ImageReference { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ImageReferenceExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string ImageReferenceId { get; set; } + /// + /// Details for image validator error. Populated when the image validation is not successful. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails ImageValidationErrorDetail { get; set; } + /// An identifier for the error. + string ImageValidationErrorDetailCode { get; set; } + /// A message describing the error. + string ImageValidationErrorDetailMessage { get; set; } + /// Validation status of the configured image. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? ImageValidationStatus { get; set; } + /// Details about the latest build. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild LatestBuild { get; set; } + /// End time of the task group. + global::System.DateTime? LatestBuildEndTime { get; set; } + /// Identifier of a build. + string LatestBuildName { get; set; } + /// Start time of the task group. + global::System.DateTime? LatestBuildStartTime { get; set; } + /// The state of an Image Definition Build. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? LatestBuildStatus { get; set; } + /// Image Definition properties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionProperties Property { get; set; } + /// Tasks to run at Dev Box provisioning time. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[] Task { get; set; } + /// Tasks to run when a user first logs into a Dev Box. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[] UserTask { get; set; } + /// Validation status for the Image Definition. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinition.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinition.json.cs new file mode 100644 index 000000000000..edeba75c696a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinition.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a definition for an Image. + public partial class ImageDefinition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageDefinition(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ImageDefinition(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuild.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuild.PowerShell.cs new file mode 100644 index 000000000000..e796a98e47ea --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuild.PowerShell.cs @@ -0,0 +1,298 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents a specific build of an Image Definition. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionBuildTypeConverter))] + public partial class ImageDefinitionBuild + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageDefinitionBuild(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageDefinitionBuild(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageDefinitionBuild(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageCreationErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ErrorDetailMessage, 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 ImageDefinitionBuild(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageCreationErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal)this).ErrorDetailMessage, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents a specific build of an Image Definition. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionBuildTypeConverter))] + public partial interface IImageDefinitionBuild + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuild.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuild.TypeConverter.cs new file mode 100644 index 000000000000..ff35fc151721 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuild.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageDefinitionBuildTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageDefinitionBuild.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageDefinitionBuild.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageDefinitionBuild.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuild.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuild.cs new file mode 100644 index 000000000000..cfc8a2acfa74 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuild.cs @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a specific build of an Image Definition. + public partial class ImageDefinitionBuild : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); + + /// End time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).EndTime; } + + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).ErrorDetailCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).ErrorDetailCode = value ?? null; } + + /// A message describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).ErrorDetailMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).ErrorDetailMessage = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).ImageReferenceExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).ImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).ImageReferenceId = value ?? null; } + + /// Internal Acessors for EndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal.EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).EndTime = value; } + + /// Internal Acessors for ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal.ErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).ErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).ErrorDetail = value; } + + /// Internal Acessors for ImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal.ImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).ImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).ImageReference = value; } + + /// Internal Acessors for ImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).ImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).ImageReferenceExactVersion = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildProperties()); set { {_property = value;} } } + + /// Internal Acessors for StartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal.StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).StartTime = value; } + + /// Internal Acessors for Status + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).Status = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildProperties _property; + + /// Image Definition Build properties + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildProperties()); set => this._property = value; } + + /// Start time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).StartTime; } + + /// The status of the build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)Property).Status; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ImageDefinitionBuild() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Represents a specific build of an Image Definition. + public partial interface IImageDefinitionBuild : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource + { + /// End time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"End time of the task group.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; } + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An identifier for the error.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailCode { get; set; } + /// A message describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A message describing the error.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailMessage { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceId { get; set; } + /// Start time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Start time of the task group.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; } + /// The status of the build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The status of the build.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get; } + + } + /// Represents a specific build of an Image Definition. + internal partial interface IImageDefinitionBuildInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal + { + /// End time of the task group. + global::System.DateTime? EndTime { get; set; } + /// + /// Details for image creation error. Populated when the image creation is not successful. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails ErrorDetail { get; set; } + /// An identifier for the error. + string ErrorDetailCode { get; set; } + /// A message describing the error. + string ErrorDetailMessage { get; set; } + /// The specific image version used by the build. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ImageReference { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ImageReferenceExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string ImageReferenceId { get; set; } + /// Image Definition Build properties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildProperties Property { get; set; } + /// Start time of the task group. + global::System.DateTime? StartTime { get; set; } + /// The status of the build. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuild.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuild.json.cs new file mode 100644 index 000000000000..4c136c4b4685 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuild.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a specific build of an Image Definition. + public partial class ImageDefinitionBuild + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageDefinitionBuild(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ImageDefinitionBuild(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildDetails.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildDetails.PowerShell.cs new file mode 100644 index 000000000000..fd9bc6cdbfb8 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildDetails.PowerShell.cs @@ -0,0 +1,298 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents a specific build of an Image Definition. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionBuildDetailsTypeConverter))] + public partial class ImageDefinitionBuildDetails + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageDefinitionBuildDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageDefinitionBuildDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageDefinitionBuildDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageCreationErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TaskGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).TaskGroup = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup[]) content.GetValueForProperty("TaskGroup",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).TaskGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTaskGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ErrorDetailMessage, 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 ImageDefinitionBuildDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageCreationErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TaskGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).TaskGroup = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup[]) content.GetValueForProperty("TaskGroup",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).TaskGroup, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTaskGroupTypeConverter.ConvertFrom)); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal)this).ErrorDetailMessage, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents a specific build of an Image Definition. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionBuildDetailsTypeConverter))] + public partial interface IImageDefinitionBuildDetails + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildDetails.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildDetails.TypeConverter.cs new file mode 100644 index 000000000000..eee860762a20 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageDefinitionBuildDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageDefinitionBuildDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageDefinitionBuildDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageDefinitionBuildDetails.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildDetails.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildDetails.cs new file mode 100644 index 000000000000..c5ed1a7e545d --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildDetails.cs @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a specific build of an Image Definition. + public partial class ImageDefinitionBuildDetails : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// End time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails _errorDetail; + + /// + /// Details for image creation error. Populated when the image creation is not successful. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageCreationErrorDetails()); } + + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)ErrorDetail).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)ErrorDetail).Code = value ?? null; } + + /// A message describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)ErrorDetail).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)ErrorDetail).Message = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference _imageReference; + + /// The specific image version used by the build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).ExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Id = value ?? null; } + + /// Internal Acessors for EndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal.EndTime { get => this._endTime; set { {_endTime = value;} } } + + /// Internal Acessors for ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal.ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageCreationErrorDetails()); set { {_errorDetail = value;} } } + + /// Internal Acessors for ImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal.ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); set { {_imageReference = value;} } } + + /// Internal Acessors for ImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).ExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).ExactVersion = value; } + + /// Internal Acessors for StartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal.StartTime { get => this._startTime; set { {_startTime = value;} } } + + /// Internal Acessors for Status + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal.Status { get => this._status; set { {_status = value;} } } + + /// Internal Acessors for TaskGroup + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetailsInternal.TaskGroup { get => this._taskGroup; set { {_taskGroup = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// Start time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? _status; + + /// The status of the build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get => this._status; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup[] _taskGroup; + + /// The list of task groups executed during the image definition build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup[] TaskGroup { get => this._taskGroup; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ImageDefinitionBuildDetails() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Represents a specific build of an Image Definition. + public partial interface IImageDefinitionBuildDetails : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource + { + /// End time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"End time of the task group.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; } + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An identifier for the error.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailCode { get; set; } + /// A message describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A message describing the error.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailMessage { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceId { get; set; } + /// Start time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Start time of the task group.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; } + /// The status of the build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The status of the build.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get; } + /// The list of task groups executed during the image definition build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The list of task groups executed during the image definition build.", + SerializedName = @"taskGroups", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup[] TaskGroup { get; } + + } + /// Represents a specific build of an Image Definition. + internal partial interface IImageDefinitionBuildDetailsInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal + { + /// End time of the task group. + global::System.DateTime? EndTime { get; set; } + /// + /// Details for image creation error. Populated when the image creation is not successful. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails ErrorDetail { get; set; } + /// An identifier for the error. + string ErrorDetailCode { get; set; } + /// A message describing the error. + string ErrorDetailMessage { get; set; } + /// The specific image version used by the build. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ImageReference { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ImageReferenceExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string ImageReferenceId { get; set; } + /// Start time of the task group. + global::System.DateTime? StartTime { get; set; } + /// The status of the build. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get; set; } + /// The list of task groups executed during the image definition build. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup[] TaskGroup { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildDetails.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildDetails.json.cs new file mode 100644 index 000000000000..0b2d56d5ebe9 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildDetails.json.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a specific build of an Image Definition. + public partial class ImageDefinitionBuildDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageDefinitionBuildDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ImageDefinitionBuildDetails(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_imageReference = If( json?.PropertyT("imageReference"), out var __jsonImageReference) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference.FromJson(__jsonImageReference) : ImageReference;} + {_errorDetail = If( json?.PropertyT("errorDetails"), out var __jsonErrorDetails) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageCreationErrorDetails.FromJson(__jsonErrorDetails) : ErrorDetail;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + {_taskGroup = If( json?.PropertyT("taskGroups"), out var __jsonTaskGroups) ? If( __jsonTaskGroups as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTaskGroup.FromJson(__u) )) ))() : null : TaskGroup;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._imageReference ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._imageReference.ToJson(null,serializationMode) : null, "imageReference" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._errorDetail ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._errorDetail.ToJson(null,serializationMode) : null, "errorDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._taskGroup) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); + foreach( var __x in this._taskGroup ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("taskGroups",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildListResult.PowerShell.cs new file mode 100644 index 000000000000..49955a465935 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Results of the Image Definition Build list operation. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionBuildListResultTypeConverter))] + public partial class ImageDefinitionBuildListResult + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageDefinitionBuildListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageDefinitionBuildListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageDefinitionBuildListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResultInternal)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 ImageDefinitionBuildListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Results of the Image Definition Build list operation. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionBuildListResultTypeConverter))] + public partial interface IImageDefinitionBuildListResult + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildListResult.TypeConverter.cs new file mode 100644 index 000000000000..7d8793af364b --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildListResult.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageDefinitionBuildListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageDefinitionBuildListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageDefinitionBuildListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageDefinitionBuildListResult.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildListResult.cs new file mode 100644 index 000000000000..64e0dc444d5e --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildListResult.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Results of the Image Definition Build list operation. + public partial class ImageDefinitionBuildListResult : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of results if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild[] _value; + + /// Current page of results. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild[] Value { get => this._value; } + + /// Creates an new instance. + public ImageDefinitionBuildListResult() + { + + } + } + /// Results of the Image Definition Build list operation. + public partial interface IImageDefinitionBuildListResult : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// URL to get the next set of results if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"URL to get the next set of results if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// Current page of results. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Current page of results.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild[] Value { get; } + + } + /// Results of the Image Definition Build list operation. + internal partial interface IImageDefinitionBuildListResultInternal + + { + /// URL to get the next set of results if there are any. + string NextLink { get; set; } + /// Current page of results. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildListResult.json.cs new file mode 100644 index 000000000000..38d970936942 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildListResult.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Results of the Image Definition Build list operation. + public partial class ImageDefinitionBuildListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageDefinitionBuildListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ImageDefinitionBuildListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuild.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildProperties.PowerShell.cs new file mode 100644 index 000000000000..0ff890386572 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildProperties.PowerShell.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Properties of an Image Definition Build. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionBuildPropertiesTypeConverter))] + public partial class ImageDefinitionBuildProperties + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageDefinitionBuildProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageDefinitionBuildProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageDefinitionBuildProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageCreationErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ErrorDetailMessage, 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 ImageDefinitionBuildProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageCreationErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal)this).ErrorDetailMessage, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Properties of an Image Definition Build. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionBuildPropertiesTypeConverter))] + public partial interface IImageDefinitionBuildProperties + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildProperties.TypeConverter.cs new file mode 100644 index 000000000000..963cda5755f5 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildProperties.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageDefinitionBuildPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageDefinitionBuildProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageDefinitionBuildProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageDefinitionBuildProperties.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildProperties.cs new file mode 100644 index 000000000000..c67baf301197 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildProperties.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Properties of an Image Definition Build. + public partial class ImageDefinitionBuildProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal + { + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// End time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails _errorDetail; + + /// + /// Details for image creation error. Populated when the image creation is not successful. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageCreationErrorDetails()); } + + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)ErrorDetail).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)ErrorDetail).Code = value ?? null; } + + /// A message describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)ErrorDetail).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetailsInternal)ErrorDetail).Message = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference _imageReference; + + /// The specific image version used by the build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).ExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Id = value ?? null; } + + /// Internal Acessors for EndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal.EndTime { get => this._endTime; set { {_endTime = value;} } } + + /// Internal Acessors for ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal.ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageCreationErrorDetails()); set { {_errorDetail = value;} } } + + /// Internal Acessors for ImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal.ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); set { {_imageReference = value;} } } + + /// Internal Acessors for ImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).ExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).ExactVersion = value; } + + /// Internal Acessors for StartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal.StartTime { get => this._startTime; set { {_startTime = value;} } } + + /// Internal Acessors for Status + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildPropertiesInternal.Status { get => this._status; set { {_status = value;} } } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// Start time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? _status; + + /// The status of the build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get => this._status; } + + /// Creates an new instance. + public ImageDefinitionBuildProperties() + { + + } + } + /// Properties of an Image Definition Build. + public partial interface IImageDefinitionBuildProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// End time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"End time of the task group.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; } + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An identifier for the error.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailCode { get; set; } + /// A message describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A message describing the error.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailMessage { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceId { get; set; } + /// Start time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Start time of the task group.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; } + /// The status of the build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The status of the build.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get; } + + } + /// Properties of an Image Definition Build. + internal partial interface IImageDefinitionBuildPropertiesInternal + + { + /// End time of the task group. + global::System.DateTime? EndTime { get; set; } + /// + /// Details for image creation error. Populated when the image creation is not successful. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageCreationErrorDetails ErrorDetail { get; set; } + /// An identifier for the error. + string ErrorDetailCode { get; set; } + /// A message describing the error. + string ErrorDetailMessage { get; set; } + /// The specific image version used by the build. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ImageReference { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ImageReferenceExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string ImageReferenceId { get; set; } + /// Start time of the task group. + global::System.DateTime? StartTime { get; set; } + /// The status of the build. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildProperties.json.cs new file mode 100644 index 000000000000..9add80c4165f --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildProperties.json.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Properties of an Image Definition Build. + public partial class ImageDefinitionBuildProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageDefinitionBuildProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ImageDefinitionBuildProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_imageReference = If( json?.PropertyT("imageReference"), out var __jsonImageReference) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference.FromJson(__jsonImageReference) : ImageReference;} + {_errorDetail = If( json?.PropertyT("errorDetails"), out var __jsonErrorDetails) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageCreationErrorDetails.FromJson(__jsonErrorDetails) : ErrorDetail;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._imageReference ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._imageReference.ToJson(null,serializationMode) : null, "imageReference" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._errorDetail ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._errorDetail.ToJson(null,serializationMode) : null, "errorDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTask.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTask.PowerShell.cs new file mode 100644 index 000000000000..2867c1c6c01e --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTask.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// A task executed during the image definition build. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionBuildTaskTypeConverter))] + public partial class ImageDefinitionBuildTask + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageDefinitionBuildTask(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageDefinitionBuildTask(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageDefinitionBuildTask(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTaskParametersItemTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + if (content.Contains("LogUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).LogUri = (string) content.GetValueForProperty("LogUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).LogUri, 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 ImageDefinitionBuildTask(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTaskParametersItemTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + if (content.Contains("LogUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).LogUri = (string) content.GetValueForProperty("LogUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal)this).LogUri, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A task executed during the image definition build. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionBuildTaskTypeConverter))] + public partial interface IImageDefinitionBuildTask + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTask.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTask.TypeConverter.cs new file mode 100644 index 000000000000..c2e506d81618 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTask.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageDefinitionBuildTaskTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageDefinitionBuildTask.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageDefinitionBuildTask.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageDefinitionBuildTask.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTask.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTask.cs new file mode 100644 index 000000000000..08b96d58135f --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTask.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// A task executed during the image definition build. + public partial class ImageDefinitionBuildTask : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal + { + + /// Backing field for property. + private string _displayName; + + /// Display name to help differentiate multiple instances of the same task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// End time of the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; } + + /// Backing field for property. + private string _id; + + /// ID of the task instance. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Backing field for property. + private string _logUri; + + /// The URI for retrieving logs for the task execution. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string LogUri { get => this._logUri; } + + /// Internal Acessors for EndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal.EndTime { get => this._endTime; set { {_endTime = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for LogUri + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal.LogUri { get => this._logUri; set { {_logUri = value;} } } + + /// Internal Acessors for StartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal.StartTime { get => this._startTime; set { {_startTime = value;} } } + + /// Internal Acessors for Status + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskInternal.Status { get => this._status; set { {_status = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem[] _parameter; + + /// Parameters for the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem[] Parameter { get => this._parameter; set => this._parameter = value; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// Start time of the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? _status; + + /// The status of the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get => this._status; } + + /// Creates an new instance. + public ImageDefinitionBuildTask() + { + + } + } + /// A task executed during the image definition build. + public partial interface IImageDefinitionBuildTask : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// Display name to help differentiate multiple instances of the same task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display name to help differentiate multiple instances of the same task.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// End time of the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"End time of the task.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; } + /// ID of the task instance. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"ID of the task instance.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// The URI for retrieving logs for the task execution. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The URI for retrieving logs for the task execution.", + SerializedName = @"logUri", + PossibleTypes = new [] { typeof(string) })] + string LogUri { get; } + /// The name of the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the task.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// Parameters for the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Parameters for the task.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem[] Parameter { get; set; } + /// Start time of the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Start time of the task.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; } + /// The status of the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The status of the task.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get; } + + } + /// A task executed during the image definition build. + internal partial interface IImageDefinitionBuildTaskInternal + + { + /// Display name to help differentiate multiple instances of the same task. + string DisplayName { get; set; } + /// End time of the task. + global::System.DateTime? EndTime { get; set; } + /// ID of the task instance. + string Id { get; set; } + /// The URI for retrieving logs for the task execution. + string LogUri { get; set; } + /// The name of the task. + string Name { get; set; } + /// Parameters for the task. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem[] Parameter { get; set; } + /// Start time of the task. + global::System.DateTime? StartTime { get; set; } + /// The status of the task. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTask.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTask.json.cs new file mode 100644 index 000000000000..ef43ee8e18ff --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTask.json.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// A task executed during the image definition build. + public partial class ImageDefinitionBuildTask + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageDefinitionBuildTask(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ImageDefinitionBuildTask(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? If( __jsonParameters as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTaskParametersItem.FromJson(__u) )) ))() : null : Parameter;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_logUri = If( json?.PropertyT("logUri"), out var __jsonLogUri) ? (string)__jsonLogUri : (string)LogUri;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + if (null != this._parameter) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); + foreach( var __x in this._parameter ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("parameters",__w); + } + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._logUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._logUri.ToString()) : null, "logUri" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskGroup.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskGroup.PowerShell.cs new file mode 100644 index 000000000000..446a0b54ec53 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskGroup.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// A task group executed during the image definition build. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionBuildTaskGroupTypeConverter))] + public partial class ImageDefinitionBuildTaskGroup + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageDefinitionBuildTaskGroup(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageDefinitionBuildTaskGroup(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageDefinitionBuildTaskGroup(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Task")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).Task = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask[]) content.GetValueForProperty("Task",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).Task, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTaskTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ImageDefinitionBuildTaskGroup(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Task")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).Task = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask[]) content.GetValueForProperty("Task",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal)this).Task, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTaskTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A task group executed during the image definition build. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionBuildTaskGroupTypeConverter))] + public partial interface IImageDefinitionBuildTaskGroup + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskGroup.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskGroup.TypeConverter.cs new file mode 100644 index 000000000000..39a8125acc0d --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskGroup.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageDefinitionBuildTaskGroupTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageDefinitionBuildTaskGroup.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageDefinitionBuildTaskGroup.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageDefinitionBuildTaskGroup.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskGroup.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskGroup.cs new file mode 100644 index 000000000000..1095bdb7fd53 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskGroup.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// A task group executed during the image definition build. + public partial class ImageDefinitionBuildTaskGroup : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal + { + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// End time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; } + + /// Internal Acessors for EndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal.EndTime { get => this._endTime; set { {_endTime = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for StartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal.StartTime { get => this._startTime; set { {_startTime = value;} } } + + /// Internal Acessors for Status + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal.Status { get => this._status; set { {_status = value;} } } + + /// Internal Acessors for Task + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroupInternal.Task { get => this._task; set { {_task = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// Start time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? _status; + + /// The status of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get => this._status; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask[] _task; + + /// The list of tasks executed during the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask[] Task { get => this._task; } + + /// Creates an new instance. + public ImageDefinitionBuildTaskGroup() + { + + } + } + /// A task group executed during the image definition build. + public partial interface IImageDefinitionBuildTaskGroup : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// End time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"End time of the task group.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; } + /// The name of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the task group.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// Start time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Start time of the task group.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; } + /// The status of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The status of the task group.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get; } + /// The list of tasks executed during the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The list of tasks executed during the task group.", + SerializedName = @"tasks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask[] Task { get; } + + } + /// A task group executed during the image definition build. + internal partial interface IImageDefinitionBuildTaskGroupInternal + + { + /// End time of the task group. + global::System.DateTime? EndTime { get; set; } + /// The name of the task group. + string Name { get; set; } + /// Start time of the task group. + global::System.DateTime? StartTime { get; set; } + /// The status of the task group. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get; set; } + /// The list of tasks executed during the task group. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask[] Task { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskGroup.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskGroup.json.cs new file mode 100644 index 000000000000..1ca8950f0a6e --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskGroup.json.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// A task group executed during the image definition build. + public partial class ImageDefinitionBuildTaskGroup + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageDefinitionBuildTaskGroup(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ImageDefinitionBuildTaskGroup(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + {_task = If( json?.PropertyT("tasks"), out var __jsonTasks) ? If( __jsonTasks as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTask) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionBuildTask.FromJson(__u) )) ))() : null : Task;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._task) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); + foreach( var __x in this._task ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("tasks",__w); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskParametersItem.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskParametersItem.PowerShell.cs new file mode 100644 index 000000000000..8510dddec43c --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskParametersItem.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionBuildTaskParametersItemTypeConverter))] + public partial class ImageDefinitionBuildTaskParametersItem + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageDefinitionBuildTaskParametersItem(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageDefinitionBuildTaskParametersItem(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageDefinitionBuildTaskParametersItem(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Key")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItemInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItemInternal)this).Key, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItemInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItemInternal)this).Value, 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 ImageDefinitionBuildTaskParametersItem(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Key")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItemInternal)this).Key = (string) content.GetValueForProperty("Key",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItemInternal)this).Key, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItemInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItemInternal)this).Value, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionBuildTaskParametersItemTypeConverter))] + public partial interface IImageDefinitionBuildTaskParametersItem + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskParametersItem.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskParametersItem.TypeConverter.cs new file mode 100644 index 000000000000..4f3816a275e7 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskParametersItem.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageDefinitionBuildTaskParametersItemTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageDefinitionBuildTaskParametersItem.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageDefinitionBuildTaskParametersItem.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageDefinitionBuildTaskParametersItem.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskParametersItem.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskParametersItem.cs new file mode 100644 index 000000000000..8dc5ed42d366 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskParametersItem.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + public partial class ImageDefinitionBuildTaskParametersItem : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItemInternal + { + + /// Backing field for property. + private string _key; + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Key { get => this._key; set => this._key = value; } + + /// Backing field for property. + private string _value; + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ImageDefinitionBuildTaskParametersItem() + { + + } + } + public partial interface IImageDefinitionBuildTaskParametersItem : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"key", + PossibleTypes = new [] { typeof(string) })] + string Key { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string Value { get; set; } + + } + internal partial interface IImageDefinitionBuildTaskParametersItemInternal + + { + string Key { get; set; } + + string Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskParametersItem.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskParametersItem.json.cs new file mode 100644 index 000000000000..1d5953640a81 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionBuildTaskParametersItem.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + public partial class ImageDefinitionBuildTaskParametersItem + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildTaskParametersItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageDefinitionBuildTaskParametersItem(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ImageDefinitionBuildTaskParametersItem(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_key = If( json?.PropertyT("key"), out var __jsonKey) ? (string)__jsonKey : (string)Key;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._key)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._key.ToString()) : null, "key" ,container.Add ); + AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionListResult.PowerShell.cs new file mode 100644 index 000000000000..8d1ec506a26d --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Results of the Image Definition list operation. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionListResultTypeConverter))] + public partial class ImageDefinitionListResult + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageDefinitionListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageDefinitionListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageDefinitionListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResultInternal)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 ImageDefinitionListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Results of the Image Definition list operation. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionListResultTypeConverter))] + public partial interface IImageDefinitionListResult + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionListResult.TypeConverter.cs new file mode 100644 index 000000000000..553d5be78970 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageDefinitionListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageDefinitionListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageDefinitionListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageDefinitionListResult.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionListResult.cs new file mode 100644 index 000000000000..12a86062c844 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionListResult.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Results of the Image Definition list operation. + public partial class ImageDefinitionListResult : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of results if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition[] _value; + + /// Current page of results. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition[] Value { get => this._value; } + + /// Creates an new instance. + public ImageDefinitionListResult() + { + + } + } + /// Results of the Image Definition list operation. + public partial interface IImageDefinitionListResult : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// URL to get the next set of results if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"URL to get the next set of results if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// Current page of results. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Current page of results.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition[] Value { get; } + + } + /// Results of the Image Definition list operation. + internal partial interface IImageDefinitionListResultInternal + + { + /// URL to get the next set of results if there are any. + string NextLink { get; set; } + /// Current page of results. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionListResult.json.cs new file mode 100644 index 000000000000..aee5787fdc66 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionListResult.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Results of the Image Definition list operation. + public partial class ImageDefinitionListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageDefinitionListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ImageDefinitionListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinition.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionProperties.PowerShell.cs new file mode 100644 index 000000000000..81c66351d9a7 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionProperties.PowerShell.cs @@ -0,0 +1,322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Properties of an Image Definition. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionPropertiesTypeConverter))] + public partial class ImageDefinitionProperties + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageDefinitionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageDefinitionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageDefinitionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("LatestBuild")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuild = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild) content.GetValueForProperty("LatestBuild",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuild, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.LatestImageBuildTypeConverter.ConvertFrom); + } + if (content.Contains("ImageValidationErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails) content.GetValueForProperty("ImageValidationErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("Extend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).Extend = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference) content.GetValueForProperty("Extend",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).Extend, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("FileUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).FileUrl = (string) content.GetValueForProperty("FileUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).FileUrl, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus?) content.GetValueForProperty("ImageValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus.CreateFrom); + } + if (content.Contains("ValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + } + if (content.Contains("AutoImageBuild")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).AutoImageBuild = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus?) content.GetValueForProperty("AutoImageBuild",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).AutoImageBuild, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus.CreateFrom); + } + if (content.Contains("Task")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).Task = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[]) content.GetValueForProperty("Task",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).Task, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskInstanceTypeConverter.ConvertFrom)); + } + if (content.Contains("UserTask")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).UserTask = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[]) content.GetValueForProperty("UserTask",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).UserTask, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskInstanceTypeConverter.ConvertFrom)); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationErrorDetailCode = (string) content.GetValueForProperty("ImageValidationErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationErrorDetailMessage = (string) content.GetValueForProperty("ImageValidationErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationErrorDetailMessage, global::System.Convert.ToString); + } + if (content.Contains("LatestBuildName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildName = (string) content.GetValueForProperty("LatestBuildName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildName, global::System.Convert.ToString); + } + if (content.Contains("LatestBuildStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildStartTime = (global::System.DateTime?) content.GetValueForProperty("LatestBuildStartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LatestBuildEndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildEndTime = (global::System.DateTime?) content.GetValueForProperty("LatestBuildEndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LatestBuildStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("LatestBuildStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ActiveImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("ExtendImageDefinition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ExtendImageDefinition = (string) content.GetValueForProperty("ExtendImageDefinition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ExtendImageDefinition, global::System.Convert.ToString); + } + if (content.Contains("ExtendParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ExtendParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[]) content.GetValueForProperty("ExtendParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ExtendParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DefinitionParametersItemTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ImageDefinitionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("LatestBuild")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuild = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild) content.GetValueForProperty("LatestBuild",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuild, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.LatestImageBuildTypeConverter.ConvertFrom); + } + if (content.Contains("ImageValidationErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails) content.GetValueForProperty("ImageValidationErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("Extend")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).Extend = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference) content.GetValueForProperty("Extend",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).Extend, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("FileUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).FileUrl = (string) content.GetValueForProperty("FileUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).FileUrl, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus?) content.GetValueForProperty("ImageValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus.CreateFrom); + } + if (content.Contains("ValidationStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ValidationStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus?) content.GetValueForProperty("ValidationStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ValidationStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus.CreateFrom); + } + if (content.Contains("AutoImageBuild")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).AutoImageBuild = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus?) content.GetValueForProperty("AutoImageBuild",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).AutoImageBuild, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus.CreateFrom); + } + if (content.Contains("Task")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).Task = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[]) content.GetValueForProperty("Task",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).Task, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskInstanceTypeConverter.ConvertFrom)); + } + if (content.Contains("UserTask")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).UserTask = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[]) content.GetValueForProperty("UserTask",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).UserTask, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskInstanceTypeConverter.ConvertFrom)); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationErrorDetailCode = (string) content.GetValueForProperty("ImageValidationErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ImageValidationErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationErrorDetailMessage = (string) content.GetValueForProperty("ImageValidationErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ImageValidationErrorDetailMessage, global::System.Convert.ToString); + } + if (content.Contains("LatestBuildName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildName = (string) content.GetValueForProperty("LatestBuildName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildName, global::System.Convert.ToString); + } + if (content.Contains("LatestBuildStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildStartTime = (global::System.DateTime?) content.GetValueForProperty("LatestBuildStartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LatestBuildEndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildEndTime = (global::System.DateTime?) content.GetValueForProperty("LatestBuildEndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LatestBuildStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("LatestBuildStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).LatestBuildStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ActiveImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("ExtendImageDefinition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ExtendImageDefinition = (string) content.GetValueForProperty("ExtendImageDefinition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ExtendImageDefinition, global::System.Convert.ToString); + } + if (content.Contains("ExtendParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ExtendParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[]) content.GetValueForProperty("ExtendParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal)this).ExtendParameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DefinitionParametersItemTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Properties of an Image Definition. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionPropertiesTypeConverter))] + public partial interface IImageDefinitionProperties + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionProperties.TypeConverter.cs new file mode 100644 index 000000000000..076787273319 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageDefinitionPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageDefinitionProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageDefinitionProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageDefinitionProperties.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionProperties.cs new file mode 100644 index 000000000000..65bba767c1fe --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionProperties.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Properties of an Image Definition. + public partial class ImageDefinitionProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference _activeImageReference; + + /// + /// Image reference information for the currently active image (only populated during updates). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ActiveImageReference { get => (this._activeImageReference = this._activeImageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ActiveImageReference).ExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ActiveImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ActiveImageReference).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ActiveImageReference).Id = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus? _autoImageBuild; + + /// + /// Indicates if automatic image builds will be triggered for image definition updates + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus? AutoImageBuild { get => this._autoImageBuild; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference _extend; + + /// Another Image Definition that this one extends. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference Extend { get => (this._extend = this._extend ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionReference()); set => this._extend = value; } + + /// Name of the referenced Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ExtendImageDefinition { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReferenceInternal)Extend).ImageDefinition; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReferenceInternal)Extend).ImageDefinition = value ?? null; } + + /// Parameters for the referenced Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[] ExtendParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReferenceInternal)Extend).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReferenceInternal)Extend).Parameter = value ?? null /* arrayOf */; } + + /// Backing field for property. + private string _fileUrl; + + /// The URL to the repository file containing the image definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string FileUrl { get => this._fileUrl; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference _imageReference; + + /// Image reference information. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); set => this._imageReference = value; } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).ExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Id = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails _imageValidationErrorDetail; + + /// + /// Details for image validator error. Populated when the image validation is not successful. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails ImageValidationErrorDetail { get => (this._imageValidationErrorDetail = this._imageValidationErrorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetails()); } + + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageValidationErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)ImageValidationErrorDetail).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)ImageValidationErrorDetail).Code = value ?? null; } + + /// A message describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageValidationErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)ImageValidationErrorDetail).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)ImageValidationErrorDetail).Message = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? _imageValidationStatus; + + /// Validation status of the configured image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? ImageValidationStatus { get => this._imageValidationStatus; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild _latestBuild; + + /// Details about the latest build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild LatestBuild { get => (this._latestBuild = this._latestBuild ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.LatestImageBuild()); set => this._latestBuild = value; } + + /// End time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public global::System.DateTime? LatestBuildEndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)LatestBuild).EndTime; } + + /// Identifier of a build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string LatestBuildName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)LatestBuild).Name; } + + /// Start time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public global::System.DateTime? LatestBuildStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)LatestBuild).StartTime; } + + /// The state of an Image Definition Build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? LatestBuildStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)LatestBuild).Status; } + + /// Internal Acessors for ActiveImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal.ActiveImageReference { get => (this._activeImageReference = this._activeImageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); set { {_activeImageReference = value;} } } + + /// Internal Acessors for ActiveImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal.ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ActiveImageReference).ExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ActiveImageReference).ExactVersion = value; } + + /// Internal Acessors for AutoImageBuild + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal.AutoImageBuild { get => this._autoImageBuild; set { {_autoImageBuild = value;} } } + + /// Internal Acessors for Extend + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal.Extend { get => (this._extend = this._extend ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionReference()); set { {_extend = value;} } } + + /// Internal Acessors for FileUrl + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal.FileUrl { get => this._fileUrl; set { {_fileUrl = value;} } } + + /// Internal Acessors for ImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal.ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); set { {_imageReference = value;} } } + + /// Internal Acessors for ImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).ExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).ExactVersion = value; } + + /// Internal Acessors for ImageValidationErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal.ImageValidationErrorDetail { get => (this._imageValidationErrorDetail = this._imageValidationErrorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetails()); set { {_imageValidationErrorDetail = value;} } } + + /// Internal Acessors for ImageValidationStatus + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal.ImageValidationStatus { get => this._imageValidationStatus; set { {_imageValidationStatus = value;} } } + + /// Internal Acessors for LatestBuild + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal.LatestBuild { get => (this._latestBuild = this._latestBuild ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.LatestImageBuild()); set { {_latestBuild = value;} } } + + /// Internal Acessors for LatestBuildEndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal.LatestBuildEndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)LatestBuild).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)LatestBuild).EndTime = value; } + + /// Internal Acessors for LatestBuildName + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal.LatestBuildName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)LatestBuild).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)LatestBuild).Name = value; } + + /// Internal Acessors for LatestBuildStartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal.LatestBuildStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)LatestBuild).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)LatestBuild).StartTime = value; } + + /// Internal Acessors for LatestBuildStatus + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal.LatestBuildStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)LatestBuild).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)LatestBuild).Status = value; } + + /// Internal Acessors for ValidationStatus + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionPropertiesInternal.ValidationStatus { get => this._validationStatus; set { {_validationStatus = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[] _task; + + /// Tasks to run at Dev Box provisioning time. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[] Task { get => this._task; set => this._task = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[] _userTask; + + /// Tasks to run when a user first logs into a Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[] UserTask { get => this._userTask; set => this._userTask = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? _validationStatus; + + /// Validation status for the Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get => this._validationStatus; } + + /// Creates an new instance. + public ImageDefinitionProperties() + { + + } + } + /// Properties of an Image Definition. + public partial interface IImageDefinitionProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ActiveImageReferenceExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ActiveImageReferenceId { get; set; } + /// + /// Indicates if automatic image builds will be triggered for image definition updates + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates if automatic image builds will be triggered for image definition updates", + SerializedName = @"autoImageBuild", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus? AutoImageBuild { get; } + /// Name of the referenced Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the referenced Image Definition.", + SerializedName = @"imageDefinition", + PossibleTypes = new [] { typeof(string) })] + string ExtendImageDefinition { get; set; } + /// Parameters for the referenced Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Parameters for the referenced Image Definition.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[] ExtendParameter { get; set; } + /// The URL to the repository file containing the image definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The URL to the repository file containing the image definition.", + SerializedName = @"fileUrl", + PossibleTypes = new [] { typeof(string) })] + string FileUrl { get; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceId { get; set; } + /// An identifier for the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An identifier for the error.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ImageValidationErrorDetailCode { get; set; } + /// A message describing the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A message describing the error.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ImageValidationErrorDetailMessage { get; set; } + /// Validation status of the configured image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Validation status of the configured image.", + SerializedName = @"imageValidationStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? ImageValidationStatus { get; } + /// End time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"End time of the task group.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LatestBuildEndTime { get; } + /// Identifier of a build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Identifier of a build.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string LatestBuildName { get; } + /// Start time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Start time of the task group.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LatestBuildStartTime { get; } + /// The state of an Image Definition Build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The state of an Image Definition Build.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? LatestBuildStatus { get; } + /// Tasks to run at Dev Box provisioning time. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Tasks to run at Dev Box provisioning time.", + SerializedName = @"tasks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[] Task { get; set; } + /// Tasks to run when a user first logs into a Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Tasks to run when a user first logs into a Dev Box.", + SerializedName = @"userTasks", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[] UserTask { get; set; } + /// Validation status for the Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Validation status for the Image Definition.", + SerializedName = @"validationStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get; } + + } + /// Properties of an Image Definition. + internal partial interface IImageDefinitionPropertiesInternal + + { + /// + /// Image reference information for the currently active image (only populated during updates). + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ActiveImageReference { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ActiveImageReferenceExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string ActiveImageReferenceId { get; set; } + /// + /// Indicates if automatic image builds will be triggered for image definition updates + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus? AutoImageBuild { get; set; } + /// Another Image Definition that this one extends. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference Extend { get; set; } + /// Name of the referenced Image Definition. + string ExtendImageDefinition { get; set; } + /// Parameters for the referenced Image Definition. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[] ExtendParameter { get; set; } + /// The URL to the repository file containing the image definition. + string FileUrl { get; set; } + /// Image reference information. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ImageReference { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ImageReferenceExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string ImageReferenceId { get; set; } + /// + /// Details for image validator error. Populated when the image validation is not successful. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails ImageValidationErrorDetail { get; set; } + /// An identifier for the error. + string ImageValidationErrorDetailCode { get; set; } + /// A message describing the error. + string ImageValidationErrorDetailMessage { get; set; } + /// Validation status of the configured image. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageValidationStatus? ImageValidationStatus { get; set; } + /// Details about the latest build. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild LatestBuild { get; set; } + /// End time of the task group. + global::System.DateTime? LatestBuildEndTime { get; set; } + /// Identifier of a build. + string LatestBuildName { get; set; } + /// Start time of the task group. + global::System.DateTime? LatestBuildStartTime { get; set; } + /// The state of an Image Definition Build. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? LatestBuildStatus { get; set; } + /// Tasks to run at Dev Box provisioning time. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[] Task { get; set; } + /// Tasks to run when a user first logs into a Dev Box. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance[] UserTask { get; set; } + /// Validation status for the Image Definition. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogResourceValidationStatus? ValidationStatus { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionProperties.json.cs new file mode 100644 index 000000000000..b3c434ec368b --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionProperties.json.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Properties of an Image Definition. + public partial class ImageDefinitionProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageDefinitionProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ImageDefinitionProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_imageReference = If( json?.PropertyT("imageReference"), out var __jsonImageReference) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference.FromJson(__jsonImageReference) : ImageReference;} + {_latestBuild = If( json?.PropertyT("latestBuild"), out var __jsonLatestBuild) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.LatestImageBuild.FromJson(__jsonLatestBuild) : LatestBuild;} + {_imageValidationErrorDetail = If( json?.PropertyT("imageValidationErrorDetails"), out var __jsonImageValidationErrorDetails) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageValidationErrorDetails.FromJson(__jsonImageValidationErrorDetails) : ImageValidationErrorDetail;} + {_activeImageReference = If( json?.PropertyT("activeImageReference"), out var __jsonActiveImageReference) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference.FromJson(__jsonActiveImageReference) : ActiveImageReference;} + {_extend = If( json?.PropertyT("extends"), out var __jsonExtends) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageDefinitionReference.FromJson(__jsonExtends) : Extend;} + {_fileUrl = If( json?.PropertyT("fileUrl"), out var __jsonFileUrl) ? (string)__jsonFileUrl : (string)FileUrl;} + {_imageValidationStatus = If( json?.PropertyT("imageValidationStatus"), out var __jsonImageValidationStatus) ? (string)__jsonImageValidationStatus : (string)ImageValidationStatus;} + {_validationStatus = If( json?.PropertyT("validationStatus"), out var __jsonValidationStatus) ? (string)__jsonValidationStatus : (string)ValidationStatus;} + {_autoImageBuild = If( json?.PropertyT("autoImageBuild"), out var __jsonAutoImageBuild) ? (string)__jsonAutoImageBuild : (string)AutoImageBuild;} + {_task = If( json?.PropertyT("tasks"), out var __jsonTasks) ? If( __jsonTasks as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskInstance.FromJson(__u) )) ))() : null : Task;} + {_userTask = If( json?.PropertyT("userTasks"), out var __jsonUserTasks) ? If( __jsonUserTasks as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskInstance) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CustomizationTaskInstance.FromJson(__p) )) ))() : null : UserTask;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._imageReference ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._imageReference.ToJson(null,serializationMode) : null, "imageReference" ,container.Add ); + AddIf( null != this._latestBuild ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._latestBuild.ToJson(null,serializationMode) : null, "latestBuild" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._imageValidationErrorDetail ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._imageValidationErrorDetail.ToJson(null,serializationMode) : null, "imageValidationErrorDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._activeImageReference ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._activeImageReference.ToJson(null,serializationMode) : null, "activeImageReference" ,container.Add ); + } + AddIf( null != this._extend ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._extend.ToJson(null,serializationMode) : null, "extends" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._fileUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._fileUrl.ToString()) : null, "fileUrl" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._imageValidationStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._imageValidationStatus.ToString()) : null, "imageValidationStatus" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._validationStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._validationStatus.ToString()) : null, "validationStatus" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._autoImageBuild)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._autoImageBuild.ToString()) : null, "autoImageBuild" ,container.Add ); + } + if (null != this._task) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); + foreach( var __x in this._task ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("tasks",__w); + } + if (null != this._userTask) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); + foreach( var __s in this._userTask ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("userTasks",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionReference.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionReference.PowerShell.cs new file mode 100644 index 000000000000..a1f041fc4973 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionReference.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// A reference to an Image Definition. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionReferenceTypeConverter))] + public partial class ImageDefinitionReference + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageDefinitionReference(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageDefinitionReference(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageDefinitionReference(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ImageDefinition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReferenceInternal)this).ImageDefinition = (string) content.GetValueForProperty("ImageDefinition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReferenceInternal)this).ImageDefinition, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReferenceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReferenceInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DefinitionParametersItemTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ImageDefinitionReference(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ImageDefinition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReferenceInternal)this).ImageDefinition = (string) content.GetValueForProperty("ImageDefinition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReferenceInternal)this).ImageDefinition, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReferenceInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReferenceInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DefinitionParametersItemTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A reference to an Image Definition. + [System.ComponentModel.TypeConverter(typeof(ImageDefinitionReferenceTypeConverter))] + public partial interface IImageDefinitionReference + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionReference.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionReference.TypeConverter.cs new file mode 100644 index 000000000000..f48d99bd2c14 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionReference.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageDefinitionReferenceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageDefinitionReference.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageDefinitionReference.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageDefinitionReference.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionReference.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionReference.cs new file mode 100644 index 000000000000..d81719b94855 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionReference.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// A reference to an Image Definition. + public partial class ImageDefinitionReference : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReferenceInternal + { + + /// Backing field for property. + private string _imageDefinition; + + /// Name of the referenced Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string ImageDefinition { get => this._imageDefinition; set => this._imageDefinition = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[] _parameter; + + /// Parameters for the referenced Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[] Parameter { get => this._parameter; set => this._parameter = value; } + + /// Creates an new instance. + public ImageDefinitionReference() + { + + } + } + /// A reference to an Image Definition. + public partial interface IImageDefinitionReference : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// Name of the referenced Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the referenced Image Definition.", + SerializedName = @"imageDefinition", + PossibleTypes = new [] { typeof(string) })] + string ImageDefinition { get; set; } + /// Parameters for the referenced Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Parameters for the referenced Image Definition.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[] Parameter { get; set; } + + } + /// A reference to an Image Definition. + internal partial interface IImageDefinitionReferenceInternal + + { + /// Name of the referenced Image Definition. + string ImageDefinition { get; set; } + /// Parameters for the referenced Image Definition. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem[] Parameter { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionReference.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionReference.json.cs new file mode 100644 index 000000000000..9c9cbcbbfe0f --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageDefinitionReference.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// A reference to an Image Definition. + public partial class ImageDefinitionReference + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageDefinitionReference(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ImageDefinitionReference(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_imageDefinition = If( json?.PropertyT("imageDefinition"), out var __jsonImageDefinition) ? (string)__jsonImageDefinition : (string)ImageDefinition;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? If( __jsonParameters as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDefinitionParametersItem) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DefinitionParametersItem.FromJson(__u) )) ))() : null : Parameter;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._imageDefinition)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._imageDefinition.ToString()) : null, "imageDefinition" ,container.Add ); + if (null != this._parameter) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); + foreach( var __x in this._parameter ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("parameters",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageListResult.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageListResult.PowerShell.cs index fdbf3cb5ff18..d170678282cf 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class ImageListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ImageListResult(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ImageListResult(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,17 +103,17 @@ internal ImageListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResultInternal)this).NextLink, 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. @@ -128,11 +128,11 @@ internal ImageListResult(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageListResult.TypeConverter.cs index 16880316404f..4e4334c43ee3 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageListResult.cs similarity index 86% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageListResult.cs index 2639e45ce741..a1e64f918bc7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Results of the image list operation. public partial class ImageListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class ImageListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage[] Value { get => this._value; } /// Creates an new instance. public ImageListResult() @@ -57,8 +57,8 @@ public partial interface IImageListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage[] Value { get; } } /// Results of the image list operation. @@ -68,7 +68,7 @@ internal partial interface IImageListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageListResult.json.cs index 9839dd34a557..8a3467bb2dc9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ImageListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageListResult(json) : null; } @@ -77,7 +77,7 @@ internal ImageListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Js { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Image.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Image.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageProperties.PowerShell.cs similarity index 76% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageProperties.PowerShell.cs index d43b980e2767..b604b6635db8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class ImageProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ImageProperties(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ImageProperties(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,61 +103,61 @@ internal ImageProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("RecommendedMachineConfiguration")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).RecommendedMachineConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration) content.GetValueForProperty("RecommendedMachineConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).RecommendedMachineConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.RecommendedMachineConfigurationTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).RecommendedMachineConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration) content.GetValueForProperty("RecommendedMachineConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).RecommendedMachineConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.RecommendedMachineConfigurationTypeConverter.ConvertFrom); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("Publisher")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Publisher, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Publisher, global::System.Convert.ToString); } if (content.Contains("Offer")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Offer = (string) content.GetValueForProperty("Offer",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Offer, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Offer = (string) content.GetValueForProperty("Offer",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Offer, global::System.Convert.ToString); } if (content.Contains("Sku")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Sku, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Sku, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("HibernateSupport")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); } if (content.Contains("RecommendedMachineConfigurationMemory")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationMemory = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationMemory",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationMemory, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRangeTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationMemory = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationMemory",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationMemory, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRangeTypeConverter.ConvertFrom); } if (content.Contains("RecommendedMachineConfigurationVCpUs")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationVCpUs, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRangeTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationVCpUs, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRangeTypeConverter.ConvertFrom); } if (content.Contains("MemoryMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("MemoryMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("VCpUsMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("VCpUsMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -172,55 +172,55 @@ internal ImageProperties(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("RecommendedMachineConfiguration")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).RecommendedMachineConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration) content.GetValueForProperty("RecommendedMachineConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).RecommendedMachineConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.RecommendedMachineConfigurationTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).RecommendedMachineConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration) content.GetValueForProperty("RecommendedMachineConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).RecommendedMachineConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.RecommendedMachineConfigurationTypeConverter.ConvertFrom); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("Publisher")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Publisher, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Publisher, global::System.Convert.ToString); } if (content.Contains("Offer")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Offer = (string) content.GetValueForProperty("Offer",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Offer, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Offer = (string) content.GetValueForProperty("Offer",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Offer, global::System.Convert.ToString); } if (content.Contains("Sku")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).Sku, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Sku = (string) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).Sku, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("HibernateSupport")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport.CreateFrom); } if (content.Contains("RecommendedMachineConfigurationMemory")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationMemory = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationMemory",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationMemory, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRangeTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationMemory = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationMemory",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationMemory, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRangeTypeConverter.ConvertFrom); } if (content.Contains("RecommendedMachineConfigurationVCpUs")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationVCpUs, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRangeTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationVCpUs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange) content.GetValueForProperty("RecommendedMachineConfigurationVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).RecommendedMachineConfigurationVCpUs, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRangeTypeConverter.ConvertFrom); } if (content.Contains("MemoryMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("MemoryMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("VCpUsMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("VCpUsMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageProperties.TypeConverter.cs index 286431e32e62..547bb9ab0c00 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageProperties.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageProperties.cs index 3c154dfae429..6749d729c5ae 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties of an image. public partial class ImageProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal { /// Backing field for property. @@ -32,50 +32,50 @@ public partial class ImageProperties : /// Maximum value. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).MemoryMax; } + public int? MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).MemoryMax; } /// Minimum value. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).MemoryMin; } + public int? MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).MemoryMin; } /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal.Description { get => this._description; set { {_description = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal.Description { get => this._description; set { {_description = value;} } } /// Internal Acessors for HibernateSupport - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal.HibernateSupport { get => this._hibernateSupport; set { {_hibernateSupport = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal.HibernateSupport { get => this._hibernateSupport; set { {_hibernateSupport = value;} } } /// Internal Acessors for MemoryMax - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal.MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).MemoryMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).MemoryMax = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal.MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).MemoryMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).MemoryMax = value; } /// Internal Acessors for MemoryMin - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal.MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).MemoryMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).MemoryMin = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal.MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).MemoryMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).MemoryMin = value; } /// Internal Acessors for Offer - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal.Offer { get => this._offer; set { {_offer = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal.Offer { get => this._offer; set { {_offer = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for Publisher - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal.Publisher { get => this._publisher; set { {_publisher = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal.Publisher { get => this._publisher; set { {_publisher = value;} } } /// Internal Acessors for RecommendedMachineConfiguration - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal.RecommendedMachineConfiguration { get => (this._recommendedMachineConfiguration = this._recommendedMachineConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.RecommendedMachineConfiguration()); set { {_recommendedMachineConfiguration = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal.RecommendedMachineConfiguration { get => (this._recommendedMachineConfiguration = this._recommendedMachineConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.RecommendedMachineConfiguration()); set { {_recommendedMachineConfiguration = value;} } } /// Internal Acessors for RecommendedMachineConfigurationMemory - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal.RecommendedMachineConfigurationMemory { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).Memory; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).Memory = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal.RecommendedMachineConfigurationMemory { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).Memory; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).Memory = value; } /// Internal Acessors for RecommendedMachineConfigurationVCpUs - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal.RecommendedMachineConfigurationVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUs; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUs = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal.RecommendedMachineConfigurationVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUs; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUs = value; } /// Internal Acessors for Sku - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal.Sku { get => this._sku; set { {_sku = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal.Sku { get => this._sku; set { {_sku = value;} } } /// Internal Acessors for VCpUsMax - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal.VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUsMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUsMax = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal.VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUsMax; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUsMax = value; } /// Internal Acessors for VCpUsMin - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImagePropertiesInternal.VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUsMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUsMin = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImagePropertiesInternal.VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUsMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUsMin = value; } /// Backing field for property. private string _offer; @@ -99,11 +99,11 @@ public partial class ImageProperties : public string Publisher { get => this._publisher; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration _recommendedMachineConfiguration; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration _recommendedMachineConfiguration; /// The recommended machine configuration to use with the image. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration RecommendedMachineConfiguration { get => (this._recommendedMachineConfiguration = this._recommendedMachineConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.RecommendedMachineConfiguration()); } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration RecommendedMachineConfiguration { get => (this._recommendedMachineConfiguration = this._recommendedMachineConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.RecommendedMachineConfiguration()); } /// Backing field for property. private string _sku; @@ -114,11 +114,11 @@ public partial class ImageProperties : /// Maximum value. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUsMax; } + public int? VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUsMax; } /// Minimum value. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUsMin; } + public int? VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)RecommendedMachineConfiguration).VCpUsMin; } /// Creates an new instance. public ImageProperties() @@ -237,11 +237,11 @@ internal partial interface IImagePropertiesInternal /// The publisher of the image. string Publisher { get; set; } /// The recommended machine configuration to use with the image. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration RecommendedMachineConfiguration { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration RecommendedMachineConfiguration { get; set; } /// Recommended memory range. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange RecommendedMachineConfigurationMemory { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange RecommendedMachineConfigurationMemory { get; set; } /// Recommended vCPU range. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange RecommendedMachineConfigurationVCpUs { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange RecommendedMachineConfigurationVCpUs { get; set; } /// The SKU name for the image. string Sku { get; set; } /// Maximum value. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageProperties.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageProperties.json.cs index f2681f169a21..4da2a0eea996 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ImageProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageProperties(json) : null; } @@ -77,7 +77,7 @@ internal ImageProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Js { return; } - {_recommendedMachineConfiguration = If( json?.PropertyT("recommendedMachineConfiguration"), out var __jsonRecommendedMachineConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.RecommendedMachineConfiguration.FromJson(__jsonRecommendedMachineConfiguration) : RecommendedMachineConfiguration;} + {_recommendedMachineConfiguration = If( json?.PropertyT("recommendedMachineConfiguration"), out var __jsonRecommendedMachineConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.RecommendedMachineConfiguration.FromJson(__jsonRecommendedMachineConfiguration) : RecommendedMachineConfiguration;} {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} {_publisher = If( json?.PropertyT("publisher"), out var __jsonPublisher) ? (string)__jsonPublisher : (string)Publisher;} {_offer = If( json?.PropertyT("offer"), out var __jsonOffer) ? (string)__jsonOffer : (string)Offer;} diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.PowerShell.cs new file mode 100644 index 000000000000..aacadcd96ebe --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.PowerShell.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Image reference information + [System.ComponentModel.TypeConverter(typeof(ImageReferenceTypeConverter))] + public partial class ImageReference + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageReference(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageReference(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageReference(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("ExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)this).ExactVersion = (string) content.GetValueForProperty("ExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)this).ExactVersion, 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 ImageReference(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("ExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)this).ExactVersion = (string) content.GetValueForProperty("ExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)this).ExactVersion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Image reference information + [System.ComponentModel.TypeConverter(typeof(ImageReferenceTypeConverter))] + public partial interface IImageReference + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.TypeConverter.cs new file mode 100644 index 000000000000..b68f014ffae4 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageReferenceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageReference.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageReference.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageReference.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.cs new file mode 100644 index 000000000000..3240482763d6 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Image reference information + public partial class ImageReference : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal + { + + /// Backing field for property. + private string _exactVersion; + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string ExactVersion { get => this._exactVersion; } + + /// Backing field for property. + private string _id; + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Internal Acessors for ExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal.ExactVersion { get => this._exactVersion; set { {_exactVersion = value;} } } + + /// Creates an new instance. + public ImageReference() + { + + } + } + /// Image reference information + public partial interface IImageReference : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + + } + /// Image reference information + internal partial interface IImageReferenceInternal + + { + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string Id { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.json.cs new file mode 100644 index 000000000000..36888e79bf1d --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Image reference information + public partial class ImageReference + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageReference(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ImageReference(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_exactVersion = If( json?.PropertyT("exactVersion"), out var __jsonExactVersion) ? (string)__jsonExactVersion : (string)ExactVersion;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._exactVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._exactVersion.ToString()) : null, "exactVersion" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageValidationErrorDetails.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageValidationErrorDetails.PowerShell.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageValidationErrorDetails.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageValidationErrorDetails.PowerShell.cs index 37aaa1b1e44f..d023eca58c0a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageValidationErrorDetails.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageValidationErrorDetails.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ImageValidationErrorDetails partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ImageValidationErrorDetails(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ImageValidationErrorDetails(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,17 +105,17 @@ internal ImageValidationErrorDetails(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetailsInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetailsInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)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. @@ -130,11 +130,11 @@ internal ImageValidationErrorDetails(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetailsInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetailsInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal)this).Message, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageValidationErrorDetails.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageValidationErrorDetails.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageValidationErrorDetails.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageValidationErrorDetails.TypeConverter.cs index 0fe366c48d4e..de6974412cf7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageValidationErrorDetails.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageValidationErrorDetails.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageValidationErrorDetails.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageValidationErrorDetails.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageValidationErrorDetails.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageValidationErrorDetails.cs index 63397cf9b684..f9a44b95d8e3 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageValidationErrorDetails.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageValidationErrorDetails.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Image validation error details public partial class ImageValidationErrorDetails : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetailsInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetailsInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageValidationErrorDetails.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageValidationErrorDetails.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageValidationErrorDetails.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageValidationErrorDetails.json.cs index b5894a70feaa..5f0a00ed5755 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageValidationErrorDetails.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageValidationErrorDetails.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ImageValidationErrorDetails partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageValidationErrorDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageValidationErrorDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageValidationErrorDetails(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersion.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersion.PowerShell.cs similarity index 76% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersion.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersion.PowerShell.cs index 19929dd78a88..17ed6bf81555 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersion.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersion.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class ImageVersion partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ImageVersion(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ImageVersion(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,73 +103,73 @@ internal ImageVersion(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersionPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("PropertiesName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).PropertiesName = (string) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).PropertiesName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).PropertiesName = (string) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).PropertiesName, global::System.Convert.ToString); } if (content.Contains("PublishedDate")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("ExcludeFromLatest")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("OSDiskImageSizeInGb")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -184,67 +184,67 @@ internal ImageVersion(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersionPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("PropertiesName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).PropertiesName = (string) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).PropertiesName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).PropertiesName = (string) content.GetValueForProperty("PropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).PropertiesName, global::System.Convert.ToString); } if (content.Contains("PublishedDate")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("ExcludeFromLatest")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("OSDiskImageSizeInGb")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersion.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersion.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersion.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersion.TypeConverter.cs index 06b625bee14e..a9b25aae067e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersion.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersion.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersion.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersion.cs similarity index 77% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersion.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersion.cs index 8f45e22bbba5..1f5029b9aab9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersion.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersion.cs @@ -3,123 +3,123 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Represents an image version. public partial class ImageVersion : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); /// If the version should be excluded from being treated as the latest version. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public bool? ExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)Property).ExcludeFromLatest; } + public bool? ExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)Property).ExcludeFromLatest; } /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } /// Internal Acessors for ExcludeFromLatest - bool? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal.ExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)Property).ExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)Property).ExcludeFromLatest = value; } + bool? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal.ExcludeFromLatest { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)Property).ExcludeFromLatest; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)Property).ExcludeFromLatest = value; } /// Internal Acessors for OSDiskImageSizeInGb - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal.OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal.OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb = value; } /// Internal Acessors for PropertiesName - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal.PropertiesName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)Property).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)Property).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal.PropertiesName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)Property).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)Property).Name = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersionProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for PublishedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionInternal.PublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)Property).PublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)Property).PublishedDate = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionInternal.PublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)Property).PublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)Property).PublishedDate = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } /// The size of the OS disk image, in GB. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb; } + public int? OSDiskImageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)Property).OSDiskImageSizeInGb; } /// The semantic version string. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string PropertiesName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)Property).Name; } + public string PropertiesName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)Property).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionProperties _property; /// Image version properties. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersionProperties()); set => this._property = value; } /// The provisioning state of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)Property).ProvisioningState; } /// The datetime that the backing image version was published. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public global::System.DateTime? PublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)Property).PublishedDate; } + public global::System.DateTime? PublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)Property).PublishedDate; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } /// Creates an new instance. public ImageVersion() @@ -142,7 +142,7 @@ public ImageVersion() /// Represents an image version. public partial interface IImageVersion : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource { /// If the version should be excluded from being treated as the latest version. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -188,7 +188,7 @@ public partial interface IImageVersion : } /// Represents an image version. internal partial interface IImageVersionInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal { /// If the version should be excluded from being treated as the latest version. bool? ExcludeFromLatest { get; set; } @@ -197,7 +197,7 @@ internal partial interface IImageVersionInternal : /// The semantic version string. string PropertiesName { get; set; } /// Image version properties. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionProperties Property { get; set; } /// The provisioning state of the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } /// The datetime that the backing image version was published. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersion.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersion.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersion.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersion.json.cs index a2ee60dcd577..6b017fc45a08 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersion.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersion.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ImageVersion partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageVersion(json) : null; } @@ -77,8 +77,8 @@ internal ImageVersion(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json. { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersionProperties.FromJson(__jsonProperties) : Property;} + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersionProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionListResult.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionListResult.PowerShell.cs index 80c3db5b62c7..87b06f1b0c26 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ImageVersionListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ImageVersionListResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ImageVersionListResult(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,17 +105,17 @@ internal ImageVersionListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResultInternal)this).NextLink, 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. @@ -130,11 +130,11 @@ internal ImageVersionListResult(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionListResult.TypeConverter.cs index ad79b5c9a72c..ac415ca2bef6 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionListResult.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionListResult.cs index ebfe45e4e2ed..2cff0efa78db 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Results of the image version list operation. public partial class ImageVersionListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class ImageVersionListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion[] Value { get => this._value; } /// Creates an new instance. public ImageVersionListResult() @@ -57,8 +57,8 @@ public partial interface IImageVersionListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion[] Value { get; } } /// Results of the image version list operation. @@ -68,7 +68,7 @@ internal partial interface IImageVersionListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionListResult.json.cs index 8d2a2c9a1bdd..b9657c2c8b51 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ImageVersionListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageVersionListResult(json) : null; } @@ -77,7 +77,7 @@ internal ImageVersionListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Run { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ImageVersion.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageVersion.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionProperties.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionProperties.PowerShell.cs index 5ccad12fabbf..ca14c9258443 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ImageVersionProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ImageVersionProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ImageVersionProperties(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,29 +105,29 @@ internal ImageVersionProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("PublishedDate")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("ExcludeFromLatest")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("OSDiskImageSizeInGb")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } 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. @@ -142,23 +142,23 @@ internal ImageVersionProperties(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("PublishedDate")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("ExcludeFromLatest")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).ExcludeFromLatest = (bool?) content.GetValueForProperty("ExcludeFromLatest",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).ExcludeFromLatest, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("OSDiskImageSizeInGb")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).OSDiskImageSizeInGb = (int?) content.GetValueForProperty("OSDiskImageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).OSDiskImageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionProperties.TypeConverter.cs index 14ca1b1c5f83..c63025df8184 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionProperties.cs similarity index 94% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionProperties.cs index dc3cbbc8ed13..67f68ca49a41 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties of an image version. public partial class ImageVersionProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal { /// Backing field for property. @@ -21,19 +21,19 @@ public partial class ImageVersionProperties : public bool? ExcludeFromLatest { get => this._excludeFromLatest; } /// Internal Acessors for ExcludeFromLatest - bool? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal.ExcludeFromLatest { get => this._excludeFromLatest; set { {_excludeFromLatest = value;} } } + bool? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal.ExcludeFromLatest { get => this._excludeFromLatest; set { {_excludeFromLatest = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for OSDiskImageSizeInGb - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal.OSDiskImageSizeInGb { get => this._oSDiskImageSizeInGb; set { {_oSDiskImageSizeInGb = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal.OSDiskImageSizeInGb { get => this._oSDiskImageSizeInGb; set { {_oSDiskImageSizeInGb = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for PublishedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionPropertiesInternal.PublishedDate { get => this._publishedDate; set { {_publishedDate = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionPropertiesInternal.PublishedDate { get => this._publishedDate; set { {_publishedDate = value;} } } /// Backing field for property. private string _name; diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionProperties.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionProperties.json.cs index 1f567715d758..382335f80279 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ImageVersionProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ImageVersionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ImageVersionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ImageVersionProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/InheritedSettingsForProject.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/InheritedSettingsForProject.PowerShell.cs similarity index 83% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/InheritedSettingsForProject.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/InheritedSettingsForProject.PowerShell.cs index 84cdfde10ee4..b04a8737523f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/InheritedSettingsForProject.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/InheritedSettingsForProject.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class InheritedSettingsForProject partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new InheritedSettingsForProject(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new InheritedSettingsForProject(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,25 +105,25 @@ internal InheritedSettingsForProject(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("ProjectCatalogSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); } if (content.Contains("NetworkSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectNetworkSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectNetworkSettingsTypeConverter.ConvertFrom); } if (content.Contains("ProjectCatalogSettingCatalogItemSyncEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); } if (content.Contains("NetworkSettingMicrosoftHostedNetworkEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); } 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. @@ -138,19 +138,19 @@ internal InheritedSettingsForProject(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("ProjectCatalogSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings) content.GetValueForProperty("ProjectCatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettingsTypeConverter.ConvertFrom); } if (content.Contains("NetworkSetting")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectNetworkSettingsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).NetworkSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettings) content.GetValueForProperty("NetworkSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).NetworkSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectNetworkSettingsTypeConverter.ConvertFrom); } if (content.Contains("ProjectCatalogSettingCatalogItemSyncEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus?) content.GetValueForProperty("ProjectCatalogSettingCatalogItemSyncEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).ProjectCatalogSettingCatalogItemSyncEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus.CreateFrom); } if (content.Contains("NetworkSettingMicrosoftHostedNetworkEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("NetworkSettingMicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal)this).NetworkSettingMicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/InheritedSettingsForProject.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/InheritedSettingsForProject.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/InheritedSettingsForProject.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/InheritedSettingsForProject.TypeConverter.cs index dcabc3784225..4e490414dd2c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/InheritedSettingsForProject.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/InheritedSettingsForProject.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/InheritedSettingsForProject.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/InheritedSettingsForProject.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/InheritedSettingsForProject.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/InheritedSettingsForProject.cs index 8a736bbb4b57..214116061fe1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/InheritedSettingsForProject.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/InheritedSettingsForProject.cs @@ -3,50 +3,50 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Applicable inherited settings for a project. public partial class InheritedSettingsForProject : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal { /// Internal Acessors for NetworkSetting - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal.NetworkSetting { get => (this._networkSetting = this._networkSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectNetworkSettings()); set { {_networkSetting = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal.NetworkSetting { get => (this._networkSetting = this._networkSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectNetworkSettings()); set { {_networkSetting = value;} } } /// Internal Acessors for NetworkSettingMicrosoftHostedNetworkEnableStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal.NetworkSettingMicrosoftHostedNetworkEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettingsInternal)NetworkSetting).MicrosoftHostedNetworkEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettingsInternal)NetworkSetting).MicrosoftHostedNetworkEnableStatus = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal.NetworkSettingMicrosoftHostedNetworkEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettingsInternal)NetworkSetting).MicrosoftHostedNetworkEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettingsInternal)NetworkSetting).MicrosoftHostedNetworkEnableStatus = value; } /// Internal Acessors for ProjectCatalogSetting - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProjectInternal.ProjectCatalogSetting { get => (this._projectCatalogSetting = this._projectCatalogSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettings()); set { {_projectCatalogSetting = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProjectInternal.ProjectCatalogSetting { get => (this._projectCatalogSetting = this._projectCatalogSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettings()); set { {_projectCatalogSetting = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettings _networkSetting; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettings _networkSetting; /// Network settings that will be enforced on this project. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettings NetworkSetting { get => (this._networkSetting = this._networkSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectNetworkSettings()); } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettings NetworkSetting { get => (this._networkSetting = this._networkSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectNetworkSettings()); } /// /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettingsInternal)NetworkSetting).MicrosoftHostedNetworkEnableStatus; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettingsInternal)NetworkSetting).MicrosoftHostedNetworkEnableStatus; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings _projectCatalogSetting; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings _projectCatalogSetting; /// Dev Center settings to be used when associating a project with a catalog. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings ProjectCatalogSetting { get => (this._projectCatalogSetting = this._projectCatalogSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettings()); } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings ProjectCatalogSetting { get => (this._projectCatalogSetting = this._projectCatalogSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettings()); } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus? ProjectCatalogSettingCatalogItemSyncEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettingsInternal)ProjectCatalogSetting).CatalogItemSyncEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettingsInternal)ProjectCatalogSetting).CatalogItemSyncEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus? ProjectCatalogSettingCatalogItemSyncEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettingsInternal)ProjectCatalogSetting).CatalogItemSyncEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettingsInternal)ProjectCatalogSetting).CatalogItemSyncEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemSyncEnableStatus)""); } /// Creates an new instance. public InheritedSettingsForProject() @@ -85,13 +85,13 @@ internal partial interface IInheritedSettingsForProjectInternal { /// Network settings that will be enforced on this project. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettings NetworkSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettings NetworkSetting { get; set; } /// /// Indicates whether pools in this Dev Center can use Microsoft Hosted Networks. Defaults to Enabled if not set. /// Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? NetworkSettingMicrosoftHostedNetworkEnableStatus { get; set; } /// Dev Center settings to be used when associating a project with a catalog. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterProjectCatalogSettings ProjectCatalogSetting { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterProjectCatalogSettings ProjectCatalogSetting { get; set; } /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/InheritedSettingsForProject.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/InheritedSettingsForProject.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/InheritedSettingsForProject.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/InheritedSettingsForProject.json.cs index 15edaddabeab..e04df6a4a6a7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/InheritedSettingsForProject.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/InheritedSettingsForProject.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class InheritedSettingsForProject partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new InheritedSettingsForProject(json) : null; } @@ -77,8 +77,8 @@ internal InheritedSettingsForProject(Microsoft.Azure.PowerShell.Cmdlets.DevCente { return; } - {_projectCatalogSetting = If( json?.PropertyT("projectCatalogSettings"), out var __jsonProjectCatalogSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterProjectCatalogSettings.FromJson(__jsonProjectCatalogSettings) : ProjectCatalogSetting;} - {_networkSetting = If( json?.PropertyT("networkSettings"), out var __jsonNetworkSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectNetworkSettings.FromJson(__jsonNetworkSettings) : NetworkSetting;} + {_projectCatalogSetting = If( json?.PropertyT("projectCatalogSettings"), out var __jsonProjectCatalogSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterProjectCatalogSettings.FromJson(__jsonProjectCatalogSettings) : ProjectCatalogSetting;} + {_networkSetting = If( json?.PropertyT("networkSettings"), out var __jsonNetworkSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectNetworkSettings.FromJson(__jsonNetworkSettings) : NetworkSetting;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/LatestImageBuild.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/LatestImageBuild.PowerShell.cs new file mode 100644 index 000000000000..da547d8c512e --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/LatestImageBuild.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Details about the latest build. + [System.ComponentModel.TypeConverter(typeof(LatestImageBuildTypeConverter))] + public partial class LatestImageBuild + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new LatestImageBuild(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new LatestImageBuild(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal LatestImageBuild(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal LatestImageBuild(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Details about the latest build. + [System.ComponentModel.TypeConverter(typeof(LatestImageBuildTypeConverter))] + public partial interface ILatestImageBuild + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/LatestImageBuild.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/LatestImageBuild.TypeConverter.cs new file mode 100644 index 000000000000..42aba28766dc --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/LatestImageBuild.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class LatestImageBuildTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return LatestImageBuild.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return LatestImageBuild.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return LatestImageBuild.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/LatestImageBuild.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/LatestImageBuild.cs new file mode 100644 index 000000000000..e16f430145fd --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/LatestImageBuild.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Details about the latest build. + public partial class LatestImageBuild : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal + { + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// End time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; } + + /// Internal Acessors for EndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal.EndTime { get => this._endTime; set { {_endTime = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for StartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal.StartTime { get => this._startTime; set { {_startTime = value;} } } + + /// Internal Acessors for Status + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuildInternal.Status { get => this._status; set { {_status = value;} } } + + /// Backing field for property. + private string _name; + + /// Identifier of a build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// Start time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? _status; + + /// The state of an Image Definition Build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get => this._status; } + + /// Creates an new instance. + public LatestImageBuild() + { + + } + } + /// Details about the latest build. + public partial interface ILatestImageBuild : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// End time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"End time of the task group.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; } + /// Identifier of a build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Identifier of a build.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// Start time of the task group. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Start time of the task group.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; } + /// The state of an Image Definition Build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The state of an Image Definition Build.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get; } + + } + /// Details about the latest build. + internal partial interface ILatestImageBuildInternal + + { + /// End time of the task group. + global::System.DateTime? EndTime { get; set; } + /// Identifier of a build. + string Name { get; set; } + /// Start time of the task group. + global::System.DateTime? StartTime { get; set; } + /// The state of an Image Definition Build. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus? Status { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/LatestImageBuild.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/LatestImageBuild.json.cs new file mode 100644 index 000000000000..6dfdd656d763 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/LatestImageBuild.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Details about the latest build. + public partial class LatestImageBuild + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ILatestImageBuild FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new LatestImageBuild(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal LatestImageBuild(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ListUsagesResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ListUsagesResult.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ListUsagesResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ListUsagesResult.PowerShell.cs index 60445da0ea07..da756a445f90 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ListUsagesResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ListUsagesResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class ListUsagesResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ListUsagesResult(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ListUsagesResult(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,17 +103,17 @@ internal ListUsagesResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.UsageTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.UsageTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResultInternal)this).NextLink, 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. @@ -128,11 +128,11 @@ internal ListUsagesResult(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.UsageTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.UsageTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ListUsagesResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ListUsagesResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ListUsagesResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ListUsagesResult.TypeConverter.cs index 7bb7c90bc4c1..0b6a8b8e45e8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ListUsagesResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ListUsagesResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ListUsagesResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ListUsagesResult.cs similarity index 86% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ListUsagesResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ListUsagesResult.cs index 67109b0801c8..ceb2acefd624 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ListUsagesResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ListUsagesResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// List of Core Usages. public partial class ListUsagesResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class ListUsagesResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage[] _value; /// The array page of Usages. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage[] Value { get => this._value; } /// Creates an new instance. public ListUsagesResult() @@ -57,8 +57,8 @@ public partial interface IListUsagesResult : ReadOnly = true, Description = @"The array page of Usages.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage[] Value { get; } } /// List of Core Usages. @@ -68,7 +68,7 @@ internal partial interface IListUsagesResultInternal /// The link to get the next page of Usage result. string NextLink { get; set; } /// The array page of Usages. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ListUsagesResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ListUsagesResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ListUsagesResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ListUsagesResult.json.cs index 175e228bdb00..74cb83f2ef8b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ListUsagesResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ListUsagesResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ListUsagesResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ListUsagesResult(json) : null; } @@ -77,7 +77,7 @@ internal ListUsagesResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.J { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Usage.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Usage.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnection.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnection.PowerShell.cs similarity index 75% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnection.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnection.PowerShell.cs index 81018a9c9352..dbf46cb042a0 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnection.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnection.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class NetworkConnection partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NetworkConnection(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NetworkConnection(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,97 +103,97 @@ internal NetworkConnection(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("SubnetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).SubnetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).SubnetId, global::System.Convert.ToString); } if (content.Contains("DomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainName, global::System.Convert.ToString); } if (content.Contains("OrganizationUnit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).OrganizationUnit, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).OrganizationUnit, global::System.Convert.ToString); } if (content.Contains("DomainUsername")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainUsername, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainUsername, global::System.Convert.ToString); } if (content.Contains("DomainPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainPassword, global::System.Convert.ToString); } if (content.Contains("HealthCheckStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); } if (content.Contains("NetworkingResourceGroupName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).NetworkingResourceGroupName = (string) content.GetValueForProperty("NetworkingResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).NetworkingResourceGroupName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).NetworkingResourceGroupName = (string) content.GetValueForProperty("NetworkingResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).NetworkingResourceGroupName, global::System.Convert.ToString); } if (content.Contains("DomainJoinType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); } 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. @@ -208,91 +208,91 @@ internal NetworkConnection(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataCreatedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); } if (content.Contains("SystemDataLastModifiedByType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); } if (content.Contains("SystemDataLastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("SubnetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).SubnetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).SubnetId, global::System.Convert.ToString); } if (content.Contains("DomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainName, global::System.Convert.ToString); } if (content.Contains("OrganizationUnit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).OrganizationUnit, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).OrganizationUnit, global::System.Convert.ToString); } if (content.Contains("DomainUsername")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainUsername, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainUsername, global::System.Convert.ToString); } if (content.Contains("DomainPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainPassword, global::System.Convert.ToString); } if (content.Contains("HealthCheckStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); } if (content.Contains("NetworkingResourceGroupName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).NetworkingResourceGroupName = (string) content.GetValueForProperty("NetworkingResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).NetworkingResourceGroupName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).NetworkingResourceGroupName = (string) content.GetValueForProperty("NetworkingResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).NetworkingResourceGroupName, global::System.Convert.ToString); } if (content.Contains("DomainJoinType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnection.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnection.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnection.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnection.TypeConverter.cs index 4383b9dcfea1..d5dc81f62aaa 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnection.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnection.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnection.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnection.cs similarity index 81% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnection.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnection.cs index 3b952f4b1635..0e3c90de8faa 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnection.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnection.cs @@ -3,145 +3,145 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Network related settings public partial class NetworkConnection : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResource(); /// AAD Join type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType? DomainJoinType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)Property).DomainJoinType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)Property).DomainJoinType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType? DomainJoinType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)Property).DomainJoinType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)Property).DomainJoinType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType)""); } /// Active Directory domain name [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DomainName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainName = value ?? null; } + public string DomainName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainName = value ?? null; } /// The password for the account used to join domain [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DomainPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainPassword = value ?? null; } + public string DomainPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainPassword = value ?? null; } /// /// The username of an Active Directory account (user or service account) that has permissions to create computer objects /// in Active Directory. Required format: admin@contoso.com. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DomainUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainUsername = value ?? null; } + public string DomainUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainUsername = value ?? null; } /// /// Overall health status of the network connection. Health checks are run on creation, update, and periodically to validate /// the network connection. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? HealthCheckStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)Property).HealthCheckStatus; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? HealthCheckStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)Property).HealthCheckStatus; } /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Location = value ; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Location = value ; } /// Internal Acessors for HealthCheckStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal.HealthCheckStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)Property).HealthCheckStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)Property).HealthCheckStatus = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal.HealthCheckStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)Property).HealthCheckStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)Property).HealthCheckStatus = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name; } /// The name for resource group where NICs will be placed. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string NetworkingResourceGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)Property).NetworkingResourceGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)Property).NetworkingResourceGroupName = value ?? null; } + public string NetworkingResourceGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)Property).NetworkingResourceGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)Property).NetworkingResourceGroupName = value ?? null; } /// Active Directory domain Organization Unit (OU) [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string OrganizationUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).OrganizationUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).OrganizationUnit = value ?? null; } + public string OrganizationUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).OrganizationUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).OrganizationUnit = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkProperties _property; /// Properties of a Network Connection [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkProperties()); set => this._property = value; } /// The provisioning state of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)Property).ProvisioningState; } /// The subnet to attach Virtual Machines to [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).SubnetId = value ?? null; } + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).SubnetId = value ?? null; } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemData; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__trackedResource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type; } /// Creates an new instance. public NetworkConnection() @@ -164,7 +164,7 @@ public NetworkConnection() /// Network related settings public partial interface INetworkConnection : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource { /// AAD Join type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -248,7 +248,7 @@ public partial interface INetworkConnection : } /// Network related settings internal partial interface INetworkConnectionInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal { /// AAD Join type. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType? DomainJoinType { get; set; } @@ -271,7 +271,7 @@ internal partial interface INetworkConnectionInternal : /// Active Directory domain Organization Unit (OU) string OrganizationUnit { get; set; } /// Properties of a Network Connection - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkProperties Property { get; set; } /// The provisioning state of the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } /// The subnet to attach Virtual Machines to diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnection.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnection.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnection.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnection.json.cs index 468e405d91ce..29ea9ad34a68 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnection.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnection.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NetworkConnection partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new NetworkConnection(json) : null; } @@ -77,8 +77,8 @@ internal NetworkConnection(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime. { return; } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkProperties.FromJson(__jsonProperties) : Property;} + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionListResult.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionListResult.PowerShell.cs index cdc1531e00a8..4f9a56fc3b22 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class NetworkConnectionListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NetworkConnectionListResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NetworkConnectionListResult(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,17 +105,17 @@ internal NetworkConnectionListResult(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResultInternal)this).NextLink, 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. @@ -130,11 +130,11 @@ internal NetworkConnectionListResult(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionListResult.TypeConverter.cs index 012ffc50919c..4425ca1e6842 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionListResult.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionListResult.cs index ce7d03654aa1..95ee6b9dcdc0 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Result of the network connection list operation. public partial class NetworkConnectionListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class NetworkConnectionListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection[] Value { get => this._value; } /// Creates an new instance. public NetworkConnectionListResult() @@ -57,8 +57,8 @@ public partial interface INetworkConnectionListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection[] Value { get; } } /// Result of the network connection list operation. @@ -68,7 +68,7 @@ internal partial interface INetworkConnectionListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionListResult.json.cs index 072f65ab7024..f76f56b783ba 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NetworkConnectionListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new NetworkConnectionListResult(json) : null; } @@ -77,7 +77,7 @@ internal NetworkConnectionListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCente { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnection.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnection.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdate.PowerShell.cs similarity index 78% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdate.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdate.PowerShell.cs index 426f24fcfdb2..5d193b8f2f0a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdate.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdate.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -57,29 +57,29 @@ public partial class NetworkConnectionUpdate partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NetworkConnectionUpdate(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NetworkConnectionUpdate(content); } @@ -89,10 +89,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -107,41 +107,41 @@ internal NetworkConnectionUpdate(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("SubnetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).SubnetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).SubnetId, global::System.Convert.ToString); } if (content.Contains("DomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).DomainName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).DomainName, global::System.Convert.ToString); } if (content.Contains("OrganizationUnit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).OrganizationUnit, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).OrganizationUnit, global::System.Convert.ToString); } if (content.Contains("DomainUsername")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).DomainUsername, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).DomainUsername, global::System.Convert.ToString); } if (content.Contains("DomainPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).DomainPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).DomainPassword, 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. @@ -156,35 +156,35 @@ internal NetworkConnectionUpdate(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("SubnetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).SubnetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).SubnetId, global::System.Convert.ToString); } if (content.Contains("DomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).DomainName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).DomainName, global::System.Convert.ToString); } if (content.Contains("OrganizationUnit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).OrganizationUnit, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).OrganizationUnit, global::System.Convert.ToString); } if (content.Contains("DomainUsername")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).DomainUsername, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).DomainUsername, global::System.Convert.ToString); } if (content.Contains("DomainPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal)this).DomainPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal)this).DomainPassword, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdate.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdate.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdate.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdate.TypeConverter.cs index e8b825673806..8a79bd67f13f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdate.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdate.cs similarity index 83% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdate.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdate.cs index 8ff93ba47df4..ba505849371a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdate.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdate.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,56 +11,56 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// The network connection properties for partial update. Properties not provided in the update request will not be changed. /// public partial class NetworkConnectionUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdate, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdate, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate(); /// Active Directory domain name [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DomainName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainName = value ?? null; } + public string DomainName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainName = value ?? null; } /// The password for the account used to join domain [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DomainPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainPassword = value ?? null; } + public string DomainPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainPassword = value ?? null; } /// /// The username of an Active Directory account (user or service account) that has permissions to create computer objects /// in Active Directory. Required format: admin@contoso.com. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DomainUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainUsername = value ?? null; } + public string DomainUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).DomainUsername = value ?? null; } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location = value ?? null; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location = value ?? null; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionUpdateProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionUpdateProperties()); set { {_property = value;} } } /// Active Directory domain Organization Unit (OU) [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string OrganizationUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).OrganizationUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).OrganizationUnit = value ?? null; } + public string OrganizationUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).OrganizationUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).OrganizationUnit = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties _property; /// Properties of a network connection resource to be updated. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionUpdateProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionUpdateProperties()); set => this._property = value; } /// The subnet to attach Virtual Machines to [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)Property).SubnetId = value ?? null; } + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)Property).SubnetId = value ?? null; } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag = value ?? null /* model class */; } /// Creates an new instance. public NetworkConnectionUpdate() @@ -83,7 +83,7 @@ public NetworkConnectionUpdate() /// The network connection properties for partial update. Properties not provided in the update request will not be changed. public partial interface INetworkConnectionUpdate : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate { /// Active Directory domain name [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -132,7 +132,7 @@ public partial interface INetworkConnectionUpdate : } /// The network connection properties for partial update. Properties not provided in the update request will not be changed. internal partial interface INetworkConnectionUpdateInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal { /// Active Directory domain name string DomainName { get; set; } @@ -146,7 +146,7 @@ internal partial interface INetworkConnectionUpdateInternal : /// Active Directory domain Organization Unit (OU) string OrganizationUnit { get; set; } /// Properties of a network connection resource to be updated. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties Property { get; set; } /// The subnet to attach Virtual Machines to string SubnetId { get; set; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdate.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdate.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdate.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdate.json.cs index e3e3992bef5f..60163fd367d8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdate.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class NetworkConnectionUpdate partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new NetworkConnectionUpdate(json) : null; } @@ -79,8 +79,8 @@ internal NetworkConnectionUpdate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Ru { return; } - __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionUpdateProperties.FromJson(__jsonProperties) : Property;} + __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionUpdateProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdateProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdateProperties.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdateProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdateProperties.PowerShell.cs index 20fa610524c2..37a792353bfe 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdateProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdateProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -57,29 +57,29 @@ public partial class NetworkConnectionUpdateProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NetworkConnectionUpdateProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NetworkConnectionUpdateProperties(content); } @@ -91,10 +91,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -109,29 +109,29 @@ internal NetworkConnectionUpdateProperties(global::System.Collections.IDictionar // actually deserialize if (content.Contains("SubnetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId, global::System.Convert.ToString); } if (content.Contains("DomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName, global::System.Convert.ToString); } if (content.Contains("OrganizationUnit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit, global::System.Convert.ToString); } if (content.Contains("DomainUsername")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername, global::System.Convert.ToString); } if (content.Contains("DomainPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword, 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. @@ -146,23 +146,23 @@ internal NetworkConnectionUpdateProperties(global::System.Management.Automation. // actually deserialize if (content.Contains("SubnetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId, global::System.Convert.ToString); } if (content.Contains("DomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName, global::System.Convert.ToString); } if (content.Contains("OrganizationUnit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit, global::System.Convert.ToString); } if (content.Contains("DomainUsername")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername, global::System.Convert.ToString); } if (content.Contains("DomainPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdateProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdateProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdateProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdateProperties.TypeConverter.cs index 1a76af351ea3..ff0e98c9fdf5 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdateProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdateProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdateProperties.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdateProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdateProperties.cs index c936398c7486..888fe9abe1e6 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdateProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdateProperties.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// Properties of network connection. These properties can be updated after the resource has been created. /// public partial class NetworkConnectionUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdateProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdateProperties.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdateProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdateProperties.json.cs index 89899857096d..01ca69a1ef3a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkConnectionUpdateProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkConnectionUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class NetworkConnectionUpdateProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new NetworkConnectionUpdateProperties(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkProperties.PowerShell.cs similarity index 82% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkProperties.PowerShell.cs index 4dbf7e2ae7b6..0efa9b399a4f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class NetworkProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NetworkProperties(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NetworkProperties(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,45 +103,45 @@ internal NetworkProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("HealthCheckStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); } if (content.Contains("NetworkingResourceGroupName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).NetworkingResourceGroupName = (string) content.GetValueForProperty("NetworkingResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).NetworkingResourceGroupName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).NetworkingResourceGroupName = (string) content.GetValueForProperty("NetworkingResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).NetworkingResourceGroupName, global::System.Convert.ToString); } if (content.Contains("DomainJoinType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); } if (content.Contains("SubnetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId, global::System.Convert.ToString); } if (content.Contains("DomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName, global::System.Convert.ToString); } if (content.Contains("OrganizationUnit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit, global::System.Convert.ToString); } if (content.Contains("DomainUsername")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername, global::System.Convert.ToString); } if (content.Contains("DomainPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword, 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. @@ -156,39 +156,39 @@ internal NetworkProperties(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("HealthCheckStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).HealthCheckStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus?) content.GetValueForProperty("HealthCheckStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).HealthCheckStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus.CreateFrom); } if (content.Contains("NetworkingResourceGroupName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).NetworkingResourceGroupName = (string) content.GetValueForProperty("NetworkingResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).NetworkingResourceGroupName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).NetworkingResourceGroupName = (string) content.GetValueForProperty("NetworkingResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).NetworkingResourceGroupName, global::System.Convert.ToString); } if (content.Contains("DomainJoinType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).DomainJoinType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType) content.GetValueForProperty("DomainJoinType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal)this).DomainJoinType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType.CreateFrom); } if (content.Contains("SubnetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).SubnetId, global::System.Convert.ToString); } if (content.Contains("DomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainName, global::System.Convert.ToString); } if (content.Contains("OrganizationUnit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit = (string) content.GetValueForProperty("OrganizationUnit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).OrganizationUnit, global::System.Convert.ToString); } if (content.Contains("DomainUsername")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername = (string) content.GetValueForProperty("DomainUsername",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainUsername, global::System.Convert.ToString); } if (content.Contains("DomainPassword")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword = (string) content.GetValueForProperty("DomainPassword",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)this).DomainPassword, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkProperties.TypeConverter.cs index 78b842f40181..490ec8dcc817 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkProperties.cs similarity index 90% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkProperties.cs index d582596e57d8..1da5d23a8d7a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkProperties.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Network properties public partial class NetworkProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties __networkConnectionUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionUpdateProperties(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties __networkConnectionUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionUpdateProperties(); /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType _domainJoinType; @@ -28,18 +28,18 @@ public partial class NetworkProperties : /// Active Directory domain name [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string DomainName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).DomainName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).DomainName = value ?? null; } + public string DomainName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).DomainName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).DomainName = value ?? null; } /// The password for the account used to join domain [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string DomainPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).DomainPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).DomainPassword = value ?? null; } + public string DomainPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).DomainPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).DomainPassword = value ?? null; } /// /// The username of an Active Directory account (user or service account) that has permissions to create computer objects /// in Active Directory. Required format: admin@contoso.com. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string DomainUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).DomainUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).DomainUsername = value ?? null; } + public string DomainUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).DomainUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).DomainUsername = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? _healthCheckStatus; @@ -52,10 +52,10 @@ public partial class NetworkProperties : public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? HealthCheckStatus { get => this._healthCheckStatus; } /// Internal Acessors for HealthCheckStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal.HealthCheckStatus { get => this._healthCheckStatus; set { {_healthCheckStatus = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal.HealthCheckStatus { get => this._healthCheckStatus; set { {_healthCheckStatus = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Backing field for property. private string _networkingResourceGroupName; @@ -66,7 +66,7 @@ public partial class NetworkProperties : /// Active Directory domain Organization Unit (OU) [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string OrganizationUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).OrganizationUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).OrganizationUnit = value ?? null; } + public string OrganizationUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).OrganizationUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).OrganizationUnit = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; @@ -77,7 +77,7 @@ public partial class NetworkProperties : /// The subnet to attach Virtual Machines to [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).SubnetId = value ?? null; } + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal)__networkConnectionUpdateProperties).SubnetId = value ?? null; } /// Creates an new instance. public NetworkProperties() @@ -100,7 +100,7 @@ public NetworkProperties() /// Network properties public partial interface INetworkProperties : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdateProperties { /// AAD Join type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -141,7 +141,7 @@ public partial interface INetworkProperties : } /// Network properties internal partial interface INetworkPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdatePropertiesInternal { /// AAD Join type. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType DomainJoinType { get; set; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkProperties.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkProperties.json.cs index 7eeb3d8eed5c..8989fbb6b41b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/NetworkProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/NetworkProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NetworkProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new NetworkProperties(json) : null; } @@ -77,7 +77,7 @@ internal NetworkProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime. { return; } - __networkConnectionUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionUpdateProperties(json); + __networkConnectionUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionUpdateProperties(json); {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} {_healthCheckStatus = If( json?.PropertyT("healthCheckStatus"), out var __jsonHealthCheckStatus) ? (string)__jsonHealthCheckStatus : (string)HealthCheckStatus;} {_networkingResourceGroupName = If( json?.PropertyT("networkingResourceGroupName"), out var __jsonNetworkingResourceGroupName) ? (string)__jsonNetworkingResourceGroupName : (string)NetworkingResourceGroupName;} diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.PowerShell.cs new file mode 100644 index 000000000000..b516b8197b6a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.PowerShell.cs @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// The current status of an async operation + [System.ComponentModel.TypeConverter(typeof(OperationStatusTypeConverter))] + public partial class OperationStatus + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationStatus(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationStatus(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationStatus(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatusInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatusInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorDetailAutoGenerated[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorDetailAutoGenerated) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("PercentComplete")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).PercentComplete = (float?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).PercentComplete, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Operation = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResult[]) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Operation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.OperationStatusResultTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationStatus(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatusInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatusInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorDetailAutoGenerated[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorDetailAutoGenerated) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorDetailAutoGeneratedTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("PercentComplete")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).PercentComplete = (float?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).PercentComplete, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Operation = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResult[]) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)this).Operation, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.OperationStatusResultTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The current status of an async operation + [System.ComponentModel.TypeConverter(typeof(OperationStatusTypeConverter))] + public partial interface IOperationStatus + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.TypeConverter.cs new file mode 100644 index 000000000000..72862baa1801 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationStatusTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationStatus.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationStatus.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationStatus.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.cs new file mode 100644 index 000000000000..89298e90c504 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// The current status of an async operation + public partial class OperationStatus : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatusInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResult __operationStatusResult = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.OperationStatusResult(); + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorDetailAutoGenerated[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Detail; } + + /// The end time of the operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).EndTime = value ?? default(global::System.DateTime); } + + /// If present, details of the operation error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorDetailAutoGenerated Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Error = value ?? null /* model class */; } + + /// Fully qualified ID for the async operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Id = value ?? null; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Message; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatusInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Any()); set { {_property = value;} } } + + /// Internal Acessors for ResourceId + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatusInternal.ResourceId { get => this._resourceId; set { {_resourceId = value;} } } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorDetailAutoGenerated[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Detail = value; } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Target = value; } + + /// Name of the async operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Name = value ?? null; } + + /// The operations list. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResult[] Operation { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Operation = value ?? null /* arrayOf */; } + + /// Percent of the operation that is complete. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public float? PercentComplete { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).PercentComplete; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).PercentComplete = value ?? default(float); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny _property; + + /// Custom operation properties, populated only for a successful operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Any()); } + + /// Backing field for property. + private string _resourceId; + + /// The id of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string ResourceId { get => this._resourceId; } + + /// The start time of the operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).StartTime = value ?? default(global::System.DateTime); } + + /// Operation status. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Status = value ; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal)__operationStatusResult).Target; } + + /// Creates an new instance. + public OperationStatus() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__operationStatusResult), __operationStatusResult); + await eventListener.AssertObjectIsValid(nameof(__operationStatusResult), __operationStatusResult); + } + } + /// The current status of an async operation + public partial interface IOperationStatus : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResult + { + /// Custom operation properties, populated only for a successful operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Custom operation properties, populated only for a successful operation.", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny Property { get; } + /// The id of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The id of the resource.", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + string ResourceId { get; } + + } + /// The current status of an async operation + internal partial interface IOperationStatusInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperationStatusResultInternal + { + /// Custom operation properties, populated only for a successful operation. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IAny Property { get; set; } + /// The id of the resource. + string ResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.json.cs new file mode 100644 index 000000000000..7412676eb660 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// The current status of an async operation + public partial class OperationStatus + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new OperationStatus(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal OperationStatus(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __operationStatusResult = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.OperationStatusResult(json); + {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)ResourceId;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Any.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __operationStatusResult?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._resourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._resourceId.ToString()) : null, "resourceId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpoint.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpoint.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpoint.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpoint.PowerShell.cs index b8d49e60bf65..5fe119b1e9eb 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpoint.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpoint.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -57,29 +57,29 @@ public partial class OutboundEnvironmentEndpoint partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OutboundEnvironmentEndpoint(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OutboundEnvironmentEndpoint(content); } @@ -89,10 +89,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -107,17 +107,17 @@ internal OutboundEnvironmentEndpoint(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("Category")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointInternal)this).Category = (string) content.GetValueForProperty("Category",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointInternal)this).Category, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointInternal)this).Category = (string) content.GetValueForProperty("Category",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointInternal)this).Category, global::System.Convert.ToString); } if (content.Contains("Endpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointInternal)this).Endpoint = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency[]) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointInternal)this).Endpoint, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EndpointDependencyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointInternal)this).Endpoint = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency[]) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointInternal)this).Endpoint, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EndpointDependencyTypeConverter.ConvertFrom)); } 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. @@ -132,11 +132,11 @@ internal OutboundEnvironmentEndpoint(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("Category")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointInternal)this).Category = (string) content.GetValueForProperty("Category",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointInternal)this).Category, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointInternal)this).Category = (string) content.GetValueForProperty("Category",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointInternal)this).Category, global::System.Convert.ToString); } if (content.Contains("Endpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointInternal)this).Endpoint = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency[]) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointInternal)this).Endpoint, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EndpointDependencyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointInternal)this).Endpoint = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency[]) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointInternal)this).Endpoint, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EndpointDependencyTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpoint.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpoint.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpoint.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpoint.TypeConverter.cs index e5a5bf928b7b..58f4909eff22 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpoint.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpoint.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpoint.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpoint.cs similarity index 86% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpoint.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpoint.cs index acdefc15c8fd..3dc858949963 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpoint.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpoint.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// A collection of related endpoints from the same service for which the agent requires outbound access. /// public partial class OutboundEnvironmentEndpoint : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointInternal { /// Backing field for property. @@ -23,17 +23,17 @@ public partial class OutboundEnvironmentEndpoint : public string Category { get => this._category; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency[] _endpoint; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency[] _endpoint; /// The endpoints for this service for which the agent requires outbound access. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency[] Endpoint { get => this._endpoint; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency[] Endpoint { get => this._endpoint; } /// Internal Acessors for Category - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointInternal.Category { get => this._category; set { {_category = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointInternal.Category { get => this._category; set { {_category = value;} } } /// Internal Acessors for Endpoint - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointInternal.Endpoint { get => this._endpoint; set { {_endpoint = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointInternal.Endpoint { get => this._endpoint; set { {_endpoint = value;} } } /// Creates an new instance. public OutboundEnvironmentEndpoint() @@ -59,8 +59,8 @@ public partial interface IOutboundEnvironmentEndpoint : ReadOnly = true, Description = @"The endpoints for this service for which the agent requires outbound access.", SerializedName = @"endpoints", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency[] Endpoint { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency[] Endpoint { get; } } /// A collection of related endpoints from the same service for which the agent requires outbound access. @@ -70,7 +70,7 @@ internal partial interface IOutboundEnvironmentEndpointInternal /// The type of service that the agent connects to. string Category { get; set; } /// The endpoints for this service for which the agent requires outbound access. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency[] Endpoint { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency[] Endpoint { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpoint.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpoint.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpoint.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpoint.json.cs index 2a9da057a8f5..8a92843ecea2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpoint.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpoint.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class OutboundEnvironmentEndpoint partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new OutboundEnvironmentEndpoint(json) : null; } @@ -80,7 +80,7 @@ internal OutboundEnvironmentEndpoint(Microsoft.Azure.PowerShell.Cmdlets.DevCente return; } {_category = If( json?.PropertyT("category"), out var __jsonCategory) ? (string)__jsonCategory : (string)Category;} - {_endpoint = If( json?.PropertyT("endpoints"), out var __jsonEndpoints) ? If( __jsonEndpoints as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEndpointDependency) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EndpointDependency.FromJson(__u) )) ))() : null : Endpoint;} + {_endpoint = If( json?.PropertyT("endpoints"), out var __jsonEndpoints) ? If( __jsonEndpoints as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEndpointDependency) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EndpointDependency.FromJson(__u) )) ))() : null : Endpoint;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpointCollection.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpointCollection.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpointCollection.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpointCollection.PowerShell.cs index eec62bf19607..d468b9927e42 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpointCollection.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpointCollection.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class OutboundEnvironmentEndpointCollection partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollection DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollection DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OutboundEnvironmentEndpointCollection(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OutboundEnvironmentEndpointCollection(content); } @@ -90,10 +90,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -108,17 +108,17 @@ internal OutboundEnvironmentEndpointCollection(global::System.Collections.IDicti // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.OutboundEnvironmentEndpointTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.OutboundEnvironmentEndpointTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollectionInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollectionInternal)this).NextLink, 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. @@ -133,11 +133,11 @@ internal OutboundEnvironmentEndpointCollection(global::System.Management.Automat // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.OutboundEnvironmentEndpointTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.OutboundEnvironmentEndpointTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollectionInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollectionInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpointCollection.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpointCollection.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpointCollection.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpointCollection.TypeConverter.cs index d238d547cd91..556e24613d50 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpointCollection.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpointCollection.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollection ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollection ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollection).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollection).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpointCollection.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpointCollection.cs similarity index 86% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpointCollection.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpointCollection.cs index 2cd5b9b324a7..f93740099450 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpointCollection.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpointCollection.cs @@ -3,18 +3,18 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Values returned by the List operation. public partial class OutboundEnvironmentEndpointCollection : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollection, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollectionInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollection, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollectionInternal { /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollectionInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollectionInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -24,13 +24,13 @@ public partial class OutboundEnvironmentEndpointCollection : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint[] _value; /// /// The collection of outbound network dependency endpoints returned by the listing operation. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint[] Value { get => this._value; } /// Creates an new instance. public OutboundEnvironmentEndpointCollection() @@ -58,8 +58,8 @@ public partial interface IOutboundEnvironmentEndpointCollection : ReadOnly = true, Description = @"The collection of outbound network dependency endpoints returned by the listing operation.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint[] Value { get; } } /// Values returned by the List operation. @@ -71,7 +71,7 @@ internal partial interface IOutboundEnvironmentEndpointCollectionInternal /// /// The collection of outbound network dependency endpoints returned by the listing operation. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpointCollection.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpointCollection.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpointCollection.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpointCollection.json.cs index 282fd55473e9..69adc5a03858 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/OutboundEnvironmentEndpointCollection.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/OutboundEnvironmentEndpointCollection.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class OutboundEnvironmentEndpointCollection partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollection. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollection. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollection. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollection. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new OutboundEnvironmentEndpointCollection(json) : null; } @@ -77,7 +77,7 @@ internal OutboundEnvironmentEndpointCollection(Microsoft.Azure.PowerShell.Cmdlet { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.OutboundEnvironmentEndpoint.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.OutboundEnvironmentEndpoint.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Pool.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Pool.PowerShell.cs new file mode 100644 index 000000000000..b4f19d49b693 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Pool.PowerShell.cs @@ -0,0 +1,552 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// A pool of Virtual Machines. + [System.ComponentModel.TypeConverter(typeof(PoolTypeConverter))] + public partial class Pool + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Pool(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Pool(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Pool(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("LicenseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); + } + if (content.Contains("HealthStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).HealthStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus?) content.GetValueForProperty("HealthStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).HealthStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("DevBoxDefinitionImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionSku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("DevBoxDefinitionSku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionSku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinition = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition) content.GetValueForProperty("DevBoxDefinition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinition, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolDevBoxDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnDisconnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnNoConnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration) content.GetValueForProperty("StopOnNoConnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnNoConnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveHoursConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHoursConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration) content.GetValueForProperty("ActiveHoursConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHoursConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ActiveHoursConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType?) content.GetValueForProperty("DevBoxDefinitionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType.CreateFrom); + } + if (content.Contains("DevBoxDefinitionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); + } + if (content.Contains("NetworkConnectionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).NetworkConnectionName, global::System.Convert.ToString); + } + if (content.Contains("LocalAdministrator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); + } + if (content.Contains("SingleSignOnStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("VirtualNetworkType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); + } + if (content.Contains("ManagedVirtualNetworkRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DevBoxTunnelEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxTunnelEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus?) content.GetValueForProperty("DevBoxTunnelEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxTunnelEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus.CreateFrom); + } + if (content.Contains("HealthStatusDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).HealthStatusDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail[]) content.GetValueForProperty("HealthStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).HealthStatusDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthStatusDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("DevBoxCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxCount = (int?) content.GetValueForProperty("DevBoxCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DevBoxDefinitionActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnDisconnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnDisconnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnNoConnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus?) content.GetValueForProperty("StopOnNoConnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnNoConnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnNoConnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationKeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationKeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationAutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationAutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationAutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationAutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationDefaultTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultTimeZone = (string) content.GetValueForProperty("ActiveHourConfigurationDefaultTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultTimeZone, global::System.Convert.ToString); + } + if (content.Contains("ActiveHourConfigurationDefaultStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultStartTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationDefaultEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultEndTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveImageReferenceExactVersion, 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 Pool(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("LicenseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); + } + if (content.Contains("HealthStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).HealthStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus?) content.GetValueForProperty("HealthStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).HealthStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("DevBoxDefinitionImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionSku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("DevBoxDefinitionSku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionSku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinition = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition) content.GetValueForProperty("DevBoxDefinition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinition, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolDevBoxDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnDisconnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnNoConnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration) content.GetValueForProperty("StopOnNoConnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnNoConnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveHoursConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHoursConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration) content.GetValueForProperty("ActiveHoursConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHoursConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ActiveHoursConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType?) content.GetValueForProperty("DevBoxDefinitionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType.CreateFrom); + } + if (content.Contains("DevBoxDefinitionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); + } + if (content.Contains("NetworkConnectionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).NetworkConnectionName, global::System.Convert.ToString); + } + if (content.Contains("LocalAdministrator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); + } + if (content.Contains("SingleSignOnStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("VirtualNetworkType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); + } + if (content.Contains("ManagedVirtualNetworkRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DevBoxTunnelEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxTunnelEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus?) content.GetValueForProperty("DevBoxTunnelEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxTunnelEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus.CreateFrom); + } + if (content.Contains("HealthStatusDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).HealthStatusDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail[]) content.GetValueForProperty("HealthStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).HealthStatusDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthStatusDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("DevBoxCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxCount = (int?) content.GetValueForProperty("DevBoxCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DevBoxDefinitionActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).DevBoxDefinitionActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnDisconnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnDisconnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnNoConnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus?) content.GetValueForProperty("StopOnNoConnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnNoConnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnNoConnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationKeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationKeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationAutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationAutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationAutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationAutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationDefaultTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultTimeZone = (string) content.GetValueForProperty("ActiveHourConfigurationDefaultTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultTimeZone, global::System.Convert.ToString); + } + if (content.Contains("ActiveHourConfigurationDefaultStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultStartTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationDefaultEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultEndTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal)this).ActiveImageReferenceExactVersion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A pool of Virtual Machines. + [System.ComponentModel.TypeConverter(typeof(PoolTypeConverter))] + public partial interface IPool + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Pool.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Pool.TypeConverter.cs new file mode 100644 index 000000000000..57b42d4d8682 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Pool.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PoolTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Pool.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Pool.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Pool.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Pool.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Pool.cs new file mode 100644 index 000000000000..10633fbf9552 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Pool.cs @@ -0,0 +1,793 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// A pool of Virtual Machines. + public partial class Pool : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResource(); + + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationAutoStartEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationAutoStartEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus)""); } + + /// The default end time of the active hours + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? ActiveHourConfigurationDefaultEndTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationDefaultEndTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationDefaultEndTimeHour = value ?? default(int); } + + /// The default start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? ActiveHourConfigurationDefaultStartTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationDefaultStartTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationDefaultStartTimeHour = value ?? default(int); } + + /// The default IANA timezone id of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ActiveHourConfigurationDefaultTimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationDefaultTimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationDefaultTimeZone = value ?? null; } + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationKeepAwakeEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationKeepAwakeEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus)""); } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveImageReferenceExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ActiveImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveImageReferenceId = value ?? null; } + + /// Indicates the number of provisioned Dev Boxes in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? DevBoxCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)Property).DevBoxCount; } + + /// + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DevBoxDefinitionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionName = value ?? null; } + + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType? DevBoxDefinitionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType)""); } + + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxTunnelEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxTunnelEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus)""); } + + /// The display name of the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + + /// + /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)Property).HealthStatus; } + + /// + /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool + /// is in a non-healthy state + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail[] HealthStatusDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)Property).HealthStatusDetail; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id; } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ImageReferenceExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ImageReferenceId = value ?? null; } + + /// + /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).LicenseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).LicenseType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType)""); } + + /// + /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).LocalAdministrator; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).LocalAdministrator = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus)""); } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// + /// The regions of the managed virtual network (required when managedNetworkType is Managed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string[] ManagedVirtualNetworkRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ManagedVirtualNetworkRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ManagedVirtualNetworkRegion = value ?? null /* arrayOf */; } + + /// Internal Acessors for ActiveHoursConfiguration + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal.ActiveHoursConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHoursConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHoursConfiguration = value; } + + /// Internal Acessors for ActiveImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal.ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveImageReferenceExactVersion = value; } + + /// Internal Acessors for DevBoxCount + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal.DevBoxCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)Property).DevBoxCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)Property).DevBoxCount = value; } + + /// Internal Acessors for DevBoxDefinition + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal.DevBoxDefinition { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinition; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinition = value; } + + /// Internal Acessors for DevBoxDefinitionActiveImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal.DevBoxDefinitionActiveImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionActiveImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionActiveImageReference = value; } + + /// Internal Acessors for DevBoxDefinitionImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal.DevBoxDefinitionImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionImageReference = value; } + + /// Internal Acessors for DevBoxDefinitionSku + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal.DevBoxDefinitionSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionSku = value; } + + /// Internal Acessors for HealthStatus + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal.HealthStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)Property).HealthStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)Property).HealthStatus = value; } + + /// Internal Acessors for HealthStatusDetail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal.HealthStatusDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)Property).HealthStatusDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)Property).HealthStatusDetail = value; } + + /// Internal Acessors for ImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ImageReferenceExactVersion = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for StopOnDisconnect + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal.StopOnDisconnect { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnect; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnect = value; } + + /// Internal Acessors for StopOnNoConnect + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolInternal.StopOnNoConnect { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnNoConnect; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnNoConnect = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name; } + + /// Name of a Network Connection in parent Project of this Pool + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string NetworkConnectionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).NetworkConnectionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).NetworkConnectionName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolProperties _property; + + /// Pool properties + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolProperties()); set => this._property = value; } + + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)Property).ProvisioningState; } + + /// + /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on + /// be enabled on the tenant. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SingleSignOnStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SingleSignOnStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus)""); } + + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuCapacity = value ?? default(int); } + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuFamily = value ?? null; } + + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuName = value ?? null; } + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuSize = value ?? null; } + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuTier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuTier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } + + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? StopOnDisconnectGracePeriodMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectGracePeriodMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectGracePeriodMinute = value ?? default(int); } + + /// + /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus)""); } + + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? StopOnNoConnectGracePeriodMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnNoConnectGracePeriodMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnNoConnectGracePeriodMinute = value ?? default(int); } + + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus? StopOnNoConnectStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnNoConnectStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnNoConnectStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus)""); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type; } + + /// + /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).VirtualNetworkType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).VirtualNetworkType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType)""); } + + /// Creates an new instance. + public Pool() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// A pool of Virtual Machines. + public partial interface IPool : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource + { + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be automatically started at commencement of active hours.", + SerializedName = @"autoStartEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get; set; } + /// The default end time of the active hours + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default end time of the active hours", + SerializedName = @"defaultEndTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? ActiveHourConfigurationDefaultEndTimeHour { get; set; } + /// The default start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default start time of the active hours.", + SerializedName = @"defaultStartTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? ActiveHourConfigurationDefaultStartTimeHour { get; set; } + /// The default IANA timezone id of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default IANA timezone id of the active hours.", + SerializedName = @"defaultTimeZone", + PossibleTypes = new [] { typeof(string) })] + string ActiveHourConfigurationDefaultTimeZone { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be kept awake during active hours.", + SerializedName = @"keepAwakeEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ActiveImageReferenceExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ActiveImageReferenceId { get; set; } + /// Indicates the number of provisioned Dev Boxes in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates the number of provisioned Dev Boxes in this pool.", + SerializedName = @"devBoxCount", + PossibleTypes = new [] { typeof(int) })] + int? DevBoxCount { get; } + /// + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value.", + SerializedName = @"devBoxDefinitionName", + PossibleTypes = new [] { typeof(string) })] + string DevBoxDefinitionName { get; set; } + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly.", + SerializedName = @"devBoxDefinitionType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType? DevBoxDefinitionType { get; set; } + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether Dev Box Tunnel is enabled for a the pool.", + SerializedName = @"devBoxTunnelEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get; set; } + /// The display name of the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The display name of the pool.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes.", + SerializedName = @"healthStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? HealthStatus { get; } + /// + /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool + /// is in a non-healthy state + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool is in a non-healthy state", + SerializedName = @"healthStatusDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail[] HealthStatusDetail { get; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceId { get; set; } + /// + /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created.", + SerializedName = @"licenseType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get; set; } + /// + /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box.", + SerializedName = @"localAdministrator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get; set; } + /// + /// The regions of the managed virtual network (required when managedNetworkType is Managed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The regions of the managed virtual network (required when managedNetworkType is Managed).", + SerializedName = @"managedVirtualNetworkRegions", + PossibleTypes = new [] { typeof(string) })] + string[] ManagedVirtualNetworkRegion { get; set; } + /// Name of a Network Connection in parent Project of this Pool + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a Network Connection in parent Project of this Pool", + SerializedName = @"networkConnectionName", + PossibleTypes = new [] { typeof(string) })] + string NetworkConnectionName { get; set; } + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } + /// + /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on + /// be enabled on the tenant. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on be enabled on the tenant.", + SerializedName = @"singleSignOnStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get; set; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + int? SkuCapacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + string SkuFamily { get; set; } + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string SkuName { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + string SkuSize { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box once disconnect is detected.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + int? StopOnDisconnectGracePeriodMinute { get; set; } + /// + /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box if no connection is made.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + int? StopOnNoConnectGracePeriodMinute { get; set; } + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus? StopOnNoConnectStatus { get; set; } + /// + /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network.", + SerializedName = @"virtualNetworkType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get; set; } + + } + /// A pool of Virtual Machines. + internal partial interface IPoolInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal + { + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get; set; } + /// The default end time of the active hours + int? ActiveHourConfigurationDefaultEndTimeHour { get; set; } + /// The default start time of the active hours. + int? ActiveHourConfigurationDefaultStartTimeHour { get; set; } + /// The default IANA timezone id of the active hours. + string ActiveHourConfigurationDefaultTimeZone { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get; set; } + /// Active hours configuration settings for Dev Boxes created in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration ActiveHoursConfiguration { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ActiveImageReferenceExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string ActiveImageReferenceId { get; set; } + /// Indicates the number of provisioned Dev Boxes in this pool. + int? DevBoxCount { get; set; } + /// + /// A definition of the machines that are created from this Pool. Will be ignored if devBoxDefinitionType is Reference or + /// not provided. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition DevBoxDefinition { get; set; } + /// + /// Image reference information for the currently active image (only populated during updates). + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference DevBoxDefinitionActiveImageReference { get; set; } + /// Image reference information. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference DevBoxDefinitionImageReference { get; set; } + /// + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// + string DevBoxDefinitionName { get; set; } + /// The SKU for Dev Boxes created from the Pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku DevBoxDefinitionSku { get; set; } + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType? DevBoxDefinitionType { get; set; } + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get; set; } + /// The display name of the pool. + string DisplayName { get; set; } + /// + /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? HealthStatus { get; set; } + /// + /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool + /// is in a non-healthy state + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail[] HealthStatusDetail { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ImageReferenceExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string ImageReferenceId { get; set; } + /// + /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get; set; } + /// + /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get; set; } + /// + /// The regions of the managed virtual network (required when managedNetworkType is Managed). + /// + string[] ManagedVirtualNetworkRegion { get; set; } + /// Name of a Network Connection in parent Project of this Pool + string NetworkConnectionName { get; set; } + /// Pool properties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolProperties Property { get; set; } + /// The provisioning state of the resource. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } + /// + /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on + /// be enabled on the tenant. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get; set; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + int? SkuCapacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + string SkuFamily { get; set; } + /// The name of the SKU. E.g. P3. It is typically a letter+number code + string SkuName { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + string SkuSize { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get; set; } + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration StopOnDisconnect { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + /// + int? StopOnDisconnectGracePeriodMinute { get; set; } + /// + /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration StopOnNoConnect { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + int? StopOnNoConnectGracePeriodMinute { get; set; } + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus? StopOnNoConnectStatus { get; set; } + /// + /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Pool.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Pool.json.cs new file mode 100644 index 000000000000..642d807c2e10 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Pool.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// A pool of Virtual Machines. + public partial class Pool + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Pool(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal Pool(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolDevBoxDefinition.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolDevBoxDefinition.PowerShell.cs new file mode 100644 index 000000000000..ee42ecc4c8dd --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolDevBoxDefinition.PowerShell.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents a definition for a Developer Machine. + [System.ComponentModel.TypeConverter(typeof(PoolDevBoxDefinitionTypeConverter))] + public partial class PoolDevBoxDefinition + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PoolDevBoxDefinition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PoolDevBoxDefinition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PoolDevBoxDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ActiveImageReferenceExactVersion, 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 PoolDevBoxDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)this).ActiveImageReferenceExactVersion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents a definition for a Developer Machine. + [System.ComponentModel.TypeConverter(typeof(PoolDevBoxDefinitionTypeConverter))] + public partial interface IPoolDevBoxDefinition + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolDevBoxDefinition.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolDevBoxDefinition.TypeConverter.cs new file mode 100644 index 000000000000..81c1a0f7533f --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolDevBoxDefinition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PoolDevBoxDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PoolDevBoxDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PoolDevBoxDefinition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PoolDevBoxDefinition.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolDevBoxDefinition.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolDevBoxDefinition.cs new file mode 100644 index 000000000000..a5843b91f86c --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolDevBoxDefinition.cs @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a definition for a Developer Machine. + public partial class PoolDevBoxDefinition : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference _activeImageReference; + + /// + /// Image reference information for the currently active image (only populated during updates). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ActiveImageReference { get => (this._activeImageReference = this._activeImageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ActiveImageReference).ExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ActiveImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ActiveImageReference).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ActiveImageReference).Id = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference _imageReference; + + /// Image reference information. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); set => this._imageReference = value; } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).ExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Id = value ?? null; } + + /// Internal Acessors for ActiveImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal.ActiveImageReference { get => (this._activeImageReference = this._activeImageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); set { {_activeImageReference = value;} } } + + /// Internal Acessors for ActiveImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal.ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ActiveImageReference).ExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ActiveImageReference).ExactVersion = value; } + + /// Internal Acessors for ImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal.ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference()); set { {_imageReference = value;} } } + + /// Internal Acessors for ImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).ExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).ExactVersion = value; } + + /// Internal Acessors for Sku + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Sku()); set { {_sku = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku _sku; + + /// The SKU for Dev Boxes created from the Pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Sku()); set => this._sku = value; } + + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Capacity = value ?? default(int); } + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Family = value ?? null; } + + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Name = value ?? null; } + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Size; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Size = value ?? null; } + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)Sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } + + /// Creates an new instance. + public PoolDevBoxDefinition() + { + + } + } + /// Represents a definition for a Developer Machine. + public partial interface IPoolDevBoxDefinition : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ActiveImageReferenceExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ActiveImageReferenceId { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceId { get; set; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + int? SkuCapacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + string SkuFamily { get; set; } + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string SkuName { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + string SkuSize { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get; set; } + + } + /// Represents a definition for a Developer Machine. + internal partial interface IPoolDevBoxDefinitionInternal + + { + /// + /// Image reference information for the currently active image (only populated during updates). + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ActiveImageReference { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ActiveImageReferenceExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string ActiveImageReferenceId { get; set; } + /// Image reference information. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference ImageReference { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ImageReferenceExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string ImageReferenceId { get; set; } + /// The SKU for Dev Boxes created from the Pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku Sku { get; set; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + int? SkuCapacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + string SkuFamily { get; set; } + /// The name of the SKU. E.g. P3. It is typically a letter+number code + string SkuName { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + string SkuSize { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolDevBoxDefinition.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolDevBoxDefinition.json.cs new file mode 100644 index 000000000000..f98f41eb1695 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolDevBoxDefinition.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a definition for a Developer Machine. + public partial class PoolDevBoxDefinition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new PoolDevBoxDefinition(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal PoolDevBoxDefinition(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_imageReference = If( json?.PropertyT("imageReference"), out var __jsonImageReference) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference.FromJson(__jsonImageReference) : ImageReference;} + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Sku.FromJson(__jsonSku) : Sku;} + {_activeImageReference = If( json?.PropertyT("activeImageReference"), out var __jsonActiveImageReference) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReference.FromJson(__jsonActiveImageReference) : ActiveImageReference;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._imageReference ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._imageReference.ToJson(null,serializationMode) : null, "imageReference" ,container.Add ); + AddIf( null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._sku.ToJson(null,serializationMode) : null, "sku" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._activeImageReference ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._activeImageReference.ToJson(null,serializationMode) : null, "activeImageReference" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolListResult.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolListResult.PowerShell.cs index e8cf43d4b0a9..25709af07b04 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class PoolListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PoolListResult(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PoolListResult(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,17 +103,17 @@ internal PoolListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResultInternal)this).NextLink, 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. @@ -128,11 +128,11 @@ internal PoolListResult(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolListResult.TypeConverter.cs index 7241f4fc9c30..d863a75775e0 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolListResult.cs similarity index 86% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolListResult.cs index fed53d09f11a..11485b6028ef 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Results of the machine pool list operation. public partial class PoolListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class PoolListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool[] Value { get => this._value; } /// Creates an new instance. public PoolListResult() @@ -57,8 +57,8 @@ public partial interface IPoolListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool[] Value { get; } } /// Results of the machine pool list operation. @@ -68,7 +68,7 @@ internal partial interface IPoolListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolListResult.json.cs index b777b94ceff5..2fe597ece8ac 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PoolListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new PoolListResult(json) : null; } @@ -77,7 +77,7 @@ internal PoolListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Jso { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Pool.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Pool.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolProperties.PowerShell.cs new file mode 100644 index 000000000000..47e73cdc4632 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolProperties.PowerShell.cs @@ -0,0 +1,448 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Properties of a Pool + [System.ComponentModel.TypeConverter(typeof(PoolPropertiesTypeConverter))] + public partial class PoolProperties + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PoolProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PoolProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PoolProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HealthStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).HealthStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus?) content.GetValueForProperty("HealthStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).HealthStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus.CreateFrom); + } + if (content.Contains("HealthStatusDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).HealthStatusDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail[]) content.GetValueForProperty("HealthStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).HealthStatusDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthStatusDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("DevBoxCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).DevBoxCount = (int?) content.GetValueForProperty("DevBoxCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).DevBoxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("DevBoxDefinitionImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionSku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("DevBoxDefinitionSku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionSku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnDisconnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnDisconnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnNoConnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus?) content.GetValueForProperty("StopOnNoConnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnNoConnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnNoConnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationKeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationKeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationAutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationAutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationAutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationAutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationDefaultTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultTimeZone = (string) content.GetValueForProperty("ActiveHourConfigurationDefaultTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultTimeZone, global::System.Convert.ToString); + } + if (content.Contains("ActiveHourConfigurationDefaultStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultStartTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationDefaultEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultEndTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("DevBoxDefinition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinition = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition) content.GetValueForProperty("DevBoxDefinition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinition, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolDevBoxDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnDisconnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnNoConnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration) content.GetValueForProperty("StopOnNoConnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnNoConnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveHoursConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHoursConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration) content.GetValueForProperty("ActiveHoursConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHoursConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ActiveHoursConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType?) content.GetValueForProperty("DevBoxDefinitionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType.CreateFrom); + } + if (content.Contains("DevBoxDefinitionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); + } + if (content.Contains("NetworkConnectionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName, global::System.Convert.ToString); + } + if (content.Contains("LicenseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); + } + if (content.Contains("LocalAdministrator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); + } + if (content.Contains("SingleSignOnStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("VirtualNetworkType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); + } + if (content.Contains("ManagedVirtualNetworkRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DevBoxTunnelEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxTunnelEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus?) content.GetValueForProperty("DevBoxTunnelEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxTunnelEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PoolProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HealthStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).HealthStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus?) content.GetValueForProperty("HealthStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).HealthStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus.CreateFrom); + } + if (content.Contains("HealthStatusDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).HealthStatusDetail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail[]) content.GetValueForProperty("HealthStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).HealthStatusDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthStatusDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("DevBoxCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).DevBoxCount = (int?) content.GetValueForProperty("DevBoxCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).DevBoxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("DevBoxDefinitionImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionSku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("DevBoxDefinitionSku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionSku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnDisconnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnDisconnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnNoConnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus?) content.GetValueForProperty("StopOnNoConnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnNoConnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnNoConnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationKeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationKeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationAutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationAutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationAutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationAutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationDefaultTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultTimeZone = (string) content.GetValueForProperty("ActiveHourConfigurationDefaultTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultTimeZone, global::System.Convert.ToString); + } + if (content.Contains("ActiveHourConfigurationDefaultStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultStartTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationDefaultEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultEndTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("DevBoxDefinition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinition = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition) content.GetValueForProperty("DevBoxDefinition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinition, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolDevBoxDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnDisconnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnNoConnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration) content.GetValueForProperty("StopOnNoConnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnNoConnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveHoursConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHoursConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration) content.GetValueForProperty("ActiveHoursConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHoursConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ActiveHoursConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType?) content.GetValueForProperty("DevBoxDefinitionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType.CreateFrom); + } + if (content.Contains("DevBoxDefinitionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); + } + if (content.Contains("NetworkConnectionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName, global::System.Convert.ToString); + } + if (content.Contains("LicenseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); + } + if (content.Contains("LocalAdministrator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); + } + if (content.Contains("SingleSignOnStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("VirtualNetworkType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); + } + if (content.Contains("ManagedVirtualNetworkRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DevBoxTunnelEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxTunnelEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus?) content.GetValueForProperty("DevBoxTunnelEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxTunnelEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Properties of a Pool + [System.ComponentModel.TypeConverter(typeof(PoolPropertiesTypeConverter))] + public partial interface IPoolProperties + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolProperties.TypeConverter.cs index 3cc157a5b024..bee5551fabd9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolProperties.cs new file mode 100644 index 000000000000..4158f15511b5 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolProperties.cs @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Properties of a Pool + public partial class PoolProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties __poolUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolUpdateProperties(); + + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveHourConfigurationAutoStartEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveHourConfigurationAutoStartEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus)""); } + + /// The default end time of the active hours + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public int? ActiveHourConfigurationDefaultEndTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveHourConfigurationDefaultEndTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveHourConfigurationDefaultEndTimeHour = value ?? default(int); } + + /// The default start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public int? ActiveHourConfigurationDefaultStartTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveHourConfigurationDefaultStartTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveHourConfigurationDefaultStartTimeHour = value ?? default(int); } + + /// The default IANA timezone id of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string ActiveHourConfigurationDefaultTimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveHourConfigurationDefaultTimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveHourConfigurationDefaultTimeZone = value ?? null; } + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveHourConfigurationKeepAwakeEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveHourConfigurationKeepAwakeEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus)""); } + + /// Active hours configuration settings for Dev Boxes created in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration ActiveHoursConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveHoursConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveHoursConfiguration = value ?? null /* model class */; } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveImageReferenceExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string ActiveImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveImageReferenceId = value ?? null; } + + /// Backing field for property. + private int? _devBoxCount; + + /// Indicates the number of provisioned Dev Boxes in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public int? DevBoxCount { get => this._devBoxCount; } + + /// + /// A definition of the machines that are created from this Pool. Will be ignored if devBoxDefinitionType is Reference or + /// not provided. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition DevBoxDefinition { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxDefinition; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxDefinition = value ?? null /* model class */; } + + /// + /// Image reference information for the currently active image (only populated during updates). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference DevBoxDefinitionActiveImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxDefinitionActiveImageReference; } + + /// Image reference information. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference DevBoxDefinitionImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxDefinitionImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxDefinitionImageReference = value ?? null /* model class */; } + + /// + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string DevBoxDefinitionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxDefinitionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxDefinitionName = value ?? null; } + + /// The SKU for Dev Boxes created from the Pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku DevBoxDefinitionSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxDefinitionSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxDefinitionSku = value ?? null /* model class */; } + + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType? DevBoxDefinitionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxDefinitionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxDefinitionType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType)""); } + + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxTunnelEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxTunnelEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus)""); } + + /// The display name of the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DisplayName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? _healthStatus; + + /// + /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? HealthStatus { get => this._healthStatus; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail[] _healthStatusDetail; + + /// + /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool + /// is in a non-healthy state + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail[] HealthStatusDetail { get => this._healthStatusDetail; } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ImageReferenceExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ImageReferenceId = value ?? null; } + + /// + /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).LicenseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).LicenseType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType)""); } + + /// + /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).LocalAdministrator; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).LocalAdministrator = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus)""); } + + /// + /// The regions of the managed virtual network (required when managedNetworkType is Managed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string[] ManagedVirtualNetworkRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ManagedVirtualNetworkRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ManagedVirtualNetworkRegion = value ?? null /* arrayOf */; } + + /// Internal Acessors for DevBoxCount + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal.DevBoxCount { get => this._devBoxCount; set { {_devBoxCount = value;} } } + + /// Internal Acessors for HealthStatus + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal.HealthStatus { get => this._healthStatus; set { {_healthStatus = value;} } } + + /// Internal Acessors for HealthStatusDetail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal.HealthStatusDetail { get => this._healthStatusDetail; set { {_healthStatusDetail = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for ActiveImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal.ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ActiveImageReferenceExactVersion = value; } + + /// Internal Acessors for DevBoxDefinitionActiveImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal.DevBoxDefinitionActiveImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxDefinitionActiveImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).DevBoxDefinitionActiveImageReference = value; } + + /// Internal Acessors for ImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).ImageReferenceExactVersion = value; } + + /// Name of a Network Connection in parent Project of this Pool + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string NetworkConnectionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).NetworkConnectionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).NetworkConnectionName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; + + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// + /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on + /// be enabled on the tenant. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).SingleSignOnStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).SingleSignOnStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus)""); } + + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).SkuCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).SkuCapacity = value ?? default(int); } + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).SkuFamily = value ?? null; } + + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).SkuName = value ?? null; } + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).SkuSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).SkuSize = value ?? null; } + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).SkuTier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).SkuTier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } + + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration StopOnDisconnect { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnDisconnect; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnDisconnect = value ?? null /* model class */; } + + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public int? StopOnDisconnectGracePeriodMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnDisconnectGracePeriodMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnDisconnectGracePeriodMinute = value ?? default(int); } + + /// + /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnDisconnectStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnDisconnectStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus)""); } + + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration StopOnNoConnect { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnNoConnect; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnNoConnect = value ?? null /* model class */; } + + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public int? StopOnNoConnectGracePeriodMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnNoConnectGracePeriodMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnNoConnectGracePeriodMinute = value ?? default(int); } + + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus? StopOnNoConnectStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnNoConnectStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).StopOnNoConnectStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus)""); } + + /// + /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).VirtualNetworkType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)__poolUpdateProperties).VirtualNetworkType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType)""); } + + /// Creates an new instance. + public PoolProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__poolUpdateProperties), __poolUpdateProperties); + await eventListener.AssertObjectIsValid(nameof(__poolUpdateProperties), __poolUpdateProperties); + } + } + /// Properties of a Pool + public partial interface IPoolProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties + { + /// Indicates the number of provisioned Dev Boxes in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates the number of provisioned Dev Boxes in this pool.", + SerializedName = @"devBoxCount", + PossibleTypes = new [] { typeof(int) })] + int? DevBoxCount { get; } + /// + /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes.", + SerializedName = @"healthStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? HealthStatus { get; } + /// + /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool + /// is in a non-healthy state + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool is in a non-healthy state", + SerializedName = @"healthStatusDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail[] HealthStatusDetail { get; } + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } + + } + /// Properties of a Pool + internal partial interface IPoolPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal + { + /// Indicates the number of provisioned Dev Boxes in this pool. + int? DevBoxCount { get; set; } + /// + /// Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthStatus? HealthStatus { get; set; } + /// + /// Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates the pool + /// is in a non-healthy state + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail[] HealthStatusDetail { get; set; } + /// The provisioning state of the resource. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolProperties.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolProperties.json.cs index f5dcfe454942..4f339a9843ae 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PoolProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new PoolProperties(json) : null; } @@ -77,9 +77,9 @@ internal PoolProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Jso { return; } - __poolUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolUpdateProperties(json); + __poolUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolUpdateProperties(json); {_healthStatus = If( json?.PropertyT("healthStatus"), out var __jsonHealthStatus) ? (string)__jsonHealthStatus : (string)HealthStatus;} - {_healthStatusDetail = If( json?.PropertyT("healthStatusDetails"), out var __jsonHealthStatusDetails) ? If( __jsonHealthStatusDetails as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthStatusDetail) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.HealthStatusDetail.FromJson(__u) )) ))() : null : HealthStatusDetail;} + {_healthStatusDetail = If( json?.PropertyT("healthStatusDetails"), out var __jsonHealthStatusDetails) ? If( __jsonHealthStatusDetails as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthStatusDetail) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.HealthStatusDetail.FromJson(__u) )) ))() : null : HealthStatusDetail;} {_devBoxCount = If( json?.PropertyT("devBoxCount"), out var __jsonDevBoxCount) ? (int?)__jsonDevBoxCount : DevBoxCount;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} AfterFromJson(json); diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdate.PowerShell.cs new file mode 100644 index 000000000000..d7af6288f0f1 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdate.PowerShell.cs @@ -0,0 +1,442 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// The pool properties for partial update. Properties not provided in the update request will not be changed. + /// + [System.ComponentModel.TypeConverter(typeof(PoolUpdateTypeConverter))] + public partial class PoolUpdate + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PoolUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PoolUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PoolUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("LicenseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); + } + if (content.Contains("DevBoxDefinition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinition = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition) content.GetValueForProperty("DevBoxDefinition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinition, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolDevBoxDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnDisconnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnNoConnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnNoConnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration) content.GetValueForProperty("StopOnNoConnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnNoConnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnNoConnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveHoursConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHoursConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration) content.GetValueForProperty("ActiveHoursConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHoursConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ActiveHoursConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType?) content.GetValueForProperty("DevBoxDefinitionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType.CreateFrom); + } + if (content.Contains("DevBoxDefinitionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); + } + if (content.Contains("NetworkConnectionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).NetworkConnectionName, global::System.Convert.ToString); + } + if (content.Contains("LocalAdministrator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); + } + if (content.Contains("SingleSignOnStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("VirtualNetworkType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); + } + if (content.Contains("ManagedVirtualNetworkRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DevBoxTunnelEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxTunnelEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus?) content.GetValueForProperty("DevBoxTunnelEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxTunnelEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxDefinitionImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionSku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("DevBoxDefinitionSku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionSku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnDisconnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnDisconnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnNoConnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnNoConnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus?) content.GetValueForProperty("StopOnNoConnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnNoConnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnNoConnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnNoConnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnNoConnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnNoConnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationKeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationKeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationAutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationAutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationAutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationAutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationDefaultTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationDefaultTimeZone = (string) content.GetValueForProperty("ActiveHourConfigurationDefaultTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationDefaultTimeZone, global::System.Convert.ToString); + } + if (content.Contains("ActiveHourConfigurationDefaultStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationDefaultStartTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationDefaultStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationDefaultEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationDefaultEndTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationDefaultEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveImageReferenceExactVersion, 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 PoolUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("LicenseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); + } + if (content.Contains("DevBoxDefinition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinition = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition) content.GetValueForProperty("DevBoxDefinition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinition, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolDevBoxDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnDisconnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnNoConnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnNoConnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration) content.GetValueForProperty("StopOnNoConnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnNoConnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnNoConnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveHoursConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHoursConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration) content.GetValueForProperty("ActiveHoursConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHoursConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ActiveHoursConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType?) content.GetValueForProperty("DevBoxDefinitionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType.CreateFrom); + } + if (content.Contains("DevBoxDefinitionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); + } + if (content.Contains("NetworkConnectionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).NetworkConnectionName, global::System.Convert.ToString); + } + if (content.Contains("LocalAdministrator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); + } + if (content.Contains("SingleSignOnStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("VirtualNetworkType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); + } + if (content.Contains("ManagedVirtualNetworkRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DevBoxTunnelEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxTunnelEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus?) content.GetValueForProperty("DevBoxTunnelEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxTunnelEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxDefinitionImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionSku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("DevBoxDefinitionSku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionSku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).DevBoxDefinitionActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnDisconnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnDisconnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnNoConnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnNoConnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus?) content.GetValueForProperty("StopOnNoConnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnNoConnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnNoConnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnNoConnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnNoConnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).StopOnNoConnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationKeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationKeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationAutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationAutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationAutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationAutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationDefaultTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationDefaultTimeZone = (string) content.GetValueForProperty("ActiveHourConfigurationDefaultTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationDefaultTimeZone, global::System.Convert.ToString); + } + if (content.Contains("ActiveHourConfigurationDefaultStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationDefaultStartTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationDefaultStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationDefaultEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationDefaultEndTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveHourConfigurationDefaultEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal)this).ActiveImageReferenceExactVersion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The pool properties for partial update. Properties not provided in the update request will not be changed. + [System.ComponentModel.TypeConverter(typeof(PoolUpdateTypeConverter))] + public partial interface IPoolUpdate + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdate.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdate.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdate.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdate.TypeConverter.cs index f126bd3585f8..7390a36f1a96 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdate.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdate.cs new file mode 100644 index 000000000000..ff40a009ced1 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdate.cs @@ -0,0 +1,654 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// The pool properties for partial update. Properties not provided in the update request will not be changed. + /// + public partial class PoolUpdate : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdate, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate(); + + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationAutoStartEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationAutoStartEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus)""); } + + /// The default end time of the active hours + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? ActiveHourConfigurationDefaultEndTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationDefaultEndTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationDefaultEndTimeHour = value ?? default(int); } + + /// The default start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? ActiveHourConfigurationDefaultStartTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationDefaultStartTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationDefaultStartTimeHour = value ?? default(int); } + + /// The default IANA timezone id of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ActiveHourConfigurationDefaultTimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationDefaultTimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationDefaultTimeZone = value ?? null; } + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationKeepAwakeEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHourConfigurationKeepAwakeEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus)""); } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveImageReferenceExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ActiveImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveImageReferenceId = value ?? null; } + + /// + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DevBoxDefinitionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionName = value ?? null; } + + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType? DevBoxDefinitionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType)""); } + + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxTunnelEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxTunnelEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus)""); } + + /// The display name of the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ImageReferenceExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ImageReferenceId = value ?? null; } + + /// + /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).LicenseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).LicenseType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType)""); } + + /// + /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).LocalAdministrator; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).LocalAdministrator = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus)""); } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location = value ?? null; } + + /// + /// The regions of the managed virtual network (required when managedNetworkType is Managed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string[] ManagedVirtualNetworkRegion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ManagedVirtualNetworkRegion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ManagedVirtualNetworkRegion = value ?? null /* arrayOf */; } + + /// Internal Acessors for ActiveHoursConfiguration + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal.ActiveHoursConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHoursConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveHoursConfiguration = value; } + + /// Internal Acessors for ActiveImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal.ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ActiveImageReferenceExactVersion = value; } + + /// Internal Acessors for DevBoxDefinition + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal.DevBoxDefinition { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinition; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinition = value; } + + /// Internal Acessors for DevBoxDefinitionActiveImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal.DevBoxDefinitionActiveImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionActiveImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionActiveImageReference = value; } + + /// Internal Acessors for DevBoxDefinitionImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal.DevBoxDefinitionImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionImageReference = value; } + + /// Internal Acessors for DevBoxDefinitionSku + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal.DevBoxDefinitionSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).DevBoxDefinitionSku = value; } + + /// Internal Acessors for ImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).ImageReferenceExactVersion = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolUpdateProperties()); set { {_property = value;} } } + + /// Internal Acessors for StopOnDisconnect + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal.StopOnDisconnect { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnect; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnect = value; } + + /// Internal Acessors for StopOnNoConnect + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateInternal.StopOnNoConnect { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnNoConnect; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnNoConnect = value; } + + /// Name of a Network Connection in parent Project of this Pool + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string NetworkConnectionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).NetworkConnectionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).NetworkConnectionName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties _property; + + /// Properties of a pool to be updated. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolUpdateProperties()); set => this._property = value; } + + /// + /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on + /// be enabled on the tenant. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SingleSignOnStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SingleSignOnStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus)""); } + + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuCapacity = value ?? default(int); } + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuFamily = value ?? null; } + + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuName = value ?? null; } + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuSize = value ?? null; } + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuTier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).SkuTier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } + + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? StopOnDisconnectGracePeriodMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectGracePeriodMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectGracePeriodMinute = value ?? default(int); } + + /// + /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnDisconnectStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus)""); } + + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? StopOnNoConnectGracePeriodMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnNoConnectGracePeriodMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnNoConnectGracePeriodMinute = value ?? default(int); } + + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus? StopOnNoConnectStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnNoConnectStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).StopOnNoConnectStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag = value ?? null /* model class */; } + + /// + /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).VirtualNetworkType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)Property).VirtualNetworkType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType)""); } + + /// Creates an new instance. + public PoolUpdate() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResourceUpdate), __trackedResourceUpdate); + await eventListener.AssertObjectIsValid(nameof(__trackedResourceUpdate), __trackedResourceUpdate); + } + } + /// The pool properties for partial update. Properties not provided in the update request will not be changed. + public partial interface IPoolUpdate : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate + { + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be automatically started at commencement of active hours.", + SerializedName = @"autoStartEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get; set; } + /// The default end time of the active hours + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default end time of the active hours", + SerializedName = @"defaultEndTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? ActiveHourConfigurationDefaultEndTimeHour { get; set; } + /// The default start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default start time of the active hours.", + SerializedName = @"defaultStartTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? ActiveHourConfigurationDefaultStartTimeHour { get; set; } + /// The default IANA timezone id of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default IANA timezone id of the active hours.", + SerializedName = @"defaultTimeZone", + PossibleTypes = new [] { typeof(string) })] + string ActiveHourConfigurationDefaultTimeZone { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be kept awake during active hours.", + SerializedName = @"keepAwakeEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ActiveImageReferenceExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ActiveImageReferenceId { get; set; } + /// + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value.", + SerializedName = @"devBoxDefinitionName", + PossibleTypes = new [] { typeof(string) })] + string DevBoxDefinitionName { get; set; } + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly.", + SerializedName = @"devBoxDefinitionType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType? DevBoxDefinitionType { get; set; } + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether Dev Box Tunnel is enabled for a the pool.", + SerializedName = @"devBoxTunnelEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get; set; } + /// The display name of the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The display name of the pool.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceId { get; set; } + /// + /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created.", + SerializedName = @"licenseType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get; set; } + /// + /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box.", + SerializedName = @"localAdministrator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get; set; } + /// + /// The regions of the managed virtual network (required when managedNetworkType is Managed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The regions of the managed virtual network (required when managedNetworkType is Managed).", + SerializedName = @"managedVirtualNetworkRegions", + PossibleTypes = new [] { typeof(string) })] + string[] ManagedVirtualNetworkRegion { get; set; } + /// Name of a Network Connection in parent Project of this Pool + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a Network Connection in parent Project of this Pool", + SerializedName = @"networkConnectionName", + PossibleTypes = new [] { typeof(string) })] + string NetworkConnectionName { get; set; } + /// + /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on + /// be enabled on the tenant. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on be enabled on the tenant.", + SerializedName = @"singleSignOnStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get; set; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + int? SkuCapacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + string SkuFamily { get; set; } + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string SkuName { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + string SkuSize { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box once disconnect is detected.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + int? StopOnDisconnectGracePeriodMinute { get; set; } + /// + /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box if no connection is made.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + int? StopOnNoConnectGracePeriodMinute { get; set; } + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus? StopOnNoConnectStatus { get; set; } + /// + /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network.", + SerializedName = @"virtualNetworkType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get; set; } + + } + /// The pool properties for partial update. Properties not provided in the update request will not be changed. + internal partial interface IPoolUpdateInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal + { + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get; set; } + /// The default end time of the active hours + int? ActiveHourConfigurationDefaultEndTimeHour { get; set; } + /// The default start time of the active hours. + int? ActiveHourConfigurationDefaultStartTimeHour { get; set; } + /// The default IANA timezone id of the active hours. + string ActiveHourConfigurationDefaultTimeZone { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get; set; } + /// Active hours configuration settings for Dev Boxes created in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration ActiveHoursConfiguration { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ActiveImageReferenceExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string ActiveImageReferenceId { get; set; } + /// + /// A definition of the machines that are created from this Pool. Will be ignored if devBoxDefinitionType is Reference or + /// not provided. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition DevBoxDefinition { get; set; } + /// + /// Image reference information for the currently active image (only populated during updates). + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference DevBoxDefinitionActiveImageReference { get; set; } + /// Image reference information. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference DevBoxDefinitionImageReference { get; set; } + /// + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// + string DevBoxDefinitionName { get; set; } + /// The SKU for Dev Boxes created from the Pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku DevBoxDefinitionSku { get; set; } + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType? DevBoxDefinitionType { get; set; } + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get; set; } + /// The display name of the pool. + string DisplayName { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ImageReferenceExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string ImageReferenceId { get; set; } + /// + /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get; set; } + /// + /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get; set; } + /// + /// The regions of the managed virtual network (required when managedNetworkType is Managed). + /// + string[] ManagedVirtualNetworkRegion { get; set; } + /// Name of a Network Connection in parent Project of this Pool + string NetworkConnectionName { get; set; } + /// Properties of a pool to be updated. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties Property { get; set; } + /// + /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on + /// be enabled on the tenant. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get; set; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + int? SkuCapacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + string SkuFamily { get; set; } + /// The name of the SKU. E.g. P3. It is typically a letter+number code + string SkuName { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + string SkuSize { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get; set; } + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration StopOnDisconnect { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + /// + int? StopOnDisconnectGracePeriodMinute { get; set; } + /// + /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration StopOnNoConnect { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + int? StopOnNoConnectGracePeriodMinute { get; set; } + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus? StopOnNoConnectStatus { get; set; } + /// + /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdate.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdate.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdate.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdate.json.cs index ea7a45601823..0cc124b305ce 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdate.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class PoolUpdate partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new PoolUpdate(json) : null; } @@ -79,8 +79,8 @@ internal PoolUpdate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.Js { return; } - __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolUpdateProperties.FromJson(__jsonProperties) : Property;} + __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolUpdateProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdateProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..ac96e157902f --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdateProperties.PowerShell.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// Properties of a Pool. These properties can be updated after the resource has been created. + /// + [System.ComponentModel.TypeConverter(typeof(PoolUpdatePropertiesTypeConverter))] + public partial class PoolUpdateProperties + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PoolUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PoolUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PoolUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DevBoxDefinition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinition = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition) content.GetValueForProperty("DevBoxDefinition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinition, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolDevBoxDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnDisconnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnNoConnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration) content.GetValueForProperty("StopOnNoConnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnNoConnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveHoursConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHoursConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration) content.GetValueForProperty("ActiveHoursConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHoursConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ActiveHoursConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType?) content.GetValueForProperty("DevBoxDefinitionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType.CreateFrom); + } + if (content.Contains("DevBoxDefinitionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); + } + if (content.Contains("NetworkConnectionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName, global::System.Convert.ToString); + } + if (content.Contains("LicenseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); + } + if (content.Contains("LocalAdministrator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); + } + if (content.Contains("SingleSignOnStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("VirtualNetworkType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); + } + if (content.Contains("ManagedVirtualNetworkRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DevBoxTunnelEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxTunnelEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus?) content.GetValueForProperty("DevBoxTunnelEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxTunnelEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxDefinitionImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionSku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("DevBoxDefinitionSku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionSku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnDisconnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnDisconnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnNoConnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus?) content.GetValueForProperty("StopOnNoConnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnNoConnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnNoConnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationKeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationKeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationAutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationAutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationAutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationAutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationDefaultTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultTimeZone = (string) content.GetValueForProperty("ActiveHourConfigurationDefaultTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultTimeZone, global::System.Convert.ToString); + } + if (content.Contains("ActiveHourConfigurationDefaultStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultStartTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationDefaultEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultEndTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceExactVersion, 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 PoolUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DevBoxDefinition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinition = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition) content.GetValueForProperty("DevBoxDefinition",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinition, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolDevBoxDefinitionTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnDisconnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnNoConnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration) content.GetValueForProperty("StopOnNoConnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnNoConnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveHoursConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHoursConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration) content.GetValueForProperty("ActiveHoursConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHoursConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ActiveHoursConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType?) content.GetValueForProperty("DevBoxDefinitionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType.CreateFrom); + } + if (content.Contains("DevBoxDefinitionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName = (string) content.GetValueForProperty("DevBoxDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionName, global::System.Convert.ToString); + } + if (content.Contains("NetworkConnectionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName = (string) content.GetValueForProperty("NetworkConnectionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).NetworkConnectionName, global::System.Convert.ToString); + } + if (content.Contains("LicenseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType.CreateFrom); + } + if (content.Contains("LocalAdministrator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus.CreateFrom); + } + if (content.Contains("SingleSignOnStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus?) content.GetValueForProperty("SingleSignOnStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SingleSignOnStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("VirtualNetworkType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType?) content.GetValueForProperty("VirtualNetworkType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).VirtualNetworkType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType.CreateFrom); + } + if (content.Contains("ManagedVirtualNetworkRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion = (string[]) content.GetValueForProperty("ManagedVirtualNetworkRegion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ManagedVirtualNetworkRegion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DevBoxTunnelEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxTunnelEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus?) content.GetValueForProperty("DevBoxTunnelEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxTunnelEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxDefinitionImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionSku = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku) content.GetValueForProperty("DevBoxDefinitionSku",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionSku, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SkuTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxDefinitionActiveImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionActiveImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("DevBoxDefinitionActiveImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).DevBoxDefinitionActiveImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceId = (string) content.GetValueForProperty("ImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceExactVersion = (string) content.GetValueForProperty("ImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ImageReferenceExactVersion, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + } + if (content.Contains("SkuSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuSize = (string) content.GetValueForProperty("SkuSize",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuSize, global::System.Convert.ToString); + } + if (content.Contains("SkuFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuFamily = (string) content.GetValueForProperty("SkuFamily",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuFamily, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnDisconnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnDisconnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnNoConnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus?) content.GetValueForProperty("StopOnNoConnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnNoConnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnNoConnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).StopOnNoConnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationKeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationKeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationAutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationAutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus?) content.GetValueForProperty("ActiveHourConfigurationAutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationAutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationDefaultTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultTimeZone = (string) content.GetValueForProperty("ActiveHourConfigurationDefaultTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultTimeZone, global::System.Convert.ToString); + } + if (content.Contains("ActiveHourConfigurationDefaultStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultStartTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationDefaultEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultEndTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveHourConfigurationDefaultEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveImageReferenceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceId = (string) content.GetValueForProperty("ActiveImageReferenceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceId, global::System.Convert.ToString); + } + if (content.Contains("ActiveImageReferenceExactVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceExactVersion = (string) content.GetValueForProperty("ActiveImageReferenceExactVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal)this).ActiveImageReferenceExactVersion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Properties of a Pool. These properties can be updated after the resource has been created. + [System.ComponentModel.TypeConverter(typeof(PoolUpdatePropertiesTypeConverter))] + public partial interface IPoolUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdateProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdateProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdateProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdateProperties.TypeConverter.cs index d30d9788d1ab..35997d16dacd 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdateProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdateProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdateProperties.cs new file mode 100644 index 000000000000..5a9a7f0f261c --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdateProperties.cs @@ -0,0 +1,676 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// Properties of a Pool. These properties can be updated after the resource has been created. + /// + public partial class PoolUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal + { + + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).AutoStartEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).AutoStartEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus)""); } + + /// The default end time of the active hours + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? ActiveHourConfigurationDefaultEndTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).DefaultEndTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).DefaultEndTimeHour = value ?? default(int); } + + /// The default start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? ActiveHourConfigurationDefaultStartTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).DefaultStartTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).DefaultStartTimeHour = value ?? default(int); } + + /// The default IANA timezone id of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ActiveHourConfigurationDefaultTimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).DefaultTimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).DefaultTimeZone = value ?? null; } + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).KeepAwakeEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).KeepAwakeEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration _activeHoursConfiguration; + + /// Active hours configuration settings for Dev Boxes created in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration ActiveHoursConfiguration { get => (this._activeHoursConfiguration = this._activeHoursConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ActiveHoursConfiguration()); set => this._activeHoursConfiguration = value; } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).ActiveImageReferenceExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ActiveImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).ActiveImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).ActiveImageReferenceId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition _devBoxDefinition; + + /// + /// A definition of the machines that are created from this Pool. Will be ignored if devBoxDefinitionType is Reference or + /// not provided. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition DevBoxDefinition { get => (this._devBoxDefinition = this._devBoxDefinition ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolDevBoxDefinition()); set => this._devBoxDefinition = value; } + + /// Backing field for property. + private string _devBoxDefinitionName; + + /// + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string DevBoxDefinitionName { get => this._devBoxDefinitionName; set => this._devBoxDefinitionName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType? _devBoxDefinitionType; + + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType? DevBoxDefinitionType { get => this._devBoxDefinitionType; set => this._devBoxDefinitionType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus? _devBoxTunnelEnableStatus; + + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get => this._devBoxTunnelEnableStatus; set => this._devBoxTunnelEnableStatus = value; } + + /// Backing field for property. + private string _displayName; + + /// The display name of the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).ImageReferenceExactVersion; } + + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string ImageReferenceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).ImageReferenceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).ImageReferenceId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? _licenseType; + + /// + /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get => this._licenseType; set => this._licenseType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? _localAdministrator; + + /// + /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get => this._localAdministrator; set => this._localAdministrator = value; } + + /// Backing field for property. + private string[] _managedVirtualNetworkRegion; + + /// + /// The regions of the managed virtual network (required when managedNetworkType is Managed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string[] ManagedVirtualNetworkRegion { get => this._managedVirtualNetworkRegion; set => this._managedVirtualNetworkRegion = value; } + + /// Internal Acessors for ActiveHoursConfiguration + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal.ActiveHoursConfiguration { get => (this._activeHoursConfiguration = this._activeHoursConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ActiveHoursConfiguration()); set { {_activeHoursConfiguration = value;} } } + + /// Internal Acessors for ActiveImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal.ActiveImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).ActiveImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).ActiveImageReferenceExactVersion = value; } + + /// Internal Acessors for DevBoxDefinition + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal.DevBoxDefinition { get => (this._devBoxDefinition = this._devBoxDefinition ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolDevBoxDefinition()); set { {_devBoxDefinition = value;} } } + + /// Internal Acessors for DevBoxDefinitionActiveImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal.DevBoxDefinitionActiveImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).ActiveImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).ActiveImageReference = value; } + + /// Internal Acessors for DevBoxDefinitionImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal.DevBoxDefinitionImageReference { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).ImageReference; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).ImageReference = value; } + + /// Internal Acessors for DevBoxDefinitionSku + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal.DevBoxDefinitionSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).Sku = value; } + + /// Internal Acessors for ImageReferenceExactVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal.ImageReferenceExactVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).ImageReferenceExactVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).ImageReferenceExactVersion = value; } + + /// Internal Acessors for StopOnDisconnect + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal.StopOnDisconnect { get => (this._stopOnDisconnect = this._stopOnDisconnect ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnDisconnectConfiguration()); set { {_stopOnDisconnect = value;} } } + + /// Internal Acessors for StopOnNoConnect + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdatePropertiesInternal.StopOnNoConnect { get => (this._stopOnNoConnect = this._stopOnNoConnect ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnNoConnectConfiguration()); set { {_stopOnNoConnect = value;} } } + + /// Backing field for property. + private string _networkConnectionName; + + /// Name of a Network Connection in parent Project of this Pool + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string NetworkConnectionName { get => this._networkConnectionName; set => this._networkConnectionName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? _singleSignOnStatus; + + /// + /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on + /// be enabled on the tenant. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get => this._singleSignOnStatus; set => this._singleSignOnStatus = value; } + + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).SkuCapacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).SkuCapacity = value ?? default(int); } + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).SkuFamily = value ?? null; } + + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).SkuName = value ?? null; } + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string SkuSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).SkuSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).SkuSize = value ?? null; } + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).SkuTier; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinitionInternal)DevBoxDefinition).SkuTier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration _stopOnDisconnect; + + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration StopOnDisconnect { get => (this._stopOnDisconnect = this._stopOnDisconnect ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnDisconnectConfiguration()); set => this._stopOnDisconnect = value; } + + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? StopOnDisconnectGracePeriodMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).GracePeriodMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).GracePeriodMinute = value ?? default(int); } + + /// + /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration _stopOnNoConnect; + + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration StopOnNoConnect { get => (this._stopOnNoConnect = this._stopOnNoConnect ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnNoConnectConfiguration()); set => this._stopOnNoConnect = value; } + + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? StopOnNoConnectGracePeriodMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)StopOnNoConnect).GracePeriodMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)StopOnNoConnect).GracePeriodMinute = value ?? default(int); } + + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus? StopOnNoConnectStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)StopOnNoConnect).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)StopOnNoConnect).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? _virtualNetworkType; + + /// + /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get => this._virtualNetworkType; set => this._virtualNetworkType = value; } + + /// Creates an new instance. + public PoolUpdateProperties() + { + + } + } + /// Properties of a Pool. These properties can be updated after the resource has been created. + public partial interface IPoolUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be automatically started at commencement of active hours.", + SerializedName = @"autoStartEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get; set; } + /// The default end time of the active hours + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default end time of the active hours", + SerializedName = @"defaultEndTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? ActiveHourConfigurationDefaultEndTimeHour { get; set; } + /// The default start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default start time of the active hours.", + SerializedName = @"defaultStartTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? ActiveHourConfigurationDefaultStartTimeHour { get; set; } + /// The default IANA timezone id of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default IANA timezone id of the active hours.", + SerializedName = @"defaultTimeZone", + PossibleTypes = new [] { typeof(string) })] + string ActiveHourConfigurationDefaultTimeZone { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be kept awake during active hours.", + SerializedName = @"keepAwakeEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ActiveImageReferenceExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ActiveImageReferenceId { get; set; } + /// + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value.", + SerializedName = @"devBoxDefinitionName", + PossibleTypes = new [] { typeof(string) })] + string DevBoxDefinitionName { get; set; } + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly.", + SerializedName = @"devBoxDefinitionType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType? DevBoxDefinitionType { get; set; } + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether Dev Box Tunnel is enabled for a the pool.", + SerializedName = @"devBoxTunnelEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get; set; } + /// The display name of the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The display name of the pool.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual version in use.", + SerializedName = @"exactVersion", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceExactVersion { get; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceId { get; set; } + /// + /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created.", + SerializedName = @"licenseType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get; set; } + /// + /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box.", + SerializedName = @"localAdministrator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get; set; } + /// + /// The regions of the managed virtual network (required when managedNetworkType is Managed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The regions of the managed virtual network (required when managedNetworkType is Managed).", + SerializedName = @"managedVirtualNetworkRegions", + PossibleTypes = new [] { typeof(string) })] + string[] ManagedVirtualNetworkRegion { get; set; } + /// Name of a Network Connection in parent Project of this Pool + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of a Network Connection in parent Project of this Pool", + SerializedName = @"networkConnectionName", + PossibleTypes = new [] { typeof(string) })] + string NetworkConnectionName { get; set; } + /// + /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on + /// be enabled on the tenant. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on be enabled on the tenant.", + SerializedName = @"singleSignOnStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get; set; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + int? SkuCapacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + string SkuFamily { get; set; } + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string SkuName { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + string SkuSize { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box once disconnect is detected.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + int? StopOnDisconnectGracePeriodMinute { get; set; } + /// + /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box if no connection is made.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + int? StopOnNoConnectGracePeriodMinute { get; set; } + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus? StopOnNoConnectStatus { get; set; } + /// + /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network.", + SerializedName = @"virtualNetworkType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get; set; } + + } + /// Properties of a Pool. These properties can be updated after the resource has been created. + internal partial interface IPoolUpdatePropertiesInternal + + { + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get; set; } + /// The default end time of the active hours + int? ActiveHourConfigurationDefaultEndTimeHour { get; set; } + /// The default start time of the active hours. + int? ActiveHourConfigurationDefaultStartTimeHour { get; set; } + /// The default IANA timezone id of the active hours. + string ActiveHourConfigurationDefaultTimeZone { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get; set; } + /// Active hours configuration settings for Dev Boxes created in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IActiveHoursConfiguration ActiveHoursConfiguration { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ActiveImageReferenceExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string ActiveImageReferenceId { get; set; } + /// + /// A definition of the machines that are created from this Pool. Will be ignored if devBoxDefinitionType is Reference or + /// not provided. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolDevBoxDefinition DevBoxDefinition { get; set; } + /// + /// Image reference information for the currently active image (only populated during updates). + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference DevBoxDefinitionActiveImageReference { get; set; } + /// Image reference information. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageReference DevBoxDefinitionImageReference { get; set; } + /// + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// + string DevBoxDefinitionName { get; set; } + /// The SKU for Dev Boxes created from the Pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku DevBoxDefinitionSku { get; set; } + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType? DevBoxDefinitionType { get; set; } + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus? DevBoxTunnelEnableStatus { get; set; } + /// The display name of the pool. + string DisplayName { get; set; } + /// + /// The actual version of the image after use. When id references a gallery image latest version, this will indicate the actual + /// version in use. + /// + string ImageReferenceExactVersion { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + string ImageReferenceId { get; set; } + /// + /// Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LicenseType? LicenseType { get; set; } + /// + /// Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus? LocalAdministrator { get; set; } + /// + /// The regions of the managed virtual network (required when managedNetworkType is Managed). + /// + string[] ManagedVirtualNetworkRegion { get; set; } + /// Name of a Network Connection in parent Project of this Pool + string NetworkConnectionName { get; set; } + /// + /// Indicates whether Dev Boxes in this pool are created with single sign on enabled. The also requires that single sign on + /// be enabled on the tenant. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus? SingleSignOnStatus { get; set; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + int? SkuCapacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + string SkuFamily { get; set; } + /// The name of the SKU. E.g. P3. It is typically a letter+number code + string SkuName { get; set; } + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + string SkuSize { get; set; } + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier? SkuTier { get; set; } + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration StopOnDisconnect { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + /// + int? StopOnDisconnectGracePeriodMinute { get; set; } + /// + /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration StopOnNoConnect { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + int? StopOnNoConnectGracePeriodMinute { get; set; } + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus? StopOnNoConnectStatus { get; set; } + /// + /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.VirtualNetworkType? VirtualNetworkType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdateProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdateProperties.json.cs similarity index 79% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdateProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdateProperties.json.cs index 7ca5593be79f..5029f19bf499 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/PoolUpdateProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/PoolUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class PoolUpdateProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new PoolUpdateProperties(json) : null; } @@ -79,7 +79,11 @@ internal PoolUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runti { return; } - {_stopOnDisconnect = If( json?.PropertyT("stopOnDisconnect"), out var __jsonStopOnDisconnect) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.StopOnDisconnectConfiguration.FromJson(__jsonStopOnDisconnect) : StopOnDisconnect;} + {_devBoxDefinition = If( json?.PropertyT("devBoxDefinition"), out var __jsonDevBoxDefinition) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolDevBoxDefinition.FromJson(__jsonDevBoxDefinition) : DevBoxDefinition;} + {_stopOnDisconnect = If( json?.PropertyT("stopOnDisconnect"), out var __jsonStopOnDisconnect) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnDisconnectConfiguration.FromJson(__jsonStopOnDisconnect) : StopOnDisconnect;} + {_stopOnNoConnect = If( json?.PropertyT("stopOnNoConnect"), out var __jsonStopOnNoConnect) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.StopOnNoConnectConfiguration.FromJson(__jsonStopOnNoConnect) : StopOnNoConnect;} + {_activeHoursConfiguration = If( json?.PropertyT("activeHoursConfiguration"), out var __jsonActiveHoursConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ActiveHoursConfiguration.FromJson(__jsonActiveHoursConfiguration) : ActiveHoursConfiguration;} + {_devBoxDefinitionType = If( json?.PropertyT("devBoxDefinitionType"), out var __jsonDevBoxDefinitionType) ? (string)__jsonDevBoxDefinitionType : (string)DevBoxDefinitionType;} {_devBoxDefinitionName = If( json?.PropertyT("devBoxDefinitionName"), out var __jsonDevBoxDefinitionName) ? (string)__jsonDevBoxDefinitionName : (string)DevBoxDefinitionName;} {_networkConnectionName = If( json?.PropertyT("networkConnectionName"), out var __jsonNetworkConnectionName) ? (string)__jsonNetworkConnectionName : (string)NetworkConnectionName;} {_licenseType = If( json?.PropertyT("licenseType"), out var __jsonLicenseType) ? (string)__jsonLicenseType : (string)LicenseType;} @@ -88,6 +92,7 @@ internal PoolUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runti {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} {_virtualNetworkType = If( json?.PropertyT("virtualNetworkType"), out var __jsonVirtualNetworkType) ? (string)__jsonVirtualNetworkType : (string)VirtualNetworkType;} {_managedVirtualNetworkRegion = If( json?.PropertyT("managedVirtualNetworkRegions"), out var __jsonManagedVirtualNetworkRegions) ? If( __jsonManagedVirtualNetworkRegions as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ManagedVirtualNetworkRegion;} + {_devBoxTunnelEnableStatus = If( json?.PropertyT("devBoxTunnelEnableStatus"), out var __jsonDevBoxTunnelEnableStatus) ? (string)__jsonDevBoxTunnelEnableStatus : (string)DevBoxTunnelEnableStatus;} AfterFromJson(json); } @@ -110,7 +115,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson { return container; } + AddIf( null != this._devBoxDefinition ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._devBoxDefinition.ToJson(null,serializationMode) : null, "devBoxDefinition" ,container.Add ); AddIf( null != this._stopOnDisconnect ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._stopOnDisconnect.ToJson(null,serializationMode) : null, "stopOnDisconnect" ,container.Add ); + AddIf( null != this._stopOnNoConnect ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._stopOnNoConnect.ToJson(null,serializationMode) : null, "stopOnNoConnect" ,container.Add ); + AddIf( null != this._activeHoursConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._activeHoursConfiguration.ToJson(null,serializationMode) : null, "activeHoursConfiguration" ,container.Add ); + AddIf( null != (((object)this._devBoxDefinitionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._devBoxDefinitionType.ToString()) : null, "devBoxDefinitionType" ,container.Add ); AddIf( null != (((object)this._devBoxDefinitionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._devBoxDefinitionName.ToString()) : null, "devBoxDefinitionName" ,container.Add ); AddIf( null != (((object)this._networkConnectionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._networkConnectionName.ToString()) : null, "networkConnectionName" ,container.Add ); AddIf( null != (((object)this._licenseType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._licenseType.ToString()) : null, "licenseType" ,container.Add ); @@ -127,6 +136,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson } container.Add("managedVirtualNetworkRegions",__w); } + AddIf( null != (((object)this._devBoxTunnelEnableStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._devBoxTunnelEnableStatus.ToString()) : null, "devBoxTunnelEnableStatus" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Project.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Project.PowerShell.cs new file mode 100644 index 000000000000..9aa9d8d1e4e6 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Project.PowerShell.cs @@ -0,0 +1,456 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents a project resource. + [System.ComponentModel.TypeConverter(typeof(ProjectTypeConverter))] + public partial class Project + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Project(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Project(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Project(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("DevBoxAutoDeleteSettingInactiveThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSettingInactiveThreshold = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingInactiveThreshold",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSettingInactiveThreshold, global::System.Convert.ToString); + } + if (content.Contains("DevBoxAutoDeleteSettingGracePeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSettingGracePeriod = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingGracePeriod",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSettingGracePeriod, global::System.Convert.ToString); + } + if (content.Contains("CatalogSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("CustomizationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CustomizationSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings) content.GetValueForProperty("CustomizationSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CustomizationSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxAutoDeleteSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings) content.GetValueForProperty("DevBoxAutoDeleteSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxAutoDeleteSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAiServicesSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).AzureAiServicesSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings) content.GetValueForProperty("AzureAiServicesSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).AzureAiServicesSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AzureAiServicesSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ServerlessGpuSessionsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ServerlessGpuSessionsSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings) content.GetValueForProperty("ServerlessGpuSessionsSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ServerlessGpuSessionsSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ServerlessGpuSessionsSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("WorkspaceStorageSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).WorkspaceStorageSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings) content.GetValueForProperty("WorkspaceStorageSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).WorkspaceStorageSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.WorkspaceStorageSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevCenterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevCenterId, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("MaxDevBoxesPerUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("DevCenterUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevCenterUri = (string) content.GetValueForProperty("DevCenterUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevCenterUri, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("CatalogSettingCatalogItemSyncType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + } + if (content.Contains("CustomizationSettingIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CustomizationSettingIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]) content.GetValueForProperty("CustomizationSettingIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CustomizationSettingIdentity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationManagedIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomizationSettingUserCustomizationsEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CustomizationSettingUserCustomizationsEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus?) content.GetValueForProperty("CustomizationSettingUserCustomizationsEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CustomizationSettingUserCustomizationsEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxAutoDeleteSettingDeleteMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSettingDeleteMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode?) content.GetValueForProperty("DevBoxAutoDeleteSettingDeleteMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSettingDeleteMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode.CreateFrom); + } + if (content.Contains("AzureAiServiceSettingAzureAiServicesMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).AzureAiServiceSettingAzureAiServicesMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode?) content.GetValueForProperty("AzureAiServiceSettingAzureAiServicesMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).AzureAiServiceSettingAzureAiServicesMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingServerlessGpuSessionsMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode?) content.GetValueForProperty("ServerlessGpuSessionSettingServerlessGpuSessionsMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject = (int?) content.GetValueForProperty("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WorkspaceStorageSettingWorkspaceStorageMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).WorkspaceStorageSettingWorkspaceStorageMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode?) content.GetValueForProperty("WorkspaceStorageSettingWorkspaceStorageMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).WorkspaceStorageSettingWorkspaceStorageMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Project(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("DevBoxAutoDeleteSettingInactiveThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSettingInactiveThreshold = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingInactiveThreshold",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSettingInactiveThreshold, global::System.Convert.ToString); + } + if (content.Contains("DevBoxAutoDeleteSettingGracePeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSettingGracePeriod = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingGracePeriod",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSettingGracePeriod, global::System.Convert.ToString); + } + if (content.Contains("CatalogSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("CustomizationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CustomizationSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings) content.GetValueForProperty("CustomizationSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CustomizationSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxAutoDeleteSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings) content.GetValueForProperty("DevBoxAutoDeleteSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxAutoDeleteSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAiServicesSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).AzureAiServicesSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings) content.GetValueForProperty("AzureAiServicesSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).AzureAiServicesSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AzureAiServicesSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ServerlessGpuSessionsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ServerlessGpuSessionsSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings) content.GetValueForProperty("ServerlessGpuSessionsSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ServerlessGpuSessionsSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ServerlessGpuSessionsSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("WorkspaceStorageSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).WorkspaceStorageSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings) content.GetValueForProperty("WorkspaceStorageSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).WorkspaceStorageSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.WorkspaceStorageSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevCenterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevCenterId, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("MaxDevBoxesPerUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("DevCenterUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevCenterUri = (string) content.GetValueForProperty("DevCenterUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevCenterUri, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("CatalogSettingCatalogItemSyncType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + } + if (content.Contains("CustomizationSettingIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CustomizationSettingIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]) content.GetValueForProperty("CustomizationSettingIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CustomizationSettingIdentity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationManagedIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomizationSettingUserCustomizationsEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CustomizationSettingUserCustomizationsEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus?) content.GetValueForProperty("CustomizationSettingUserCustomizationsEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).CustomizationSettingUserCustomizationsEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxAutoDeleteSettingDeleteMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSettingDeleteMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode?) content.GetValueForProperty("DevBoxAutoDeleteSettingDeleteMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).DevBoxAutoDeleteSettingDeleteMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode.CreateFrom); + } + if (content.Contains("AzureAiServiceSettingAzureAiServicesMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).AzureAiServiceSettingAzureAiServicesMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode?) content.GetValueForProperty("AzureAiServiceSettingAzureAiServicesMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).AzureAiServiceSettingAzureAiServicesMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingServerlessGpuSessionsMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode?) content.GetValueForProperty("ServerlessGpuSessionSettingServerlessGpuSessionsMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject = (int?) content.GetValueForProperty("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WorkspaceStorageSettingWorkspaceStorageMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).WorkspaceStorageSettingWorkspaceStorageMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode?) content.GetValueForProperty("WorkspaceStorageSettingWorkspaceStorageMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal)this).WorkspaceStorageSettingWorkspaceStorageMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents a project resource. + [System.ComponentModel.TypeConverter(typeof(ProjectTypeConverter))] + public partial interface IProject + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Project.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Project.TypeConverter.cs new file mode 100644 index 000000000000..18a5258a6a51 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Project.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Project.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Project.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Project.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Project.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Project.cs new file mode 100644 index 000000000000..9bda7c274d6a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Project.cs @@ -0,0 +1,531 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a project resource. + public partial class Project : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResource(); + + /// The property indicates whether Azure AI services is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode? AzureAiServiceSettingAzureAiServicesMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).AzureAiServiceSettingAzureAiServicesMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).AzureAiServiceSettingAzureAiServicesMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode)""); } + + /// Indicates catalog item types that can be synced. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CatalogSettingCatalogItemSyncType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CatalogSettingCatalogItemSyncType = value ?? null /* arrayOf */; } + + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] CustomizationSettingIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CustomizationSettingIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CustomizationSettingIdentity = value ?? null /* arrayOf */; } + + /// Indicates whether user customizations are enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus? CustomizationSettingUserCustomizationsEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CustomizationSettingUserCustomizationsEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CustomizationSettingUserCustomizationsEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus)""); } + + /// Description of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).Description = value ?? null; } + + /// Indicates the delete mode for Dev Boxes within this project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode? DevBoxAutoDeleteSettingDeleteMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSettingDeleteMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSettingDeleteMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode)""); } + + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DevBoxAutoDeleteSettingGracePeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSettingGracePeriod; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSettingGracePeriod = value ?? null; } + + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DevBoxAutoDeleteSettingInactiveThreshold { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSettingInactiveThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSettingInactiveThreshold = value ?? null; } + + /// Resource Id of an associated DevCenter + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DevCenterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevCenterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevCenterId = value ?? null; } + + /// The URI of the Dev Center resource this project is associated with. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DevCenterUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal)Property).DevCenterUri; } + + /// The display name of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity _identity; + + /// Managed identity properties + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; } + + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; } + + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType)""); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// + /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This + /// will have no effect on existing Dev Boxes when reduced. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? MaxDevBoxesPerUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).MaxDevBoxesPerUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).MaxDevBoxesPerUser = value ?? default(int); } + + /// Internal Acessors for AzureAiServicesSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal.AzureAiServicesSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).AzureAiServicesSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).AzureAiServicesSetting = value; } + + /// Internal Acessors for CatalogSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal.CatalogSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CatalogSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CatalogSetting = value; } + + /// Internal Acessors for CustomizationSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal.CustomizationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CustomizationSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CustomizationSetting = value; } + + /// Internal Acessors for DevBoxAutoDeleteSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal.DevBoxAutoDeleteSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSetting = value; } + + /// Internal Acessors for DevCenterUri + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal.DevCenterUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal)Property).DevCenterUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal)Property).DevCenterUri = value; } + + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } + + /// Internal Acessors for IdentityPrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } + + /// Internal Acessors for IdentityTenantId + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for ServerlessGpuSessionsSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal.ServerlessGpuSessionsSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).ServerlessGpuSessionsSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).ServerlessGpuSessionsSetting = value; } + + /// Internal Acessors for WorkspaceStorageSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectInternal.WorkspaceStorageSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).WorkspaceStorageSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).WorkspaceStorageSetting = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectProperties _property; + + /// Properties of a project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectProperties()); set => this._property = value; } + + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal)Property).ProvisioningState; } + + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject = value ?? default(int); } + + /// The property indicates whether serverless GPU access is enabled on the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode? ServerlessGpuSessionSettingServerlessGpuSessionsMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).ServerlessGpuSessionSettingServerlessGpuSessionsMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).ServerlessGpuSessionSettingServerlessGpuSessionsMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode)""); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__trackedResource).Type; } + + /// Indicates whether workspace storage is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode? WorkspaceStorageSettingWorkspaceStorageMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).WorkspaceStorageSettingWorkspaceStorageMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).WorkspaceStorageSettingWorkspaceStorageMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode)""); } + + /// Creates an new instance. + public Project() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// Represents a project resource. + public partial interface IProject : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource + { + /// The property indicates whether Azure AI services is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether Azure AI services is enabled.", + SerializedName = @"azureAiServicesMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode? AzureAiServiceSettingAzureAiServicesMode { get; set; } + /// Indicates catalog item types that can be synced. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates catalog item types that can be synced.", + SerializedName = @"catalogItemSyncTypes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get; set; } + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identities that can to be used in customization scenarios; e.g., to clone a repository.", + SerializedName = @"identities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] CustomizationSettingIdentity { get; set; } + /// Indicates whether user customizations are enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether user customizations are enabled.", + SerializedName = @"userCustomizationsEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus? CustomizationSettingUserCustomizationsEnableStatus { get; set; } + /// Description of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the project.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Indicates the delete mode for Dev Boxes within this project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the delete mode for Dev Boxes within this project.", + SerializedName = @"deleteMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode? DevBoxAutoDeleteSettingDeleteMode { get; set; } + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"gracePeriod", + PossibleTypes = new [] { typeof(string) })] + string DevBoxAutoDeleteSettingGracePeriod { get; set; } + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"inactiveThreshold", + PossibleTypes = new [] { typeof(string) })] + string DevBoxAutoDeleteSettingInactiveThreshold { get; set; } + /// Resource Id of an associated DevCenter + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource Id of an associated DevCenter", + SerializedName = @"devCenterId", + PossibleTypes = new [] { typeof(string) })] + string DevCenterId { get; set; } + /// The URI of the Dev Center resource this project is associated with. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The URI of the Dev Center resource this project is associated with.", + SerializedName = @"devCenterUri", + PossibleTypes = new [] { typeof(string) })] + string DevCenterUri { get; } + /// The display name of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The display name of the project.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType? 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } + /// + /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This + /// will have no effect on existing Dev Boxes when reduced. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced.", + SerializedName = @"maxDevBoxesPerUser", + PossibleTypes = new [] { typeof(int) })] + int? MaxDevBoxesPerUser { get; set; } + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"When specified, limits the maximum number of concurrent sessions across all pools in the project.", + SerializedName = @"maxConcurrentSessionsPerProject", + PossibleTypes = new [] { typeof(int) })] + int? ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject { get; set; } + /// The property indicates whether serverless GPU access is enabled on the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether serverless GPU access is enabled on the project.", + SerializedName = @"serverlessGpuSessionsMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode? ServerlessGpuSessionSettingServerlessGpuSessionsMode { get; set; } + /// Indicates whether workspace storage is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether workspace storage is enabled.", + SerializedName = @"workspaceStorageMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode? WorkspaceStorageSettingWorkspaceStorageMode { get; set; } + + } + /// Represents a project resource. + internal partial interface IProjectInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal + { + /// The property indicates whether Azure AI services is enabled. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode? AzureAiServiceSettingAzureAiServicesMode { get; set; } + /// Indicates whether Azure AI services are enabled for a project. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings AzureAiServicesSetting { get; set; } + /// Settings to be used when associating a project with a catalog. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings CatalogSetting { get; set; } + /// Indicates catalog item types that can be synced. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get; set; } + /// Settings to be used for customizations. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings CustomizationSetting { get; set; } + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] CustomizationSettingIdentity { get; set; } + /// Indicates whether user customizations are enabled. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus? CustomizationSettingUserCustomizationsEnableStatus { get; set; } + /// Description of the project. + string Description { get; set; } + /// Dev Box Auto Delete settings. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings DevBoxAutoDeleteSetting { get; set; } + /// Indicates the delete mode for Dev Boxes within this project. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode? DevBoxAutoDeleteSettingDeleteMode { get; set; } + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + string DevBoxAutoDeleteSettingGracePeriod { get; set; } + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + string DevBoxAutoDeleteSettingInactiveThreshold { get; set; } + /// Resource Id of an associated DevCenter + string DevCenterId { get; set; } + /// The URI of the Dev Center resource this project is associated with. + string DevCenterUri { get; set; } + /// The display name of the project. + string DisplayName { get; set; } + /// Managed identity properties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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). + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType? 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } + /// + /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This + /// will have no effect on existing Dev Boxes when reduced. + /// + int? MaxDevBoxesPerUser { get; set; } + /// Properties of a project. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectProperties Property { get; set; } + /// The provisioning state of the resource. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + int? ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject { get; set; } + /// The property indicates whether serverless GPU access is enabled on the project. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode? ServerlessGpuSessionSettingServerlessGpuSessionsMode { get; set; } + /// Settings to be used for serverless GPU. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings ServerlessGpuSessionsSetting { get; set; } + /// Settings to be used for workspace storage. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings WorkspaceStorageSetting { get; set; } + /// Indicates whether workspace storage is enabled. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode? WorkspaceStorageSettingWorkspaceStorageMode { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Project.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Project.json.cs new file mode 100644 index 000000000000..193228a420c2 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Project.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a project resource. + public partial class Project + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Project(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal Project(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectProperties.FromJson(__jsonProperties) : Property;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity.FromJson(__jsonIdentity) : Identity;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectCatalogSettings.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCatalogSettings.PowerShell.cs similarity index 90% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectCatalogSettings.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCatalogSettings.PowerShell.cs index 1f65579359c5..353ce84fcba9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectCatalogSettings.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCatalogSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ProjectCatalogSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProjectCatalogSettings(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProjectCatalogSettings(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,13 +105,13 @@ internal ProjectCatalogSettings(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("CatalogItemSyncType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettingsInternal)this).CatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettingsInternal)this).CatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettingsInternal)this).CatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettingsInternal)this).CatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); } 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. @@ -126,7 +126,7 @@ internal ProjectCatalogSettings(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("CatalogItemSyncType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettingsInternal)this).CatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettingsInternal)this).CatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettingsInternal)this).CatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettingsInternal)this).CatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectCatalogSettings.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCatalogSettings.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectCatalogSettings.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCatalogSettings.TypeConverter.cs index 9f16564a36c6..dbf38ea63593 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectCatalogSettings.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCatalogSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectCatalogSettings.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCatalogSettings.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectCatalogSettings.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCatalogSettings.cs index 48d315110390..e9887b4da321 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectCatalogSettings.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCatalogSettings.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Settings to be used when associating a project with a catalog. public partial class ProjectCatalogSettings : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettingsInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectCatalogSettings.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCatalogSettings.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectCatalogSettings.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCatalogSettings.json.cs index 83265226a52c..c3e0c8d9b453 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectCatalogSettings.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCatalogSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ProjectCatalogSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectCatalogSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectCatalogSettings(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationManagedIdentity.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationManagedIdentity.PowerShell.cs new file mode 100644 index 000000000000..ee4fd9fc06a7 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationManagedIdentity.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// A reference to a Managed Identity that is attached to the Project. + [System.ComponentModel.TypeConverter(typeof(ProjectCustomizationManagedIdentityTypeConverter))] + public partial class ProjectCustomizationManagedIdentity + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProjectCustomizationManagedIdentity(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProjectCustomizationManagedIdentity(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProjectCustomizationManagedIdentity(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentityInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentityInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType.CreateFrom); + } + if (content.Contains("IdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentityInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentityInternal)this).IdentityResourceId, 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 ProjectCustomizationManagedIdentity(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentityInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentityInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType.CreateFrom); + } + if (content.Contains("IdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentityInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentityInternal)this).IdentityResourceId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A reference to a Managed Identity that is attached to the Project. + [System.ComponentModel.TypeConverter(typeof(ProjectCustomizationManagedIdentityTypeConverter))] + public partial interface IProjectCustomizationManagedIdentity + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationManagedIdentity.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationManagedIdentity.TypeConverter.cs new file mode 100644 index 000000000000..0b7806e8b651 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationManagedIdentity.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectCustomizationManagedIdentityTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProjectCustomizationManagedIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProjectCustomizationManagedIdentity.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProjectCustomizationManagedIdentity.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationManagedIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationManagedIdentity.cs new file mode 100644 index 000000000000..b04dc404c5f2 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationManagedIdentity.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// A reference to a Managed Identity that is attached to the Project. + public partial class ProjectCustomizationManagedIdentity : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentityInternal + { + + /// Backing field for property. + private string _identityResourceId; + + /// + /// Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. + /// Mutually exclusive with identityType systemAssignedIdentity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string IdentityResourceId { get => this._identityResourceId; set => this._identityResourceId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType? _identityType; + + /// Values can be systemAssignedIdentity or userAssignedIdentity + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType? IdentityType { get => this._identityType; set => this._identityType = value; } + + /// Creates an new instance. + public ProjectCustomizationManagedIdentity() + { + + } + } + /// A reference to a Managed Identity that is attached to the Project. + public partial interface IProjectCustomizationManagedIdentity : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// + /// Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. + /// Mutually exclusive with identityType systemAssignedIdentity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity.", + SerializedName = @"identityResourceId", + PossibleTypes = new [] { typeof(string) })] + string IdentityResourceId { get; set; } + /// Values can be systemAssignedIdentity or userAssignedIdentity + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Values can be systemAssignedIdentity or userAssignedIdentity", + SerializedName = @"identityType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType? IdentityType { get; set; } + + } + /// A reference to a Managed Identity that is attached to the Project. + internal partial interface IProjectCustomizationManagedIdentityInternal + + { + /// + /// Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. + /// Mutually exclusive with identityType systemAssignedIdentity. + /// + string IdentityResourceId { get; set; } + /// Values can be systemAssignedIdentity or userAssignedIdentity + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType? IdentityType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationManagedIdentity.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationManagedIdentity.json.cs new file mode 100644 index 000000000000..2cbb21875348 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationManagedIdentity.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// A reference to a Managed Identity that is attached to the Project. + public partial class ProjectCustomizationManagedIdentity + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectCustomizationManagedIdentity(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ProjectCustomizationManagedIdentity(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_identityType = If( json?.PropertyT("identityType"), out var __jsonIdentityType) ? (string)__jsonIdentityType : (string)IdentityType;} + {_identityResourceId = If( json?.PropertyT("identityResourceId"), out var __jsonIdentityResourceId) ? (string)__jsonIdentityResourceId : (string)IdentityResourceId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._identityType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._identityType.ToString()) : null, "identityType" ,container.Add ); + AddIf( null != (((object)this._identityResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._identityResourceId.ToString()) : null, "identityResourceId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationSettings.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationSettings.PowerShell.cs new file mode 100644 index 000000000000..205db20ec048 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationSettings.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Settings to be used for customizations. + [System.ComponentModel.TypeConverter(typeof(ProjectCustomizationSettingsTypeConverter))] + public partial class ProjectCustomizationSettings + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProjectCustomizationSettings(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProjectCustomizationSettings(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProjectCustomizationSettings(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettingsInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettingsInternal)this).Identity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationManagedIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("UserCustomizationsEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettingsInternal)this).UserCustomizationsEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus?) content.GetValueForProperty("UserCustomizationsEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettingsInternal)this).UserCustomizationsEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProjectCustomizationSettings(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettingsInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettingsInternal)this).Identity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationManagedIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("UserCustomizationsEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettingsInternal)this).UserCustomizationsEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus?) content.GetValueForProperty("UserCustomizationsEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettingsInternal)this).UserCustomizationsEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Settings to be used for customizations. + [System.ComponentModel.TypeConverter(typeof(ProjectCustomizationSettingsTypeConverter))] + public partial interface IProjectCustomizationSettings + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationSettings.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationSettings.TypeConverter.cs new file mode 100644 index 000000000000..b257f1972fa0 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationSettings.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectCustomizationSettingsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProjectCustomizationSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProjectCustomizationSettings.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProjectCustomizationSettings.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationSettings.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationSettings.cs new file mode 100644 index 000000000000..73efe329f548 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationSettings.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Settings to be used for customizations. + public partial class ProjectCustomizationSettings : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettingsInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] _identity; + + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] Identity { get => this._identity; set => this._identity = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus? _userCustomizationsEnableStatus; + + /// Indicates whether user customizations are enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus? UserCustomizationsEnableStatus { get => this._userCustomizationsEnableStatus; set => this._userCustomizationsEnableStatus = value; } + + /// Creates an new instance. + public ProjectCustomizationSettings() + { + + } + } + /// Settings to be used for customizations. + public partial interface IProjectCustomizationSettings : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identities that can to be used in customization scenarios; e.g., to clone a repository.", + SerializedName = @"identities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] Identity { get; set; } + /// Indicates whether user customizations are enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether user customizations are enabled.", + SerializedName = @"userCustomizationsEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus? UserCustomizationsEnableStatus { get; set; } + + } + /// Settings to be used for customizations. + internal partial interface IProjectCustomizationSettingsInternal + + { + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] Identity { get; set; } + /// Indicates whether user customizations are enabled. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus? UserCustomizationsEnableStatus { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationSettings.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationSettings.json.cs new file mode 100644 index 000000000000..8ef56ec6ecd2 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectCustomizationSettings.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Settings to be used for customizations. + public partial class ProjectCustomizationSettings + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectCustomizationSettings(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ProjectCustomizationSettings(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_identity = If( json?.PropertyT("identities"), out var __jsonIdentities) ? If( __jsonIdentities as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationManagedIdentity.FromJson(__u) )) ))() : null : Identity;} + {_userCustomizationsEnableStatus = If( json?.PropertyT("userCustomizationsEnableStatus"), out var __jsonUserCustomizationsEnableStatus) ? (string)__jsonUserCustomizationsEnableStatus : (string)UserCustomizationsEnableStatus;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._identity) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); + foreach( var __x in this._identity ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("identities",__w); + } + AddIf( null != (((object)this._userCustomizationsEnableStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._userCustomizationsEnableStatus.ToString()) : null, "userCustomizationsEnableStatus" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentType.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentType.PowerShell.cs new file mode 100644 index 000000000000..7e8b022551a9 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentType.PowerShell.cs @@ -0,0 +1,346 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents an environment type. + [System.ComponentModel.TypeConverter(typeof(ProjectEnvironmentTypeTypeConverter))] + public partial class ProjectEnvironmentType + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProjectEnvironmentType(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProjectEnvironmentType(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProjectEnvironmentType(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("CreatorRoleAssignment")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); + } + if (content.Contains("DeploymentTargetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).DeploymentTargetId, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); + } + if (content.Contains("UserRoleAssignment")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); + } + if (content.Contains("EnvironmentCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).EnvironmentCount = (int?) content.GetValueForProperty("EnvironmentCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).EnvironmentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("CreatorRoleAssignmentRole")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProjectEnvironmentType(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("CreatorRoleAssignment")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); + } + if (content.Contains("DeploymentTargetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).DeploymentTargetId, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); + } + if (content.Contains("UserRoleAssignment")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); + } + if (content.Contains("EnvironmentCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).EnvironmentCount = (int?) content.GetValueForProperty("EnvironmentCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).EnvironmentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("CreatorRoleAssignmentRole")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents an environment type. + [System.ComponentModel.TypeConverter(typeof(ProjectEnvironmentTypeTypeConverter))] + public partial interface IProjectEnvironmentType + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentType.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentType.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentType.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentType.TypeConverter.cs index ff9b4ce245e6..cac943a3aa81 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentType.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentType.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentType.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentType.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentType.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentType.cs index 83bdf3b92104..d8d8c2acaf7d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentType.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentType.cs @@ -3,45 +3,45 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Represents an environment type. public partial class ProjectEnvironmentType : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); /// A map of roles to assign to the environment creator. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignmentRole; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignmentRole = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignmentRole; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignmentRole = value ?? null /* model class */; } /// /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this /// subscription. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DeploymentTargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DeploymentTargetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DeploymentTargetId = value ?? null; } + public string DeploymentTargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DeploymentTargetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DeploymentTargetId = value ?? null; } /// The display name of the project environment type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName = value ?? null; } /// The number of environments of this type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? EnvironmentCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal)Property).EnvironmentCount; } + public int? EnvironmentCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal)Property).EnvironmentCount; } /// /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; } + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity _identity; @@ -84,106 +84,106 @@ public partial class ProjectEnvironmentType : public string Location { get => this._location; set => this._location = value; } /// Internal Acessors for CreatorRoleAssignment - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal.CreatorRoleAssignment { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignment; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignment = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal.CreatorRoleAssignment { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignment; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignment = value; } /// Internal Acessors for EnvironmentCount - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal.EnvironmentCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal)Property).EnvironmentCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal)Property).EnvironmentCount = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal.EnvironmentCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal)Property).EnvironmentCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal)Property).EnvironmentCount = value; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } /// The name of the resource [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; } + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeProperties _property; /// Properties of an environment type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeProperties()); set => this._property = value; } /// The provisioning state of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal)Property).ProvisioningState; } /// Defines whether this Environment Type can be used in this Project. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus? Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus? Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus)""); } /// /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } /// The timestamp of resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } /// The identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } /// The type of identity that created the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// The timestamp of resource last modification (UTC) [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } /// The identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } /// The type of identity that last modified the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags _tag; /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Tags()); set => this._tag = value; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; } + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } /// /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role /// definition IDs. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).UserRoleAssignment; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).UserRoleAssignment = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).UserRoleAssignment; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).UserRoleAssignment = value ?? null /* model class */; } /// Creates an new instance. public ProjectEnvironmentType() @@ -206,7 +206,7 @@ public ProjectEnvironmentType() /// Represents an environment type. public partial interface IProjectEnvironmentType : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource { /// A map of roles to assign to the environment creator. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -214,8 +214,8 @@ public partial interface IProjectEnvironmentType : ReadOnly = false, Description = @"A map of roles to assign to the environment creator.", SerializedName = @"roles", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get; set; } /// /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this /// subscription. @@ -315,8 +315,8 @@ public partial interface IProjectEnvironmentType : ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get; set; } /// /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role /// definition IDs. @@ -326,18 +326,18 @@ public partial interface IProjectEnvironmentType : ReadOnly = false, Description = @"Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs.", SerializedName = @"userRoleAssignments", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get; set; } } /// Represents an environment type. internal partial interface IProjectEnvironmentTypeInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal { /// The role definition assigned to the environment creator on backing resources. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment CreatorRoleAssignment { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment CreatorRoleAssignment { get; set; } /// A map of roles to assign to the environment creator. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get; set; } /// /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this /// subscription. @@ -370,18 +370,18 @@ internal partial interface IProjectEnvironmentTypeInternal : /// The geo-location for the environment type string Location { get; set; } /// Properties of an environment type. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeProperties Property { get; set; } /// The provisioning state of the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } /// Defines whether this Environment Type can be used in this Project. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus? Status { get; set; } /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get; set; } /// /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role /// definition IDs. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentType.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentType.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentType.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentType.json.cs index d537735d1b73..b7b2f45b2eca 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentType.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentType.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ProjectEnvironmentType partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectEnvironmentType(json) : null; } @@ -77,10 +77,10 @@ internal ProjectEnvironmentType(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Run { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeProperties.FromJson(__jsonProperties) : Property;} + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeProperties.FromJson(__jsonProperties) : Property;} {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity.FromJson(__jsonIdentity) : Identity;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags.FromJson(__jsonTags) : Tag;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Tags.FromJson(__jsonTags) : Tag;} {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeListResult.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeListResult.PowerShell.cs index f3f2a6c340f9..1e319e68450f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ProjectEnvironmentTypeListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProjectEnvironmentTypeListResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProjectEnvironmentTypeListResult(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,17 +105,17 @@ internal ProjectEnvironmentTypeListResult(global::System.Collections.IDictionary // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResultInternal)this).NextLink, 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. @@ -130,11 +130,11 @@ internal ProjectEnvironmentTypeListResult(global::System.Management.Automation.P // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeListResult.TypeConverter.cs index 6eeb62ccce30..d7858a6391aa 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeListResult.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeListResult.cs index 55e110c5b37a..bdf28d7d38e9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Result of the project environment type list operation. public partial class ProjectEnvironmentTypeListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class ProjectEnvironmentTypeListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType[] Value { get => this._value; } /// Creates an new instance. public ProjectEnvironmentTypeListResult() @@ -57,8 +57,8 @@ public partial interface IProjectEnvironmentTypeListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType[] Value { get; } } /// Result of the project environment type list operation. @@ -68,7 +68,7 @@ internal partial interface IProjectEnvironmentTypeListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeListResult.json.cs index 0bd45a7568c4..effff8556943 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ProjectEnvironmentTypeListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectEnvironmentTypeListResult(json) : null; } @@ -77,7 +77,7 @@ internal ProjectEnvironmentTypeListResult(Microsoft.Azure.PowerShell.Cmdlets.Dev { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentType.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentType.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeProperties.PowerShell.cs similarity index 80% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeProperties.PowerShell.cs index 052348b46532..cd9ac4a0ac49 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ProjectEnvironmentTypeProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProjectEnvironmentTypeProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProjectEnvironmentTypeProperties(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,41 +105,41 @@ internal ProjectEnvironmentTypeProperties(global::System.Collections.IDictionary // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("EnvironmentCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal)this).EnvironmentCount = (int?) content.GetValueForProperty("EnvironmentCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal)this).EnvironmentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal)this).EnvironmentCount = (int?) content.GetValueForProperty("EnvironmentCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal)this).EnvironmentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("CreatorRoleAssignmentRole")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); } if (content.Contains("CreatorRoleAssignment")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); } if (content.Contains("DeploymentTargetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId, global::System.Convert.ToString); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); } if (content.Contains("UserRoleAssignment")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); } 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. @@ -154,35 +154,35 @@ internal ProjectEnvironmentTypeProperties(global::System.Management.Automation.P // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("EnvironmentCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal)this).EnvironmentCount = (int?) content.GetValueForProperty("EnvironmentCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal)this).EnvironmentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal)this).EnvironmentCount = (int?) content.GetValueForProperty("EnvironmentCount",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal)this).EnvironmentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("CreatorRoleAssignmentRole")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); } if (content.Contains("CreatorRoleAssignment")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); } if (content.Contains("DeploymentTargetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId, global::System.Convert.ToString); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); } if (content.Contains("UserRoleAssignment")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeProperties.TypeConverter.cs index 8e4c2db883c7..8892c23c22bc 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeProperties.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeProperties.cs index 8e1a2e9eb160..a2784d6231e2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeProperties.cs @@ -3,40 +3,40 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties of a project environment type. public partial class ProjectEnvironmentTypeProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties __projectEnvironmentTypeUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdateProperties(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties __projectEnvironmentTypeUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdateProperties(); /// The role definition assigned to the environment creator on backing resources. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment CreatorRoleAssignment { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).CreatorRoleAssignment; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).CreatorRoleAssignment = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment CreatorRoleAssignment { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).CreatorRoleAssignment; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).CreatorRoleAssignment = value ?? null /* model class */; } /// A map of roles to assign to the environment creator. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).CreatorRoleAssignmentRole; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).CreatorRoleAssignmentRole = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).CreatorRoleAssignmentRole; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).CreatorRoleAssignmentRole = value ?? null /* model class */; } /// /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this /// subscription. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string DeploymentTargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).DeploymentTargetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).DeploymentTargetId = value ?? null; } + public string DeploymentTargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).DeploymentTargetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).DeploymentTargetId = value ?? null; } /// The display name of the project environment type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).DisplayName = value ?? null; } + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).DisplayName = value ?? null; } /// Backing field for property. private int? _environmentCount; @@ -46,10 +46,10 @@ public partial class ProjectEnvironmentTypeProperties : public int? EnvironmentCount { get => this._environmentCount; } /// Internal Acessors for EnvironmentCount - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal.EnvironmentCount { get => this._environmentCount; set { {_environmentCount = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal.EnvironmentCount { get => this._environmentCount; set { {_environmentCount = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; @@ -60,14 +60,14 @@ public partial class ProjectEnvironmentTypeProperties : /// Defines whether this Environment Type can be used in this Project. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus? Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus? Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus)""); } /// /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role /// definition IDs. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).UserRoleAssignment; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).UserRoleAssignment = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).UserRoleAssignment; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)__projectEnvironmentTypeUpdateProperties).UserRoleAssignment = value ?? null /* model class */; } /// Creates an new instance. public ProjectEnvironmentTypeProperties() @@ -90,7 +90,7 @@ public ProjectEnvironmentTypeProperties() /// Properties of a project environment type. public partial interface IProjectEnvironmentTypeProperties : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties { /// The number of environments of this type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -112,7 +112,7 @@ public partial interface IProjectEnvironmentTypeProperties : } /// Properties of a project environment type. internal partial interface IProjectEnvironmentTypePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal { /// The number of environments of this type. int? EnvironmentCount { get; set; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeProperties.json.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeProperties.json.cs index 679bd6a8f5d8..38a3daaad2f6 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ProjectEnvironmentTypeProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectEnvironmentTypeProperties(json) : null; } @@ -77,7 +77,7 @@ internal ProjectEnvironmentTypeProperties(Microsoft.Azure.PowerShell.Cmdlets.Dev { return; } - __projectEnvironmentTypeUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdateProperties(json); + __projectEnvironmentTypeUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdateProperties(json); {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} {_environmentCount = If( json?.PropertyT("environmentCount"), out var __jsonEnvironmentCount) ? (int?)__jsonEnvironmentCount : EnvironmentCount;} AfterFromJson(json); diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdate.PowerShell.cs similarity index 77% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdate.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdate.PowerShell.cs index 7e7232725f2a..10b2823bac7a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdate.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdate.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -57,29 +57,29 @@ public partial class ProjectEnvironmentTypeUpdate partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProjectEnvironmentTypeUpdate(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProjectEnvironmentTypeUpdate(content); } @@ -89,10 +89,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -107,61 +107,61 @@ internal ProjectEnvironmentTypeUpdate(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Identity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("CreatorRoleAssignment")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); } if (content.Contains("DeploymentTargetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).DeploymentTargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).DeploymentTargetId, global::System.Convert.ToString); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).DisplayName, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); } if (content.Contains("UserRoleAssignment")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); } if (content.Contains("IdentityPrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); } if (content.Contains("IdentityTenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); } if (content.Contains("IdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); } if (content.Contains("IdentityUserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); } if (content.Contains("CreatorRoleAssignmentRole")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); } 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. @@ -176,55 +176,55 @@ internal ProjectEnvironmentTypeUpdate(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Identity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("CreatorRoleAssignment")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); } if (content.Contains("DeploymentTargetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).DeploymentTargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).DeploymentTargetId, global::System.Convert.ToString); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).DisplayName, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); } if (content.Contains("UserRoleAssignment")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); } if (content.Contains("IdentityPrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); } if (content.Contains("IdentityTenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); } if (content.Contains("IdentityType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); } if (content.Contains("IdentityUserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); } if (content.Contains("CreatorRoleAssignmentRole")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdate.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdate.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdate.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdate.TypeConverter.cs index c0ba8dfed9d7..e373eb7fb40b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdate.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdate.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdate.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdate.cs index 5717e90d0a3b..0615a5ba73d9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdate.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdate.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,24 +11,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// The project environment type for partial update. Properties not provided in the update request will not be changed. /// public partial class ProjectEnvironmentTypeUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdate, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdate, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal { /// A map of roles to assign to the environment creator. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignmentRole; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignmentRole = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignmentRole; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignmentRole = value ?? null /* model class */; } /// /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this /// subscription. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DeploymentTargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DeploymentTargetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DeploymentTargetId = value ?? null; } + public string DeploymentTargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DeploymentTargetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DeploymentTargetId = value ?? null; } /// The display name of the project environment type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).DisplayName = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity _identity; @@ -64,44 +64,44 @@ public partial class ProjectEnvironmentTypeUpdate : public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } /// Internal Acessors for CreatorRoleAssignment - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal.CreatorRoleAssignment { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignment; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignment = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal.CreatorRoleAssignment { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignment; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).CreatorRoleAssignment = value; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdateProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdateProperties()); set { {_property = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties _property; /// Properties to configure an environment type. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdateProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdateProperties()); set => this._property = value; } /// Defines whether this Environment Type can be used in this Project. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus? Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus? Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus)""); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags _tag; /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Tags()); set => this._tag = value; } /// /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role /// definition IDs. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).UserRoleAssignment; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).UserRoleAssignment = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).UserRoleAssignment; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)Property).UserRoleAssignment = value ?? null /* model class */; } /// Creates an new instance. public ProjectEnvironmentTypeUpdate() @@ -119,8 +119,8 @@ public partial interface IProjectEnvironmentTypeUpdate : ReadOnly = false, Description = @"A map of roles to assign to the environment creator.", SerializedName = @"roles", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get; set; } /// /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this /// subscription. @@ -196,8 +196,8 @@ public partial interface IProjectEnvironmentTypeUpdate : ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get; set; } /// /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role /// definition IDs. @@ -207,8 +207,8 @@ public partial interface IProjectEnvironmentTypeUpdate : ReadOnly = false, Description = @"Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs.", SerializedName = @"userRoleAssignments", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get; set; } } /// The project environment type for partial update. Properties not provided in the update request will not be changed. @@ -216,9 +216,9 @@ internal partial interface IProjectEnvironmentTypeUpdateInternal { /// The role definition assigned to the environment creator on backing resources. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment CreatorRoleAssignment { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment CreatorRoleAssignment { get; set; } /// A map of roles to assign to the environment creator. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get; set; } /// /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this /// subscription. @@ -247,16 +247,16 @@ internal partial interface IProjectEnvironmentTypeUpdateInternal /// Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } /// Properties to configure an environment type. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties Property { get; set; } /// Defines whether this Environment Type can be used in this Project. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus? Status { get; set; } /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get; set; } /// /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role /// definition IDs. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdate.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdate.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdate.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdate.json.cs index 3ac206d84784..e5db02b5046b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdate.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class ProjectEnvironmentTypeUpdate partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectEnvironmentTypeUpdate(json) : null; } @@ -79,9 +79,9 @@ internal ProjectEnvironmentTypeUpdate(Microsoft.Azure.PowerShell.Cmdlets.DevCent { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdateProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdateProperties.FromJson(__jsonProperties) : Property;} {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity.FromJson(__jsonIdentity) : Identity;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags.FromJson(__jsonTags) : Tag;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Tags.FromJson(__jsonTags) : Tag;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdateProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdateProperties.PowerShell.cs similarity index 81% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdateProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdateProperties.PowerShell.cs index 5dd2684e3885..8c62fcd7d720 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdateProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdateProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -57,29 +57,29 @@ public partial class ProjectEnvironmentTypeUpdateProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProjectEnvironmentTypeUpdateProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProjectEnvironmentTypeUpdateProperties(content); } @@ -92,10 +92,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -110,33 +110,33 @@ internal ProjectEnvironmentTypeUpdateProperties(global::System.Collections.IDict // actually deserialize if (content.Contains("CreatorRoleAssignment")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); } if (content.Contains("DeploymentTargetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId, global::System.Convert.ToString); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); } if (content.Contains("UserRoleAssignment")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); } if (content.Contains("CreatorRoleAssignmentRole")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); } 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. @@ -151,27 +151,27 @@ internal ProjectEnvironmentTypeUpdateProperties(global::System.Management.Automa // actually deserialize if (content.Contains("CreatorRoleAssignment")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment) content.GetValueForProperty("CreatorRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTypeConverter.ConvertFrom); } if (content.Contains("DeploymentTargetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DeploymentTargetId, global::System.Convert.ToString); } if (content.Contains("DisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus.CreateFrom); } if (content.Contains("UserRoleAssignment")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) content.GetValueForProperty("UserRoleAssignment",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).UserRoleAssignment, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsTypeConverter.ConvertFrom); } if (content.Contains("CreatorRoleAssignmentRole")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("CreatorRoleAssignmentRole",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal)this).CreatorRoleAssignmentRole, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdateProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdateProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdateProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdateProperties.TypeConverter.cs index 3380733c9d26..cd5e926bd94e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdateProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdateProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdateProperties.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdateProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdateProperties.cs index a8a74aba691e..6807289d21b4 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdateProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdateProperties.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,20 +11,20 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// Properties of a project environment type. These properties can be updated after the resource has been created. /// public partial class ProjectEnvironmentTypeUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment _creatorRoleAssignment; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment _creatorRoleAssignment; /// The role definition assigned to the environment creator on backing resources. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment CreatorRoleAssignment { get => (this._creatorRoleAssignment = this._creatorRoleAssignment ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment()); set => this._creatorRoleAssignment = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment CreatorRoleAssignment { get => (this._creatorRoleAssignment = this._creatorRoleAssignment ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment()); set => this._creatorRoleAssignment = value; } /// A map of roles to assign to the environment creator. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentInternal)CreatorRoleAssignment).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentInternal)CreatorRoleAssignment).Role = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentInternal)CreatorRoleAssignment).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentInternal)CreatorRoleAssignment).Role = value ?? null /* model class */; } /// Backing field for property. private string _deploymentTargetId; @@ -44,7 +44,7 @@ public partial class ProjectEnvironmentTypeUpdateProperties : public string DisplayName { get => this._displayName; set => this._displayName = value; } /// Internal Acessors for CreatorRoleAssignment - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesInternal.CreatorRoleAssignment { get => (this._creatorRoleAssignment = this._creatorRoleAssignment ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment()); set { {_creatorRoleAssignment = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesInternal.CreatorRoleAssignment { get => (this._creatorRoleAssignment = this._creatorRoleAssignment ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment()); set { {_creatorRoleAssignment = value;} } } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus? _status; @@ -54,14 +54,14 @@ public partial class ProjectEnvironmentTypeUpdateProperties : public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.EnvironmentTypeEnableStatus? Status { get => this._status; set => this._status = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments _userRoleAssignment; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments _userRoleAssignment; /// /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role /// definition IDs. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => (this._userRoleAssignment = this._userRoleAssignment ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments()); set => this._userRoleAssignment = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => (this._userRoleAssignment = this._userRoleAssignment ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments()); set => this._userRoleAssignment = value; } /// Creates an new instance. public ProjectEnvironmentTypeUpdateProperties() @@ -79,8 +79,8 @@ public partial interface IProjectEnvironmentTypeUpdateProperties : ReadOnly = false, Description = @"A map of roles to assign to the environment creator.", SerializedName = @"roles", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get; set; } /// /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this /// subscription. @@ -117,8 +117,8 @@ public partial interface IProjectEnvironmentTypeUpdateProperties : ReadOnly = false, Description = @"Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs.", SerializedName = @"userRoleAssignments", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get; set; } } /// Properties of a project environment type. These properties can be updated after the resource has been created. @@ -126,9 +126,9 @@ internal partial interface IProjectEnvironmentTypeUpdatePropertiesInternal { /// The role definition assigned to the environment creator on backing resources. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment CreatorRoleAssignment { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment CreatorRoleAssignment { get; set; } /// A map of roles to assign to the environment creator. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get; set; } /// /// Id of a subscription that the environment type will be mapped to. The environment's resources will be deployed into this /// subscription. @@ -142,7 +142,7 @@ internal partial interface IProjectEnvironmentTypeUpdatePropertiesInternal /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role /// definition IDs. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdateProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdateProperties.json.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdateProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdateProperties.json.cs index b1e63b361dc6..0379ecdb62bb 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdateProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class ProjectEnvironmentTypeUpdateProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectEnvironmentTypeUpdateProperties(json) : null; } @@ -79,11 +79,11 @@ internal ProjectEnvironmentTypeUpdateProperties(Microsoft.Azure.PowerShell.Cmdle { return; } - {_creatorRoleAssignment = If( json?.PropertyT("creatorRoleAssignment"), out var __jsonCreatorRoleAssignment) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.FromJson(__jsonCreatorRoleAssignment) : CreatorRoleAssignment;} + {_creatorRoleAssignment = If( json?.PropertyT("creatorRoleAssignment"), out var __jsonCreatorRoleAssignment) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.FromJson(__jsonCreatorRoleAssignment) : CreatorRoleAssignment;} {_deploymentTargetId = If( json?.PropertyT("deploymentTargetId"), out var __jsonDeploymentTargetId) ? (string)__jsonDeploymentTargetId : (string)DeploymentTargetId;} {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_userRoleAssignment = If( json?.PropertyT("userRoleAssignments"), out var __jsonUserRoleAssignments) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.FromJson(__jsonUserRoleAssignments) : UserRoleAssignment;} + {_userRoleAssignment = If( json?.PropertyT("userRoleAssignments"), out var __jsonUserRoleAssignments) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.FromJson(__jsonUserRoleAssignments) : UserRoleAssignment;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.PowerShell.cs similarity index 89% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.PowerShell.cs index bccb90daead4..d218dd5ffea9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment(content); } @@ -90,10 +90,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -108,13 +108,13 @@ internal ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment(global::Sys // actually deserialize if (content.Contains("Role")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); } 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. @@ -129,7 +129,7 @@ internal ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment(global::Sys // actually deserialize if (content.Contains("Role")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.TypeConverter.cs index 927ae77d4ddf..a610a762185a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is /// no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.cs index cf56e13ec51d..5d92843d754d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// The role definition assigned to the environment creator on backing resources. public partial class ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles _role; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles _role; /// A map of roles to assign to the environment creator. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles Role { get => (this._role = this._role ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles()); set => this._role = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles Role { get => (this._role = this._role ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles()); set => this._role = value; } /// /// Creates an new instance. @@ -38,8 +38,8 @@ public partial interface IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssig ReadOnly = false, Description = @"A map of roles to assign to the environment creator.", SerializedName = @"roles", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles Role { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles Role { get; set; } } /// The role definition assigned to the environment creator on backing resources. @@ -47,7 +47,7 @@ internal partial interface IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAss { /// A map of roles to assign to the environment creator. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles Role { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles Role { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.json.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.json.cs index 355fbf050054..51503b5d8c63 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment(json) : null; } @@ -78,7 +78,7 @@ internal ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment(Microsoft.A { return; } - {_role = If( json?.PropertyT("roles"), out var __jsonRoles) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.FromJson(__jsonRoles) : Role;} + {_role = If( json?.PropertyT("roles"), out var __jsonRoles) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.FromJson(__jsonRoles) : Role;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.PowerShell.cs similarity index 93% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.PowerShell.cs index 447fa0183e04..18fefeea1f02 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles(content); } @@ -90,10 +90,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -112,7 +112,7 @@ internal ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles(global } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.TypeConverter.cs index 5cd1eeb4cb07..00ec4d10ba85 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there /// is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.cs similarity index 89% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.cs index c1c633a7110d..ba30a05315dd 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// A map of roles to assign to the environment creator. public partial class ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRolesInternal { /// @@ -24,7 +24,7 @@ public ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles() /// A map of roles to assign to the environment creator. public partial interface IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray { } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.dictionary.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.dictionary.cs similarity index 81% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.dictionary.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.dictionary.cs index 8792f8776037..84bab02f91de 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.dictionary.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.dictionary.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; public partial class ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - int Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + int Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRole this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRole this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } /// /// - public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRole value) => __additionalProperties.Add( key, value); + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRole value) => __additionalProperties.Add( key, value); public void Clear() => __additionalProperties.Clear(); @@ -40,7 +40,7 @@ public void CopyFrom(global::System.Collections.IDictionary source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -55,7 +55,7 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -66,10 +66,10 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// /// - public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRole value) => __additionalProperties.TryGetValue( key, out value); + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRole value) => __additionalProperties.TryGetValue( key, out value); /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.json.cs similarity index 94% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.json.cs index 3f96477d2383..d7e80de36e07 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles(json) : null; } @@ -79,7 +79,7 @@ internal ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles(Micros { return; } - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentRole.FromJson(j) ,exclusions ); + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentRole.FromJson(j) ,exclusions ); AfterFromJson(json); } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson { return container; } - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, container); + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, container); AfterToJson(ref container); return container; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.PowerShell.cs similarity index 93% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.PowerShell.cs index 628bf55b109e..96b039178311 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -58,29 +58,29 @@ public partial class ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -115,7 +115,7 @@ internal ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments(global::Syste } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.TypeConverter.cs index 72e08fecc763..78a28f46911c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no /// suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.cs similarity index 90% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.cs index 539f221b0f47..0b63a6542bf7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -12,8 +12,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// definition IDs. /// public partial class ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignmentsInternal { /// @@ -28,7 +28,7 @@ public ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments() /// definition IDs. public partial interface IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray { } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.dictionary.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.dictionary.cs similarity index 82% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.dictionary.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.dictionary.cs index bd4a84513b24..f8f0d14054f0 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.dictionary.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.dictionary.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; public partial class ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - int Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + int Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValue this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValue this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } /// /// - public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValue value) => __additionalProperties.Add( key, value); + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValue value) => __additionalProperties.Add( key, value); public void Clear() => __additionalProperties.Clear(); @@ -40,7 +40,7 @@ public void CopyFrom(global::System.Collections.IDictionary source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -55,7 +55,7 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -66,10 +66,10 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// /// - public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValue value) => __additionalProperties.TryGetValue( key, out value); + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValue value) => __additionalProperties.TryGetValue( key, out value); /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.json.cs similarity index 94% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.json.cs index 217ce92fb9d7..c9948cf49e58 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -57,13 +57,13 @@ public partial class ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments(json) : null; } @@ -82,7 +82,7 @@ internal ProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments(Microsoft.Azu { return; } - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.UserRoleAssignmentValue.FromJson(j) ,exclusions ); + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.UserRoleAssignmentValue.FromJson(j) ,exclusions ); AfterFromJson(json); } @@ -107,7 +107,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson { return container; } - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, container); + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, container); AfterToJson(ref container); return container; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectListResult.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectListResult.PowerShell.cs index b53707cd9779..63b4fa9d2d56 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class ProjectListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProjectListResult(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProjectListResult(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,17 +103,17 @@ internal ProjectListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResultInternal)this).NextLink, 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. @@ -128,11 +128,11 @@ internal ProjectListResult(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectListResult.TypeConverter.cs index 231de314cd25..f5b5339761cc 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectListResult.cs similarity index 86% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectListResult.cs index 0ed5f9071728..b34092a78845 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Results of the project list operation. public partial class ProjectListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class ProjectListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject[] Value { get => this._value; } /// Creates an new instance. public ProjectListResult() @@ -57,8 +57,8 @@ public partial interface IProjectListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject[] Value { get; } } /// Results of the project list operation. @@ -68,7 +68,7 @@ internal partial interface IProjectListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectListResult.json.cs index 15963aea85ae..2f59685869b0 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ProjectListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectListResult(json) : null; } @@ -77,7 +77,7 @@ internal ProjectListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime. { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Project.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Project.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectNetworkSettings.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectNetworkSettings.PowerShell.cs similarity index 90% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectNetworkSettings.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectNetworkSettings.PowerShell.cs index bfae90bcf712..f26df2ecc619 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectNetworkSettings.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectNetworkSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ProjectNetworkSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProjectNetworkSettings(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProjectNetworkSettings(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,13 +105,13 @@ internal ProjectNetworkSettings(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("MicrosoftHostedNetworkEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("MicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("MicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); } 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. @@ -126,7 +126,7 @@ internal ProjectNetworkSettings(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("MicrosoftHostedNetworkEnableStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("MicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus?) content.GetValueForProperty("MicrosoftHostedNetworkEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettingsInternal)this).MicrosoftHostedNetworkEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus.CreateFrom); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectNetworkSettings.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectNetworkSettings.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectNetworkSettings.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectNetworkSettings.TypeConverter.cs index 8ae2ea14931b..90dae2537854 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectNetworkSettings.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectNetworkSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectNetworkSettings.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectNetworkSettings.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectNetworkSettings.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectNetworkSettings.cs index e45958a59751..30cfdf7ad573 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectNetworkSettings.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectNetworkSettings.cs @@ -3,18 +3,18 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Network settings for the project. public partial class ProjectNetworkSettings : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettings, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettingsInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettings, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettingsInternal { /// Internal Acessors for MicrosoftHostedNetworkEnableStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettingsInternal.MicrosoftHostedNetworkEnableStatus { get => this._microsoftHostedNetworkEnableStatus; set { {_microsoftHostedNetworkEnableStatus = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettingsInternal.MicrosoftHostedNetworkEnableStatus { get => this._microsoftHostedNetworkEnableStatus; set { {_microsoftHostedNetworkEnableStatus = value;} } } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.MicrosoftHostedNetworkEnableStatus? _microsoftHostedNetworkEnableStatus; diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectNetworkSettings.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectNetworkSettings.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectNetworkSettings.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectNetworkSettings.json.cs index f2933c211c25..364052788ca3 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectNetworkSettings.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectNetworkSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ProjectNetworkSettings partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectNetworkSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectNetworkSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectNetworkSettings(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicy.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicy.PowerShell.cs new file mode 100644 index 000000000000..c3510458dc51 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicy.PowerShell.cs @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents an project policy resource. + [System.ComponentModel.TypeConverter(typeof(ProjectPolicyTypeConverter))] + public partial class ProjectPolicy + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProjectPolicy(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProjectPolicy(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProjectPolicy(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("ResourcePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).ResourcePolicy = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[]) content.GetValueForProperty("ResourcePolicy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).ResourcePolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourcePolicyTypeConverter.ConvertFrom)); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).Scope = (string[]) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).Scope, __y => TypeConverterExtensions.SelectToArray(__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 ProjectPolicy(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("ResourcePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).ResourcePolicy = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[]) content.GetValueForProperty("ResourcePolicy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).ResourcePolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourcePolicyTypeConverter.ConvertFrom)); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).Scope = (string[]) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal)this).Scope, __y => TypeConverterExtensions.SelectToArray(__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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents an project policy resource. + [System.ComponentModel.TypeConverter(typeof(ProjectPolicyTypeConverter))] + public partial interface IProjectPolicy + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicy.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicy.TypeConverter.cs new file mode 100644 index 000000000000..d1e31e854efe --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicy.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectPolicyTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProjectPolicy.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProjectPolicy.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProjectPolicy.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicy.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicy.cs new file mode 100644 index 000000000000..efe414bc22b8 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicy.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents an project policy resource. + public partial class ProjectPolicy : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyProperties _property; + + /// Properties of an project policy. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyProperties()); set => this._property = value; } + + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyPropertiesInternal)Property).ProvisioningState; } + + /// Resource policies that are a part of this project policy. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[] ResourcePolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)Property).ResourcePolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)Property).ResourcePolicy = value ?? null /* arrayOf */; } + + /// + /// Resources that have access to the shared resources that are a part of this project policy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string[] Scope { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)Property).Scope; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)Property).Scope = value ?? null /* arrayOf */; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProjectPolicy() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Represents an project policy resource. + public partial interface IProjectPolicy : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource + { + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } + /// Resource policies that are a part of this project policy. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource policies that are a part of this project policy.", + SerializedName = @"resourcePolicies", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[] ResourcePolicy { get; set; } + /// + /// Resources that have access to the shared resources that are a part of this project policy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resources that have access to the shared resources that are a part of this project policy.", + SerializedName = @"scopes", + PossibleTypes = new [] { typeof(string) })] + string[] Scope { get; set; } + + } + /// Represents an project policy resource. + internal partial interface IProjectPolicyInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal + { + /// Properties of an project policy. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyProperties Property { get; set; } + /// The provisioning state of the resource. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } + /// Resource policies that are a part of this project policy. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[] ResourcePolicy { get; set; } + /// + /// Resources that have access to the shared resources that are a part of this project policy. + /// + string[] Scope { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicy.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicy.json.cs new file mode 100644 index 000000000000..157ba5b8cf27 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicy.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents an project policy resource. + public partial class ProjectPolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectPolicy(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ProjectPolicy(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyListResult.PowerShell.cs new file mode 100644 index 000000000000..1a3159f0219a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Results of the project policy list operation. + [System.ComponentModel.TypeConverter(typeof(ProjectPolicyListResultTypeConverter))] + public partial class ProjectPolicyListResult + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProjectPolicyListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProjectPolicyListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProjectPolicyListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResultInternal)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 ProjectPolicyListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Results of the project policy list operation. + [System.ComponentModel.TypeConverter(typeof(ProjectPolicyListResultTypeConverter))] + public partial interface IProjectPolicyListResult + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyListResult.TypeConverter.cs new file mode 100644 index 000000000000..0a58eee2df56 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectPolicyListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProjectPolicyListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProjectPolicyListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProjectPolicyListResult.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyListResult.cs new file mode 100644 index 000000000000..11ef26d2b28a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyListResult.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Results of the project policy list operation. + public partial class ProjectPolicyListResult : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of results if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy[] _value; + + /// Current page of results. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy[] Value { get => this._value; } + + /// Creates an new instance. + public ProjectPolicyListResult() + { + + } + } + /// Results of the project policy list operation. + public partial interface IProjectPolicyListResult : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// URL to get the next set of results if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"URL to get the next set of results if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// Current page of results. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Current page of results.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy[] Value { get; } + + } + /// Results of the project policy list operation. + internal partial interface IProjectPolicyListResultInternal + + { + /// URL to get the next set of results if there are any. + string NextLink { get; set; } + /// Current page of results. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyListResult.json.cs new file mode 100644 index 000000000000..ff477be60249 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyListResult.json.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Results of the project policy list operation. + public partial class ProjectPolicyListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectPolicyListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ProjectPolicyListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicy.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyProperties.PowerShell.cs new file mode 100644 index 000000000000..5392401b4f48 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyProperties.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Properties of an project policy. + [System.ComponentModel.TypeConverter(typeof(ProjectPolicyPropertiesTypeConverter))] + public partial class ProjectPolicyProperties + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProjectPolicyProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProjectPolicyProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProjectPolicyProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("ResourcePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).ResourcePolicy = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[]) content.GetValueForProperty("ResourcePolicy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).ResourcePolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourcePolicyTypeConverter.ConvertFrom)); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).Scope = (string[]) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).Scope, __y => TypeConverterExtensions.SelectToArray(__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 ProjectPolicyProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("ResourcePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).ResourcePolicy = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[]) content.GetValueForProperty("ResourcePolicy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).ResourcePolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourcePolicyTypeConverter.ConvertFrom)); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).Scope = (string[]) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).Scope, __y => TypeConverterExtensions.SelectToArray(__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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Properties of an project policy. + [System.ComponentModel.TypeConverter(typeof(ProjectPolicyPropertiesTypeConverter))] + public partial interface IProjectPolicyProperties + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyProperties.TypeConverter.cs new file mode 100644 index 000000000000..05b3fc25e5a3 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectPolicyPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProjectPolicyProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProjectPolicyProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProjectPolicyProperties.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyProperties.cs new file mode 100644 index 000000000000..917c77a81af4 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyProperties.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Properties of an project policy. + public partial class ProjectPolicyProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties __projectPolicyUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyUpdateProperties(); + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; + + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Resource policies that are a part of this project policy. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[] ResourcePolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)__projectPolicyUpdateProperties).ResourcePolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)__projectPolicyUpdateProperties).ResourcePolicy = value ?? null /* arrayOf */; } + + /// + /// Resources that have access to the shared resources that are a part of this project policy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string[] Scope { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)__projectPolicyUpdateProperties).Scope; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)__projectPolicyUpdateProperties).Scope = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public ProjectPolicyProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__projectPolicyUpdateProperties), __projectPolicyUpdateProperties); + await eventListener.AssertObjectIsValid(nameof(__projectPolicyUpdateProperties), __projectPolicyUpdateProperties); + } + } + /// Properties of an project policy. + public partial interface IProjectPolicyProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties + { + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } + + } + /// Properties of an project policy. + internal partial interface IProjectPolicyPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal + { + /// The provisioning state of the resource. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyProperties.json.cs new file mode 100644 index 000000000000..888fdf45ba52 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyProperties.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Properties of an project policy. + public partial class ProjectPolicyProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectPolicyProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ProjectPolicyProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __projectPolicyUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyUpdateProperties(json); + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __projectPolicyUpdateProperties?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdate.PowerShell.cs new file mode 100644 index 000000000000..e63aec9d1676 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdate.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// The project policy properties for partial update. Properties not provided in the update request will not be changed. + /// + [System.ComponentModel.TypeConverter(typeof(ProjectPolicyUpdateTypeConverter))] + public partial class ProjectPolicyUpdate + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProjectPolicyUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProjectPolicyUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProjectPolicyUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ResourcePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateInternal)this).ResourcePolicy = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[]) content.GetValueForProperty("ResourcePolicy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateInternal)this).ResourcePolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourcePolicyTypeConverter.ConvertFrom)); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateInternal)this).Scope = (string[]) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateInternal)this).Scope, __y => TypeConverterExtensions.SelectToArray(__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 ProjectPolicyUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ResourcePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateInternal)this).ResourcePolicy = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[]) content.GetValueForProperty("ResourcePolicy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateInternal)this).ResourcePolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourcePolicyTypeConverter.ConvertFrom)); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateInternal)this).Scope = (string[]) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateInternal)this).Scope, __y => TypeConverterExtensions.SelectToArray(__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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The project policy properties for partial update. Properties not provided in the update request will not be changed. + [System.ComponentModel.TypeConverter(typeof(ProjectPolicyUpdateTypeConverter))] + public partial interface IProjectPolicyUpdate + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdate.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdate.TypeConverter.cs new file mode 100644 index 000000000000..1dacd2e68973 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectPolicyUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProjectPolicyUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProjectPolicyUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProjectPolicyUpdate.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdate.cs new file mode 100644 index 000000000000..5ccefbdb33ed --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdate.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// The project policy properties for partial update. Properties not provided in the update request will not be changed. + /// + public partial class ProjectPolicyUpdate : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdate, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateInternal + { + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyUpdateProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties _property; + + /// Properties of an project policy to be updated. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyUpdateProperties()); set => this._property = value; } + + /// Resource policies that are a part of this project policy. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[] ResourcePolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)Property).ResourcePolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)Property).ResourcePolicy = value ?? null /* arrayOf */; } + + /// + /// Resources that have access to the shared resources that are a part of this project policy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string[] Scope { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)Property).Scope; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)Property).Scope = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public ProjectPolicyUpdate() + { + + } + } + /// The project policy properties for partial update. Properties not provided in the update request will not be changed. + public partial interface IProjectPolicyUpdate : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// Resource policies that are a part of this project policy. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource policies that are a part of this project policy.", + SerializedName = @"resourcePolicies", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[] ResourcePolicy { get; set; } + /// + /// Resources that have access to the shared resources that are a part of this project policy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resources that have access to the shared resources that are a part of this project policy.", + SerializedName = @"scopes", + PossibleTypes = new [] { typeof(string) })] + string[] Scope { get; set; } + + } + /// The project policy properties for partial update. Properties not provided in the update request will not be changed. + internal partial interface IProjectPolicyUpdateInternal + + { + /// Properties of an project policy to be updated. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties Property { get; set; } + /// Resource policies that are a part of this project policy. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[] ResourcePolicy { get; set; } + /// + /// Resources that have access to the shared resources that are a part of this project policy. + /// + string[] Scope { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdate.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdate.json.cs new file mode 100644 index 000000000000..0666ca603210 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdate.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// The project policy properties for partial update. Properties not provided in the update request will not be changed. + /// + public partial class ProjectPolicyUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectPolicyUpdate(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ProjectPolicyUpdate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyUpdateProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdateProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..b22933800412 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdateProperties.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// Properties of an project policy. These properties can be updated after the resource has been created. + /// + [System.ComponentModel.TypeConverter(typeof(ProjectPolicyUpdatePropertiesTypeConverter))] + public partial class ProjectPolicyUpdateProperties + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProjectPolicyUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProjectPolicyUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProjectPolicyUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResourcePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).ResourcePolicy = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[]) content.GetValueForProperty("ResourcePolicy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).ResourcePolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourcePolicyTypeConverter.ConvertFrom)); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).Scope = (string[]) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).Scope, __y => TypeConverterExtensions.SelectToArray(__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 ProjectPolicyUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ResourcePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).ResourcePolicy = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[]) content.GetValueForProperty("ResourcePolicy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).ResourcePolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourcePolicyTypeConverter.ConvertFrom)); + } + if (content.Contains("Scope")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).Scope = (string[]) content.GetValueForProperty("Scope",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal)this).Scope, __y => TypeConverterExtensions.SelectToArray(__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, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Properties of an project policy. These properties can be updated after the resource has been created. + [System.ComponentModel.TypeConverter(typeof(ProjectPolicyUpdatePropertiesTypeConverter))] + public partial interface IProjectPolicyUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdateProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..00cc389d3d0c --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdateProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectPolicyUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProjectPolicyUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProjectPolicyUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProjectPolicyUpdateProperties.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdateProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdateProperties.cs new file mode 100644 index 000000000000..951b3b6e540e --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdateProperties.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// Properties of an project policy. These properties can be updated after the resource has been created. + /// + public partial class ProjectPolicyUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdatePropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[] _resourcePolicy; + + /// Resource policies that are a part of this project policy. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[] ResourcePolicy { get => this._resourcePolicy; set => this._resourcePolicy = value; } + + /// Backing field for property. + private string[] _scope; + + /// + /// Resources that have access to the shared resources that are a part of this project policy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string[] Scope { get => this._scope; set => this._scope = value; } + + /// Creates an new instance. + public ProjectPolicyUpdateProperties() + { + + } + } + /// Properties of an project policy. These properties can be updated after the resource has been created. + public partial interface IProjectPolicyUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// Resource policies that are a part of this project policy. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource policies that are a part of this project policy.", + SerializedName = @"resourcePolicies", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[] ResourcePolicy { get; set; } + /// + /// Resources that have access to the shared resources that are a part of this project policy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resources that have access to the shared resources that are a part of this project policy.", + SerializedName = @"scopes", + PossibleTypes = new [] { typeof(string) })] + string[] Scope { get; set; } + + } + /// Properties of an project policy. These properties can be updated after the resource has been created. + internal partial interface IProjectPolicyUpdatePropertiesInternal + + { + /// Resource policies that are a part of this project policy. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[] ResourcePolicy { get; set; } + /// + /// Resources that have access to the shared resources that are a part of this project policy. + /// + string[] Scope { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdateProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdateProperties.json.cs new file mode 100644 index 000000000000..9d4a4faadff6 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectPolicyUpdateProperties.json.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// Properties of an project policy. These properties can be updated after the resource has been created. + /// + public partial class ProjectPolicyUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectPolicyUpdateProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ProjectPolicyUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_resourcePolicy = If( json?.PropertyT("resourcePolicies"), out var __jsonResourcePolicies) ? If( __jsonResourcePolicies as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourcePolicy.FromJson(__u) )) ))() : null : ResourcePolicy;} + {_scope = If( json?.PropertyT("scopes"), out var __jsonScopes) ? If( __jsonScopes as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : Scope;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._resourcePolicy) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); + foreach( var __x in this._resourcePolicy ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("resourcePolicies",__w); + } + if (null != this._scope) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); + foreach( var __s in this._scope ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("scopes",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectProperties.PowerShell.cs new file mode 100644 index 000000000000..6cd21ec92f59 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectProperties.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Properties of a project. + [System.ComponentModel.TypeConverter(typeof(ProjectPropertiesTypeConverter))] + public partial class ProjectProperties + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProjectProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProjectProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProjectProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("DevCenterUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal)this).DevCenterUri = (string) content.GetValueForProperty("DevCenterUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal)this).DevCenterUri, global::System.Convert.ToString); + } + if (content.Contains("DevBoxAutoDeleteSettingInactiveThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingInactiveThreshold = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingInactiveThreshold",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingInactiveThreshold, global::System.Convert.ToString); + } + if (content.Contains("DevBoxAutoDeleteSettingGracePeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingGracePeriod = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingGracePeriod",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingGracePeriod, global::System.Convert.ToString); + } + if (content.Contains("CatalogSettingCatalogItemSyncType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + } + if (content.Contains("CustomizationSettingIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]) content.GetValueForProperty("CustomizationSettingIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingIdentity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationManagedIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomizationSettingUserCustomizationsEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingUserCustomizationsEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus?) content.GetValueForProperty("CustomizationSettingUserCustomizationsEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingUserCustomizationsEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxAutoDeleteSettingDeleteMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingDeleteMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode?) content.GetValueForProperty("DevBoxAutoDeleteSettingDeleteMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingDeleteMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode.CreateFrom); + } + if (content.Contains("AzureAiServiceSettingAzureAiServicesMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServiceSettingAzureAiServicesMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode?) content.GetValueForProperty("AzureAiServiceSettingAzureAiServicesMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServiceSettingAzureAiServicesMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingServerlessGpuSessionsMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode?) content.GetValueForProperty("ServerlessGpuSessionSettingServerlessGpuSessionsMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject = (int?) content.GetValueForProperty("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WorkspaceStorageSettingWorkspaceStorageMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSettingWorkspaceStorageMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode?) content.GetValueForProperty("WorkspaceStorageSettingWorkspaceStorageMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSettingWorkspaceStorageMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode.CreateFrom); + } + if (content.Contains("CatalogSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("CustomizationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings) content.GetValueForProperty("CustomizationSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxAutoDeleteSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings) content.GetValueForProperty("DevBoxAutoDeleteSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxAutoDeleteSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAiServicesSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServicesSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings) content.GetValueForProperty("AzureAiServicesSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServicesSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AzureAiServicesSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ServerlessGpuSessionsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionsSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings) content.GetValueForProperty("ServerlessGpuSessionsSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionsSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ServerlessGpuSessionsSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("WorkspaceStorageSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings) content.GetValueForProperty("WorkspaceStorageSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.WorkspaceStorageSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevCenterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevCenterId, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("MaxDevBoxesPerUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DisplayName, 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 ProjectProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("DevCenterUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal)this).DevCenterUri = (string) content.GetValueForProperty("DevCenterUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal)this).DevCenterUri, global::System.Convert.ToString); + } + if (content.Contains("DevBoxAutoDeleteSettingInactiveThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingInactiveThreshold = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingInactiveThreshold",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingInactiveThreshold, global::System.Convert.ToString); + } + if (content.Contains("DevBoxAutoDeleteSettingGracePeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingGracePeriod = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingGracePeriod",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingGracePeriod, global::System.Convert.ToString); + } + if (content.Contains("CatalogSettingCatalogItemSyncType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + } + if (content.Contains("CustomizationSettingIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]) content.GetValueForProperty("CustomizationSettingIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingIdentity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationManagedIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomizationSettingUserCustomizationsEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingUserCustomizationsEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus?) content.GetValueForProperty("CustomizationSettingUserCustomizationsEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingUserCustomizationsEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxAutoDeleteSettingDeleteMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingDeleteMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode?) content.GetValueForProperty("DevBoxAutoDeleteSettingDeleteMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingDeleteMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode.CreateFrom); + } + if (content.Contains("AzureAiServiceSettingAzureAiServicesMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServiceSettingAzureAiServicesMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode?) content.GetValueForProperty("AzureAiServiceSettingAzureAiServicesMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServiceSettingAzureAiServicesMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingServerlessGpuSessionsMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode?) content.GetValueForProperty("ServerlessGpuSessionSettingServerlessGpuSessionsMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject = (int?) content.GetValueForProperty("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WorkspaceStorageSettingWorkspaceStorageMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSettingWorkspaceStorageMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode?) content.GetValueForProperty("WorkspaceStorageSettingWorkspaceStorageMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSettingWorkspaceStorageMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode.CreateFrom); + } + if (content.Contains("CatalogSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("CustomizationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings) content.GetValueForProperty("CustomizationSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxAutoDeleteSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings) content.GetValueForProperty("DevBoxAutoDeleteSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxAutoDeleteSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAiServicesSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServicesSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings) content.GetValueForProperty("AzureAiServicesSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServicesSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AzureAiServicesSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ServerlessGpuSessionsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionsSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings) content.GetValueForProperty("ServerlessGpuSessionsSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionsSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ServerlessGpuSessionsSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("WorkspaceStorageSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings) content.GetValueForProperty("WorkspaceStorageSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.WorkspaceStorageSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevCenterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevCenterId, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("MaxDevBoxesPerUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Properties of a project. + [System.ComponentModel.TypeConverter(typeof(ProjectPropertiesTypeConverter))] + public partial interface IProjectProperties + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectProperties.TypeConverter.cs new file mode 100644 index 000000000000..4455b6d236c0 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProjectProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProjectProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProjectProperties.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectProperties.cs new file mode 100644 index 000000000000..6fbfb5631482 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectProperties.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Properties of a project. + public partial class ProjectProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties __projectUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectUpdateProperties(); + + /// The property indicates whether Azure AI services is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode? AzureAiServiceSettingAzureAiServicesMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).AzureAiServiceSettingAzureAiServicesMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).AzureAiServiceSettingAzureAiServicesMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode)""); } + + /// Indicates whether Azure AI services are enabled for a project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings AzureAiServicesSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).AzureAiServicesSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).AzureAiServicesSetting = value ?? null /* model class */; } + + /// Settings to be used when associating a project with a catalog. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings CatalogSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).CatalogSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).CatalogSetting = value ?? null /* model class */; } + + /// Indicates catalog item types that can be synced. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).CatalogSettingCatalogItemSyncType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).CatalogSettingCatalogItemSyncType = value ?? null /* arrayOf */; } + + /// Settings to be used for customizations. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings CustomizationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).CustomizationSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).CustomizationSetting = value ?? null /* model class */; } + + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] CustomizationSettingIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).CustomizationSettingIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).CustomizationSettingIdentity = value ?? null /* arrayOf */; } + + /// Indicates whether user customizations are enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus? CustomizationSettingUserCustomizationsEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).CustomizationSettingUserCustomizationsEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).CustomizationSettingUserCustomizationsEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus)""); } + + /// Description of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).Description = value ?? null; } + + /// Dev Box Auto Delete settings. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings DevBoxAutoDeleteSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DevBoxAutoDeleteSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DevBoxAutoDeleteSetting = value ?? null /* model class */; } + + /// Indicates the delete mode for Dev Boxes within this project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode? DevBoxAutoDeleteSettingDeleteMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DevBoxAutoDeleteSettingDeleteMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DevBoxAutoDeleteSettingDeleteMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode)""); } + + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string DevBoxAutoDeleteSettingGracePeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DevBoxAutoDeleteSettingGracePeriod; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DevBoxAutoDeleteSettingGracePeriod = value ?? null; } + + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string DevBoxAutoDeleteSettingInactiveThreshold { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DevBoxAutoDeleteSettingInactiveThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DevBoxAutoDeleteSettingInactiveThreshold = value ?? null; } + + /// Resource Id of an associated DevCenter + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string DevCenterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DevCenterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DevCenterId = value ?? null; } + + /// Backing field for property. + private string _devCenterUri; + + /// The URI of the Dev Center resource this project is associated with. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string DevCenterUri { get => this._devCenterUri; } + + /// The display name of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).DisplayName = value ?? null; } + + /// + /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This + /// will have no effect on existing Dev Boxes when reduced. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public int? MaxDevBoxesPerUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).MaxDevBoxesPerUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).MaxDevBoxesPerUser = value ?? default(int); } + + /// Internal Acessors for DevCenterUri + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal.DevCenterUri { get => this._devCenterUri; set { {_devCenterUri = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; + + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public int? ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject = value ?? default(int); } + + /// The property indicates whether serverless GPU access is enabled on the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode? ServerlessGpuSessionSettingServerlessGpuSessionsMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).ServerlessGpuSessionSettingServerlessGpuSessionsMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).ServerlessGpuSessionSettingServerlessGpuSessionsMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode)""); } + + /// Settings to be used for serverless GPU. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings ServerlessGpuSessionsSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).ServerlessGpuSessionsSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).ServerlessGpuSessionsSetting = value ?? null /* model class */; } + + /// Settings to be used for workspace storage. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings WorkspaceStorageSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).WorkspaceStorageSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).WorkspaceStorageSetting = value ?? null /* model class */; } + + /// Indicates whether workspace storage is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode? WorkspaceStorageSettingWorkspaceStorageMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).WorkspaceStorageSettingWorkspaceStorageMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)__projectUpdateProperties).WorkspaceStorageSettingWorkspaceStorageMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode)""); } + + /// Creates an new instance. + public ProjectProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__projectUpdateProperties), __projectUpdateProperties); + await eventListener.AssertObjectIsValid(nameof(__projectUpdateProperties), __projectUpdateProperties); + } + } + /// Properties of a project. + public partial interface IProjectProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties + { + /// The URI of the Dev Center resource this project is associated with. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The URI of the Dev Center resource this project is associated with.", + SerializedName = @"devCenterUri", + PossibleTypes = new [] { typeof(string) })] + string DevCenterUri { get; } + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } + + } + /// Properties of a project. + internal partial interface IProjectPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal + { + /// The URI of the Dev Center resource this project is associated with. + string DevCenterUri { get; set; } + /// The provisioning state of the resource. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectProperties.json.cs new file mode 100644 index 000000000000..efdd384515db --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectProperties.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Properties of a project. + public partial class ProjectProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ProjectProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __projectUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectUpdateProperties(json); + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_devCenterUri = If( json?.PropertyT("devCenterUri"), out var __jsonDevCenterUri) ? (string)__jsonDevCenterUri : (string)DevCenterUri;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __projectUpdateProperties?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._devCenterUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._devCenterUri.ToString()) : null, "devCenterUri" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdate.PowerShell.cs new file mode 100644 index 000000000000..d1033b7fa628 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdate.PowerShell.cs @@ -0,0 +1,362 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// The project properties for partial update. Properties not provided in the update request will not be changed. + /// + [System.ComponentModel.TypeConverter(typeof(ProjectUpdateTypeConverter))] + public partial class ProjectUpdate + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProjectUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProjectUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProjectUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("CatalogSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("CustomizationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CustomizationSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings) content.GetValueForProperty("CustomizationSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CustomizationSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxAutoDeleteSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings) content.GetValueForProperty("DevBoxAutoDeleteSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxAutoDeleteSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAiServicesSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).AzureAiServicesSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings) content.GetValueForProperty("AzureAiServicesSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).AzureAiServicesSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AzureAiServicesSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ServerlessGpuSessionsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).ServerlessGpuSessionsSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings) content.GetValueForProperty("ServerlessGpuSessionsSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).ServerlessGpuSessionsSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ServerlessGpuSessionsSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("WorkspaceStorageSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).WorkspaceStorageSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings) content.GetValueForProperty("WorkspaceStorageSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).WorkspaceStorageSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.WorkspaceStorageSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevCenterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevCenterId, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("MaxDevBoxesPerUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("DevBoxAutoDeleteSettingInactiveThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSettingInactiveThreshold = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingInactiveThreshold",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSettingInactiveThreshold, global::System.Convert.ToString); + } + if (content.Contains("DevBoxAutoDeleteSettingGracePeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSettingGracePeriod = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingGracePeriod",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSettingGracePeriod, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("CatalogSettingCatalogItemSyncType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + } + if (content.Contains("CustomizationSettingIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CustomizationSettingIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]) content.GetValueForProperty("CustomizationSettingIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CustomizationSettingIdentity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationManagedIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomizationSettingUserCustomizationsEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CustomizationSettingUserCustomizationsEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus?) content.GetValueForProperty("CustomizationSettingUserCustomizationsEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CustomizationSettingUserCustomizationsEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxAutoDeleteSettingDeleteMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSettingDeleteMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode?) content.GetValueForProperty("DevBoxAutoDeleteSettingDeleteMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSettingDeleteMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode.CreateFrom); + } + if (content.Contains("AzureAiServiceSettingAzureAiServicesMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).AzureAiServiceSettingAzureAiServicesMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode?) content.GetValueForProperty("AzureAiServiceSettingAzureAiServicesMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).AzureAiServiceSettingAzureAiServicesMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingServerlessGpuSessionsMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode?) content.GetValueForProperty("ServerlessGpuSessionSettingServerlessGpuSessionsMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject = (int?) content.GetValueForProperty("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WorkspaceStorageSettingWorkspaceStorageMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).WorkspaceStorageSettingWorkspaceStorageMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode?) content.GetValueForProperty("WorkspaceStorageSettingWorkspaceStorageMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).WorkspaceStorageSettingWorkspaceStorageMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProjectUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("CatalogSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("CustomizationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CustomizationSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings) content.GetValueForProperty("CustomizationSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CustomizationSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxAutoDeleteSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings) content.GetValueForProperty("DevBoxAutoDeleteSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxAutoDeleteSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAiServicesSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).AzureAiServicesSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings) content.GetValueForProperty("AzureAiServicesSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).AzureAiServicesSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AzureAiServicesSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ServerlessGpuSessionsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).ServerlessGpuSessionsSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings) content.GetValueForProperty("ServerlessGpuSessionsSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).ServerlessGpuSessionsSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ServerlessGpuSessionsSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("WorkspaceStorageSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).WorkspaceStorageSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings) content.GetValueForProperty("WorkspaceStorageSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).WorkspaceStorageSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.WorkspaceStorageSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevCenterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevCenterId, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("MaxDevBoxesPerUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("DevBoxAutoDeleteSettingInactiveThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSettingInactiveThreshold = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingInactiveThreshold",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSettingInactiveThreshold, global::System.Convert.ToString); + } + if (content.Contains("DevBoxAutoDeleteSettingGracePeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSettingGracePeriod = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingGracePeriod",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSettingGracePeriod, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType.CreateFrom); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("CatalogSettingCatalogItemSyncType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + } + if (content.Contains("CustomizationSettingIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CustomizationSettingIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]) content.GetValueForProperty("CustomizationSettingIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CustomizationSettingIdentity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationManagedIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomizationSettingUserCustomizationsEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CustomizationSettingUserCustomizationsEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus?) content.GetValueForProperty("CustomizationSettingUserCustomizationsEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).CustomizationSettingUserCustomizationsEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxAutoDeleteSettingDeleteMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSettingDeleteMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode?) content.GetValueForProperty("DevBoxAutoDeleteSettingDeleteMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).DevBoxAutoDeleteSettingDeleteMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode.CreateFrom); + } + if (content.Contains("AzureAiServiceSettingAzureAiServicesMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).AzureAiServiceSettingAzureAiServicesMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode?) content.GetValueForProperty("AzureAiServiceSettingAzureAiServicesMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).AzureAiServiceSettingAzureAiServicesMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingServerlessGpuSessionsMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode?) content.GetValueForProperty("ServerlessGpuSessionSettingServerlessGpuSessionsMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject = (int?) content.GetValueForProperty("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WorkspaceStorageSettingWorkspaceStorageMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).WorkspaceStorageSettingWorkspaceStorageMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode?) content.GetValueForProperty("WorkspaceStorageSettingWorkspaceStorageMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal)this).WorkspaceStorageSettingWorkspaceStorageMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The project properties for partial update. Properties not provided in the update request will not be changed. + [System.ComponentModel.TypeConverter(typeof(ProjectUpdateTypeConverter))] + public partial interface IProjectUpdate + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdate.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdate.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdate.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdate.TypeConverter.cs index 8fafdcc48e96..55057bee0dac 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdate.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdate.cs new file mode 100644 index 000000000000..c7cbeb67e4b3 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdate.cs @@ -0,0 +1,441 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// The project properties for partial update. Properties not provided in the update request will not be changed. + /// + public partial class ProjectUpdate : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdate, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate(); + + /// The property indicates whether Azure AI services is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode? AzureAiServiceSettingAzureAiServicesMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).AzureAiServiceSettingAzureAiServicesMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).AzureAiServiceSettingAzureAiServicesMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode)""); } + + /// Indicates catalog item types that can be synced. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CatalogSettingCatalogItemSyncType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CatalogSettingCatalogItemSyncType = value ?? null /* arrayOf */; } + + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] CustomizationSettingIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CustomizationSettingIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CustomizationSettingIdentity = value ?? null /* arrayOf */; } + + /// Indicates whether user customizations are enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus? CustomizationSettingUserCustomizationsEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CustomizationSettingUserCustomizationsEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CustomizationSettingUserCustomizationsEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus)""); } + + /// Description of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).Description = value ?? null; } + + /// Indicates the delete mode for Dev Boxes within this project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode? DevBoxAutoDeleteSettingDeleteMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSettingDeleteMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSettingDeleteMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode)""); } + + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DevBoxAutoDeleteSettingGracePeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSettingGracePeriod; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSettingGracePeriod = value ?? null; } + + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DevBoxAutoDeleteSettingInactiveThreshold { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSettingInactiveThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSettingInactiveThreshold = value ?? null; } + + /// Resource Id of an associated DevCenter + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DevCenterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevCenterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevCenterId = value ?? null; } + + /// The display name of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity _identity; + + /// Managed identity properties + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; } + + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; } + + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType)""); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location = value ?? null; } + + /// + /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This + /// will have no effect on existing Dev Boxes when reduced. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? MaxDevBoxesPerUser { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).MaxDevBoxesPerUser; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).MaxDevBoxesPerUser = value ?? default(int); } + + /// Internal Acessors for AzureAiServicesSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal.AzureAiServicesSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).AzureAiServicesSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).AzureAiServicesSetting = value; } + + /// Internal Acessors for CatalogSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal.CatalogSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CatalogSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CatalogSetting = value; } + + /// Internal Acessors for CustomizationSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal.CustomizationSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CustomizationSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).CustomizationSetting = value; } + + /// Internal Acessors for DevBoxAutoDeleteSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal.DevBoxAutoDeleteSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).DevBoxAutoDeleteSetting = value; } + + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity()); set { {_identity = value;} } } + + /// Internal Acessors for IdentityPrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } + + /// Internal Acessors for IdentityTenantId + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IManagedServiceIdentityInternal)Identity).TenantId = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectUpdateProperties()); set { {_property = value;} } } + + /// Internal Acessors for ServerlessGpuSessionsSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal.ServerlessGpuSessionsSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).ServerlessGpuSessionsSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).ServerlessGpuSessionsSetting = value; } + + /// Internal Acessors for WorkspaceStorageSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateInternal.WorkspaceStorageSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).WorkspaceStorageSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).WorkspaceStorageSetting = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties _property; + + /// Properties of a project to be updated. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectUpdateProperties()); set => this._property = value; } + + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject = value ?? default(int); } + + /// The property indicates whether serverless GPU access is enabled on the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode? ServerlessGpuSessionSettingServerlessGpuSessionsMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).ServerlessGpuSessionSettingServerlessGpuSessionsMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).ServerlessGpuSessionSettingServerlessGpuSessionsMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag = value ?? null /* model class */; } + + /// Indicates whether workspace storage is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode? WorkspaceStorageSettingWorkspaceStorageMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).WorkspaceStorageSettingWorkspaceStorageMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)Property).WorkspaceStorageSettingWorkspaceStorageMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode)""); } + + /// Creates an new instance. + public ProjectUpdate() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResourceUpdate), __trackedResourceUpdate); + await eventListener.AssertObjectIsValid(nameof(__trackedResourceUpdate), __trackedResourceUpdate); + } + } + /// The project properties for partial update. Properties not provided in the update request will not be changed. + public partial interface IProjectUpdate : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate + { + /// The property indicates whether Azure AI services is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether Azure AI services is enabled.", + SerializedName = @"azureAiServicesMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode? AzureAiServiceSettingAzureAiServicesMode { get; set; } + /// Indicates catalog item types that can be synced. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates catalog item types that can be synced.", + SerializedName = @"catalogItemSyncTypes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get; set; } + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identities that can to be used in customization scenarios; e.g., to clone a repository.", + SerializedName = @"identities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] CustomizationSettingIdentity { get; set; } + /// Indicates whether user customizations are enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether user customizations are enabled.", + SerializedName = @"userCustomizationsEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus? CustomizationSettingUserCustomizationsEnableStatus { get; set; } + /// Description of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the project.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Indicates the delete mode for Dev Boxes within this project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the delete mode for Dev Boxes within this project.", + SerializedName = @"deleteMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode? DevBoxAutoDeleteSettingDeleteMode { get; set; } + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"gracePeriod", + PossibleTypes = new [] { typeof(string) })] + string DevBoxAutoDeleteSettingGracePeriod { get; set; } + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"inactiveThreshold", + PossibleTypes = new [] { typeof(string) })] + string DevBoxAutoDeleteSettingInactiveThreshold { get; set; } + /// Resource Id of an associated DevCenter + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource Id of an associated DevCenter", + SerializedName = @"devCenterId", + PossibleTypes = new [] { typeof(string) })] + string DevCenterId { get; set; } + /// The display name of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The display name of the project.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType? 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } + /// + /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This + /// will have no effect on existing Dev Boxes when reduced. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced.", + SerializedName = @"maxDevBoxesPerUser", + PossibleTypes = new [] { typeof(int) })] + int? MaxDevBoxesPerUser { get; set; } + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"When specified, limits the maximum number of concurrent sessions across all pools in the project.", + SerializedName = @"maxConcurrentSessionsPerProject", + PossibleTypes = new [] { typeof(int) })] + int? ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject { get; set; } + /// The property indicates whether serverless GPU access is enabled on the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether serverless GPU access is enabled on the project.", + SerializedName = @"serverlessGpuSessionsMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode? ServerlessGpuSessionSettingServerlessGpuSessionsMode { get; set; } + /// Indicates whether workspace storage is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether workspace storage is enabled.", + SerializedName = @"workspaceStorageMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode? WorkspaceStorageSettingWorkspaceStorageMode { get; set; } + + } + /// The project properties for partial update. Properties not provided in the update request will not be changed. + internal partial interface IProjectUpdateInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal + { + /// The property indicates whether Azure AI services is enabled. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode? AzureAiServiceSettingAzureAiServicesMode { get; set; } + /// Indicates whether Azure AI services are enabled for a project. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings AzureAiServicesSetting { get; set; } + /// Settings to be used when associating a project with a catalog. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings CatalogSetting { get; set; } + /// Indicates catalog item types that can be synced. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get; set; } + /// Settings to be used for customizations. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings CustomizationSetting { get; set; } + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] CustomizationSettingIdentity { get; set; } + /// Indicates whether user customizations are enabled. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus? CustomizationSettingUserCustomizationsEnableStatus { get; set; } + /// Description of the project. + string Description { get; set; } + /// Dev Box Auto Delete settings. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings DevBoxAutoDeleteSetting { get; set; } + /// Indicates the delete mode for Dev Boxes within this project. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode? DevBoxAutoDeleteSettingDeleteMode { get; set; } + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + string DevBoxAutoDeleteSettingGracePeriod { get; set; } + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + string DevBoxAutoDeleteSettingInactiveThreshold { get; set; } + /// Resource Id of an associated DevCenter + string DevCenterId { get; set; } + /// The display name of the project. + string DisplayName { get; set; } + /// Managed identity properties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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). + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType? 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } + /// + /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This + /// will have no effect on existing Dev Boxes when reduced. + /// + int? MaxDevBoxesPerUser { get; set; } + /// Properties of a project to be updated. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties Property { get; set; } + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + int? ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject { get; set; } + /// The property indicates whether serverless GPU access is enabled on the project. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode? ServerlessGpuSessionSettingServerlessGpuSessionsMode { get; set; } + /// Settings to be used for serverless GPU. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings ServerlessGpuSessionsSetting { get; set; } + /// Settings to be used for workspace storage. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings WorkspaceStorageSetting { get; set; } + /// Indicates whether workspace storage is enabled. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode? WorkspaceStorageSettingWorkspaceStorageMode { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdate.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdate.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdate.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdate.json.cs index dd759a219f91..2c8742b3cd2f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ProjectUpdate.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class ProjectUpdate partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectUpdate(json) : null; } @@ -79,8 +79,8 @@ internal ProjectUpdate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json { return; } - __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectUpdateProperties.FromJson(__jsonProperties) : Property;} + __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectUpdateProperties.FromJson(__jsonProperties) : Property;} {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ManagedServiceIdentity.FromJson(__jsonIdentity) : Identity;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdateProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..cc2f7341b4a7 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdateProperties.PowerShell.cs @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// Properties of a project. These properties can be updated after the resource has been created. + /// + [System.ComponentModel.TypeConverter(typeof(ProjectUpdatePropertiesTypeConverter))] + public partial class ProjectUpdateProperties + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProjectUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProjectUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProjectUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CatalogSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("CustomizationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings) content.GetValueForProperty("CustomizationSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxAutoDeleteSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings) content.GetValueForProperty("DevBoxAutoDeleteSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxAutoDeleteSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAiServicesSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServicesSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings) content.GetValueForProperty("AzureAiServicesSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServicesSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AzureAiServicesSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ServerlessGpuSessionsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionsSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings) content.GetValueForProperty("ServerlessGpuSessionsSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionsSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ServerlessGpuSessionsSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("WorkspaceStorageSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings) content.GetValueForProperty("WorkspaceStorageSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.WorkspaceStorageSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevCenterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevCenterId, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("MaxDevBoxesPerUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("DevBoxAutoDeleteSettingInactiveThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingInactiveThreshold = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingInactiveThreshold",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingInactiveThreshold, global::System.Convert.ToString); + } + if (content.Contains("DevBoxAutoDeleteSettingGracePeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingGracePeriod = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingGracePeriod",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingGracePeriod, global::System.Convert.ToString); + } + if (content.Contains("CatalogSettingCatalogItemSyncType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + } + if (content.Contains("CustomizationSettingIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]) content.GetValueForProperty("CustomizationSettingIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingIdentity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationManagedIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomizationSettingUserCustomizationsEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingUserCustomizationsEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus?) content.GetValueForProperty("CustomizationSettingUserCustomizationsEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingUserCustomizationsEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxAutoDeleteSettingDeleteMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingDeleteMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode?) content.GetValueForProperty("DevBoxAutoDeleteSettingDeleteMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingDeleteMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode.CreateFrom); + } + if (content.Contains("AzureAiServiceSettingAzureAiServicesMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServiceSettingAzureAiServicesMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode?) content.GetValueForProperty("AzureAiServiceSettingAzureAiServicesMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServiceSettingAzureAiServicesMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingServerlessGpuSessionsMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode?) content.GetValueForProperty("ServerlessGpuSessionSettingServerlessGpuSessionsMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject = (int?) content.GetValueForProperty("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WorkspaceStorageSettingWorkspaceStorageMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSettingWorkspaceStorageMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode?) content.GetValueForProperty("WorkspaceStorageSettingWorkspaceStorageMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSettingWorkspaceStorageMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProjectUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CatalogSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings) content.GetValueForProperty("CatalogSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCatalogSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("CustomizationSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings) content.GetValueForProperty("CustomizationSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevBoxAutoDeleteSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings) content.GetValueForProperty("DevBoxAutoDeleteSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxAutoDeleteSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAiServicesSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServicesSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings) content.GetValueForProperty("AzureAiServicesSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServicesSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AzureAiServicesSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("ServerlessGpuSessionsSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionsSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings) content.GetValueForProperty("ServerlessGpuSessionsSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionsSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ServerlessGpuSessionsSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("WorkspaceStorageSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSetting = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings) content.GetValueForProperty("WorkspaceStorageSetting",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSetting, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.WorkspaceStorageSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("DevCenterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevCenterId = (string) content.GetValueForProperty("DevCenterId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevCenterId, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("MaxDevBoxesPerUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("DevBoxAutoDeleteSettingInactiveThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingInactiveThreshold = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingInactiveThreshold",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingInactiveThreshold, global::System.Convert.ToString); + } + if (content.Contains("DevBoxAutoDeleteSettingGracePeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingGracePeriod = (string) content.GetValueForProperty("DevBoxAutoDeleteSettingGracePeriod",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingGracePeriod, global::System.Convert.ToString); + } + if (content.Contains("CatalogSettingCatalogItemSyncType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("CatalogSettingCatalogItemSyncType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CatalogSettingCatalogItemSyncType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + } + if (content.Contains("CustomizationSettingIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingIdentity = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]) content.GetValueForProperty("CustomizationSettingIdentity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingIdentity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationManagedIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("CustomizationSettingUserCustomizationsEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingUserCustomizationsEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus?) content.GetValueForProperty("CustomizationSettingUserCustomizationsEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).CustomizationSettingUserCustomizationsEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus.CreateFrom); + } + if (content.Contains("DevBoxAutoDeleteSettingDeleteMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingDeleteMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode?) content.GetValueForProperty("DevBoxAutoDeleteSettingDeleteMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).DevBoxAutoDeleteSettingDeleteMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode.CreateFrom); + } + if (content.Contains("AzureAiServiceSettingAzureAiServicesMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServiceSettingAzureAiServicesMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode?) content.GetValueForProperty("AzureAiServiceSettingAzureAiServicesMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).AzureAiServiceSettingAzureAiServicesMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingServerlessGpuSessionsMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode?) content.GetValueForProperty("ServerlessGpuSessionSettingServerlessGpuSessionsMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingServerlessGpuSessionsMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode.CreateFrom); + } + if (content.Contains("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject = (int?) content.GetValueForProperty("ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WorkspaceStorageSettingWorkspaceStorageMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSettingWorkspaceStorageMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode?) content.GetValueForProperty("WorkspaceStorageSettingWorkspaceStorageMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal)this).WorkspaceStorageSettingWorkspaceStorageMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Properties of a project. These properties can be updated after the resource has been created. + [System.ComponentModel.TypeConverter(typeof(ProjectUpdatePropertiesTypeConverter))] + public partial interface IProjectUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdateProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..519d4536ebbc --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdateProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProjectUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProjectUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProjectUpdateProperties.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdateProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdateProperties.cs new file mode 100644 index 000000000000..7a797b1b156c --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdateProperties.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// Properties of a project. These properties can be updated after the resource has been created. + /// + public partial class ProjectUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal + { + + /// The property indicates whether Azure AI services is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode? AzureAiServiceSettingAzureAiServicesMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettingsInternal)AzureAiServicesSetting).AzureAiServicesMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettingsInternal)AzureAiServicesSetting).AzureAiServicesMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings _azureAiServicesSetting; + + /// Indicates whether Azure AI services are enabled for a project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings AzureAiServicesSetting { get => (this._azureAiServicesSetting = this._azureAiServicesSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AzureAiServicesSettings()); set => this._azureAiServicesSetting = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings _catalogSetting; + + /// Settings to be used when associating a project with a catalog. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings CatalogSetting { get => (this._catalogSetting = this._catalogSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCatalogSettings()); set => this._catalogSetting = value; } + + /// Indicates catalog item types that can be synced. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettingsInternal)CatalogSetting).CatalogItemSyncType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettingsInternal)CatalogSetting).CatalogItemSyncType = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings _customizationSetting; + + /// Settings to be used for customizations. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings CustomizationSetting { get => (this._customizationSetting = this._customizationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationSettings()); set => this._customizationSetting = value; } + + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] CustomizationSettingIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettingsInternal)CustomizationSetting).Identity; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettingsInternal)CustomizationSetting).Identity = value ?? null /* arrayOf */; } + + /// Indicates whether user customizations are enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus? CustomizationSettingUserCustomizationsEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettingsInternal)CustomizationSetting).UserCustomizationsEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettingsInternal)CustomizationSetting).UserCustomizationsEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus)""); } + + /// Backing field for property. + private string _description; + + /// Description of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings _devBoxAutoDeleteSetting; + + /// Dev Box Auto Delete settings. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings DevBoxAutoDeleteSetting { get => (this._devBoxAutoDeleteSetting = this._devBoxAutoDeleteSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxAutoDeleteSettings()); set => this._devBoxAutoDeleteSetting = value; } + + /// Indicates the delete mode for Dev Boxes within this project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode? DevBoxAutoDeleteSettingDeleteMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)DevBoxAutoDeleteSetting).DeleteMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)DevBoxAutoDeleteSetting).DeleteMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode)""); } + + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DevBoxAutoDeleteSettingGracePeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)DevBoxAutoDeleteSetting).GracePeriod; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)DevBoxAutoDeleteSetting).GracePeriod = value ?? null; } + + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string DevBoxAutoDeleteSettingInactiveThreshold { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)DevBoxAutoDeleteSetting).InactiveThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettingsInternal)DevBoxAutoDeleteSetting).InactiveThreshold = value ?? null; } + + /// Backing field for property. + private string _devCenterId; + + /// Resource Id of an associated DevCenter + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string DevCenterId { get => this._devCenterId; set => this._devCenterId = value; } + + /// Backing field for property. + private string _displayName; + + /// The display name of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private int? _maxDevBoxesPerUser; + + /// + /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This + /// will have no effect on existing Dev Boxes when reduced. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public int? MaxDevBoxesPerUser { get => this._maxDevBoxesPerUser; set => this._maxDevBoxesPerUser = value; } + + /// Internal Acessors for AzureAiServicesSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal.AzureAiServicesSetting { get => (this._azureAiServicesSetting = this._azureAiServicesSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AzureAiServicesSettings()); set { {_azureAiServicesSetting = value;} } } + + /// Internal Acessors for CatalogSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal.CatalogSetting { get => (this._catalogSetting = this._catalogSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCatalogSettings()); set { {_catalogSetting = value;} } } + + /// Internal Acessors for CustomizationSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal.CustomizationSetting { get => (this._customizationSetting = this._customizationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationSettings()); set { {_customizationSetting = value;} } } + + /// Internal Acessors for DevBoxAutoDeleteSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal.DevBoxAutoDeleteSetting { get => (this._devBoxAutoDeleteSetting = this._devBoxAutoDeleteSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxAutoDeleteSettings()); set { {_devBoxAutoDeleteSetting = value;} } } + + /// Internal Acessors for ServerlessGpuSessionsSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal.ServerlessGpuSessionsSetting { get => (this._serverlessGpuSessionsSetting = this._serverlessGpuSessionsSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ServerlessGpuSessionsSettings()); set { {_serverlessGpuSessionsSetting = value;} } } + + /// Internal Acessors for WorkspaceStorageSetting + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdatePropertiesInternal.WorkspaceStorageSetting { get => (this._workspaceStorageSetting = this._workspaceStorageSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.WorkspaceStorageSettings()); set { {_workspaceStorageSetting = value;} } } + + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public int? ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettingsInternal)ServerlessGpuSessionsSetting).MaxConcurrentSessionsPerProject; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettingsInternal)ServerlessGpuSessionsSetting).MaxConcurrentSessionsPerProject = value ?? default(int); } + + /// The property indicates whether serverless GPU access is enabled on the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode? ServerlessGpuSessionSettingServerlessGpuSessionsMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettingsInternal)ServerlessGpuSessionsSetting).ServerlessGpuSessionsMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettingsInternal)ServerlessGpuSessionsSetting).ServerlessGpuSessionsMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings _serverlessGpuSessionsSetting; + + /// Settings to be used for serverless GPU. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings ServerlessGpuSessionsSetting { get => (this._serverlessGpuSessionsSetting = this._serverlessGpuSessionsSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ServerlessGpuSessionsSettings()); set => this._serverlessGpuSessionsSetting = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings _workspaceStorageSetting; + + /// Settings to be used for workspace storage. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings WorkspaceStorageSetting { get => (this._workspaceStorageSetting = this._workspaceStorageSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.WorkspaceStorageSettings()); set => this._workspaceStorageSetting = value; } + + /// Indicates whether workspace storage is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode? WorkspaceStorageSettingWorkspaceStorageMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettingsInternal)WorkspaceStorageSetting).WorkspaceStorageMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettingsInternal)WorkspaceStorageSetting).WorkspaceStorageMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode)""); } + + /// Creates an new instance. + public ProjectUpdateProperties() + { + + } + } + /// Properties of a project. These properties can be updated after the resource has been created. + public partial interface IProjectUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// The property indicates whether Azure AI services is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether Azure AI services is enabled.", + SerializedName = @"azureAiServicesMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode? AzureAiServiceSettingAzureAiServicesMode { get; set; } + /// Indicates catalog item types that can be synced. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates catalog item types that can be synced.", + SerializedName = @"catalogItemSyncTypes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get; set; } + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identities that can to be used in customization scenarios; e.g., to clone a repository.", + SerializedName = @"identities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] CustomizationSettingIdentity { get; set; } + /// Indicates whether user customizations are enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether user customizations are enabled.", + SerializedName = @"userCustomizationsEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus? CustomizationSettingUserCustomizationsEnableStatus { get; set; } + /// Description of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the project.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Indicates the delete mode for Dev Boxes within this project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the delete mode for Dev Boxes within this project.", + SerializedName = @"deleteMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode? DevBoxAutoDeleteSettingDeleteMode { get; set; } + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"gracePeriod", + PossibleTypes = new [] { typeof(string) })] + string DevBoxAutoDeleteSettingGracePeriod { get; set; } + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"inactiveThreshold", + PossibleTypes = new [] { typeof(string) })] + string DevBoxAutoDeleteSettingInactiveThreshold { get; set; } + /// Resource Id of an associated DevCenter + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource Id of an associated DevCenter", + SerializedName = @"devCenterId", + PossibleTypes = new [] { typeof(string) })] + string DevCenterId { get; set; } + /// The display name of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The display name of the project.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This + /// will have no effect on existing Dev Boxes when reduced. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This will have no effect on existing Dev Boxes when reduced.", + SerializedName = @"maxDevBoxesPerUser", + PossibleTypes = new [] { typeof(int) })] + int? MaxDevBoxesPerUser { get; set; } + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"When specified, limits the maximum number of concurrent sessions across all pools in the project.", + SerializedName = @"maxConcurrentSessionsPerProject", + PossibleTypes = new [] { typeof(int) })] + int? ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject { get; set; } + /// The property indicates whether serverless GPU access is enabled on the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether serverless GPU access is enabled on the project.", + SerializedName = @"serverlessGpuSessionsMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode? ServerlessGpuSessionSettingServerlessGpuSessionsMode { get; set; } + /// Indicates whether workspace storage is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether workspace storage is enabled.", + SerializedName = @"workspaceStorageMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode? WorkspaceStorageSettingWorkspaceStorageMode { get; set; } + + } + /// Properties of a project. These properties can be updated after the resource has been created. + internal partial interface IProjectUpdatePropertiesInternal + + { + /// The property indicates whether Azure AI services is enabled. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode? AzureAiServiceSettingAzureAiServicesMode { get; set; } + /// Indicates whether Azure AI services are enabled for a project. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAzureAiServicesSettings AzureAiServicesSetting { get; set; } + /// Settings to be used when associating a project with a catalog. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCatalogSettings CatalogSetting { get; set; } + /// Indicates catalog item types that can be synced. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[] CatalogSettingCatalogItemSyncType { get; set; } + /// Settings to be used for customizations. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationSettings CustomizationSetting { get; set; } + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] CustomizationSettingIdentity { get; set; } + /// Indicates whether user customizations are enabled. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus? CustomizationSettingUserCustomizationsEnableStatus { get; set; } + /// Description of the project. + string Description { get; set; } + /// Dev Box Auto Delete settings. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxAutoDeleteSettings DevBoxAutoDeleteSetting { get; set; } + /// Indicates the delete mode for Dev Boxes within this project. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode? DevBoxAutoDeleteSettingDeleteMode { get; set; } + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + string DevBoxAutoDeleteSettingGracePeriod { get; set; } + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + string DevBoxAutoDeleteSettingInactiveThreshold { get; set; } + /// Resource Id of an associated DevCenter + string DevCenterId { get; set; } + /// The display name of the project. + string DisplayName { get; set; } + /// + /// When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. This + /// will have no effect on existing Dev Boxes when reduced. + /// + int? MaxDevBoxesPerUser { get; set; } + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + int? ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject { get; set; } + /// The property indicates whether serverless GPU access is enabled on the project. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode? ServerlessGpuSessionSettingServerlessGpuSessionsMode { get; set; } + /// Settings to be used for serverless GPU. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings ServerlessGpuSessionsSetting { get; set; } + /// Settings to be used for workspace storage. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings WorkspaceStorageSetting { get; set; } + /// Indicates whether workspace storage is enabled. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode? WorkspaceStorageSettingWorkspaceStorageMode { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdateProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdateProperties.json.cs new file mode 100644 index 000000000000..93cdfcb5592f --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ProjectUpdateProperties.json.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// Properties of a project. These properties can be updated after the resource has been created. + /// + public partial class ProjectUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectUpdateProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ProjectUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_catalogSetting = If( json?.PropertyT("catalogSettings"), out var __jsonCatalogSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCatalogSettings.FromJson(__jsonCatalogSettings) : CatalogSetting;} + {_customizationSetting = If( json?.PropertyT("customizationSettings"), out var __jsonCustomizationSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectCustomizationSettings.FromJson(__jsonCustomizationSettings) : CustomizationSetting;} + {_devBoxAutoDeleteSetting = If( json?.PropertyT("devBoxAutoDeleteSettings"), out var __jsonDevBoxAutoDeleteSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxAutoDeleteSettings.FromJson(__jsonDevBoxAutoDeleteSettings) : DevBoxAutoDeleteSetting;} + {_azureAiServicesSetting = If( json?.PropertyT("azureAiServicesSettings"), out var __jsonAzureAiServicesSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AzureAiServicesSettings.FromJson(__jsonAzureAiServicesSettings) : AzureAiServicesSetting;} + {_serverlessGpuSessionsSetting = If( json?.PropertyT("serverlessGpuSessionsSettings"), out var __jsonServerlessGpuSessionsSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ServerlessGpuSessionsSettings.FromJson(__jsonServerlessGpuSessionsSettings) : ServerlessGpuSessionsSetting;} + {_workspaceStorageSetting = If( json?.PropertyT("workspaceStorageSettings"), out var __jsonWorkspaceStorageSettings) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.WorkspaceStorageSettings.FromJson(__jsonWorkspaceStorageSettings) : WorkspaceStorageSetting;} + {_devCenterId = If( json?.PropertyT("devCenterId"), out var __jsonDevCenterId) ? (string)__jsonDevCenterId : (string)DevCenterId;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_maxDevBoxesPerUser = If( json?.PropertyT("maxDevBoxesPerUser"), out var __jsonMaxDevBoxesPerUser) ? (int?)__jsonMaxDevBoxesPerUser : MaxDevBoxesPerUser;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._catalogSetting ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._catalogSetting.ToJson(null,serializationMode) : null, "catalogSettings" ,container.Add ); + AddIf( null != this._customizationSetting ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._customizationSetting.ToJson(null,serializationMode) : null, "customizationSettings" ,container.Add ); + AddIf( null != this._devBoxAutoDeleteSetting ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._devBoxAutoDeleteSetting.ToJson(null,serializationMode) : null, "devBoxAutoDeleteSettings" ,container.Add ); + AddIf( null != this._azureAiServicesSetting ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._azureAiServicesSetting.ToJson(null,serializationMode) : null, "azureAiServicesSettings" ,container.Add ); + AddIf( null != this._serverlessGpuSessionsSetting ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._serverlessGpuSessionsSetting.ToJson(null,serializationMode) : null, "serverlessGpuSessionsSettings" ,container.Add ); + AddIf( null != this._workspaceStorageSetting ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._workspaceStorageSetting.ToJson(null,serializationMode) : null, "workspaceStorageSettings" ,container.Add ); + AddIf( null != (((object)this._devCenterId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._devCenterId.ToString()) : null, "devCenterId" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AddIf( null != this._maxDevBoxesPerUser ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNumber((int)this._maxDevBoxesPerUser) : null, "maxDevBoxesPerUser" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/RecommendedMachineConfiguration.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/RecommendedMachineConfiguration.PowerShell.cs similarity index 79% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/RecommendedMachineConfiguration.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/RecommendedMachineConfiguration.PowerShell.cs index 8237552bb489..d8b7c963825a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/RecommendedMachineConfiguration.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/RecommendedMachineConfiguration.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class RecommendedMachineConfiguration partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new RecommendedMachineConfiguration(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new RecommendedMachineConfiguration(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,33 +105,33 @@ internal RecommendedMachineConfiguration(global::System.Collections.IDictionary // actually deserialize if (content.Contains("Memory")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).Memory = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange) content.GetValueForProperty("Memory",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).Memory, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRangeTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).Memory = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange) content.GetValueForProperty("Memory",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).Memory, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRangeTypeConverter.ConvertFrom); } if (content.Contains("VCpUs")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).VCpUs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange) content.GetValueForProperty("VCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).VCpUs, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRangeTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).VCpUs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange) content.GetValueForProperty("VCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).VCpUs, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRangeTypeConverter.ConvertFrom); } if (content.Contains("MemoryMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("MemoryMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("VCpUsMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("VCpUsMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -146,27 +146,27 @@ internal RecommendedMachineConfiguration(global::System.Management.Automation.PS // actually deserialize if (content.Contains("Memory")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).Memory = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange) content.GetValueForProperty("Memory",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).Memory, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRangeTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).Memory = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange) content.GetValueForProperty("Memory",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).Memory, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRangeTypeConverter.ConvertFrom); } if (content.Contains("VCpUs")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).VCpUs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange) content.GetValueForProperty("VCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).VCpUs, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRangeTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).VCpUs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange) content.GetValueForProperty("VCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).VCpUs, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRangeTypeConverter.ConvertFrom); } if (content.Contains("MemoryMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).MemoryMin = (int?) content.GetValueForProperty("MemoryMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).MemoryMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("MemoryMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).MemoryMax = (int?) content.GetValueForProperty("MemoryMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).MemoryMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("VCpUsMin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMin = (int?) content.GetValueForProperty("VCpUsMin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("VCpUsMax")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMax = (int?) content.GetValueForProperty("VCpUsMax",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal)this).VCpUsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/RecommendedMachineConfiguration.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/RecommendedMachineConfiguration.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/RecommendedMachineConfiguration.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/RecommendedMachineConfiguration.TypeConverter.cs index 56c85bb95f0b..c1656967ffd1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/RecommendedMachineConfiguration.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/RecommendedMachineConfiguration.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/RecommendedMachineConfiguration.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/RecommendedMachineConfiguration.cs similarity index 75% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/RecommendedMachineConfiguration.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/RecommendedMachineConfiguration.cs index 3f0f9759df05..d86cc43641a7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/RecommendedMachineConfiguration.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/RecommendedMachineConfiguration.cs @@ -3,63 +3,63 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties for a recommended machine configuration. public partial class RecommendedMachineConfiguration : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange _memory; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange _memory; /// Recommended memory range. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange Memory { get => (this._memory = this._memory ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRange()); } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange Memory { get => (this._memory = this._memory ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRange()); } /// Maximum value. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)Memory).Max; } + public int? MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)Memory).Max; } /// Minimum value. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)Memory).Min; } + public int? MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)Memory).Min; } /// Internal Acessors for Memory - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal.Memory { get => (this._memory = this._memory ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRange()); set { {_memory = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal.Memory { get => (this._memory = this._memory ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRange()); set { {_memory = value;} } } /// Internal Acessors for MemoryMax - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal.MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)Memory).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)Memory).Max = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal.MemoryMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)Memory).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)Memory).Max = value; } /// Internal Acessors for MemoryMin - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal.MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)Memory).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)Memory).Min = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal.MemoryMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)Memory).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)Memory).Min = value; } /// Internal Acessors for VCpUs - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal.VCpUs { get => (this._vCpUs = this._vCpUs ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRange()); set { {_vCpUs = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal.VCpUs { get => (this._vCpUs = this._vCpUs ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRange()); set { {_vCpUs = value;} } } /// Internal Acessors for VCpUsMax - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal.VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)VCpUs).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)VCpUs).Max = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal.VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)VCpUs).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)VCpUs).Max = value; } /// Internal Acessors for VCpUsMin - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfigurationInternal.VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)VCpUs).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)VCpUs).Min = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfigurationInternal.VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)VCpUs).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)VCpUs).Min = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange _vCpUs; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange _vCpUs; /// Recommended vCPU range. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange VCpUs { get => (this._vCpUs = this._vCpUs ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRange()); } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange VCpUs { get => (this._vCpUs = this._vCpUs ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRange()); } /// Maximum value. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)VCpUs).Max; } + public int? VCpUsMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)VCpUs).Max; } /// Minimum value. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public int? VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)VCpUs).Min; } + public int? VCpUsMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)VCpUs).Min; } /// Creates an new instance. public RecommendedMachineConfiguration() @@ -110,13 +110,13 @@ internal partial interface IRecommendedMachineConfigurationInternal { /// Recommended memory range. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange Memory { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange Memory { get; set; } /// Maximum value. int? MemoryMax { get; set; } /// Minimum value. int? MemoryMin { get; set; } /// Recommended vCPU range. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange VCpUs { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange VCpUs { get; set; } /// Maximum value. int? VCpUsMax { get; set; } /// Minimum value. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/RecommendedMachineConfiguration.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/RecommendedMachineConfiguration.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/RecommendedMachineConfiguration.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/RecommendedMachineConfiguration.json.cs index fa1bc96e8515..1ce2eac64769 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/RecommendedMachineConfiguration.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/RecommendedMachineConfiguration.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class RecommendedMachineConfiguration partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IRecommendedMachineConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IRecommendedMachineConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new RecommendedMachineConfiguration(json) : null; } @@ -77,8 +77,8 @@ internal RecommendedMachineConfiguration(Microsoft.Azure.PowerShell.Cmdlets.DevC { return; } - {_memory = If( json?.PropertyT("memory"), out var __jsonMemory) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRange.FromJson(__jsonMemory) : Memory;} - {_vCpUs = If( json?.PropertyT("vCPUs"), out var __jsonVCpUs) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ResourceRange.FromJson(__jsonVCpUs) : VCpUs;} + {_memory = If( json?.PropertyT("memory"), out var __jsonMemory) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRange.FromJson(__jsonMemory) : Memory;} + {_vCpUs = If( json?.PropertyT("vCPUs"), out var __jsonVCpUs) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ResourceRange.FromJson(__jsonVCpUs) : VCpUs;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourcePolicy.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourcePolicy.PowerShell.cs new file mode 100644 index 000000000000..9fee423403d1 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourcePolicy.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// A resource policy. + [System.ComponentModel.TypeConverter(typeof(ResourcePolicyTypeConverter))] + public partial class ResourcePolicy + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ResourcePolicy(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ResourcePolicy(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ResourcePolicy(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Filter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).Filter = (string) content.GetValueForProperty("Filter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).Filter, global::System.Convert.ToString); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction?) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction.CreateFrom); + } + if (content.Contains("ResourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).ResourceType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType?) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).ResourceType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ResourcePolicy(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Filter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).Filter = (string) content.GetValueForProperty("Filter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).Filter, global::System.Convert.ToString); + } + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction?) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction.CreateFrom); + } + if (content.Contains("ResourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).ResourceType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType?) content.GetValueForProperty("ResourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal)this).ResourceType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A resource policy. + [System.ComponentModel.TypeConverter(typeof(ResourcePolicyTypeConverter))] + public partial interface IResourcePolicy + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourcePolicy.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourcePolicy.TypeConverter.cs new file mode 100644 index 000000000000..9dc0c19575d9 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourcePolicy.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourcePolicyTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ResourcePolicy.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ResourcePolicy.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ResourcePolicy.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourcePolicy.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourcePolicy.cs new file mode 100644 index 000000000000..cd7c8f2def9b --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourcePolicy.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// A resource policy. + public partial class ResourcePolicy : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicyInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction? _action; + + /// + /// Policy action to be taken on the resources. This is optional, and defaults to allow + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction? Action { get => this._action; set => this._action = value; } + + /// Backing field for property. + private string _filter; + + /// Optional. When specified, this expression is used to filter the resources. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Filter { get => this._filter; set => this._filter = value; } + + /// Backing field for property. + private string _resource; + + /// Resources that are included and shared as a part of a project policy. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Resource { get => this._resource; set => this._resource = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType? _resourceType; + + /// + /// Optional. The resource type being restricted or allowed by a project policy. Used with a given action to restrict or allow + /// access to a resource type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType? ResourceType { get => this._resourceType; set => this._resourceType = value; } + + /// Creates an new instance. + public ResourcePolicy() + { + + } + } + /// A resource policy. + public partial interface IResourcePolicy : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// + /// Policy action to be taken on the resources. This is optional, and defaults to allow + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Policy action to be taken on the resources. This is optional, and defaults to allow", + SerializedName = @"action", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction? Action { get; set; } + /// Optional. When specified, this expression is used to filter the resources. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. When specified, this expression is used to filter the resources.", + SerializedName = @"filter", + PossibleTypes = new [] { typeof(string) })] + string Filter { get; set; } + /// Resources that are included and shared as a part of a project policy. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resources that are included and shared as a part of a project policy.", + SerializedName = @"resources", + PossibleTypes = new [] { typeof(string) })] + string Resource { get; set; } + /// + /// Optional. The resource type being restricted or allowed by a project policy. Used with a given action to restrict or allow + /// access to a resource type. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The resource type being restricted or allowed by a project policy. Used with a given action to restrict or allow access to a resource type.", + SerializedName = @"resourceType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType? ResourceType { get; set; } + + } + /// A resource policy. + internal partial interface IResourcePolicyInternal + + { + /// + /// Policy action to be taken on the resources. This is optional, and defaults to allow + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction? Action { get; set; } + /// Optional. When specified, this expression is used to filter the resources. + string Filter { get; set; } + /// Resources that are included and shared as a part of a project policy. + string Resource { get; set; } + /// + /// Optional. The resource type being restricted or allowed by a project policy. Used with a given action to restrict or allow + /// access to a resource type. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType? ResourceType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourcePolicy.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourcePolicy.json.cs new file mode 100644 index 000000000000..4cb65a74c6f4 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourcePolicy.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// A resource policy. + public partial class ResourcePolicy + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ResourcePolicy(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ResourcePolicy(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_resource = If( json?.PropertyT("resources"), out var __jsonResources) ? (string)__jsonResources : (string)Resource;} + {_filter = If( json?.PropertyT("filter"), out var __jsonFilter) ? (string)__jsonFilter : (string)Filter;} + {_action = If( json?.PropertyT("action"), out var __jsonAction) ? (string)__jsonAction : (string)Action;} + {_resourceType = If( json?.PropertyT("resourceType"), out var __jsonResourceType) ? (string)__jsonResourceType : (string)ResourceType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._resource.ToString()) : null, "resources" ,container.Add ); + AddIf( null != (((object)this._filter)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._filter.ToString()) : null, "filter" ,container.Add ); + AddIf( null != (((object)this._action)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._action.ToString()) : null, "action" ,container.Add ); + AddIf( null != (((object)this._resourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._resourceType.ToString()) : null, "resourceType" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ResourceRange.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourceRange.PowerShell.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ResourceRange.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourceRange.PowerShell.cs index b6d6aab0169d..06ae84d83dde 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ResourceRange.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourceRange.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class ResourceRange partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResourceRange(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResourceRange(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,17 +103,17 @@ internal ResourceRange(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Min")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)this).Min = (int?) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)this).Min, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)this).Min = (int?) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)this).Min, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Max")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)this).Max = (int?) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)this).Max, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)this).Max = (int?) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)this).Max, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -128,11 +128,11 @@ internal ResourceRange(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Min")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)this).Min = (int?) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)this).Min, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)this).Min = (int?) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)this).Min, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Max")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)this).Max = (int?) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal)this).Max, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)this).Max = (int?) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal)this).Max, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ResourceRange.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourceRange.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ResourceRange.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourceRange.TypeConverter.cs index bd59c94cb453..7824f014badd 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ResourceRange.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourceRange.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ResourceRange.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourceRange.cs similarity index 93% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ResourceRange.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourceRange.cs index 29717737228e..676a94466391 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ResourceRange.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourceRange.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Properties for a range of values. public partial class ResourceRange : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal { /// Backing field for property. @@ -21,10 +21,10 @@ public partial class ResourceRange : public int? Max { get => this._max; } /// Internal Acessors for Max - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal.Max { get => this._max; set { {_max = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal.Max { get => this._max; set { {_max = value;} } } /// Internal Acessors for Min - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRangeInternal.Min { get => this._min; set { {_min = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRangeInternal.Min { get => this._min; set { {_min = value;} } } /// Backing field for property. private int? _min; diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ResourceRange.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourceRange.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ResourceRange.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourceRange.json.cs index 4a44c2fb4b4d..d433a4b9c60f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ResourceRange.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ResourceRange.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ResourceRange partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IResourceRange FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourceRange FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ResourceRange(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Schedule.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Schedule.PowerShell.cs new file mode 100644 index 000000000000..f22843cdb8f1 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Schedule.PowerShell.cs @@ -0,0 +1,288 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents a Schedule to execute a task. + [System.ComponentModel.TypeConverter(typeof(ScheduleTypeConverter))] + public partial class Schedule + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Schedule(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Schedule(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Schedule(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SchedulePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("PropertiesType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).PropertiesType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("PropertiesType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).PropertiesType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); + } + if (content.Contains("Frequency")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); + } + if (content.Contains("Time")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Time, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("State")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Schedule(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.SchedulePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("PropertiesType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).PropertiesType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("PropertiesType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).PropertiesType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); + } + if (content.Contains("Frequency")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); + } + if (content.Contains("Time")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).Time, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("State")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents a Schedule to execute a task. + [System.ComponentModel.TypeConverter(typeof(ScheduleTypeConverter))] + public partial interface ISchedule + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Schedule.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Schedule.TypeConverter.cs new file mode 100644 index 000000000000..7b5e8b33adb5 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Schedule.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ScheduleTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Schedule.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Schedule.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Schedule.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Schedule.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Schedule.cs new file mode 100644 index 000000000000..2e925c489357 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Schedule.cs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a Schedule to execute a task. + public partial class Schedule : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); + + /// The frequency of this scheduled task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency? Frequency { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).Frequency; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).Frequency = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency)""); } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)Property).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)Property).Location = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedulePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedulePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } + + /// Supported type this scheduled task represents. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType? PropertiesType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleProperties _property; + + /// Properties of a Schedule resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleProperties()); set => this._property = value; } + + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedulePropertiesInternal)Property).ProvisioningState; } + + /// Indicates whether or not this scheduled task is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus? State { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).State; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).State = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus)""); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)Property).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)Property).Tag = value ?? null /* model class */; } + + /// The target time to trigger the action. The format is HH:MM. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string Time { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).Time; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).Time = value ?? null; } + + /// The IANA timezone id at which the schedule should execute. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string TimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).TimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).TimeZone = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public Schedule() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// Represents a Schedule to execute a task. + public partial interface ISchedule : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource + { + /// The frequency of this scheduled task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The frequency of this scheduled task.", + SerializedName = @"frequency", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency? Frequency { get; set; } + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Supported type this scheduled task represents. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Supported type this scheduled task represents.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType? PropertiesType { get; set; } + /// The provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The provisioning state of the resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; } + /// Indicates whether or not this scheduled task is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether or not this scheduled task is enabled.", + SerializedName = @"state", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus? State { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get; set; } + /// The target time to trigger the action. The format is HH:MM. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target time to trigger the action. The format is HH:MM.", + SerializedName = @"time", + PossibleTypes = new [] { typeof(string) })] + string Time { get; set; } + /// The IANA timezone id at which the schedule should execute. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The IANA timezone id at which the schedule should execute.", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + + } + /// Represents a Schedule to execute a task. + internal partial interface IScheduleInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal + { + /// The frequency of this scheduled task. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency? Frequency { get; set; } + /// The geo-location where the resource lives + string Location { get; set; } + /// Supported type this scheduled task represents. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType? PropertiesType { get; set; } + /// Properties of a Schedule resource + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleProperties Property { get; set; } + /// The provisioning state of the resource. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } + /// Indicates whether or not this scheduled task is enabled. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus? State { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get; set; } + /// The target time to trigger the action. The format is HH:MM. + string Time { get; set; } + /// The IANA timezone id at which the schedule should execute. + string TimeZone { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Schedule.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Schedule.json.cs new file mode 100644 index 000000000000..d3b434a923e7 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Schedule.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents a Schedule to execute a task. + public partial class Schedule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Schedule(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal Schedule(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleListResult.PowerShell.cs similarity index 83% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleListResult.PowerShell.cs index 32e4f1df93e3..e2f5d7ad4168 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ScheduleListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ScheduleListResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ScheduleListResult(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,17 +105,17 @@ internal ScheduleListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResultInternal)this).NextLink, 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. @@ -130,11 +130,11 @@ internal ScheduleListResult(global::System.Management.Automation.PSObject conten // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleListResult.TypeConverter.cs index c52ff4798784..a2e4daa9af8f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleListResult.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleListResult.cs index 5d560436a540..6904600bec9e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Result of the schedule list operation. public partial class ScheduleListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class ScheduleListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule[] Value { get => this._value; } /// Creates an new instance. public ScheduleListResult() @@ -57,8 +57,8 @@ public partial interface IScheduleListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule[] Value { get; } } /// Result of the schedule list operation. @@ -68,7 +68,7 @@ internal partial interface IScheduleListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleListResult.json.cs index 05301aa9037d..f677a098ae63 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ScheduleListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ScheduleListResult(json) : null; } @@ -77,7 +77,7 @@ internal ScheduleListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Schedule.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Schedule.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleProperties.PowerShell.cs similarity index 80% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleProperties.PowerShell.cs index aaf8559f0874..f4a41762a6f7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ScheduleProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ScheduleProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ScheduleProperties(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,41 +105,41 @@ internal ScheduleProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedulePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedulePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedulePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedulePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); } if (content.Contains("Frequency")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); } if (content.Contains("Time")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Time, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Time, global::System.Convert.ToString); } if (content.Contains("TimeZone")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).TimeZone, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).TimeZone, global::System.Convert.ToString); } if (content.Contains("State")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); } 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. @@ -154,35 +154,35 @@ internal ScheduleProperties(global::System.Management.Automation.PSObject conten // actually deserialize if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedulePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedulePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedulePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedulePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState.CreateFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); } if (content.Contains("Frequency")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); } if (content.Contains("Time")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Time, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Time, global::System.Convert.ToString); } if (content.Contains("TimeZone")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).TimeZone, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).TimeZone, global::System.Convert.ToString); } if (content.Contains("State")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleProperties.TypeConverter.cs index 2a0e8548e5ed..fc6fa475766a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleProperties.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleProperties.cs index bc03e5b138a5..7df868c0d94d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleProperties.cs @@ -3,32 +3,32 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// The Schedule properties defining when and what to execute. public partial class ScheduleProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedulePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedulePropertiesInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties __scheduleUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleUpdateProperties(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties __scheduleUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleUpdateProperties(); /// The frequency of this scheduled task. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency? Frequency { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).Frequency; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).Frequency = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency? Frequency { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).Frequency; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).Frequency = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency)""); } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__scheduleUpdateProperties).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__scheduleUpdateProperties).Location = value ?? null; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__scheduleUpdateProperties).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__scheduleUpdateProperties).Location = value ?? null; } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedulePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedulePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? _provisioningState; @@ -39,23 +39,23 @@ public partial class ScheduleProperties : /// Indicates whether or not this scheduled task is enabled. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus? State { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).State; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).State = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus? State { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).State; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).State = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus)""); } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__scheduleUpdateProperties).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__scheduleUpdateProperties).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__scheduleUpdateProperties).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__scheduleUpdateProperties).Tag = value ?? null /* model class */; } /// The target time to trigger the action. The format is HH:MM. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Time { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).Time; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).Time = value ?? null; } + public string Time { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).Time; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).Time = value ?? null; } /// The IANA timezone id at which the schedule should execute. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string TimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).TimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).TimeZone = value ?? null; } + public string TimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).TimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).TimeZone = value ?? null; } /// Supported type this scheduled task represents. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)__scheduleUpdateProperties).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType)""); } /// Creates an new instance. public ScheduleProperties() @@ -78,7 +78,7 @@ public ScheduleProperties() /// The Schedule properties defining when and what to execute. public partial interface IScheduleProperties : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties { /// The provisioning state of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -92,7 +92,7 @@ public partial interface IScheduleProperties : } /// The Schedule properties defining when and what to execute. internal partial interface ISchedulePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal { /// The provisioning state of the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProvisioningState? ProvisioningState { get; set; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleProperties.json.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleProperties.json.cs index ab3dd6ffe5bf..302ccc9ebf0d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ScheduleProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ScheduleProperties(json) : null; } @@ -77,7 +77,7 @@ internal ScheduleProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime { return; } - __scheduleUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleUpdateProperties(json); + __scheduleUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleUpdateProperties(json); {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdate.PowerShell.cs similarity index 79% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdate.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdate.PowerShell.cs index a55cb6998c24..720219a22e46 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdate.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdate.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -57,27 +57,27 @@ public partial class ScheduleUpdate partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ScheduleUpdate(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ScheduleUpdate(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,41 +105,41 @@ internal ScheduleUpdate(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); } if (content.Contains("Frequency")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); } if (content.Contains("Time")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Time, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Time, global::System.Convert.ToString); } if (content.Contains("TimeZone")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).TimeZone, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).TimeZone, global::System.Convert.ToString); } if (content.Contains("State")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); } 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. @@ -154,35 +154,35 @@ internal ScheduleUpdate(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Location, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); } if (content.Contains("Frequency")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); } if (content.Contains("Time")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).Time, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).Time, global::System.Convert.ToString); } if (content.Contains("TimeZone")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).TimeZone, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).TimeZone, global::System.Convert.ToString); } if (content.Contains("State")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdate.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdate.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdate.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdate.TypeConverter.cs index 9d2cc4ea0656..6d4b87218c3b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdate.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdate.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdate.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdate.cs index e9bfe1ff2022..579ee9fb0bb2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdate.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdate.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -11,47 +11,47 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview /// The schedule properties for partial update. Properties not provided in the update request will not be changed. /// public partial class ScheduleUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdate, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdate, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal { /// The frequency of this scheduled task. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency? Frequency { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).Frequency; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).Frequency = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency? Frequency { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).Frequency; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).Frequency = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency)""); } /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)Property).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)Property).Location = value ?? null; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)Property).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)Property).Location = value ?? null; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleUpdateProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleUpdateProperties()); set { {_property = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties _property; /// Properties of a schedule resource to be updated. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleUpdateProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleUpdateProperties()); set => this._property = value; } /// Indicates whether or not this scheduled task is enabled. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus? State { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).State; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).State = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus? State { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).State; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).State = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus)""); } /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)Property).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)Property).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)Property).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)Property).Tag = value ?? null /* model class */; } /// The target time to trigger the action. The format is HH:MM. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string Time { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).Time; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).Time = value ?? null; } + public string Time { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).Time; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).Time = value ?? null; } /// The IANA timezone id at which the schedule should execute. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string TimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).TimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).TimeZone = value ?? null; } + public string TimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).TimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).TimeZone = value ?? null; } /// Supported type this scheduled task represents. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)Property).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)Property).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType)""); } /// Creates an new instance. public ScheduleUpdate() @@ -93,8 +93,8 @@ public partial interface IScheduleUpdate : ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get; set; } /// The target time to trigger the action. The format is HH:MM. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, @@ -130,11 +130,11 @@ internal partial interface IScheduleUpdateInternal /// The geo-location where the resource lives string Location { get; set; } /// Properties of a schedule resource to be updated. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties Property { get; set; } /// Indicates whether or not this scheduled task is enabled. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus? State { get; set; } /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get; set; } /// The target time to trigger the action. The format is HH:MM. string Time { get; set; } /// The IANA timezone id at which the schedule should execute. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdate.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdate.json.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdate.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdate.json.cs index 8c62d8281d5b..b4e37e52e490 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdate.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class ScheduleUpdate partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ScheduleUpdate(json) : null; } @@ -79,7 +79,7 @@ internal ScheduleUpdate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Jso { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleUpdateProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleUpdateProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdateProperties.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdateProperties.PowerShell.cs similarity index 80% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdateProperties.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdateProperties.PowerShell.cs index 738c421f5810..ec0e3a18ddc3 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdateProperties.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdateProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ScheduleUpdateProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ScheduleUpdateProperties(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ScheduleUpdateProperties(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -105,37 +105,37 @@ internal ScheduleUpdateProperties(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); } if (content.Contains("Frequency")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); } if (content.Contains("Time")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Time, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Time, global::System.Convert.ToString); } if (content.Contains("TimeZone")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).TimeZone, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).TimeZone, global::System.Convert.ToString); } if (content.Contains("State")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, 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. @@ -150,31 +150,31 @@ internal ScheduleUpdateProperties(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledType.CreateFrom); } if (content.Contains("Frequency")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Frequency = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency?) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Frequency, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency.CreateFrom); } if (content.Contains("Time")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).Time, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).Time, global::System.Convert.ToString); } if (content.Contains("TimeZone")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).TimeZone, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).TimeZone, global::System.Convert.ToString); } if (content.Contains("State")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).State = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus?) content.GetValueForProperty("State",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal)this).State, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus.CreateFrom); } if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdateProperties.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdateProperties.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdateProperties.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdateProperties.TypeConverter.cs index fdfef6bfb934..f30cd92e4c30 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdateProperties.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdateProperties.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdateProperties.cs similarity index 92% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdateProperties.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdateProperties.cs index d12fa6bc5e8e..e91a8baed4f9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdateProperties.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdateProperties.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Updatable properties of a Schedule. public partial class ScheduleUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdatePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdatePropertiesInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate(); /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency? _frequency; @@ -28,7 +28,7 @@ public partial class ScheduleUpdateProperties : /// The geo-location where the resource lives [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location = value ?? null; } + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Location = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduleEnableStatus? _state; @@ -39,7 +39,7 @@ public partial class ScheduleUpdateProperties : /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)__trackedResourceUpdate).Tag = value ?? null /* model class */; } /// Backing field for property. private string _time; @@ -83,7 +83,7 @@ public ScheduleUpdateProperties() /// Updatable properties of a Schedule. public partial interface IScheduleUpdateProperties : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate { /// The frequency of this scheduled task. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( @@ -129,7 +129,7 @@ public partial interface IScheduleUpdateProperties : } /// Updatable properties of a Schedule. internal partial interface IScheduleUpdatePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal { /// The frequency of this scheduled task. Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ScheduledFrequency? Frequency { get; set; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdateProperties.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdateProperties.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdateProperties.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdateProperties.json.cs index a25b04ee56ba..d78c2a6537b8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/ScheduleUpdateProperties.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ScheduleUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ScheduleUpdateProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ScheduleUpdateProperties(json) : null; } @@ -77,7 +77,7 @@ internal ScheduleUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.R { return; } - __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TrackedResourceUpdate(json); + __trackedResourceUpdate = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TrackedResourceUpdate(json); {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} {_frequency = If( json?.PropertyT("frequency"), out var __jsonFrequency) ? (string)__jsonFrequency : (string)Frequency;} {_time = If( json?.PropertyT("time"), out var __jsonTime) ? (string)__jsonTime : (string)Time;} diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ServerlessGpuSessionsSettings.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ServerlessGpuSessionsSettings.PowerShell.cs new file mode 100644 index 000000000000..8caf6ec6a784 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ServerlessGpuSessionsSettings.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Represents settings for serverless GPU access. + [System.ComponentModel.TypeConverter(typeof(ServerlessGpuSessionsSettingsTypeConverter))] + public partial class ServerlessGpuSessionsSettings + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ServerlessGpuSessionsSettings(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ServerlessGpuSessionsSettings(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ServerlessGpuSessionsSettings(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ServerlessGpuSessionsMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettingsInternal)this).ServerlessGpuSessionsMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode?) content.GetValueForProperty("ServerlessGpuSessionsMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettingsInternal)this).ServerlessGpuSessionsMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode.CreateFrom); + } + if (content.Contains("MaxConcurrentSessionsPerProject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettingsInternal)this).MaxConcurrentSessionsPerProject = (int?) content.GetValueForProperty("MaxConcurrentSessionsPerProject",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettingsInternal)this).MaxConcurrentSessionsPerProject, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ServerlessGpuSessionsSettings(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ServerlessGpuSessionsMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettingsInternal)this).ServerlessGpuSessionsMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode?) content.GetValueForProperty("ServerlessGpuSessionsMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettingsInternal)this).ServerlessGpuSessionsMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode.CreateFrom); + } + if (content.Contains("MaxConcurrentSessionsPerProject")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettingsInternal)this).MaxConcurrentSessionsPerProject = (int?) content.GetValueForProperty("MaxConcurrentSessionsPerProject",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettingsInternal)this).MaxConcurrentSessionsPerProject, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Represents settings for serverless GPU access. + [System.ComponentModel.TypeConverter(typeof(ServerlessGpuSessionsSettingsTypeConverter))] + public partial interface IServerlessGpuSessionsSettings + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ServerlessGpuSessionsSettings.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ServerlessGpuSessionsSettings.TypeConverter.cs new file mode 100644 index 000000000000..36ec9cdd9084 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ServerlessGpuSessionsSettings.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ServerlessGpuSessionsSettingsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ServerlessGpuSessionsSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ServerlessGpuSessionsSettings.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ServerlessGpuSessionsSettings.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ServerlessGpuSessionsSettings.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ServerlessGpuSessionsSettings.cs new file mode 100644 index 000000000000..87e7235c08c5 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ServerlessGpuSessionsSettings.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents settings for serverless GPU access. + public partial class ServerlessGpuSessionsSettings : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettingsInternal + { + + /// Backing field for property. + private int? _maxConcurrentSessionsPerProject; + + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public int? MaxConcurrentSessionsPerProject { get => this._maxConcurrentSessionsPerProject; set => this._maxConcurrentSessionsPerProject = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode? _serverlessGpuSessionsMode; + + /// The property indicates whether serverless GPU access is enabled on the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode? ServerlessGpuSessionsMode { get => this._serverlessGpuSessionsMode; set => this._serverlessGpuSessionsMode = value; } + + /// Creates an new instance. + public ServerlessGpuSessionsSettings() + { + + } + } + /// Represents settings for serverless GPU access. + public partial interface IServerlessGpuSessionsSettings : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"When specified, limits the maximum number of concurrent sessions across all pools in the project.", + SerializedName = @"maxConcurrentSessionsPerProject", + PossibleTypes = new [] { typeof(int) })] + int? MaxConcurrentSessionsPerProject { get; set; } + /// The property indicates whether serverless GPU access is enabled on the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether serverless GPU access is enabled on the project.", + SerializedName = @"serverlessGpuSessionsMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode? ServerlessGpuSessionsMode { get; set; } + + } + /// Represents settings for serverless GPU access. + internal partial interface IServerlessGpuSessionsSettingsInternal + + { + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + int? MaxConcurrentSessionsPerProject { get; set; } + /// The property indicates whether serverless GPU access is enabled on the project. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode? ServerlessGpuSessionsMode { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ServerlessGpuSessionsSettings.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ServerlessGpuSessionsSettings.json.cs new file mode 100644 index 000000000000..67d1ef6894a6 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/ServerlessGpuSessionsSettings.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Represents settings for serverless GPU access. + public partial class ServerlessGpuSessionsSettings + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IServerlessGpuSessionsSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ServerlessGpuSessionsSettings(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ServerlessGpuSessionsSettings(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_serverlessGpuSessionsMode = If( json?.PropertyT("serverlessGpuSessionsMode"), out var __jsonServerlessGpuSessionsMode) ? (string)__jsonServerlessGpuSessionsMode : (string)ServerlessGpuSessionsMode;} + {_maxConcurrentSessionsPerProject = If( json?.PropertyT("maxConcurrentSessionsPerProject"), out var __jsonMaxConcurrentSessionsPerProject) ? (int?)__jsonMaxConcurrentSessionsPerProject : MaxConcurrentSessionsPerProject;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._serverlessGpuSessionsMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._serverlessGpuSessionsMode.ToString()) : null, "serverlessGpuSessionsMode" ,container.Add ); + AddIf( null != this._maxConcurrentSessionsPerProject ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNumber((int)this._maxConcurrentSessionsPerProject) : null, "maxConcurrentSessionsPerProject" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SkuListResult.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SkuListResult.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SkuListResult.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SkuListResult.PowerShell.cs index 2cfc634964c8..7ae3eed52e79 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SkuListResult.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SkuListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class SkuListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SkuListResult(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SkuListResult(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,17 +103,17 @@ internal SkuListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterSkuTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterSkuTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResultInternal)this).NextLink, 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. @@ -128,11 +128,11 @@ internal SkuListResult(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterSkuTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterSkuTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SkuListResult.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SkuListResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SkuListResult.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SkuListResult.TypeConverter.cs index 5b4f2c117622..dd0ffae7d435 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SkuListResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SkuListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SkuListResult.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SkuListResult.cs similarity index 85% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SkuListResult.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SkuListResult.cs index 7eee4efdeec8..83b5bdec58c2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SkuListResult.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SkuListResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Results of the Microsoft.DevCenter SKU list operation. public partial class SkuListResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _nextLink; @@ -27,11 +27,11 @@ public partial class SkuListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku[] _value; /// Current page of results. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku[] Value { get => this._value; } /// Creates an new instance. public SkuListResult() @@ -57,8 +57,8 @@ public partial interface ISkuListResult : ReadOnly = true, Description = @"Current page of results.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku[] Value { get; } } /// Results of the Microsoft.DevCenter SKU list operation. @@ -68,7 +68,7 @@ internal partial interface ISkuListResultInternal /// URL to get the next set of results if there are any. string NextLink { get; set; } /// Current page of results. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SkuListResult.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SkuListResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SkuListResult.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SkuListResult.json.cs index 489f8dc2ffb0..e9e4927cf6cc 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SkuListResult.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SkuListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SkuListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new SkuListResult(json) : null; } @@ -77,7 +77,7 @@ internal SkuListResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterSku.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterSku.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.PowerShell.cs new file mode 100644 index 000000000000..fd607b157cfc --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + [System.ComponentModel.TypeConverter(typeof(StopOnDisconnectConfigurationTypeConverter))] + public partial class StopOnDisconnectConfiguration + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StopOnDisconnectConfiguration(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StopOnDisconnectConfiguration(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StopOnDisconnectConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); + } + if (content.Contains("GracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute = (int?) content.GetValueForProperty("GracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StopOnDisconnectConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus.CreateFrom); + } + if (content.Contains("GracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute = (int?) content.GetValueForProperty("GracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + [System.ComponentModel.TypeConverter(typeof(StopOnDisconnectConfigurationTypeConverter))] + public partial interface IStopOnDisconnectConfiguration + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.TypeConverter.cs new file mode 100644 index 000000000000..8f7d4ddb51c3 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StopOnDisconnectConfigurationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StopOnDisconnectConfiguration.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StopOnDisconnectConfiguration.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StopOnDisconnectConfiguration.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.cs new file mode 100644 index 000000000000..bebbe26cb79b --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + public partial class StopOnDisconnectConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal + { + + /// Backing field for property. + private int? _gracePeriodMinute; + + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public int? GracePeriodMinute { get => this._gracePeriodMinute; set => this._gracePeriodMinute = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? _status; + + /// + /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public StopOnDisconnectConfiguration() + { + + } + } + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + public partial interface IStopOnDisconnectConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box once disconnect is detected.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + int? GracePeriodMinute { get; set; } + /// + /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? Status { get; set; } + + } + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + internal partial interface IStopOnDisconnectConfigurationInternal + + { + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + /// + int? GracePeriodMinute { get; set; } + /// + /// Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus? Status { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.json.cs new file mode 100644 index 000000000000..5c3c5589dd25 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + public partial class StopOnDisconnectConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnDisconnectConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new StopOnDisconnectConfiguration(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal StopOnDisconnectConfiguration(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_gracePeriodMinute = If( json?.PropertyT("gracePeriodMinutes"), out var __jsonGracePeriodMinutes) ? (int?)__jsonGracePeriodMinutes : GracePeriodMinute;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != this._gracePeriodMinute ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNumber((int)this._gracePeriodMinute) : null, "gracePeriodMinutes" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.PowerShell.cs new file mode 100644 index 000000000000..b3f891c0b338 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + [System.ComponentModel.TypeConverter(typeof(StopOnNoConnectConfigurationTypeConverter))] + public partial class StopOnNoConnectConfiguration + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StopOnNoConnectConfiguration(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StopOnNoConnectConfiguration(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StopOnNoConnectConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus.CreateFrom); + } + if (content.Contains("GracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).GracePeriodMinute = (int?) content.GetValueForProperty("GracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).GracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StopOnNoConnectConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus.CreateFrom); + } + if (content.Contains("GracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).GracePeriodMinute = (int?) content.GetValueForProperty("GracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).GracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + [System.ComponentModel.TypeConverter(typeof(StopOnNoConnectConfigurationTypeConverter))] + public partial interface IStopOnNoConnectConfiguration + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.TypeConverter.cs new file mode 100644 index 000000000000..7cc3a9f4f7e2 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StopOnNoConnectConfigurationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StopOnNoConnectConfiguration.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StopOnNoConnectConfiguration.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StopOnNoConnectConfiguration.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.cs new file mode 100644 index 000000000000..171591a0ff40 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + public partial class StopOnNoConnectConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal + { + + /// Backing field for property. + private int? _gracePeriodMinute; + + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public int? GracePeriodMinute { get => this._gracePeriodMinute; set => this._gracePeriodMinute = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus? _status; + + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus? Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public StopOnNoConnectConfiguration() + { + + } + } + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + public partial interface IStopOnNoConnectConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box if no connection is made.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + int? GracePeriodMinute { get; set; } + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus? Status { get; set; } + + } + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + internal partial interface IStopOnNoConnectConfigurationInternal + + { + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + int? GracePeriodMinute { get; set; } + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus? Status { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.json.cs new file mode 100644 index 000000000000..ad992cb3b981 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + public partial class StopOnNoConnectConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IStopOnNoConnectConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new StopOnNoConnectConfiguration(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal StopOnNoConnectConfiguration(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_gracePeriodMinute = If( json?.PropertyT("gracePeriodMinutes"), out var __jsonGracePeriodMinutes) ? (int?)__jsonGracePeriodMinutes : GracePeriodMinute;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != this._gracePeriodMinute ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNumber((int)this._gracePeriodMinute) : null, "gracePeriodMinutes" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncErrorDetails.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncErrorDetails.PowerShell.cs similarity index 76% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncErrorDetails.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncErrorDetails.PowerShell.cs index f3477cef6a75..7809d407a75b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncErrorDetails.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncErrorDetails.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class SyncErrorDetails partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SyncErrorDetails(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SyncErrorDetails(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,29 +103,29 @@ internal SyncErrorDetails(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("OperationError")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).OperationError = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails) content.GetValueForProperty("OperationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).OperationError, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogErrorDetailsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).OperationError = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails) content.GetValueForProperty("OperationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).OperationError, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogErrorDetailsTypeConverter.ConvertFrom); } if (content.Contains("Conflict")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).Conflict = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError[]) content.GetValueForProperty("Conflict",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).Conflict, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogConflictErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).Conflict = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError[]) content.GetValueForProperty("Conflict",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).Conflict, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogConflictErrorTypeConverter.ConvertFrom)); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError[]) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).Error, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogSyncErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError[]) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).Error, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogSyncErrorTypeConverter.ConvertFrom)); } if (content.Contains("OperationErrorCode")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).OperationErrorCode = (string) content.GetValueForProperty("OperationErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).OperationErrorCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).OperationErrorCode = (string) content.GetValueForProperty("OperationErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).OperationErrorCode, global::System.Convert.ToString); } if (content.Contains("OperationErrorMessage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).OperationErrorMessage = (string) content.GetValueForProperty("OperationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).OperationErrorMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).OperationErrorMessage = (string) content.GetValueForProperty("OperationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).OperationErrorMessage, 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. @@ -140,23 +140,23 @@ internal SyncErrorDetails(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("OperationError")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).OperationError = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails) content.GetValueForProperty("OperationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).OperationError, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogErrorDetailsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).OperationError = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails) content.GetValueForProperty("OperationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).OperationError, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogErrorDetailsTypeConverter.ConvertFrom); } if (content.Contains("Conflict")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).Conflict = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError[]) content.GetValueForProperty("Conflict",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).Conflict, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogConflictErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).Conflict = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError[]) content.GetValueForProperty("Conflict",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).Conflict, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogConflictErrorTypeConverter.ConvertFrom)); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError[]) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).Error, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogSyncErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError[]) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).Error, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogSyncErrorTypeConverter.ConvertFrom)); } if (content.Contains("OperationErrorCode")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).OperationErrorCode = (string) content.GetValueForProperty("OperationErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).OperationErrorCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).OperationErrorCode = (string) content.GetValueForProperty("OperationErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).OperationErrorCode, global::System.Convert.ToString); } if (content.Contains("OperationErrorMessage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).OperationErrorMessage = (string) content.GetValueForProperty("OperationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal)this).OperationErrorMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).OperationErrorMessage = (string) content.GetValueForProperty("OperationErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal)this).OperationErrorMessage, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncErrorDetails.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncErrorDetails.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncErrorDetails.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncErrorDetails.TypeConverter.cs index 55a1885ef51d..a88e0590b000 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncErrorDetails.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncErrorDetails.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncErrorDetails.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncErrorDetails.cs similarity index 79% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncErrorDetails.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncErrorDetails.cs index 4166112da275..f2a9b8f7ab26 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncErrorDetails.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncErrorDetails.cs @@ -3,53 +3,53 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Synchronization error details. public partial class SyncErrorDetails : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError[] _conflict; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError[] _conflict; /// Catalog items that have conflicting names. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError[] Conflict { get => this._conflict; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError[] Conflict { get => this._conflict; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError[] _error; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError[] _error; /// Errors that occured during synchronization. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError[] Error { get => this._error; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError[] Error { get => this._error; } /// Internal Acessors for Conflict - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal.Conflict { get => this._conflict; set { {_conflict = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal.Conflict { get => this._conflict; set { {_conflict = value;} } } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal.Error { get => this._error; set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal.Error { get => this._error; set { {_error = value;} } } /// Internal Acessors for OperationError - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetailsInternal.OperationError { get => (this._operationError = this._operationError ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogErrorDetails()); set { {_operationError = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetailsInternal.OperationError { get => (this._operationError = this._operationError ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogErrorDetails()); set { {_operationError = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails _operationError; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails _operationError; /// Error information for the overall synchronization operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails OperationError { get => (this._operationError = this._operationError ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogErrorDetails()); } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails OperationError { get => (this._operationError = this._operationError ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogErrorDetails()); } /// An identifier for the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string OperationErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetailsInternal)OperationError).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetailsInternal)OperationError).Code = value ?? null; } + public string OperationErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetailsInternal)OperationError).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetailsInternal)OperationError).Code = value ?? null; } /// A message describing the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string OperationErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetailsInternal)OperationError).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetailsInternal)OperationError).Message = value ?? null; } + public string OperationErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetailsInternal)OperationError).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetailsInternal)OperationError).Message = value ?? null; } /// Creates an new instance. public SyncErrorDetails() @@ -67,16 +67,16 @@ public partial interface ISyncErrorDetails : ReadOnly = true, Description = @"Catalog items that have conflicting names.", SerializedName = @"conflicts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError[] Conflict { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError[] Conflict { get; } /// Errors that occured during synchronization. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, ReadOnly = true, Description = @"Errors that occured during synchronization.", SerializedName = @"errors", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError[] Error { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError[] Error { get; } /// An identifier for the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, @@ -100,11 +100,11 @@ internal partial interface ISyncErrorDetailsInternal { /// Catalog items that have conflicting names. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError[] Conflict { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError[] Conflict { get; set; } /// Errors that occured during synchronization. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError[] Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError[] Error { get; set; } /// Error information for the overall synchronization operation. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails OperationError { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails OperationError { get; set; } /// An identifier for the error. string OperationErrorCode { get; set; } /// A message describing the error. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncErrorDetails.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncErrorDetails.json.cs similarity index 93% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncErrorDetails.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncErrorDetails.json.cs index 0d70888ca741..539272cf1ed9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncErrorDetails.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncErrorDetails.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SyncErrorDetails partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new SyncErrorDetails(json) : null; } @@ -77,9 +77,9 @@ internal SyncErrorDetails(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.J { return; } - {_operationError = If( json?.PropertyT("operationError"), out var __jsonOperationError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogErrorDetails.FromJson(__jsonOperationError) : OperationError;} - {_conflict = If( json?.PropertyT("conflicts"), out var __jsonConflicts) ? If( __jsonConflicts as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogConflictError) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogConflictError.FromJson(__u) )) ))() : null : Conflict;} - {_error = If( json?.PropertyT("errors"), out var __jsonErrors) ? If( __jsonErrors as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogSyncError) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogSyncError.FromJson(__p) )) ))() : null : Error;} + {_operationError = If( json?.PropertyT("operationError"), out var __jsonOperationError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogErrorDetails.FromJson(__jsonOperationError) : OperationError;} + {_conflict = If( json?.PropertyT("conflicts"), out var __jsonConflicts) ? If( __jsonConflicts as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogConflictError) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogConflictError.FromJson(__u) )) ))() : null : Conflict;} + {_error = If( json?.PropertyT("errors"), out var __jsonErrors) ? If( __jsonErrors as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogSyncError) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogSyncError.FromJson(__p) )) ))() : null : Error;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncStats.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncStats.PowerShell.cs similarity index 82% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncStats.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncStats.PowerShell.cs index 37623e3539d7..ee6b66f7b174 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncStats.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncStats.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class SyncStats partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SyncStats(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SyncStats(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,37 +103,37 @@ internal SyncStats(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Added")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Added = (int?) content.GetValueForProperty("Added",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Added, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Added = (int?) content.GetValueForProperty("Added",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Added, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Updated")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Updated = (int?) content.GetValueForProperty("Updated",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Updated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Updated = (int?) content.GetValueForProperty("Updated",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Updated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Unchanged")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Unchanged = (int?) content.GetValueForProperty("Unchanged",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Unchanged, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Unchanged = (int?) content.GetValueForProperty("Unchanged",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Unchanged, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Removed")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Removed = (int?) content.GetValueForProperty("Removed",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Removed, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Removed = (int?) content.GetValueForProperty("Removed",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Removed, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("ValidationError")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).ValidationError = (int?) content.GetValueForProperty("ValidationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).ValidationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).ValidationError = (int?) content.GetValueForProperty("ValidationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).ValidationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("SynchronizationError")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).SynchronizationError = (int?) content.GetValueForProperty("SynchronizationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).SynchronizationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).SynchronizationError = (int?) content.GetValueForProperty("SynchronizationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).SynchronizationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("SyncedCatalogItemType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).SyncedCatalogItemType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("SyncedCatalogItemType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).SyncedCatalogItemType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).SyncedCatalogItemType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("SyncedCatalogItemType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).SyncedCatalogItemType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); } 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. @@ -148,31 +148,31 @@ internal SyncStats(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Added")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Added = (int?) content.GetValueForProperty("Added",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Added, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Added = (int?) content.GetValueForProperty("Added",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Added, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Updated")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Updated = (int?) content.GetValueForProperty("Updated",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Updated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Updated = (int?) content.GetValueForProperty("Updated",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Updated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Unchanged")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Unchanged = (int?) content.GetValueForProperty("Unchanged",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Unchanged, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Unchanged = (int?) content.GetValueForProperty("Unchanged",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Unchanged, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Removed")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Removed = (int?) content.GetValueForProperty("Removed",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).Removed, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Removed = (int?) content.GetValueForProperty("Removed",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).Removed, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("ValidationError")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).ValidationError = (int?) content.GetValueForProperty("ValidationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).ValidationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).ValidationError = (int?) content.GetValueForProperty("ValidationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).ValidationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("SynchronizationError")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).SynchronizationError = (int?) content.GetValueForProperty("SynchronizationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).SynchronizationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).SynchronizationError = (int?) content.GetValueForProperty("SynchronizationError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).SynchronizationError, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("SyncedCatalogItemType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).SyncedCatalogItemType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("SyncedCatalogItemType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal)this).SyncedCatalogItemType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).SyncedCatalogItemType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType[]) content.GetValueForProperty("SyncedCatalogItemType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal)this).SyncedCatalogItemType, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType.CreateFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncStats.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncStats.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncStats.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncStats.TypeConverter.cs index a7ee8369319e..c85e3d8ae6e3 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncStats.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncStats.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncStats.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncStats.cs similarity index 95% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncStats.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncStats.cs index cec4fe29ea39..2a69aff06685 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncStats.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncStats.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Stats of the synchronization. public partial class SyncStats : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal { /// Backing field for property. @@ -21,22 +21,22 @@ public partial class SyncStats : public int? Added { get => this._added; } /// Internal Acessors for Added - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal.Added { get => this._added; set { {_added = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal.Added { get => this._added; set { {_added = value;} } } /// Internal Acessors for Removed - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal.Removed { get => this._removed; set { {_removed = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal.Removed { get => this._removed; set { {_removed = value;} } } /// Internal Acessors for SynchronizationError - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal.SynchronizationError { get => this._synchronizationError; set { {_synchronizationError = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal.SynchronizationError { get => this._synchronizationError; set { {_synchronizationError = value;} } } /// Internal Acessors for Unchanged - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal.Unchanged { get => this._unchanged; set { {_unchanged = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal.Unchanged { get => this._unchanged; set { {_unchanged = value;} } } /// Internal Acessors for Updated - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal.Updated { get => this._updated; set { {_updated = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal.Updated { get => this._updated; set { {_updated = value;} } } /// Internal Acessors for ValidationError - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStatsInternal.ValidationError { get => this._validationError; set { {_validationError = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStatsInternal.ValidationError { get => this._validationError; set { {_validationError = value;} } } /// Backing field for property. private int? _removed; diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncStats.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncStats.json.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncStats.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncStats.json.cs index 4d1c5f410322..c271fb3ad6a1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/SyncStats.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/SyncStats.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SyncStats partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncStats FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncStats FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new SyncStats(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Tags.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Tags.PowerShell.cs similarity index 92% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Tags.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Tags.PowerShell.cs index 0b3065365eeb..3afd7921da72 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Tags.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Tags.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class Tags partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Tags(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Tags(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -107,7 +107,7 @@ internal Tags(global::System.Collections.IDictionary content) } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Tags.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Tags.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Tags.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Tags.TypeConverter.cs index d50a519bc48e..eb3a49565759 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Tags.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Tags.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Tags.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Tags.cs similarity index 94% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Tags.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Tags.cs index 09aa4063c75c..fe0f9c5a39cc 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Tags.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Tags.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Resource tags. public partial class Tags : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITagsInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITagsInternal { /// Creates an new instance. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Tags.dictionary.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Tags.dictionary.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Tags.dictionary.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Tags.dictionary.cs index eeb1f6abb7d2..b81d056e6d28 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Tags.dictionary.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Tags.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Tags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Tags.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Tags.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Tags.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Tags.json.cs index 47f12996ed9f..f4d917f7a359 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Tags.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Tags.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Tags partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Tags(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/TrackedResourceUpdate.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/TrackedResourceUpdate.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/TrackedResourceUpdate.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/TrackedResourceUpdate.PowerShell.cs index 5b85ab6b299f..c9107af9f48a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/TrackedResourceUpdate.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/TrackedResourceUpdate.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class TrackedResourceUpdate partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TrackedResourceUpdate(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TrackedResourceUpdate(content); } @@ -87,7 +87,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -95,7 +95,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -110,17 +110,17 @@ internal TrackedResourceUpdate(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, 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. @@ -135,11 +135,11 @@ internal TrackedResourceUpdate(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.TagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.TagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal)this).Location, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/TrackedResourceUpdate.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/TrackedResourceUpdate.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/TrackedResourceUpdate.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/TrackedResourceUpdate.TypeConverter.cs index 3f9fd4d0679d..ef0fc1e8763a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/TrackedResourceUpdate.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/TrackedResourceUpdate.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/TrackedResourceUpdate.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/TrackedResourceUpdate.cs similarity index 88% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/TrackedResourceUpdate.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/TrackedResourceUpdate.cs index 7920f79c2873..73c0238f91e2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/TrackedResourceUpdate.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/TrackedResourceUpdate.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Base tracked resource type for PATCH updates public partial class TrackedResourceUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdateInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdateInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class TrackedResourceUpdate : public string Location { get => this._location; set => this._location = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags _tag; /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Tags()); set => this._tag = value; } /// Creates an new instance. public TrackedResourceUpdate() @@ -51,8 +51,8 @@ public partial interface ITrackedResourceUpdate : ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get; set; } } /// Base tracked resource type for PATCH updates @@ -62,7 +62,7 @@ internal partial interface ITrackedResourceUpdateInternal /// The geo-location where the resource lives string Location { get; set; } /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/TrackedResourceUpdate.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/TrackedResourceUpdate.json.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/TrackedResourceUpdate.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/TrackedResourceUpdate.json.cs index efa57ecd3a78..701990bab00b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/TrackedResourceUpdate.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/TrackedResourceUpdate.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TrackedResourceUpdate partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITrackedResourceUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITrackedResourceUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new TrackedResourceUpdate(json) : null; } @@ -102,7 +102,7 @@ internal TrackedResourceUpdate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runt { return; } - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Tags.FromJson(__jsonTags) : Tag;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Tags.FromJson(__jsonTags) : Tag;} {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Usage.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Usage.PowerShell.cs similarity index 80% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Usage.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Usage.PowerShell.cs index a20721947412..739ea5e8a3f0 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Usage.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Usage.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class Usage partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Usage(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Usage(content); } @@ -85,7 +85,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -108,37 +108,37 @@ internal Usage(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.UsageNameTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.UsageNameTypeConverter.ConvertFrom); } if (content.Contains("CurrentValue")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).CurrentValue = (long?) content.GetValueForProperty("CurrentValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).CurrentValue, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).CurrentValue = (long?) content.GetValueForProperty("CurrentValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).CurrentValue, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("Limit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Limit = (long?) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Limit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Limit = (long?) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Limit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("Unit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Unit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UsageUnit?) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Unit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UsageUnit.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Unit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UsageUnit?) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Unit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UsageUnit.CreateFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("NameLocalizedValue")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).NameLocalizedValue, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).NameLocalizedValue, global::System.Convert.ToString); } if (content.Contains("NameValue")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).NameValue, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).NameValue, 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. @@ -153,31 +153,31 @@ internal Usage(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.UsageNameTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.UsageNameTypeConverter.ConvertFrom); } if (content.Contains("CurrentValue")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).CurrentValue = (long?) content.GetValueForProperty("CurrentValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).CurrentValue, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).CurrentValue = (long?) content.GetValueForProperty("CurrentValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).CurrentValue, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("Limit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Limit = (long?) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Limit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Limit = (long?) content.GetValueForProperty("Limit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Limit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("Unit")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Unit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UsageUnit?) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Unit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UsageUnit.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Unit = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UsageUnit?) content.GetValueForProperty("Unit",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Unit, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UsageUnit.CreateFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("NameLocalizedValue")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).NameLocalizedValue, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).NameLocalizedValue = (string) content.GetValueForProperty("NameLocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).NameLocalizedValue, global::System.Convert.ToString); } if (content.Contains("NameValue")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal)this).NameValue, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).NameValue = (string) content.GetValueForProperty("NameValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal)this).NameValue, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Usage.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Usage.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Usage.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Usage.TypeConverter.cs index 6ebb7b6f3664..a7a56e75b6a2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Usage.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Usage.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Usage.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Usage.cs similarity index 90% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Usage.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Usage.cs index d81816cec000..86c1f2bd24c0 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Usage.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Usage.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// The core usage details. public partial class Usage : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal { /// Backing field for property. @@ -35,22 +35,22 @@ public partial class Usage : public long? Limit { get => this._limit; set => this._limit = value; } /// Internal Acessors for Name - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageName Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageInternal.Name { get => (this._name = this._name ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.UsageName()); set { {_name = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageName Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageInternal.Name { get => (this._name = this._name ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.UsageName()); set { {_name = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageName _name; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageName _name; /// The name. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageName Name { get => (this._name = this._name ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.UsageName()); set => this._name = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageName Name { get => (this._name = this._name ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.UsageName()); set => this._name = value; } /// The localized name of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageNameInternal)Name).LocalizedValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageNameInternal)Name).LocalizedValue = value ?? null; } + public string NameLocalizedValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageNameInternal)Name).LocalizedValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageNameInternal)Name).LocalizedValue = value ?? null; } /// The name of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string NameValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageNameInternal)Name).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageNameInternal)Name).Value = value ?? null; } + public string NameValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageNameInternal)Name).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageNameInternal)Name).Value = value ?? null; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UsageUnit? _unit; @@ -130,7 +130,7 @@ internal partial interface IUsageInternal /// The limit integer. long? Limit { get; set; } /// The name. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageName Name { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageName Name { get; set; } /// The localized name of the resource. string NameLocalizedValue { get; set; } /// The name of the resource. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Usage.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Usage.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Usage.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Usage.json.cs index 202bac50a894..1e4398e2e102 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/Usage.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/Usage.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Usage partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Usage(json) : null; } @@ -105,7 +105,7 @@ internal Usage(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObj { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.UsageName.FromJson(__jsonName) : Name;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.UsageName.FromJson(__jsonName) : Name;} {_currentValue = If( json?.PropertyT("currentValue"), out var __jsonCurrentValue) ? (long?)__jsonCurrentValue : CurrentValue;} {_limit = If( json?.PropertyT("limit"), out var __jsonLimit) ? (long?)__jsonLimit : Limit;} {_unit = If( json?.PropertyT("unit"), out var __jsonUnit) ? (string)__jsonUnit : (string)Unit;} diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UsageName.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UsageName.PowerShell.cs similarity index 87% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UsageName.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UsageName.PowerShell.cs index a6fec0837743..c3498b8a8a03 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UsageName.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UsageName.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class UsageName partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageName DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageName DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UsageName(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageName DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageName DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UsageName(content); } @@ -85,7 +85,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageName FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageName FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -108,17 +108,17 @@ internal UsageName(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("LocalizedValue")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageNameInternal)this).LocalizedValue = (string) content.GetValueForProperty("LocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageNameInternal)this).LocalizedValue, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageNameInternal)this).LocalizedValue = (string) content.GetValueForProperty("LocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageNameInternal)this).LocalizedValue, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageNameInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageNameInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageNameInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageNameInternal)this).Value, 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. @@ -133,11 +133,11 @@ internal UsageName(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("LocalizedValue")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageNameInternal)this).LocalizedValue = (string) content.GetValueForProperty("LocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageNameInternal)this).LocalizedValue, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageNameInternal)this).LocalizedValue = (string) content.GetValueForProperty("LocalizedValue",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageNameInternal)this).LocalizedValue, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageNameInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageNameInternal)this).Value, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageNameInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageNameInternal)this).Value, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UsageName.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UsageName.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UsageName.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UsageName.TypeConverter.cs index b22b04c4d1b1..22ec3a1c3c94 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UsageName.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UsageName.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageName ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageName ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageName).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageName).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UsageName.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UsageName.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UsageName.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UsageName.cs index 5ab25c6addd1..15550c9c932e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UsageName.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UsageName.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// The Usage Names. public partial class UsageName : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageName, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageNameInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageName, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageNameInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UsageName.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UsageName.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UsageName.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UsageName.json.cs index 7b78ac213d4e..843a6cde4115 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UsageName.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UsageName.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class UsageName partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageName. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageName. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageName. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageName. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsageName FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsageName FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new UsageName(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentRoles.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentRoles.PowerShell.cs similarity index 92% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentRoles.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentRoles.PowerShell.cs index 19d527d08b0d..ca7e74f428a0 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentRoles.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentRoles.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class UserRoleAssignmentRoles partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UserRoleAssignmentRoles(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UserRoleAssignmentRoles(content); } @@ -87,7 +87,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -95,7 +95,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -114,7 +114,7 @@ internal UserRoleAssignmentRoles(global::System.Collections.IDictionary content) } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentRoles.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentRoles.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentRoles.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentRoles.TypeConverter.cs index 523574a37a57..29bfbec3caf2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentRoles.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentRoles.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentRoles.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentRoles.cs similarity index 90% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentRoles.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentRoles.cs index 351bc8baf4f8..bd230345c5d9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentRoles.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentRoles.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// A map of roles to assign to the parent user. public partial class UserRoleAssignmentRoles : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRolesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRolesInternal { /// Creates an new instance. @@ -22,7 +22,7 @@ public UserRoleAssignmentRoles() /// A map of roles to assign to the parent user. public partial interface IUserRoleAssignmentRoles : Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray { } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentRoles.dictionary.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentRoles.dictionary.cs similarity index 80% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentRoles.dictionary.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentRoles.dictionary.cs index 1b9cba7dad09..ebcc6bb80d05 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentRoles.dictionary.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentRoles.dictionary.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; public partial class UserRoleAssignmentRoles : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - int Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + int Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRole this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRole this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } /// /// - public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRole value) => __additionalProperties.Add( key, value); + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRole value) => __additionalProperties.Add( key, value); public void Clear() => __additionalProperties.Clear(); @@ -40,7 +40,7 @@ public void CopyFrom(global::System.Collections.IDictionary source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -55,7 +55,7 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -66,10 +66,10 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// /// - public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentRole value) => __additionalProperties.TryGetValue( key, out value); + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentRole value) => __additionalProperties.TryGetValue( key, out value); /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.UserRoleAssignmentRoles source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.UserRoleAssignmentRoles source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentRoles.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentRoles.json.cs similarity index 94% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentRoles.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentRoles.json.cs index 01d67fda5baf..c18c940e463c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentRoles.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentRoles.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class UserRoleAssignmentRoles partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new UserRoleAssignmentRoles(json) : null; } @@ -84,7 +84,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson { return container; } - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, container); + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, container); AfterToJson(ref container); return container; } @@ -102,7 +102,7 @@ internal UserRoleAssignmentRoles(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Ru { return; } - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentRole.FromJson(j) ,exclusions ); + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentRole.FromJson(j) ,exclusions ); AfterFromJson(json); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentValue.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentValue.PowerShell.cs similarity index 87% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentValue.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentValue.PowerShell.cs index dc5bd4e8c6ee..385c1f322a4f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentValue.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentValue.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class UserRoleAssignmentValue partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValue DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValue DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UserRoleAssignmentValue(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValue DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValue DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UserRoleAssignmentValue(content); } @@ -87,7 +87,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValue FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValue FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -95,7 +95,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Pre public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -110,13 +110,13 @@ internal UserRoleAssignmentValue(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Role")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValueInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValueInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.UserRoleAssignmentRolesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValueInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValueInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.UserRoleAssignmentRolesTypeConverter.ConvertFrom); } 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. @@ -131,7 +131,7 @@ internal UserRoleAssignmentValue(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("Role")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValueInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValueInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.UserRoleAssignmentRolesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValueInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValueInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.UserRoleAssignmentRolesTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentValue.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentValue.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentValue.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentValue.TypeConverter.cs index 428711f09167..bead144fb62a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentValue.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentValue.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValue ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValue ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValue).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValue).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentValue.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentValue.cs similarity index 83% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentValue.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentValue.cs index 5c47bdc14e21..5dafb2dd623a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentValue.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentValue.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// Mapping of user object ID to role assignments. public partial class UserRoleAssignmentValue : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValue, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValueInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValue, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValueInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles _role; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles _role; /// A map of roles to assign to the parent user. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles Role { get => (this._role = this._role ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.UserRoleAssignmentRoles()); set => this._role = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles Role { get => (this._role = this._role ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.UserRoleAssignmentRoles()); set => this._role = value; } /// Creates an new instance. public UserRoleAssignmentValue() @@ -36,8 +36,8 @@ public partial interface IUserRoleAssignmentValue : ReadOnly = false, Description = @"A map of roles to assign to the parent user.", SerializedName = @"roles", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles Role { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles Role { get; set; } } /// Mapping of user object ID to role assignments. @@ -45,7 +45,7 @@ internal partial interface IUserRoleAssignmentValueInternal { /// A map of roles to assign to the parent user. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentRoles Role { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentRoles Role { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentValue.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentValue.json.cs similarity index 96% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentValue.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentValue.json.cs index abd2420b6ab7..38f754ca8e5d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20240501Preview/UserRoleAssignmentValue.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/UserRoleAssignmentValue.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class UserRoleAssignmentValue partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValue. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValue. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValue. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValue. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUserRoleAssignmentValue FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUserRoleAssignmentValue FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new UserRoleAssignmentValue(json) : null; } @@ -101,7 +101,7 @@ internal UserRoleAssignmentValue(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Ru { return; } - {_role = If( json?.PropertyT("roles"), out var __jsonRoles) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.UserRoleAssignmentRoles.FromJson(__jsonRoles) : Role;} + {_role = If( json?.PropertyT("roles"), out var __jsonRoles) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.UserRoleAssignmentRoles.FromJson(__jsonRoles) : Role;} AfterFromJson(json); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/WorkspaceStorageSettings.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/WorkspaceStorageSettings.PowerShell.cs new file mode 100644 index 000000000000..330aacd273e5 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/WorkspaceStorageSettings.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Settings to be used for workspace storage. + [System.ComponentModel.TypeConverter(typeof(WorkspaceStorageSettingsTypeConverter))] + public partial class WorkspaceStorageSettings + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new WorkspaceStorageSettings(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new WorkspaceStorageSettings(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal WorkspaceStorageSettings(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("WorkspaceStorageMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettingsInternal)this).WorkspaceStorageMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode?) content.GetValueForProperty("WorkspaceStorageMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettingsInternal)this).WorkspaceStorageMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal WorkspaceStorageSettings(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("WorkspaceStorageMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettingsInternal)this).WorkspaceStorageMode = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode?) content.GetValueForProperty("WorkspaceStorageMode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettingsInternal)this).WorkspaceStorageMode, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode.CreateFrom); + } + AfterDeserializePSObject(content); + } + } + /// Settings to be used for workspace storage. + [System.ComponentModel.TypeConverter(typeof(WorkspaceStorageSettingsTypeConverter))] + public partial interface IWorkspaceStorageSettings + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/WorkspaceStorageSettings.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/WorkspaceStorageSettings.TypeConverter.cs new file mode 100644 index 000000000000..b29d890e5bec --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/WorkspaceStorageSettings.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class WorkspaceStorageSettingsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return WorkspaceStorageSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return WorkspaceStorageSettings.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return WorkspaceStorageSettings.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/WorkspaceStorageSettings.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/WorkspaceStorageSettings.cs new file mode 100644 index 000000000000..1ab8ea4c13ff --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/WorkspaceStorageSettings.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Settings to be used for workspace storage. + public partial class WorkspaceStorageSettings : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettingsInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode? _workspaceStorageMode; + + /// Indicates whether workspace storage is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode? WorkspaceStorageMode { get => this._workspaceStorageMode; set => this._workspaceStorageMode = value; } + + /// Creates an new instance. + public WorkspaceStorageSettings() + { + + } + } + /// Settings to be used for workspace storage. + public partial interface IWorkspaceStorageSettings : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// Indicates whether workspace storage is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether workspace storage is enabled.", + SerializedName = @"workspaceStorageMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode? WorkspaceStorageMode { get; set; } + + } + /// Settings to be used for workspace storage. + internal partial interface IWorkspaceStorageSettingsInternal + + { + /// Indicates whether workspace storage is enabled. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode? WorkspaceStorageMode { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/WorkspaceStorageSettings.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/WorkspaceStorageSettings.json.cs new file mode 100644 index 000000000000..ece148f96721 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api20250401Preview/WorkspaceStorageSettings.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Settings to be used for workspace storage. + public partial class WorkspaceStorageSettings + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IWorkspaceStorageSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new WorkspaceStorageSettings(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._workspaceStorageMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._workspaceStorageMode.ToString()) : null, "workspaceStorageMode" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal WorkspaceStorageSettings(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_workspaceStorageMode = If( json?.PropertyT("workspaceStorageMode"), out var __jsonWorkspaceStorageMode) ? (string)__jsonWorkspaceStorageMode : (string)WorkspaceStorageMode;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorDetail.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorDetail.PowerShell.cs deleted file mode 100644 index 65b28d3c7f40..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorDetail.PowerShell.cs +++ /dev/null @@ -1,176 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// The error detail. - [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] - public partial class ErrorDetail - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ErrorDetail(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ErrorDetail(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ErrorDetail(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("AdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ErrorDetail(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("AdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The error detail. - [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] - public partial interface IErrorDetail - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorDetail.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorDetail.TypeConverter.cs deleted file mode 100644 index c5ddf997c976..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorDetail.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ErrorDetailTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ErrorDetail.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ErrorDetail.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ErrorDetail.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorDetail.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorDetail.cs deleted file mode 100644 index 76d1cd8d199e..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorDetail.cs +++ /dev/null @@ -1,134 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// The error detail. - public partial class ErrorDetail : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] _additionalInfo; - - /// The error additional info. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } - - /// Backing field for property. - private string _code; - - /// The error code. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string Code { get => this._code; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail[] _detail; - - /// The error details. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail[] Detail { get => this._detail; } - - /// Backing field for property. - private string _message; - - /// The error message. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string Message { get => this._message; } - - /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } - - /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } - - /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } - - /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } - - /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } - - /// Backing field for property. - private string _target; - - /// The error target. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string Target { get => this._target; } - - /// Creates an new instance. - public ErrorDetail() - { - - } - } - /// The error detail. - public partial interface IErrorDetail : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable - { - /// The error additional info. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error additional info.", - SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; } - /// The error code. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error code.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string Code { get; } - /// The error details. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error details.", - SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail[] Detail { get; } - /// The error message. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error message.", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string Message { get; } - /// The error target. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error target.", - SerializedName = @"target", - PossibleTypes = new [] { typeof(string) })] - string Target { get; } - - } - /// The error detail. - internal partial interface IErrorDetailInternal - - { - /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; set; } - /// The error code. - string Code { get; set; } - /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail[] Detail { get; set; } - /// The error message. - string Message { get; set; } - /// The error target. - string Target { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorDetail.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorDetail.json.cs deleted file mode 100644 index 4ad6c98a5a0c..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorDetail.json.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// The error detail. - public partial class ErrorDetail - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorDetail.FromJson(__u) )) ))() : null : Detail;} - {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - if (null != this._detail) - { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); - foreach( var __x in this._detail ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("details",__w); - } - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - if (null != this._additionalInfo) - { - var __r = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); - foreach( var __s in this._additionalInfo ) - { - AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); - } - container.Add("additionalInfo",__r); - } - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorResponse.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorResponse.PowerShell.cs deleted file mode 100644 index cddac0b48b47..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorResponse.PowerShell.cs +++ /dev/null @@ -1,188 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - /// the OData error response format.). - /// - [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] - public partial class ErrorResponse - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ErrorResponse(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ErrorResponse(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ErrorResponse(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("AdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ErrorResponse(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorDetailTypeConverter.ConvertFrom); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("AdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - /// the OData error response format.). - [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] - public partial interface IErrorResponse - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorResponse.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorResponse.TypeConverter.cs deleted file mode 100644 index b72dcaf29f4b..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorResponse.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ErrorResponseTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ErrorResponse.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ErrorResponse.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorResponse.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorResponse.cs deleted file mode 100644 index fe3cf5b01605..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorResponse.cs +++ /dev/null @@ -1,136 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - /// the OData error response format.). - /// - public partial class ErrorResponse : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal - { - - /// The error additional info. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo; } - - /// The error code. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)Error).Code; } - - /// The error details. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)Error).Detail; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail _error; - - /// The error object. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorDetail()); set => this._error = value; } - - /// The error message. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)Error).Message; } - - /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)Error).AdditionalInfo = value; } - - /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)Error).Code = value; } - - /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)Error).Detail = value; } - - /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorDetail()); set { {_error = value;} } } - - /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)Error).Message = value; } - - /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)Error).Target = value; } - - /// The error target. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetailInternal)Error).Target; } - - /// Creates an new instance. - public ErrorResponse() - { - - } - } - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - /// the OData error response format.). - public partial interface IErrorResponse : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable - { - /// The error additional info. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error additional info.", - SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; } - /// The error code. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error code.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string Code { get; } - /// The error details. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error details.", - SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail[] Detail { get; } - /// The error message. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error message.", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string Message { get; } - /// The error target. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error target.", - SerializedName = @"target", - PossibleTypes = new [] { typeof(string) })] - string Target { get; } - - } - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - /// the OData error response format.). - internal partial interface IErrorResponseInternal - - { - /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; set; } - /// The error code. - string Code { get; set; } - /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail[] Detail { get; set; } - /// The error object. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorDetail Error { get; set; } - /// The error message. - string Message { get; set; } - /// The error target. - string Target { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorResponse.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorResponse.json.cs deleted file mode 100644 index 7b33096acf55..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ErrorResponse.json.cs +++ /dev/null @@ -1,111 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - /// the OData error response format.). - /// - public partial class ErrorResponse - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ErrorDetail.FromJson(__jsonError) : Error;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ProxyResource.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ProxyResource.PowerShell.cs deleted file mode 100644 index 934950172e3c..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ProxyResource.PowerShell.cs +++ /dev/null @@ -1,218 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location - /// - [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] - public partial class ProxyResource - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ProxyResource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ProxyResource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ProxyResource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ProxyResource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location - [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] - public partial interface IProxyResource - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ProxyResource.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ProxyResource.TypeConverter.cs deleted file mode 100644 index cf5e45080011..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ProxyResource.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ProxyResourceTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IProxyResource ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IProxyResource).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ProxyResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ProxyResource.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ProxyResource.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ProxyResource.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ProxyResource.cs deleted file mode 100644 index b2a33f5fdf9d..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ProxyResource.cs +++ /dev/null @@ -1,112 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location - /// - public partial class ProxyResource : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IProxyResource, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IProxyResourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(); - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public ProxyResource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location - public partial interface IProxyResource : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource - { - - } - /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location - internal partial interface IProxyResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ProxyResource.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ProxyResource.json.cs deleted file mode 100644 index 5584893f8c1b..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/ProxyResource.json.cs +++ /dev/null @@ -1,110 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location - /// - public partial class ProxyResource - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IProxyResource. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IProxyResource. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(json); - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __resource?.ToJson(container, serializationMode); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Resource.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Resource.PowerShell.cs deleted file mode 100644 index a1a399610152..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Resource.PowerShell.cs +++ /dev/null @@ -1,218 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// Common fields that are returned in the response for all Azure Resource Manager resources - /// - [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] - public partial class Resource - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Resource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Resource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Resource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Resource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Common fields that are returned in the response for all Azure Resource Manager resources - [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] - public partial interface IResource - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Resource.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Resource.TypeConverter.cs deleted file mode 100644 index 682873a86bbb..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Resource.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ResourceTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return Resource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return Resource.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return Resource.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Resource.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Resource.cs deleted file mode 100644 index e9d538c336d9..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Resource.cs +++ /dev/null @@ -1,208 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// Common fields that are returned in the response for all Azure Resource Manager resources - /// - public partial class Resource : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal - { - - /// Backing field for property. - private string _id; - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string Id { get => this._id; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => this._id; set { {_id = value;} } } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => this._name; set { {_name = value;} } } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemData()); set { {_systemData = value;} } } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => this._type; set { {_type = value;} } } - - /// Backing field for property. - private string _name; - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData _systemData; - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemData()); } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// Backing field for property. - private string _type; - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string Type { get => this._type; } - - /// Creates an new instance. - public Resource() - { - - } - } - /// Common fields that are returned in the response for all Azure Resource Manager resources - public partial interface IResource : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable - { - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Fully qualified resource ID for the resource. E.g. ""/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}""", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string Id { get; } - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The name of the resource", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The timestamp of resource creation (UTC).", - SerializedName = @"createdAt", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The identity that created the resource.", - SerializedName = @"createdBy", - PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of identity that created the resource.", - SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get; set; } - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The timestamp of resource last modification (UTC)", - SerializedName = @"lastModifiedAt", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The identity that last modified the resource.", - SerializedName = @"lastModifiedBy", - PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of identity that last modified the resource.", - SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string Type { get; } - - } - /// Common fields that are returned in the response for all Azure Resource Manager resources - internal partial interface IResourceInternal - - { - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - string Id { get; set; } - /// The name of the resource - string Name { get; set; } - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get; set; } - /// The timestamp of resource creation (UTC). - global::System.DateTime? SystemDataCreatedAt { get; set; } - /// The identity that created the resource. - string SystemDataCreatedBy { get; set; } - /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get; set; } - /// The timestamp of resource last modification (UTC) - global::System.DateTime? SystemDataLastModifiedAt { get; set; } - /// The identity that last modified the resource. - string SystemDataLastModifiedBy { get; set; } - /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - string Type { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Resource.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Resource.json.cs deleted file mode 100644 index 7430044b8687..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Resource.json.cs +++ /dev/null @@ -1,128 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// Common fields that are returned in the response for all Azure Resource Manager resources - /// - public partial class Resource - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Resource(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal Resource(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemData.FromJson(__jsonSystemData) : SystemData;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/SystemData.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/SystemData.PowerShell.cs deleted file mode 100644 index 457b84fd8128..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/SystemData.PowerShell.cs +++ /dev/null @@ -1,184 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Metadata pertaining to creation and last modification of the resource. - [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] - public partial class SystemData - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SystemData(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SystemData(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SystemData(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); - } - if (content.Contains("CreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("LastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("LastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SystemData(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); - } - if (content.Contains("CreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("LastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("LastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Metadata pertaining to creation and last modification of the resource. - [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] - public partial interface ISystemData - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/SystemData.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/SystemData.TypeConverter.cs deleted file mode 100644 index 07d87748921d..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/SystemData.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class SystemDataTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return SystemData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return SystemData.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return SystemData.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/SystemData.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/SystemData.cs deleted file mode 100644 index 0fc8922a4640..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/SystemData.cs +++ /dev/null @@ -1,136 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Metadata pertaining to creation and last modification of the resource. - public partial class SystemData : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemDataInternal - { - - /// Backing field for property. - private global::System.DateTime? _createdAt; - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public global::System.DateTime? CreatedAt { get => this._createdAt; set => this._createdAt = value; } - - /// Backing field for property. - private string _createdBy; - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? _createdByType; - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? CreatedByType { get => this._createdByType; set => this._createdByType = value; } - - /// Backing field for property. - private global::System.DateTime? _lastModifiedAt; - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public global::System.DateTime? LastModifiedAt { get => this._lastModifiedAt; set => this._lastModifiedAt = value; } - - /// Backing field for property. - private string _lastModifiedBy; - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? _lastModifiedByType; - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } - - /// Creates an new instance. - public SystemData() - { - - } - } - /// Metadata pertaining to creation and last modification of the resource. - public partial interface ISystemData : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable - { - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The timestamp of resource creation (UTC).", - SerializedName = @"createdAt", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? CreatedAt { get; set; } - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The identity that created the resource.", - SerializedName = @"createdBy", - PossibleTypes = new [] { typeof(string) })] - string CreatedBy { get; set; } - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of identity that created the resource.", - SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? CreatedByType { get; set; } - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The timestamp of resource last modification (UTC)", - SerializedName = @"lastModifiedAt", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? LastModifiedAt { get; set; } - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The identity that last modified the resource.", - SerializedName = @"lastModifiedBy", - PossibleTypes = new [] { typeof(string) })] - string LastModifiedBy { get; set; } - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of identity that last modified the resource.", - SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? LastModifiedByType { get; set; } - - } - /// Metadata pertaining to creation and last modification of the resource. - internal partial interface ISystemDataInternal - - { - /// The timestamp of resource creation (UTC). - global::System.DateTime? CreatedAt { get; set; } - /// The identity that created the resource. - string CreatedBy { get; set; } - /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? CreatedByType { get; set; } - /// The timestamp of resource last modification (UTC) - global::System.DateTime? LastModifiedAt { get; set; } - /// The identity that last modified the resource. - string LastModifiedBy { get; set; } - /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? LastModifiedByType { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/SystemData.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/SystemData.json.cs deleted file mode 100644 index 717b4d001fce..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/SystemData.json.cs +++ /dev/null @@ -1,118 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Metadata pertaining to creation and last modification of the resource. - public partial class SystemData - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new SystemData(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy;} - {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType;} - {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} - {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy;} - {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType;} - {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add ); - AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add ); - AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); - AddIf( null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy" ,container.Add ); - AddIf( null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType" ,container.Add ); - AddIf( null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResource.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResource.PowerShell.cs deleted file mode 100644 index 19333dffff18..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResource.PowerShell.cs +++ /dev/null @@ -1,234 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' - /// - [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] - public partial class TrackedResource - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new TrackedResource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new TrackedResource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal TrackedResource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, 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 TrackedResource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)this).Type, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - } - /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' - [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] - public partial interface ITrackedResource - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResource.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResource.TypeConverter.cs deleted file mode 100644 index 183761390362..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResource.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class TrackedResourceTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return TrackedResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return TrackedResource.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return TrackedResource.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResource.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResource.cs deleted file mode 100644 index 5dbb471b66a1..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResource.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' - /// - public partial class TrackedResource : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(); - - /// - /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; } - - /// Backing field for property. - private string _location; - - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string Location { get => this._location; set => this._location = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Name; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags _tag; - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTags()); set => this._tag = value; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public TrackedResource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' - public partial interface ITrackedResource : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResource - { - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - string Location { get; set; } - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get; set; } - - } - /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' - internal partial interface ITrackedResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IResourceInternal - { - /// The geo-location where the resource lives - string Location { get; set; } - /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResource.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResource.json.cs deleted file mode 100644 index fcad6a03c2f4..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResource.json.cs +++ /dev/null @@ -1,114 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// - /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' - /// - public partial class TrackedResource - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __resource?.ToJson(container, serializationMode); - AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); - AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); - AfterToJson(ref container); - return container; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.Resource(json); - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTags.FromJson(__jsonTags) : Tag;} - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} - AfterFromJson(json); - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResourceTags.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResourceTags.PowerShell.cs deleted file mode 100644 index 678e657626c7..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResourceTags.PowerShell.cs +++ /dev/null @@ -1,140 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// Resource tags. - [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] - public partial class TrackedResourceTags - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new TrackedResourceTags(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new TrackedResourceTags(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal TrackedResourceTags(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - // this type is a dictionary; copy elements from source to here. - CopyFrom(content); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal TrackedResourceTags(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - // this type is a dictionary; copy elements from source to here. - CopyFrom(content); - AfterDeserializePSObject(content); - } - } - /// Resource tags. - [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] - public partial interface ITrackedResourceTags - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResourceTags.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResourceTags.TypeConverter.cs deleted file mode 100644 index d4ce782bd5ad..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResourceTags.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class TrackedResourceTagsTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return TrackedResourceTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return TrackedResourceTags.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return TrackedResourceTags.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResourceTags.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResourceTags.cs deleted file mode 100644 index 82e3747e5120..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResourceTags.cs +++ /dev/null @@ -1,35 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Resource tags. - public partial class TrackedResourceTags : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTagsInternal - { - - /// Creates an new instance. - public TrackedResourceTags() - { - - } - } - /// Resource tags. - public partial interface ITrackedResourceTags : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray - { - - } - /// Resource tags. - internal partial interface ITrackedResourceTagsInternal - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResourceTags.dictionary.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResourceTags.dictionary.cs deleted file mode 100644 index bece6517d667..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResourceTags.dictionary.cs +++ /dev/null @@ -1,75 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - public partial class TrackedResourceTags : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray - { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - - int Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - - public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } - - /// - /// - public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); - - public void Clear() => __additionalProperties.Clear(); - - /// - public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); - - /// - public void CopyFrom(global::System.Collections.IDictionary source) - { - if (null != source) - { - foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) - { - if ((null != property.Key && null != property.Value)) - { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); - } - } - } - } - - /// - public void CopyFrom(global::System.Management.Automation.PSObject source) - { - if (null != source) - { - foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) - { - if ((null != property.Key && null != property.Value)) - { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); - } - } - } - } - - /// - public bool Remove(global::System.String key) => __additionalProperties.Remove( key); - - /// - /// - public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); - - /// - - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.TrackedResourceTags source) => source.__additionalProperties; - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResourceTags.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResourceTags.json.cs deleted file mode 100644 index 740f200339cc..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/TrackedResourceTags.json.cs +++ /dev/null @@ -1,109 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - - /// Resource tags. - public partial class TrackedResourceTags - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, container); - AfterToJson(ref container); - return container; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. - /// - internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); - AfterFromJson(json); - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorDetail.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorDetail.PowerShell.cs new file mode 100644 index 000000000000..60d94c408d1a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorDetail.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial class ErrorDetail + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorDetail(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorDetail(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial interface IErrorDetail + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorDetail.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorDetail.TypeConverter.cs new file mode 100644 index 000000000000..f353c6caf542 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorDetail.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorDetailTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorDetail.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorDetail.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorDetail.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorDetail.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorDetail.cs new file mode 100644 index 000000000000..4c9f92c40b91 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorDetail.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] _additionalInfo; + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } + + /// Backing field for property. + private string _code; + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Code { get => this._code; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail[] _detail; + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail[] Detail { get => this._detail; } + + /// Backing field for property. + private string _message; + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } + + /// Backing field for property. + private string _target; + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Target { get => this._target; } + + /// Creates an new instance. + public ErrorDetail() + { + + } + } + /// The error detail. + public partial interface IErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail[] Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// The error detail. + internal partial interface IErrorDetailInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail[] Detail { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorDetail.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorDetail.json.cs new file mode 100644 index 000000000000..f2de26e7b127 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorDetail.json.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorDetail.FromJson(__u) )) ))() : null : Detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._additionalInfo) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.XNodeArray(); + foreach( var __s in this._additionalInfo ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("additionalInfo",__r); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorResponse.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorResponse.PowerShell.cs new file mode 100644 index 000000000000..a59d58d7d456 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorResponse.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial class ErrorResponse + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial interface IErrorResponse + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorResponse.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorResponse.TypeConverter.cs new file mode 100644 index 000000000000..7c147f06d468 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorResponse.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorResponse.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorResponse.cs new file mode 100644 index 000000000000..22ec8d37fd47 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorResponse.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail _error; + + /// The error object. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorDetail()); set => this._error = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)Error).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)Error).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorDetail()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)Error).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)Error).Target = value; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetailInternal)Error).Target; } + + /// Creates an new instance. + public ErrorResponse() + { + + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + public partial interface IErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail[] Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + internal partial interface IErrorResponseInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail[] Detail { get; set; } + /// The error object. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorDetail Error { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorResponse.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorResponse.json.cs new file mode 100644 index 000000000000..61e40905bb9f --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ErrorResponse.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ErrorDetail.FromJson(__jsonError) : Error;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ProxyResource.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ProxyResource.PowerShell.cs new file mode 100644 index 000000000000..8c7b18436953 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ProxyResource.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial class ProxyResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProxyResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProxyResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProxyResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProxyResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial interface IProxyResource + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ProxyResource.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ProxyResource.TypeConverter.cs new file mode 100644 index 000000000000..d7745d330851 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ProxyResource.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProxyResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IProxyResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IProxyResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProxyResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ProxyResource.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ProxyResource.cs new file mode 100644 index 000000000000..8ace813a4006 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ProxyResource.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IProxyResource, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IProxyResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProxyResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + public partial interface IProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource + { + + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + internal partial interface IProxyResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ProxyResource.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ProxyResource.json.cs new file mode 100644 index 000000000000..e91fedbd19d0 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/ProxyResource.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IProxyResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IProxyResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Resource.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Resource.PowerShell.cs new file mode 100644 index 000000000000..c12356890e6e --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Resource.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial class Resource + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Resource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Resource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Resource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Resource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial interface IResource + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Resource.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Resource.TypeConverter.cs new file mode 100644 index 000000000000..43308f2a0bf5 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Resource.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Resource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Resource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Resource.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/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Resource.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Resource.cs new file mode 100644 index 000000000000..7c5c2b527742 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Resource.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal + { + + /// Backing field for property. + private string _id; + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData _systemData; + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// Backing field for property. + private string _type; + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public Resource() + { + + } + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + public partial interface IResource : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Fully qualified resource ID for the resource. E.g. ""/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}""", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the resource", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + internal partial interface IResourceInternal + + { + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + string Id { get; set; } + /// The name of the resource + string Name { get; set; } + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Resource.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Resource.json.cs new file mode 100644 index 000000000000..39951b11ed6a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Resource.json.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Resource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal Resource(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemData.FromJson(__jsonSystemData) : SystemData;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Sku.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Sku.PowerShell.cs similarity index 83% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Sku.PowerShell.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Sku.PowerShell.cs index af37676541ef..4e9a36c4ee63 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Sku.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Sku.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class Sku partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Sku(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Sku(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku Des /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. @@ -103,29 +103,29 @@ internal Sku(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Tier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); } if (content.Contains("Size")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Size, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Size, global::System.Convert.ToString); } if (content.Contains("Family")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Family = (string) content.GetValueForProperty("Family",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Family, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Family = (string) content.GetValueForProperty("Family",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Family, global::System.Convert.ToString); } if (content.Contains("Capacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -140,23 +140,23 @@ internal Sku(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Tier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier.CreateFrom); } if (content.Contains("Size")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Size, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Size = (string) content.GetValueForProperty("Size",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Size, global::System.Convert.ToString); } if (content.Contains("Family")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Family = (string) content.GetValueForProperty("Family",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Family, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Family = (string) content.GetValueForProperty("Family",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Family, global::System.Convert.ToString); } if (content.Contains("Capacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Sku.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Sku.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Sku.TypeConverter.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Sku.TypeConverter.cs index 1b341aa4f293..d31d11796c8d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Sku.TypeConverter.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Sku.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 { using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Sku.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Sku.cs similarity index 98% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Sku.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Sku.cs index 62d7cf17a60c..b6d0a2a54233 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Sku.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Sku.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; /// The resource model definition representing SKU public partial class Sku : - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISkuInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISkuInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Sku.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Sku.json.cs similarity index 97% rename from generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Sku.json.cs rename to generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Sku.json.cs index cebdd45c8bb9..cbfede841367 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api40/Sku.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/Sku.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40 +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; @@ -54,11 +54,11 @@ public partial class Sku partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku. /// /// a to deserialize from. - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ISku FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISku FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new Sku(json) : null; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/SystemData.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/SystemData.PowerShell.cs new file mode 100644 index 000000000000..6a8b164ce288 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/SystemData.PowerShell.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial class SystemData + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemData(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemData(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemData(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemData(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial interface ISystemData + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/SystemData.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/SystemData.TypeConverter.cs new file mode 100644 index 000000000000..1e943e5e2640 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/SystemData.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemDataTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/SystemData.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/SystemData.cs new file mode 100644 index 000000000000..88d6b46f4b01 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/SystemData.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemDataInternal + { + + /// Backing field for property. + private global::System.DateTime? _createdAt; + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public global::System.DateTime? CreatedAt { get => this._createdAt; set => this._createdAt = value; } + + /// Backing field for property. + private string _createdBy; + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? _createdByType; + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? CreatedByType { get => this._createdByType; set => this._createdByType = value; } + + /// Backing field for property. + private global::System.DateTime? _lastModifiedAt; + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public global::System.DateTime? LastModifiedAt { get => this._lastModifiedAt; set => this._lastModifiedAt = value; } + + /// Backing field for property. + private string _lastModifiedBy; + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? _lastModifiedByType; + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + + /// Creates an new instance. + public SystemData() + { + + } + } + /// Metadata pertaining to creation and last modification of the resource. + public partial interface ISystemData : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable + { + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string CreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? LastModifiedByType { get; set; } + + } + /// Metadata pertaining to creation and last modification of the resource. + internal partial interface ISystemDataInternal + + { + /// The timestamp of resource creation (UTC). + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + string CreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? LastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/SystemData.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/SystemData.json.cs new file mode 100644 index 000000000000..7f91c31de351 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/SystemData.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new SystemData(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy;} + {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} + {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy;} + {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType;} + {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add ); + AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add ); + AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); + AddIf( null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy" ,container.Add ); + AddIf( null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType" ,container.Add ); + AddIf( null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResource.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResource.PowerShell.cs new file mode 100644 index 000000000000..0287c37285cf --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResource.PowerShell.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial class TrackedResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, 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 TrackedResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial interface ITrackedResource + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResource.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResource.TypeConverter.cs new file mode 100644 index 000000000000..42ae8ce7c1a7 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResource.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResource.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResource.cs new file mode 100644 index 000000000000..e9aaea845b84 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResource.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; } + + /// Backing field for property. + private string _location; + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CreatedByType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTags()); set => this._tag = value; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public TrackedResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + public partial interface ITrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResource + { + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get; set; } + + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + internal partial interface ITrackedResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.IResourceInternal + { + /// The geo-location where the resource lives + string Location { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResource.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResource.json.cs new file mode 100644 index 000000000000..fd55f1360dca --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResource.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.Resource(json); + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTags.FromJson(__jsonTags) : Tag;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResourceTags.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResourceTags.PowerShell.cs new file mode 100644 index 000000000000..f1c28afae8a8 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResourceTags.PowerShell.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial class TrackedResourceTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResourceTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResourceTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResourceTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrackedResourceTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial interface ITrackedResourceTags + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResourceTags.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResourceTags.TypeConverter.cs new file mode 100644 index 000000000000..39cd57157d6b --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResourceTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResourceTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResourceTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResourceTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResourceTags.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResourceTags.cs new file mode 100644 index 000000000000..70dd5cec602a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResourceTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTagsInternal + { + + /// Creates an new instance. + public TrackedResourceTags() + { + + } + } + /// Resource tags. + public partial interface ITrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface ITrackedResourceTagsInternal + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResourceTags.dictionary.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResourceTags.dictionary.cs new file mode 100644 index 000000000000..04e5eafcb4d2 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResourceTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.TrackedResourceTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResourceTags.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResourceTags.json.cs new file mode 100644 index 000000000000..d24883f2d2de --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/Api50/TrackedResourceTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + /// + internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/DevCenterIdentity.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/DevCenterIdentity.PowerShell.cs index 7cde510c9807..8c3c7fd43e84 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/DevCenterIdentity.PowerShell.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/DevCenterIdentity.PowerShell.cs @@ -101,14 +101,6 @@ internal DevCenterIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); } - if (content.Contains("PlanName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).PlanName, global::System.Convert.ToString); - } - if (content.Contains("MemberName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).MemberName = (string) content.GetValueForProperty("MemberName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).MemberName, global::System.Convert.ToString); - } if (content.Contains("DevCenterName")) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).DevCenterName = (string) content.GetValueForProperty("DevCenterName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).DevCenterName, global::System.Convert.ToString); @@ -117,6 +109,10 @@ internal DevCenterIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).EncryptionSetName = (string) content.GetValueForProperty("EncryptionSetName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).EncryptionSetName, global::System.Convert.ToString); } + if (content.Contains("ProjectPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ProjectPolicyName = (string) content.GetValueForProperty("ProjectPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ProjectPolicyName, global::System.Convert.ToString); + } if (content.Contains("ProjectName")) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ProjectName = (string) content.GetValueForProperty("ProjectName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ProjectName, global::System.Convert.ToString); @@ -165,6 +161,14 @@ internal DevCenterIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).TaskName = (string) content.GetValueForProperty("TaskName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).TaskName, global::System.Convert.ToString); } + if (content.Contains("ImageDefinitionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ImageDefinitionName = (string) content.GetValueForProperty("ImageDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ImageDefinitionName, global::System.Convert.ToString); + } + if (content.Contains("BuildName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).BuildName = (string) content.GetValueForProperty("BuildName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).BuildName, global::System.Convert.ToString); + } if (content.Contains("PoolName")) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).PoolName = (string) content.GetValueForProperty("PoolName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).PoolName, global::System.Convert.ToString); @@ -206,14 +210,6 @@ internal DevCenterIdentity(global::System.Management.Automation.PSObject content { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); } - if (content.Contains("PlanName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).PlanName, global::System.Convert.ToString); - } - if (content.Contains("MemberName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).MemberName = (string) content.GetValueForProperty("MemberName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).MemberName, global::System.Convert.ToString); - } if (content.Contains("DevCenterName")) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).DevCenterName = (string) content.GetValueForProperty("DevCenterName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).DevCenterName, global::System.Convert.ToString); @@ -222,6 +218,10 @@ internal DevCenterIdentity(global::System.Management.Automation.PSObject content { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).EncryptionSetName = (string) content.GetValueForProperty("EncryptionSetName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).EncryptionSetName, global::System.Convert.ToString); } + if (content.Contains("ProjectPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ProjectPolicyName = (string) content.GetValueForProperty("ProjectPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ProjectPolicyName, global::System.Convert.ToString); + } if (content.Contains("ProjectName")) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ProjectName = (string) content.GetValueForProperty("ProjectName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ProjectName, global::System.Convert.ToString); @@ -270,6 +270,14 @@ internal DevCenterIdentity(global::System.Management.Automation.PSObject content { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).TaskName = (string) content.GetValueForProperty("TaskName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).TaskName, global::System.Convert.ToString); } + if (content.Contains("ImageDefinitionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ImageDefinitionName = (string) content.GetValueForProperty("ImageDefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).ImageDefinitionName, global::System.Convert.ToString); + } + if (content.Contains("BuildName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).BuildName = (string) content.GetValueForProperty("BuildName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).BuildName, global::System.Convert.ToString); + } if (content.Contains("PoolName")) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).PoolName = (string) content.GetValueForProperty("PoolName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentityInternal)this).PoolName, global::System.Convert.ToString); diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/DevCenterIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/DevCenterIdentity.cs index dd9a9f833368..5950585cce4b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/DevCenterIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/DevCenterIdentity.cs @@ -19,6 +19,13 @@ public partial class DevCenterIdentity : [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] public string AttachedNetworkConnectionName { get => this._attachedNetworkConnectionName; set => this._attachedNetworkConnectionName = value; } + /// Backing field for property. + private string _buildName; + + /// The ID of the Image Definition Build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string BuildName { get => this._buildName; set => this._buildName = value; } + /// Backing field for property. private string _catalogName; @@ -75,6 +82,13 @@ public partial class DevCenterIdentity : [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] public string Id { get => this._id; set => this._id = value; } + /// Backing field for property. + private string _imageDefinitionName; + + /// The name of the Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string ImageDefinitionName { get => this._imageDefinitionName; set => this._imageDefinitionName = value; } + /// Backing field for property. private string _imageName; @@ -89,13 +103,6 @@ public partial class DevCenterIdentity : [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] public string Location { get => this._location; set => this._location = value; } - /// Backing field for property. - private string _memberName; - - /// The name of a devcenter plan member. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string MemberName { get => this._memberName; set => this._memberName = value; } - /// Backing field for property. private string _networkConnectionName; @@ -110,13 +117,6 @@ public partial class DevCenterIdentity : [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] public string OperationId { get => this._operationId; set => this._operationId = value; } - /// Backing field for property. - private string _planName; - - /// The name of the devcenter plan. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] - public string PlanName { get => this._planName; set => this._planName = value; } - /// Backing field for property. private string _poolName; @@ -131,6 +131,13 @@ public partial class DevCenterIdentity : [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] public string ProjectName { get => this._projectName; set => this._projectName = value; } + /// Backing field for property. + private string _projectPolicyName; + + /// The name of the project policy. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string ProjectPolicyName { get => this._projectPolicyName; set => this._projectPolicyName = value; } + /// Backing field for property. private string _resourceGroupName; @@ -183,6 +190,14 @@ public partial interface IDevCenterIdentity : SerializedName = @"attachedNetworkConnectionName", PossibleTypes = new [] { typeof(string) })] string AttachedNetworkConnectionName { get; set; } + /// The ID of the Image Definition Build. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ID of the Image Definition Build.", + SerializedName = @"buildName", + PossibleTypes = new [] { typeof(string) })] + string BuildName { get; set; } /// The name of the Catalog. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, @@ -247,6 +262,14 @@ public partial interface IDevCenterIdentity : SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string Id { get; set; } + /// The name of the Image Definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the Image Definition.", + SerializedName = @"imageDefinitionName", + PossibleTypes = new [] { typeof(string) })] + string ImageDefinitionName { get; set; } /// The name of the image. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, @@ -263,14 +286,6 @@ public partial interface IDevCenterIdentity : SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] string Location { get; set; } - /// The name of a devcenter plan member. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of a devcenter plan member.", - SerializedName = @"memberName", - PossibleTypes = new [] { typeof(string) })] - string MemberName { get; set; } /// Name of the Network Connection that can be applied to a Pool. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, @@ -287,14 +302,6 @@ public partial interface IDevCenterIdentity : SerializedName = @"operationId", PossibleTypes = new [] { typeof(string) })] string OperationId { get; set; } - /// The name of the devcenter plan. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the devcenter plan.", - SerializedName = @"planName", - PossibleTypes = new [] { typeof(string) })] - string PlanName { get; set; } /// Name of the pool. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, @@ -311,6 +318,14 @@ public partial interface IDevCenterIdentity : SerializedName = @"projectName", PossibleTypes = new [] { typeof(string) })] string ProjectName { get; set; } + /// The name of the project policy. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the project policy.", + SerializedName = @"projectPolicyName", + PossibleTypes = new [] { typeof(string) })] + string ProjectPolicyName { get; set; } /// The name of the resource group. The name is case insensitive. [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, @@ -358,6 +373,8 @@ internal partial interface IDevCenterIdentityInternal { /// The name of the attached NetworkConnection. string AttachedNetworkConnectionName { get; set; } + /// The ID of the Image Definition Build. + string BuildName { get; set; } /// The name of the Catalog. string CatalogName { get; set; } /// The name of the Dev Box definition. @@ -374,22 +391,22 @@ internal partial interface IDevCenterIdentityInternal string GalleryName { get; set; } /// Resource identity path string Id { get; set; } + /// The name of the Image Definition. + string ImageDefinitionName { get; set; } /// The name of the image. string ImageName { get; set; } /// The Azure region string Location { get; set; } - /// The name of a devcenter plan member. - string MemberName { get; set; } /// Name of the Network Connection that can be applied to a Pool. string NetworkConnectionName { get; set; } /// The ID of an ongoing async operation string OperationId { get; set; } - /// The name of the devcenter plan. - string PlanName { get; set; } /// Name of the pool. string PoolName { get; set; } /// The name of the project. string ProjectName { get; set; } + /// The name of the project policy. + string ProjectPolicyName { get; set; } /// The name of the resource group. The name is case insensitive. string ResourceGroupName { get; set; } /// The name of the schedule that uniquely identifies it. diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/DevCenterIdentity.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/DevCenterIdentity.json.cs index f19bf6eeb20b..22c3ee4e94a5 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/DevCenterIdentity.json.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/DevCenterIdentity.json.cs @@ -66,10 +66,9 @@ internal DevCenterIdentity(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime. } {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} - {_planName = If( json?.PropertyT("planName"), out var __jsonPlanName) ? (string)__jsonPlanName : (string)PlanName;} - {_memberName = If( json?.PropertyT("memberName"), out var __jsonMemberName) ? (string)__jsonMemberName : (string)MemberName;} {_devCenterName = If( json?.PropertyT("devCenterName"), out var __jsonDevCenterName) ? (string)__jsonDevCenterName : (string)DevCenterName;} {_encryptionSetName = If( json?.PropertyT("encryptionSetName"), out var __jsonEncryptionSetName) ? (string)__jsonEncryptionSetName : (string)EncryptionSetName;} + {_projectPolicyName = If( json?.PropertyT("projectPolicyName"), out var __jsonProjectPolicyName) ? (string)__jsonProjectPolicyName : (string)ProjectPolicyName;} {_projectName = If( json?.PropertyT("projectName"), out var __jsonProjectName) ? (string)__jsonProjectName : (string)ProjectName;} {_attachedNetworkConnectionName = If( json?.PropertyT("attachedNetworkConnectionName"), out var __jsonAttachedNetworkConnectionName) ? (string)__jsonAttachedNetworkConnectionName : (string)AttachedNetworkConnectionName;} {_catalogName = If( json?.PropertyT("catalogName"), out var __jsonCatalogName) ? (string)__jsonCatalogName : (string)CatalogName;} @@ -82,6 +81,8 @@ internal DevCenterIdentity(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime. {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} {_operationId = If( json?.PropertyT("operationId"), out var __jsonOperationId) ? (string)__jsonOperationId : (string)OperationId;} {_taskName = If( json?.PropertyT("taskName"), out var __jsonTaskName) ? (string)__jsonTaskName : (string)TaskName;} + {_imageDefinitionName = If( json?.PropertyT("imageDefinitionName"), out var __jsonImageDefinitionName) ? (string)__jsonImageDefinitionName : (string)ImageDefinitionName;} + {_buildName = If( json?.PropertyT("buildName"), out var __jsonBuildName) ? (string)__jsonBuildName : (string)BuildName;} {_poolName = If( json?.PropertyT("poolName"), out var __jsonPoolName) ? (string)__jsonPoolName : (string)PoolName;} {_scheduleName = If( json?.PropertyT("scheduleName"), out var __jsonScheduleName) ? (string)__jsonScheduleName : (string)ScheduleName;} {_networkConnectionName = If( json?.PropertyT("networkConnectionName"), out var __jsonNetworkConnectionName) ? (string)__jsonNetworkConnectionName : (string)NetworkConnectionName;} @@ -122,10 +123,9 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson } AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); - AddIf( null != (((object)this._planName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._planName.ToString()) : null, "planName" ,container.Add ); - AddIf( null != (((object)this._memberName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._memberName.ToString()) : null, "memberName" ,container.Add ); AddIf( null != (((object)this._devCenterName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._devCenterName.ToString()) : null, "devCenterName" ,container.Add ); AddIf( null != (((object)this._encryptionSetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._encryptionSetName.ToString()) : null, "encryptionSetName" ,container.Add ); + AddIf( null != (((object)this._projectPolicyName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._projectPolicyName.ToString()) : null, "projectPolicyName" ,container.Add ); AddIf( null != (((object)this._projectName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._projectName.ToString()) : null, "projectName" ,container.Add ); AddIf( null != (((object)this._attachedNetworkConnectionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._attachedNetworkConnectionName.ToString()) : null, "attachedNetworkConnectionName" ,container.Add ); AddIf( null != (((object)this._catalogName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._catalogName.ToString()) : null, "catalogName" ,container.Add ); @@ -138,6 +138,8 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); AddIf( null != (((object)this._operationId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._operationId.ToString()) : null, "operationId" ,container.Add ); AddIf( null != (((object)this._taskName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._taskName.ToString()) : null, "taskName" ,container.Add ); + AddIf( null != (((object)this._imageDefinitionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._imageDefinitionName.ToString()) : null, "imageDefinitionName" ,container.Add ); + AddIf( null != (((object)this._buildName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._buildName.ToString()) : null, "buildName" ,container.Add ); AddIf( null != (((object)this._poolName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._poolName.ToString()) : null, "poolName" ,container.Add ); AddIf( null != (((object)this._scheduleName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._scheduleName.ToString()) : null, "scheduleName" ,container.Add ); AddIf( null != (((object)this._networkConnectionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonString(this._networkConnectionName.ToString()) : null, "networkConnectionName" ,container.Add ); diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..50c18eb113b5 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ProjectCatalogImageDefinitionBuildCancelOkResponseHeadersTypeConverter))] + public partial class ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the + /// content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeadersInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeadersInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeadersInternal)this).Location, 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 ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeadersInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeadersInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(ProjectCatalogImageDefinitionBuildCancelOkResponseHeadersTypeConverter))] + public partial interface IProjectCatalogImageDefinitionBuildCancelOkResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..1e8024ef0876 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectCatalogImageDefinitionBuildCancelOkResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no + /// suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no + /// suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders.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/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders.cs new file mode 100644 index 000000000000..790e07afbe9a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + public partial class ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeadersInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader0) is string __headerAzureAsyncOperationHeader0 ? __headerAzureAsyncOperationHeader0 : (string)null; + } + if (headers.TryGetValues("Location", out var __locationHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader1) is string __headerLocationHeader1 ? __headerLocationHeader1 : (string)null; + } + } + + /// + /// Creates an new instance. + /// + public ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders() + { + + } + } + public partial interface IProjectCatalogImageDefinitionBuildCancelOkResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + } + internal partial interface IProjectCatalogImageDefinitionBuildCancelOkResponseHeadersInternal + + { + string AzureAsyncOperation { get; set; } + + string Location { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders.json.cs new file mode 100644 index 000000000000..41bcd8979334 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + public partial class ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionBuildCancelOkResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ProjectCatalogImageDefinitionBuildCancelOkResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders.PowerShell.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..f015d7a3c0d6 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ProjectCatalogImageDefinitionsBuildImageOkResponseHeadersTypeConverter))] + public partial class ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the + /// content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeadersInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeadersInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeadersInternal)this).Location, 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 ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeadersInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeadersInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(ProjectCatalogImageDefinitionsBuildImageOkResponseHeadersTypeConverter))] + public partial interface IProjectCatalogImageDefinitionsBuildImageOkResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..6baff495cb26 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectCatalogImageDefinitionsBuildImageOkResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no + /// suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no + /// suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders.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/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders.cs new file mode 100644 index 000000000000..acf3bf05e19d --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + public partial class ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeadersInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader0) is string __headerAzureAsyncOperationHeader0 ? __headerAzureAsyncOperationHeader0 : (string)null; + } + if (headers.TryGetValues("Location", out var __locationHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader1) is string __headerLocationHeader1 ? __headerLocationHeader1 : (string)null; + } + } + + /// + /// Creates an new instance. + /// + public ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders() + { + + } + } + public partial interface IProjectCatalogImageDefinitionsBuildImageOkResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + } + internal partial interface IProjectCatalogImageDefinitionsBuildImageOkResponseHeadersInternal + + { + string AzureAsyncOperation { get; set; } + + string Location { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders.json.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders.json.cs new file mode 100644 index 000000000000..689f513433b8 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Models/ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + + public partial class ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IProjectCatalogImageDefinitionsBuildImageOkResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json ? new ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject instance to deserialize from. + internal ProjectCatalogImageDefinitionsBuildImageOkResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoImageBuildStatus.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoImageBuildStatus.Completer.cs new file mode 100644 index 000000000000..c709e34254e3 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoImageBuildStatus.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether auto image build is enabled/disabled. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatusTypeConverter))] + public partial struct AutoImageBuildStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoImageBuildStatus.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoImageBuildStatus.TypeConverter.cs new file mode 100644 index 000000000000..b7b88b62b791 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoImageBuildStatus.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether auto image build is enabled/disabled. + public partial class AutoImageBuildStatusTypeConverter : + 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) => true; + + /// + /// 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 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) => AutoImageBuildStatus.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoImageBuildStatus.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoImageBuildStatus.cs new file mode 100644 index 000000000000..77e745e48f73 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoImageBuildStatus.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether auto image build is enabled/disabled. + public partial struct AutoImageBuildStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus Enabled = @"Enabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AutoImageBuildStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AutoImageBuildStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AutoImageBuildStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AutoImageBuildStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AutoImageBuildStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AutoImageBuildStatus && Equals((AutoImageBuildStatus)obj); + } + + /// Returns hashCode for enum AutoImageBuildStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AutoImageBuildStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AutoImageBuildStatus + /// the value to convert to an instance of . + + public static implicit operator AutoImageBuildStatus(string value) + { + return new AutoImageBuildStatus(value); + } + + /// Implicit operator to convert AutoImageBuildStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus e) + { + return e._value; + } + + /// Overriding != operator for enum AutoImageBuildStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AutoImageBuildStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoImageBuildStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoStartEnableStatus.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoStartEnableStatus.Completer.cs new file mode 100644 index 000000000000..7acb4331c6fe --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoStartEnableStatus.Completer.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// + /// Enables or disables whether Dev Boxes should be automatically started at commencement of active hours. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatusTypeConverter))] + public partial struct AutoStartEnableStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoStartEnableStatus.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoStartEnableStatus.TypeConverter.cs new file mode 100644 index 000000000000..e2eafc8a3763 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoStartEnableStatus.TypeConverter.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// + /// Enables or disables whether Dev Boxes should be automatically started at commencement of active hours. + /// + public partial class AutoStartEnableStatusTypeConverter : + 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) => true; + + /// + /// 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 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) => AutoStartEnableStatus.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoStartEnableStatus.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoStartEnableStatus.cs new file mode 100644 index 000000000000..a4acac808ae1 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AutoStartEnableStatus.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// + /// Enables or disables whether Dev Boxes should be automatically started at commencement of active hours. + /// + public partial struct AutoStartEnableStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus Enabled = @"Enabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AutoStartEnableStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AutoStartEnableStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AutoStartEnableStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AutoStartEnableStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AutoStartEnableStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AutoStartEnableStatus && Equals((AutoStartEnableStatus)obj); + } + + /// Returns hashCode for enum AutoStartEnableStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AutoStartEnableStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AutoStartEnableStatus + /// the value to convert to an instance of . + + public static implicit operator AutoStartEnableStatus(string value) + { + return new AutoStartEnableStatus(value); + } + + /// Implicit operator to convert AutoStartEnableStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus e) + { + return e._value; + } + + /// Overriding != operator for enum AutoStartEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AutoStartEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AzureAiServicesMode.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AzureAiServicesMode.Completer.cs new file mode 100644 index 000000000000..cde4394826e1 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AzureAiServicesMode.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether Azure AI services are enabled for a project. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesModeTypeConverter))] + public partial struct AzureAiServicesMode : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "AutoDeploy".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'AutoDeploy'", "AutoDeploy", global::System.Management.Automation.CompletionResultType.ParameterValue, "AutoDeploy"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AzureAiServicesMode.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AzureAiServicesMode.TypeConverter.cs new file mode 100644 index 000000000000..f1ab3f9778d0 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AzureAiServicesMode.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether Azure AI services are enabled for a project. + public partial class AzureAiServicesModeTypeConverter : + 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) => true; + + /// + /// 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 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) => AzureAiServicesMode.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/AzureAiServicesMode.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AzureAiServicesMode.cs new file mode 100644 index 000000000000..6f8c7d6c7601 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/AzureAiServicesMode.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether Azure AI services are enabled for a project. + public partial struct AzureAiServicesMode : + System.IEquatable + { + /// + /// Azure AI services are enabled for this project and necessary resources will be automatically setup. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode AutoDeploy = @"AutoDeploy"; + + /// Azure AI services are disabled for this project. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode Disabled = @"Disabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AzureAiServicesMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AzureAiServicesMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AzureAiServicesMode(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AzureAiServicesMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AzureAiServicesMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AzureAiServicesMode && Equals((AzureAiServicesMode)obj); + } + + /// Returns hashCode for enum AzureAiServicesMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AzureAiServicesMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AzureAiServicesMode + /// the value to convert to an instance of . + + public static implicit operator AzureAiServicesMode(string value) + { + return new AzureAiServicesMode(value); + } + + /// Implicit operator to convert AzureAiServicesMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode e) + { + return e._value; + } + + /// Overriding != operator for enum AzureAiServicesMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AzureAiServicesMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/CatalogItemType.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/CatalogItemType.Completer.cs index dc5d6c8db94c..d3c014a55181 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/CatalogItemType.Completer.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/CatalogItemType.Completer.cs @@ -30,6 +30,10 @@ public partial struct CatalogItemType : { yield return new global::System.Management.Automation.CompletionResult("'EnvironmentDefinition'", "EnvironmentDefinition", global::System.Management.Automation.CompletionResultType.ParameterValue, "EnvironmentDefinition"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ImageDefinition".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ImageDefinition'", "ImageDefinition", global::System.Management.Automation.CompletionResultType.ParameterValue, "ImageDefinition"); + } } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/CatalogItemType.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/CatalogItemType.cs index 6cd39b633cab..799cc522d127 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/CatalogItemType.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/CatalogItemType.cs @@ -12,6 +12,8 @@ public partial struct CatalogItemType : { public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType EnvironmentDefinition = @"EnvironmentDefinition"; + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType ImageDefinition = @"ImageDefinition"; + /// the value for an instance of the Enum. private string _value { get; set; } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxDeleteMode.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxDeleteMode.Completer.cs new file mode 100644 index 000000000000..6feac55ac55b --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxDeleteMode.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates possible values for Dev Box delete mode. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteModeTypeConverter))] + public partial struct DevBoxDeleteMode : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Manual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Manual'", "Manual", global::System.Management.Automation.CompletionResultType.ParameterValue, "Manual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Auto".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Auto'", "Auto", global::System.Management.Automation.CompletionResultType.ParameterValue, "Auto"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxDeleteMode.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxDeleteMode.TypeConverter.cs new file mode 100644 index 000000000000..3705d631e4fa --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxDeleteMode.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates possible values for Dev Box delete mode. + public partial class DevBoxDeleteModeTypeConverter : + 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) => true; + + /// + /// 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 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) => DevBoxDeleteMode.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxDeleteMode.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxDeleteMode.cs new file mode 100644 index 000000000000..642ac739648e --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxDeleteMode.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates possible values for Dev Box delete mode. + public partial struct DevBoxDeleteMode : + System.IEquatable + { + /// Dev Boxes will be deleted automatically according to configured settings. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode Auto = @"Auto"; + + /// + /// Dev Boxes will not be deleted automatically, and user must manually delete. This is the default. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode Manual = @"Manual"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DevBoxDeleteMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DevBoxDeleteMode(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DevBoxDeleteMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DevBoxDeleteMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DevBoxDeleteMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DevBoxDeleteMode && Equals((DevBoxDeleteMode)obj); + } + + /// Returns hashCode for enum DevBoxDeleteMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DevBoxDeleteMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DevBoxDeleteMode + /// the value to convert to an instance of . + + public static implicit operator DevBoxDeleteMode(string value) + { + return new DevBoxDeleteMode(value); + } + + /// Implicit operator to convert DevBoxDeleteMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode e) + { + return e._value; + } + + /// Overriding != operator for enum DevBoxDeleteMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DevBoxDeleteMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxTunnelEnableStatus.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxTunnelEnableStatus.Completer.cs new file mode 100644 index 000000000000..f47b7f337561 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxTunnelEnableStatus.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether Dev Box Tunnel is enabled. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatusTypeConverter))] + public partial struct DevBoxTunnelEnableStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxTunnelEnableStatus.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxTunnelEnableStatus.TypeConverter.cs new file mode 100644 index 000000000000..43e10675b5f7 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxTunnelEnableStatus.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether Dev Box Tunnel is enabled. + public partial class DevBoxTunnelEnableStatusTypeConverter : + 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) => true; + + /// + /// 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 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) => DevBoxTunnelEnableStatus.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxTunnelEnableStatus.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxTunnelEnableStatus.cs new file mode 100644 index 000000000000..8542923532ac --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevBoxTunnelEnableStatus.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether Dev Box Tunnel is enabled. + public partial struct DevBoxTunnelEnableStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus Enabled = @"Enabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DevBoxTunnelEnableStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DevBoxTunnelEnableStatus(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DevBoxTunnelEnableStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DevBoxTunnelEnableStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DevBoxTunnelEnableStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DevBoxTunnelEnableStatus && Equals((DevBoxTunnelEnableStatus)obj); + } + + /// Returns hashCode for enum DevBoxTunnelEnableStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DevBoxTunnelEnableStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DevBoxTunnelEnableStatus + /// the value to convert to an instance of . + + public static implicit operator DevBoxTunnelEnableStatus(string value) + { + return new DevBoxTunnelEnableStatus(value); + } + + /// Implicit operator to convert DevBoxTunnelEnableStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus e) + { + return e._value; + } + + /// Overriding != operator for enum DevBoxTunnelEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DevBoxTunnelEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevCenterResourceType.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevCenterResourceType.Completer.cs new file mode 100644 index 000000000000..25545381028c --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevCenterResourceType.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates dev center resource types. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceTypeTypeConverter))] + public partial struct DevCenterResourceType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Images".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Images'", "Images", global::System.Management.Automation.CompletionResultType.ParameterValue, "Images"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "AttachedNetworks".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'AttachedNetworks'", "AttachedNetworks", global::System.Management.Automation.CompletionResultType.ParameterValue, "AttachedNetworks"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Skus".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Skus'", "Skus", global::System.Management.Automation.CompletionResultType.ParameterValue, "Skus"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevCenterResourceType.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevCenterResourceType.TypeConverter.cs new file mode 100644 index 000000000000..6d1fe86045ca --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevCenterResourceType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates dev center resource types. + public partial class DevCenterResourceTypeTypeConverter : + 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) => true; + + /// + /// 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 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) => DevCenterResourceType.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/DevCenterResourceType.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevCenterResourceType.cs new file mode 100644 index 000000000000..050090446429 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/DevCenterResourceType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates dev center resource types. + public partial struct DevCenterResourceType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType AttachedNetworks = @"AttachedNetworks"; + + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType Images = @"Images"; + + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType Skus = @"Skus"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DevCenterResourceType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DevCenterResourceType(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DevCenterResourceType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DevCenterResourceType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DevCenterResourceType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DevCenterResourceType && Equals((DevCenterResourceType)obj); + } + + /// Returns hashCode for enum DevCenterResourceType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DevCenterResourceType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DevCenterResourceType + /// the value to convert to an instance of . + + public static implicit operator DevCenterResourceType(string value) + { + return new DevCenterResourceType(value); + } + + /// Implicit operator to convert DevCenterResourceType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType e) + { + return e._value; + } + + /// Overriding != operator for enum DevCenterResourceType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DevCenterResourceType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevCenterResourceType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/HealthCheckStatus.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/HealthCheckStatus.Completer.cs index 94679acb5161..019043dd5b51 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/HealthCheckStatus.Completer.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/HealthCheckStatus.Completer.cs @@ -50,6 +50,10 @@ public partial struct HealthCheckStatus : { yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Informational".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Informational'", "Informational", global::System.Management.Automation.CompletionResultType.ParameterValue, "Informational"); + } } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/HealthCheckStatus.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/HealthCheckStatus.cs index 784f9fed9761..6a86a689cf5b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/HealthCheckStatus.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/HealthCheckStatus.cs @@ -12,6 +12,8 @@ public partial struct HealthCheckStatus : { public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus Failed = @"Failed"; + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus Informational = @"Informational"; + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus Passed = @"Passed"; public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HealthCheckStatus Pending = @"Pending"; diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ImageDefinitionBuildStatus.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ImageDefinitionBuildStatus.Completer.cs new file mode 100644 index 000000000000..15397b91018a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ImageDefinitionBuildStatus.Completer.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// The state of an Image Definition Build. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatusTypeConverter))] + public partial struct ImageDefinitionBuildStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Running".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Running'", "Running", global::System.Management.Automation.CompletionResultType.ParameterValue, "Running"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ValidationFailed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ValidationFailed'", "ValidationFailed", global::System.Management.Automation.CompletionResultType.ParameterValue, "ValidationFailed"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Cancelled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Cancelled'", "Cancelled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Cancelled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TimedOut".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TimedOut'", "TimedOut", global::System.Management.Automation.CompletionResultType.ParameterValue, "TimedOut"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ImageDefinitionBuildStatus.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ImageDefinitionBuildStatus.TypeConverter.cs new file mode 100644 index 000000000000..936077febe7d --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ImageDefinitionBuildStatus.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// The state of an Image Definition Build. + public partial class ImageDefinitionBuildStatusTypeConverter : + 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) => true; + + /// + /// 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 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) => ImageDefinitionBuildStatus.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/ImageDefinitionBuildStatus.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ImageDefinitionBuildStatus.cs new file mode 100644 index 000000000000..866913ce43f1 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ImageDefinitionBuildStatus.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// The state of an Image Definition Build. + public partial struct ImageDefinitionBuildStatus : + System.IEquatable + { + /// The image build has been cancelled. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus Cancelled = @"Cancelled"; + + /// The image build has failed. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus Failed = @"Failed"; + + /// The image build is running. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus Running = @"Running"; + + /// The image build has succeeded. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus Succeeded = @"Succeeded"; + + /// The image build has timed out. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus TimedOut = @"TimedOut"; + + /// The built image has failed validation. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus ValidationFailed = @"ValidationFailed"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to ImageDefinitionBuildStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ImageDefinitionBuildStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ImageDefinitionBuildStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ImageDefinitionBuildStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ImageDefinitionBuildStatus && Equals((ImageDefinitionBuildStatus)obj); + } + + /// Returns hashCode for enum ImageDefinitionBuildStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ImageDefinitionBuildStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ImageDefinitionBuildStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ImageDefinitionBuildStatus + /// the value to convert to an instance of . + + public static implicit operator ImageDefinitionBuildStatus(string value) + { + return new ImageDefinitionBuildStatus(value); + } + + /// Implicit operator to convert ImageDefinitionBuildStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus e) + { + return e._value; + } + + /// Overriding != operator for enum ImageDefinitionBuildStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ImageDefinitionBuildStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ImageDefinitionBuildStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/KeepAwakeEnableStatus.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/KeepAwakeEnableStatus.Completer.cs new file mode 100644 index 000000000000..0ebf1cc14f2c --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/KeepAwakeEnableStatus.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Enables or disables whether Dev Boxes should be kept awake during active hours. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatusTypeConverter))] + public partial struct KeepAwakeEnableStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/KeepAwakeEnableStatus.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/KeepAwakeEnableStatus.TypeConverter.cs new file mode 100644 index 000000000000..4a34a8feea67 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/KeepAwakeEnableStatus.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Enables or disables whether Dev Boxes should be kept awake during active hours. + public partial class KeepAwakeEnableStatusTypeConverter : + 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) => true; + + /// + /// 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 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) => KeepAwakeEnableStatus.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/KeepAwakeEnableStatus.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/KeepAwakeEnableStatus.cs new file mode 100644 index 000000000000..74aecac57c82 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/KeepAwakeEnableStatus.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Enables or disables whether Dev Boxes should be kept awake during active hours. + public partial struct KeepAwakeEnableStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus Enabled = @"Enabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to KeepAwakeEnableStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new KeepAwakeEnableStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type KeepAwakeEnableStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type KeepAwakeEnableStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is KeepAwakeEnableStatus && Equals((KeepAwakeEnableStatus)obj); + } + + /// Returns hashCode for enum KeepAwakeEnableStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private KeepAwakeEnableStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for KeepAwakeEnableStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to KeepAwakeEnableStatus + /// the value to convert to an instance of . + + public static implicit operator KeepAwakeEnableStatus(string value) + { + return new KeepAwakeEnableStatus(value); + } + + /// Implicit operator to convert KeepAwakeEnableStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus e) + { + return e._value; + } + + /// Overriding != operator for enum KeepAwakeEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum KeepAwakeEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PlanMemberType.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PlanMemberType.Completer.cs deleted file mode 100644 index a5b6d481750b..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PlanMemberType.Completer.cs +++ /dev/null @@ -1,39 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support -{ - - /// The type of the member (user, group) - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberTypeTypeConverter))] - public partial struct PlanMemberType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "User".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'User'", "User", global::System.Management.Automation.CompletionResultType.ParameterValue, "User"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Group".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Group'", "Group", global::System.Management.Automation.CompletionResultType.ParameterValue, "Group"); - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PlanMemberType.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PlanMemberType.TypeConverter.cs deleted file mode 100644 index 1d579cc337f2..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PlanMemberType.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support -{ - - /// The type of the member (user, group) - public partial class PlanMemberTypeTypeConverter : - 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) => true; - - /// - /// 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 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) => PlanMemberType.CreateFrom(sourceValue); - - /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/PlanMemberType.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PlanMemberType.cs deleted file mode 100644 index 619f860c9d08..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PlanMemberType.cs +++ /dev/null @@ -1,98 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support -{ - - /// The type of the member (user, group) - public partial struct PlanMemberType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType Group = @"Group"; - - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType User = @"User"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to PlanMemberType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new PlanMemberType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type PlanMemberType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type PlanMemberType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is PlanMemberType && Equals((PlanMemberType)obj); - } - - /// Returns hashCode for enum PlanMemberType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private PlanMemberType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for PlanMemberType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to PlanMemberType - /// the value to convert to an instance of . - - public static implicit operator PlanMemberType(string value) - { - return new PlanMemberType(value); - } - - /// Implicit operator to convert PlanMemberType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType e) - { - return e._value; - } - - /// Overriding != operator for enum PlanMemberType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum PlanMemberType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PolicyAction.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PolicyAction.Completer.cs new file mode 100644 index 000000000000..74d71e60e699 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PolicyAction.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates what action to perform for the policy. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyActionTypeConverter))] + public partial struct PolicyAction : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Allow".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Allow'", "Allow", global::System.Management.Automation.CompletionResultType.ParameterValue, "Allow"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deny".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deny'", "Deny", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deny"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PolicyAction.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PolicyAction.TypeConverter.cs new file mode 100644 index 000000000000..d7e82fe91f78 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PolicyAction.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates what action to perform for the policy. + public partial class PolicyActionTypeConverter : + 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) => true; + + /// + /// 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 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) => PolicyAction.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/PolicyAction.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PolicyAction.cs new file mode 100644 index 000000000000..2ed671cf455e --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PolicyAction.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates what action to perform for the policy. + public partial struct PolicyAction : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction Allow = @"Allow"; + + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction Deny = @"Deny"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to PolicyAction + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new PolicyAction(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type PolicyAction + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type PolicyAction (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is PolicyAction && Equals((PolicyAction)obj); + } + + /// Returns hashCode for enum PolicyAction + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private PolicyAction(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for PolicyAction + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to PolicyAction + /// the value to convert to an instance of . + + public static implicit operator PolicyAction(string value) + { + return new PolicyAction(value); + } + + /// Implicit operator to convert PolicyAction to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction e) + { + return e._value; + } + + /// Overriding != operator for enum PolicyAction + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum PolicyAction + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PolicyAction e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PoolDevBoxDefinitionType.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PoolDevBoxDefinitionType.Completer.cs new file mode 100644 index 000000000000..20b59411ede4 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PoolDevBoxDefinitionType.Completer.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionTypeTypeConverter))] + public partial struct PoolDevBoxDefinitionType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Reference".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Reference'", "Reference", global::System.Management.Automation.CompletionResultType.ParameterValue, "Reference"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Value".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Value'", "Value", global::System.Management.Automation.CompletionResultType.ParameterValue, "Value"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PoolDevBoxDefinitionType.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PoolDevBoxDefinitionType.TypeConverter.cs new file mode 100644 index 000000000000..2f9754c304c8 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PoolDevBoxDefinitionType.TypeConverter.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + public partial class PoolDevBoxDefinitionTypeTypeConverter : + 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) => true; + + /// + /// 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 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) => PoolDevBoxDefinitionType.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/PoolDevBoxDefinitionType.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PoolDevBoxDefinitionType.cs new file mode 100644 index 000000000000..b80751297af3 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/PoolDevBoxDefinitionType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + public partial struct PoolDevBoxDefinitionType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType Reference = @"Reference"; + + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType Value = @"Value"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to PoolDevBoxDefinitionType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new PoolDevBoxDefinitionType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type PoolDevBoxDefinitionType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type PoolDevBoxDefinitionType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is PoolDevBoxDefinitionType && Equals((PoolDevBoxDefinitionType)obj); + } + + /// Returns hashCode for enum PoolDevBoxDefinitionType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private PoolDevBoxDefinitionType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for PoolDevBoxDefinitionType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to PoolDevBoxDefinitionType + /// the value to convert to an instance of . + + public static implicit operator PoolDevBoxDefinitionType(string value) + { + return new PoolDevBoxDefinitionType(value); + } + + /// Implicit operator to convert PoolDevBoxDefinitionType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType e) + { + return e._value; + } + + /// Overriding != operator for enum PoolDevBoxDefinitionType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum PoolDevBoxDefinitionType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ProjectCustomizationIdentityType.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ProjectCustomizationIdentityType.Completer.cs new file mode 100644 index 000000000000..2495b90aaf90 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ProjectCustomizationIdentityType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Values can be systemAssignedIdentity or userAssignedIdentity + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityTypeTypeConverter))] + public partial struct ProjectCustomizationIdentityType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "systemAssignedIdentity".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'systemAssignedIdentity'", "systemAssignedIdentity", global::System.Management.Automation.CompletionResultType.ParameterValue, "systemAssignedIdentity"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "userAssignedIdentity".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'userAssignedIdentity'", "userAssignedIdentity", global::System.Management.Automation.CompletionResultType.ParameterValue, "userAssignedIdentity"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ProjectCustomizationIdentityType.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ProjectCustomizationIdentityType.TypeConverter.cs new file mode 100644 index 000000000000..14e5b15213af --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ProjectCustomizationIdentityType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Values can be systemAssignedIdentity or userAssignedIdentity + public partial class ProjectCustomizationIdentityTypeTypeConverter : + 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) => true; + + /// + /// 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 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) => ProjectCustomizationIdentityType.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/ProjectCustomizationIdentityType.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ProjectCustomizationIdentityType.cs new file mode 100644 index 000000000000..9eec52c3904a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ProjectCustomizationIdentityType.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Values can be systemAssignedIdentity or userAssignedIdentity + public partial struct ProjectCustomizationIdentityType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType SystemAssignedIdentity = @"systemAssignedIdentity"; + + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType UserAssignedIdentity = @"userAssignedIdentity"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to ProjectCustomizationIdentityType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ProjectCustomizationIdentityType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ProjectCustomizationIdentityType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type ProjectCustomizationIdentityType (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ProjectCustomizationIdentityType && Equals((ProjectCustomizationIdentityType)obj); + } + + /// Returns hashCode for enum ProjectCustomizationIdentityType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private ProjectCustomizationIdentityType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ProjectCustomizationIdentityType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ProjectCustomizationIdentityType + /// the value to convert to an instance of . + + public static implicit operator ProjectCustomizationIdentityType(string value) + { + return new ProjectCustomizationIdentityType(value); + } + + /// Implicit operator to convert ProjectCustomizationIdentityType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType e) + { + return e._value; + } + + /// Overriding != operator for enum ProjectCustomizationIdentityType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ProjectCustomizationIdentityType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ProjectCustomizationIdentityType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ServerlessGpuSessionsMode.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ServerlessGpuSessionsMode.Completer.cs new file mode 100644 index 000000000000..c53102d67a35 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ServerlessGpuSessionsMode.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether serverless GPU session access is enabled. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsModeTypeConverter))] + public partial struct ServerlessGpuSessionsMode : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "AutoDeploy".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'AutoDeploy'", "AutoDeploy", global::System.Management.Automation.CompletionResultType.ParameterValue, "AutoDeploy"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ServerlessGpuSessionsMode.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ServerlessGpuSessionsMode.TypeConverter.cs new file mode 100644 index 000000000000..3f02a2e1d2ab --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ServerlessGpuSessionsMode.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether serverless GPU session access is enabled. + public partial class ServerlessGpuSessionsModeTypeConverter : + 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) => true; + + /// + /// 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 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) => ServerlessGpuSessionsMode.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/ServerlessGpuSessionsMode.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ServerlessGpuSessionsMode.cs new file mode 100644 index 000000000000..1328ad1593e1 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/ServerlessGpuSessionsMode.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether serverless GPU session access is enabled. + public partial struct ServerlessGpuSessionsMode : + System.IEquatable + { + /// + /// Serverless GPU session access is enabled and necessary resources will be automatically setup. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode AutoDeploy = @"AutoDeploy"; + + /// Serverless GPU session access is disabled. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode Disabled = @"Disabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ServerlessGpuSessionsMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ServerlessGpuSessionsMode(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ServerlessGpuSessionsMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ServerlessGpuSessionsMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ServerlessGpuSessionsMode && Equals((ServerlessGpuSessionsMode)obj); + } + + /// Returns hashCode for enum ServerlessGpuSessionsMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ServerlessGpuSessionsMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ServerlessGpuSessionsMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ServerlessGpuSessionsMode + /// the value to convert to an instance of . + + public static implicit operator ServerlessGpuSessionsMode(string value) + { + return new ServerlessGpuSessionsMode(value); + } + + /// Implicit operator to convert ServerlessGpuSessionsMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode e) + { + return e._value; + } + + /// Overriding != operator for enum ServerlessGpuSessionsMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ServerlessGpuSessionsMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.Completer.cs new file mode 100644 index 000000000000..e54be923b788 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Stop on no connect enable or disable status. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatusTypeConverter))] + public partial struct StopOnNoConnectEnableStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.TypeConverter.cs new file mode 100644 index 000000000000..311378c95a8f --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Stop on no connect enable or disable status. + public partial class StopOnNoConnectEnableStatusTypeConverter : + 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) => true; + + /// + /// 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 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) => StopOnNoConnectEnableStatus.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.cs new file mode 100644 index 000000000000..b2ad4bbd315d --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Stop on no connect enable or disable status. + public partial struct StopOnNoConnectEnableStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus Enabled = @"Enabled"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to StopOnNoConnectEnableStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new StopOnNoConnectEnableStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type StopOnNoConnectEnableStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type StopOnNoConnectEnableStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is StopOnNoConnectEnableStatus && Equals((StopOnNoConnectEnableStatus)obj); + } + + /// Returns hashCode for enum StopOnNoConnectEnableStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private StopOnNoConnectEnableStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for StopOnNoConnectEnableStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to StopOnNoConnectEnableStatus + /// the value to convert to an instance of . + + public static implicit operator StopOnNoConnectEnableStatus(string value) + { + return new StopOnNoConnectEnableStatus(value); + } + + /// Implicit operator to convert StopOnNoConnectEnableStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus e) + { + return e._value; + } + + /// Overriding != operator for enum StopOnNoConnectEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum StopOnNoConnectEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/UserCustomizationsEnableStatus.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/UserCustomizationsEnableStatus.Completer.cs new file mode 100644 index 000000000000..66106528f633 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/UserCustomizationsEnableStatus.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether user customizations are enabled. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatusTypeConverter))] + public partial struct UserCustomizationsEnableStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/UserCustomizationsEnableStatus.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/UserCustomizationsEnableStatus.TypeConverter.cs new file mode 100644 index 000000000000..08f5aad2fb5f --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/UserCustomizationsEnableStatus.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether user customizations are enabled. + public partial class UserCustomizationsEnableStatusTypeConverter : + 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) => true; + + /// + /// 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 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) => UserCustomizationsEnableStatus.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/UserCustomizationsEnableStatus.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/UserCustomizationsEnableStatus.cs new file mode 100644 index 000000000000..2e02cf5a78b3 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/UserCustomizationsEnableStatus.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether user customizations are enabled. + public partial struct UserCustomizationsEnableStatus : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus Enabled = @"Enabled"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to UserCustomizationsEnableStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new UserCustomizationsEnableStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type UserCustomizationsEnableStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type UserCustomizationsEnableStatus (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is UserCustomizationsEnableStatus && Equals((UserCustomizationsEnableStatus)obj); + } + + /// Returns hashCode for enum UserCustomizationsEnableStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for UserCustomizationsEnableStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private UserCustomizationsEnableStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to UserCustomizationsEnableStatus + /// the value to convert to an instance of . + + public static implicit operator UserCustomizationsEnableStatus(string value) + { + return new UserCustomizationsEnableStatus(value); + } + + /// Implicit operator to convert UserCustomizationsEnableStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus e) + { + return e._value; + } + + /// Overriding != operator for enum UserCustomizationsEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum UserCustomizationsEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/WorkspaceStorageMode.Completer.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/WorkspaceStorageMode.Completer.cs new file mode 100644 index 000000000000..2b6e9b244f60 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/WorkspaceStorageMode.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether workspace storage is enabled. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageModeTypeConverter))] + public partial struct WorkspaceStorageMode : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "AutoDeploy".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'AutoDeploy'", "AutoDeploy", global::System.Management.Automation.CompletionResultType.ParameterValue, "AutoDeploy"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/WorkspaceStorageMode.TypeConverter.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/WorkspaceStorageMode.TypeConverter.cs new file mode 100644 index 000000000000..7624db69ce3a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/WorkspaceStorageMode.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether workspace storage is enabled. + public partial class WorkspaceStorageModeTypeConverter : + 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) => true; + + /// + /// 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 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) => WorkspaceStorageMode.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenter.AutoRest/generated/api/Support/WorkspaceStorageMode.cs b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/WorkspaceStorageMode.cs new file mode 100644 index 000000000000..3d10450558bf --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/api/Support/WorkspaceStorageMode.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support +{ + + /// Indicates whether workspace storage is enabled. + public partial struct WorkspaceStorageMode : + System.IEquatable + { + /// + /// Workspace storage is enabled and necessary resources will be automatically setup. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode AutoDeploy = @"AutoDeploy"; + + /// Workspace storage is disabled. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode Disabled = @"Disabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to WorkspaceStorageMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new WorkspaceStorageMode(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type WorkspaceStorageMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type WorkspaceStorageMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is WorkspaceStorageMode && Equals((WorkspaceStorageMode)obj); + } + + /// Returns hashCode for enum WorkspaceStorageMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for WorkspaceStorageMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private WorkspaceStorageMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to WorkspaceStorageMode + /// the value to convert to an instance of . + + public static implicit operator WorkspaceStorageMode(string value) + { + return new WorkspaceStorageMode(value); + } + + /// Implicit operator to convert WorkspaceStorageMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode e) + { + return e._value; + } + + /// Overriding != operator for enum WorkspaceStorageMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum WorkspaceStorageMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_Build.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_Build.cs new file mode 100644 index 000000000000..dce9b7a1e883 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_Build.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Builds an image for the specified Image Definition. + /// + /// [OpenAPI] BuildImage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/buildImage" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] + [global::System.Management.Automation.Cmdlet("Build", @"AzDevCenterAdminDevCenterCatalogImageDefinitionImage_Build", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Builds an image for the specified Image Definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/buildImage", ApiVersion = "2025-04-01-preview")] + public partial class BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_Build : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devCenterName; + + /// The name of the devcenter. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the devcenter.", + SerializedName = @"devCenterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string DevCenterName { get => this._devCenterName; set => this._devCenterName = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageDefinitionName; + + /// The name of the Image Definition. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Image Definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Image Definition.", + SerializedName = @"imageDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageDefinitionName { get => this._imageDefinitionName; set => this._imageDefinitionName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_Build() + { + + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_Build + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_Build Clone() + { + var clone = new BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_Build(); + 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.DevCenterName = this.DevCenterName; + clone.CatalogName = this.CatalogName; + clone.ImageDefinitionName = this.ImageDefinitionName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevCenterCatalogImageDefinitionsBuildImage' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevCenterCatalogImageDefinitionsBuildImage(SubscriptionId, ResourceGroupName, DevCenterName, CatalogName, ImageDefinitionName, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,DevCenterName=DevCenterName,CatalogName=CatalogName,ImageDefinitionName=ImageDefinitionName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_BuildViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_BuildViaIdentity.cs new file mode 100644 index 000000000000..cad348b8b79b --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_BuildViaIdentity.cs @@ -0,0 +1,458 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Builds an image for the specified Image Definition. + /// + /// [OpenAPI] BuildImage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/buildImage" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] + [global::System.Management.Automation.Cmdlet("Build", @"AzDevCenterAdminDevCenterCatalogImageDefinitionImage_BuildViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Builds an image for the specified Image Definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/buildImage", ApiVersion = "2025-04-01-preview")] + public partial class BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_BuildViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_BuildViaIdentity() + { + + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_BuildViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_BuildViaIdentity Clone() + { + var clone = new BuildAzDevCenterAdminDevCenterCatalogImageDefinitionImage_BuildViaIdentity(); + 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevCenterCatalogImageDefinitionsBuildImage' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevCenterCatalogImageDefinitionsBuildImageViaIdentity(InputObject.Id, 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.DevCenterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevCenterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageDefinitionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageDefinitionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevCenterCatalogImageDefinitionsBuildImage(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.DevCenterName ?? null, InputObject.CatalogName ?? null, InputObject.ImageDefinitionName ?? null, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } + }); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_Build.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_Build.cs new file mode 100644 index 000000000000..b48194d015f5 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_Build.cs @@ -0,0 +1,544 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Builds an image for the specified Image Definition. + /// + /// [OpenAPI] BuildImage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/buildImage" + /// + [global::System.Management.Automation.Cmdlet("Build", @"AzDevCenterAdminProjectCatalogImageDefinitionImage_Build", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Builds an image for the specified Image Definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/buildImage", ApiVersion = "2025-04-01-preview")] + public partial class BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_Build : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageDefinitionName; + + /// The name of the Image Definition. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Image Definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Image Definition.", + SerializedName = @"imageDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageDefinitionName { get => this._imageDefinitionName; set => this._imageDefinitionName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 header result as a 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 headers, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_Build() + { + + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_Build + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_Build Clone() + { + var clone = new BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_Build(); + 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.ProjectName = this.ProjectName; + clone.CatalogName = this.CatalogName; + clone.ImageDefinitionName = this.ImageDefinitionName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectCatalogImageDefinitionsBuildImage' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectCatalogImageDefinitionsBuildImage(SubscriptionId, ResourceGroupName, ProjectName, CatalogName, ImageDefinitionName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,ProjectName=ProjectName,CatalogName=CatalogName,ImageDefinitionName=ImageDefinitionName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + 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 header result as a 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 headers) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, headers, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_BuildViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_BuildViaIdentity.cs new file mode 100644 index 000000000000..4be6cf1f0a91 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_BuildViaIdentity.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Builds an image for the specified Image Definition. + /// + /// [OpenAPI] BuildImage=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/buildImage" + /// + [global::System.Management.Automation.Cmdlet("Build", @"AzDevCenterAdminProjectCatalogImageDefinitionImage_BuildViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Builds an image for the specified Image Definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/buildImage", ApiVersion = "2025-04-01-preview")] + public partial class BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_BuildViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 header result as a 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 headers, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_BuildViaIdentity() + { + + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_BuildViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_BuildViaIdentity Clone() + { + var clone = new BuildAzDevCenterAdminProjectCatalogImageDefinitionImage_BuildViaIdentity(); + 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectCatalogImageDefinitionsBuildImage' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProjectCatalogImageDefinitionsBuildImageViaIdentity(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.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageDefinitionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageDefinitionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProjectCatalogImageDefinitionsBuildImage(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ProjectName ?? null, InputObject.CatalogName ?? null, InputObject.ImageDefinitionName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 header result as a 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 headers) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, headers, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminCatalog_Connect.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminCatalog_Connect.cs index 4fc6e643e460..36fbc7decc92 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminCatalog_Connect.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminCatalog_Connect.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Connect=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/connect" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommunications.Connect, @"AzDevCenterAdminCatalog_Connect", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Connect-AzDevCenterAdminCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Connects a catalog to enable syncing.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/connect", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/connect", ApiVersion = "2025-04-01-preview")] public partial class ConnectAzDevCenterAdminCatalog_Connect : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -183,12 +182,12 @@ public partial class ConnectAzDevCenterAdminCatalog_Connect : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -460,12 +459,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -482,7 +481,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminCatalog_ConnectViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminCatalog_ConnectViaIdentity.cs index 78eab6ef952b..f5f752269b4f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminCatalog_ConnectViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminCatalog_ConnectViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Connect=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/connect" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommunications.Connect, @"AzDevCenterAdminCatalog_ConnectViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Connect-AzDevCenterAdminCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Connects a catalog to enable syncing.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/connect", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/connect", ApiVersion = "2025-04-01-preview")] public partial class ConnectAzDevCenterAdminCatalog_ConnectViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -130,12 +129,12 @@ public partial class ConnectAzDevCenterAdminCatalog_ConnectViaIdentity : global: /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -427,12 +426,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -449,7 +448,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminProjectCatalog_Connect.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminProjectCatalog_Connect.cs index 5b5af7623776..3cc97f2d7d56 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminProjectCatalog_Connect.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminProjectCatalog_Connect.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Connect=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/connect" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommunications.Connect, @"AzDevCenterAdminProjectCatalog_Connect", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Connect-AzDevCenterAdminProjectCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Connects a project catalog to enable syncing.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/connect", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/connect", ApiVersion = "2025-04-01-preview")] public partial class ConnectAzDevCenterAdminProjectCatalog_Connect : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -182,12 +181,12 @@ public partial class ConnectAzDevCenterAdminProjectCatalog_Connect : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -459,12 +458,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -481,7 +480,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminProjectCatalog_ConnectViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminProjectCatalog_ConnectViaIdentity.cs index 83d16d1f4a87..0112f3c50ce7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminProjectCatalog_ConnectViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/ConnectAzDevCenterAdminProjectCatalog_ConnectViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Connect=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/connect" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommunications.Connect, @"AzDevCenterAdminProjectCatalog_ConnectViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Connect-AzDevCenterAdminProjectCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Connects a project catalog to enable syncing.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/connect", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/connect", ApiVersion = "2025-04-01-preview")] public partial class ConnectAzDevCenterAdminProjectCatalog_ConnectViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -130,12 +129,12 @@ public partial class ConnectAzDevCenterAdminProjectCatalog_ConnectViaIdentity : /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -429,12 +428,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -451,7 +450,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_Get.cs index 01d5d9af5752..da9953dee76e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetByProject=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/attachednetworks/{attachedNetworkConnectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminAttachedNetwork_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminAttachedNetwork", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an attached NetworkConnection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/attachednetworks/{attachedNetworkConnectionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/attachednetworks/{attachedNetworkConnectionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminAttachedNetwork_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -163,24 +162,24 @@ public partial class GetAzDevCenterAdminAttachedNetwork_Get : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection /// 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); + 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) @@ -388,12 +387,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,7 +409,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, ConnectionName=ConnectionName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -428,12 +427,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,7 +444,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_Get1.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_Get1.cs index b1380216f991..cffa3c9ae250 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_Get1.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_Get1.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetByDevCenter=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks/{attachedNetworkConnectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminAttachedNetwork_Get1")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminAttachedNetwork", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an attached NetworkConnection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks/{attachedNetworkConnectionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks/{attachedNetworkConnectionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminAttachedNetwork_Get1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -163,24 +162,24 @@ public partial class GetAzDevCenterAdminAttachedNetwork_Get1 : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection /// 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); + 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) @@ -388,12 +387,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,7 +409,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, ConnectionName=ConnectionName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -428,12 +427,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,7 +444,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_GetViaIdentity.cs index 280cd5ca1ada..086a2446f161 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetByProject=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/attachednetworks/{attachedNetworkConnectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminAttachedNetwork_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminAttachedNetwork", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an attached NetworkConnection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/attachednetworks/{attachedNetworkConnectionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/attachednetworks/{attachedNetworkConnectionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminAttachedNetwork_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminAttachedNetwork_GetViaIdentity : global: /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection /// 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); + 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) @@ -356,12 +355,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,7 +377,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,7 +412,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_List.cs index 2c529fe1c20c..45b3c083edef 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByProject=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/attachednetworks" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminAttachedNetwork_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminAttachedNetwork", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists the attached NetworkConnections for a Project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/attachednetworks", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/attachednetworks", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminAttachedNetwork_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -171,24 +170,24 @@ public partial class GetAzDevCenterAdminAttachedNetwork_List : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResult /// 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); + 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) @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,7 +417,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -436,12 +435,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_List1.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_List1.cs index ded5c76f1e87..c6caa7ba1db2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_List1.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminAttachedNetwork_List1.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByDevCenter=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminAttachedNetwork_List1")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminAttachedNetwork", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists the attached NetworkConnections for a DevCenter.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminAttachedNetwork_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -171,24 +170,24 @@ public partial class GetAzDevCenterAdminAttachedNetwork_List1 : global::System.M /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResult /// 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); + 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) @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,7 +417,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -436,12 +435,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalogSyncErrorDetail_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalogSyncErrorDetail_Get.cs index 671eff403566..b2417937cf81 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalogSyncErrorDetail_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalogSyncErrorDetail_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetSyncErrorDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/getSyncErrorDetails" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminCatalogSyncErrorDetail_Get", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminCatalogSyncErrorDetail", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets catalog synchronization error details")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/getSyncErrorDetails", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/getSyncErrorDetails", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminCatalogSyncErrorDetail_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -162,24 +161,24 @@ public partial class GetAzDevCenterAdminCatalogSyncErrorDetail_Get : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails /// 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); + 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) @@ -390,12 +389,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,7 +411,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -430,12 +429,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -447,7 +446,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalogSyncErrorDetail_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalogSyncErrorDetail_GetViaIdentity.cs index caa6dbadd67c..8814a538ee64 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalogSyncErrorDetail_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalogSyncErrorDetail_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetSyncErrorDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/getSyncErrorDetails" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminCatalogSyncErrorDetail_GetViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminCatalogSyncErrorDetail", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets catalog synchronization error details")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/getSyncErrorDetails", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/getSyncErrorDetails", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminCatalogSyncErrorDetail_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminCatalogSyncErrorDetail_GetViaIdentity : /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails /// 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); + 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) @@ -359,12 +358,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -381,7 +380,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -399,12 +398,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -416,7 +415,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalog_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalog_Get.cs index 4d69934c39db..fcbe14652cd5 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalog_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalog_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminCatalog_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a catalog")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminCatalog_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -163,24 +162,24 @@ public partial class GetAzDevCenterAdminCatalog_Get : global::System.Management. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -388,12 +387,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,7 +409,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -428,12 +427,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,7 +444,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalog_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalog_GetViaIdentity.cs index 436f2a71ff48..89c8dab87f09 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalog_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalog_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminCatalog_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a catalog")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminCatalog_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminCatalog_GetViaIdentity : global::System. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -356,12 +355,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,7 +377,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,7 +412,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalog_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalog_List.cs index 6a904f800ab6..b13472b5c799 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalog_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCatalog_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByDevCenter=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminCatalog_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists catalogs for a devcenter.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminCatalog_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -171,24 +170,24 @@ public partial class GetAzDevCenterAdminCatalog_List : global::System.Management /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResult /// 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); + 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) @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,7 +417,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -436,12 +435,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTaskErrorDetail_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTaskErrorDetail_Get.cs index 21d69af0e1a8..9e834e508a5c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTaskErrorDetail_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTaskErrorDetail_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetErrorDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}/getErrorDetails" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminCustomizationTaskErrorDetail_Get", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminCustomizationTaskErrorDetail", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets Customization Task error details")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}/getErrorDetails", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}/getErrorDetails", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminCustomizationTaskErrorDetail_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -176,24 +175,24 @@ public partial class GetAzDevCenterAdminCustomizationTaskErrorDetail_Get : globa /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails /// 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); + 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) @@ -404,12 +403,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,7 +425,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, TaskName=TaskName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -444,12 +443,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTaskErrorDetail_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTaskErrorDetail_GetViaIdentity.cs index 350a62168560..46661c9590da 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTaskErrorDetail_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTaskErrorDetail_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetErrorDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}/getErrorDetails" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminCustomizationTaskErrorDetail_GetViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminCustomizationTaskErrorDetail", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets Customization Task error details")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}/getErrorDetails", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}/getErrorDetails", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminCustomizationTaskErrorDetail_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminCustomizationTaskErrorDetail_GetViaIdent /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails /// 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); + 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) @@ -364,12 +363,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -386,7 +385,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -404,12 +403,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTask_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTask_Get.cs index 6dc2fdbce575..425329b30d3f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTask_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTask_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminCustomizationTask_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminCustomizationTask", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a Task from the catalog")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminCustomizationTask_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -176,24 +175,24 @@ public partial class GetAzDevCenterAdminCustomizationTask_Get : global::System.M /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask /// 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); + 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) @@ -401,12 +400,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,7 +422,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, TaskName=TaskName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -441,12 +440,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -458,7 +457,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTask_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTask_GetViaIdentity.cs index 85bc263c7e7e..f64e559690e8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTask_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTask_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminCustomizationTask_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminCustomizationTask", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a Task from the catalog")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks/{taskName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminCustomizationTask_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminCustomizationTask_GetViaIdentity : globa /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask /// 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); + 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) @@ -360,12 +359,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -382,7 +381,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -400,12 +399,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -417,7 +416,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTask_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTask_List.cs index 456e83ad3932..6463aa32d621 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTask_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminCustomizationTask_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByCatalog=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminCustomizationTask_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminCustomizationTask", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTask))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTask))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"List Tasks in the catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/tasks", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminCustomizationTask_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -185,24 +184,24 @@ public partial class GetAzDevCenterAdminCustomizationTask_List : global::System. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResult /// 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); + 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) @@ -410,12 +409,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -432,7 +431,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -450,12 +449,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICustomizationTaskListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICustomizationTaskListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_Get.cs index 8dedd38d6775..244a6c936988 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevBoxDefinition_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminDevBoxDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a Dev Box definition")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminDevBoxDefinition_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -163,24 +162,24 @@ public partial class GetAzDevCenterAdminDevBoxDefinition_Get : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition /// 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); + 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) @@ -388,12 +387,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,7 +409,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -428,12 +427,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,7 +444,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_Get1.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_Get1.cs index bc69035f1709..19ebf4034ac1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_Get1.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_Get1.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetByProject=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/devboxdefinitions/{devBoxDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevBoxDefinition_Get1")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminDevBoxDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a Dev Box definition configured for a project")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminDevBoxDefinition_Get1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -163,24 +162,24 @@ public partial class GetAzDevCenterAdminDevBoxDefinition_Get1 : global::System.M /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition /// 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); + 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) @@ -388,12 +387,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,7 +409,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -428,12 +427,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,7 +444,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_GetViaIdentity.cs index 445379290d3d..354c751d0f16 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevBoxDefinition_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminDevBoxDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a Dev Box definition")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminDevBoxDefinition_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminDevBoxDefinition_GetViaIdentity : global /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition /// 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); + 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) @@ -356,12 +355,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,7 +377,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,7 +412,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_List.cs index 174dade7803e..ca2e1c1250de 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByDevCenter=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevBoxDefinition_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminDevBoxDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"List Dev Box definitions for a devcenter.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminDevBoxDefinition_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -171,24 +170,24 @@ public partial class GetAzDevCenterAdminDevBoxDefinition_List : global::System.M /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResult /// 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); + 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) @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,7 +417,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -436,12 +435,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_List1.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_List1.cs index d3e029215c7c..04bfa65de953 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_List1.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevBoxDefinition_List1.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByProject=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/devboxdefinitions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevBoxDefinition_List1")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminDevBoxDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"List Dev Box definitions configured for a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/devboxdefinitions", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/devboxdefinitions", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminDevBoxDefinition_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -171,24 +170,24 @@ public partial class GetAzDevCenterAdminDevBoxDefinition_List1 : global::System. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResult /// 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); + 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) @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,7 +417,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -436,12 +435,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_Get.cs new file mode 100644 index 000000000000..0cc4f6bac822 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_Get.cs @@ -0,0 +1,484 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets Build details + /// + /// [OpenAPI] GetBuildDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/getBuildDetails" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_Get", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets Build details")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/getBuildDetails", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _buildName; + + /// The ID of the Image Definition Build. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the Image Definition Build.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the Image Definition Build.", + SerializedName = @"buildName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string BuildName { get => this._buildName; set => this._buildName = value; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devCenterName; + + /// The name of the devcenter. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the devcenter.", + SerializedName = @"devCenterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string DevCenterName { get => this._devCenterName; set => this._devCenterName = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageDefinitionName; + + /// The name of the Image Definition. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Image Definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Image Definition.", + SerializedName = @"imageDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageDefinitionName { get => this._imageDefinitionName; set => this._imageDefinitionName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevCenterCatalogImageDefinitionBuildGetBuildDetails' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevCenterCatalogImageDefinitionBuildGetBuildDetails(SubscriptionId, ResourceGroupName, DevCenterName, CatalogName, ImageDefinitionName, BuildName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,DevCenterName=DevCenterName,CatalogName=CatalogName,ImageDefinitionName=ImageDefinitionName,BuildName=BuildName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName, BuildName=BuildName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName, BuildName=BuildName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_GetViaIdentity.cs new file mode 100644 index 000000000000..f8a1645c9794 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_GetViaIdentity.cs @@ -0,0 +1,433 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets Build details + /// + /// [OpenAPI] GetBuildDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/getBuildDetails" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_GetViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets Build details")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/getBuildDetails", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevCenterCatalogImageDefinitionBuildGetBuildDetails' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevCenterCatalogImageDefinitionBuildGetBuildDetailsViaIdentity(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.DevCenterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevCenterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageDefinitionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageDefinitionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.BuildName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.BuildName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevCenterCatalogImageDefinitionBuildGetBuildDetails(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.DevCenterName ?? null, InputObject.CatalogName ?? null, InputObject.ImageDefinitionName ?? null, InputObject.BuildName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Get.cs new file mode 100644 index 000000000000..6923f54d7875 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Get.cs @@ -0,0 +1,480 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets a build for a specified image definition. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a build for a specified image definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _buildName; + + /// The ID of the Image Definition Build. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the Image Definition Build.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the Image Definition Build.", + SerializedName = @"buildName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string BuildName { get => this._buildName; set => this._buildName = value; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devCenterName; + + /// The name of the devcenter. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the devcenter.", + SerializedName = @"devCenterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string DevCenterName { get => this._devCenterName; set => this._devCenterName = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageDefinitionName; + + /// The name of the Image Definition. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Image Definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Image Definition.", + SerializedName = @"imageDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageDefinitionName { get => this._imageDefinitionName; set => this._imageDefinitionName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevCenterCatalogImageDefinitionBuildGet(SubscriptionId, ResourceGroupName, DevCenterName, CatalogName, ImageDefinitionName, BuildName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,DevCenterName=DevCenterName,CatalogName=CatalogName,ImageDefinitionName=ImageDefinitionName,BuildName=BuildName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName, BuildName=BuildName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName, BuildName=BuildName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_GetViaIdentity.cs new file mode 100644 index 000000000000..5fe61a547b66 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_GetViaIdentity.cs @@ -0,0 +1,430 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets a build for a specified image definition. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevCenterCatalogImageDefinitionBuild_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a build for a specified image definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevCenterCatalogImageDefinitionBuildGetViaIdentity(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.DevCenterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevCenterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageDefinitionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageDefinitionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.BuildName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.BuildName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevCenterCatalogImageDefinitionBuildGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.DevCenterName ?? null, InputObject.CatalogName ?? null, InputObject.ImageDefinitionName ?? null, InputObject.BuildName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_List.cs new file mode 100644 index 000000000000..6050527d8447 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_List.cs @@ -0,0 +1,488 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Lists builds for a specified image definition. + /// + /// [OpenAPI] ListByImageDefinition=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevCenterCatalogImageDefinitionBuild_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists builds for a specified image definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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 flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devCenterName; + + /// The name of the devcenter. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the devcenter.", + SerializedName = @"devCenterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string DevCenterName { get => this._devCenterName; set => this._devCenterName = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageDefinitionName; + + /// The name of the Image Definition. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Image Definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Image Definition.", + SerializedName = @"imageDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageDefinitionName { get => this._imageDefinitionName; set => this._imageDefinitionName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResult + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevCenterCatalogImageDefinitionBuildsListByImageDefinition(SubscriptionId, ResourceGroupName, DevCenterName, CatalogName, ImageDefinitionName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,DevCenterName=DevCenterName,CatalogName=CatalogName,ImageDefinitionName=ImageDefinitionName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResult + /// 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 + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevCenterCatalogImageDefinitionBuildsListByImageDefinition_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_Get.cs new file mode 100644 index 000000000000..c640b95267eb --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_Get.cs @@ -0,0 +1,471 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets Image Definition error details + /// + /// [OpenAPI] GetErrorDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/getErrorDetails" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_Get", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets Image Definition error details")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/getErrorDetails", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devCenterName; + + /// The name of the devcenter. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the devcenter.", + SerializedName = @"devCenterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string DevCenterName { get => this._devCenterName; set => this._devCenterName = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageDefinitionName; + + /// The name of the Image Definition. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Image Definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Image Definition.", + SerializedName = @"imageDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageDefinitionName { get => this._imageDefinitionName; set => this._imageDefinitionName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevCenterCatalogImageDefinitionsGetErrorDetails' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevCenterCatalogImageDefinitionsGetErrorDetails(SubscriptionId, ResourceGroupName, DevCenterName, CatalogName, ImageDefinitionName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,DevCenterName=DevCenterName,CatalogName=CatalogName,ImageDefinitionName=ImageDefinitionName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails + /// 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 + // response should be returning an array of some kind. +Pageable + // nested-array / errors / + WriteObject((await response).Error, true); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_GetViaIdentity.cs new file mode 100644 index 000000000000..8052e6cc0294 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_GetViaIdentity.cs @@ -0,0 +1,430 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets Image Definition error details + /// + /// [OpenAPI] GetErrorDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/getErrorDetails" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_GetViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets Image Definition error details")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/getErrorDetails", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevCenterCatalogImageDefinitionsGetErrorDetails' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevCenterCatalogImageDefinitionsGetErrorDetailsViaIdentity(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.DevCenterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevCenterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageDefinitionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageDefinitionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevCenterCatalogImageDefinitionsGetErrorDetails(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.DevCenterName ?? null, InputObject.CatalogName ?? null, InputObject.ImageDefinitionName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails + /// 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 + // response should be returning an array of some kind. +Pageable + // nested-array / errors / + WriteObject((await response).Error, true); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinition_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinition_Get.cs new file mode 100644 index 000000000000..e08ddff7f8d4 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinition_Get.cs @@ -0,0 +1,466 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets an Image Definition from the catalog + /// + /// [OpenAPI] GetByDevCenterCatalog=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevCenterCatalogImageDefinition_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an Image Definition from the catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminDevCenterCatalogImageDefinition_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devCenterName; + + /// The name of the devcenter. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the devcenter.", + SerializedName = @"devCenterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string DevCenterName { get => this._devCenterName; set => this._devCenterName = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageDefinitionName; + + /// The name of the Image Definition. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Image Definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Image Definition.", + SerializedName = @"imageDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageDefinitionName { get => this._imageDefinitionName; set => this._imageDefinitionName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminDevCenterCatalogImageDefinition_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevCenterCatalogImageDefinitionsGetByDevCenterCatalog(SubscriptionId, ResourceGroupName, DevCenterName, CatalogName, ImageDefinitionName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,DevCenterName=DevCenterName,CatalogName=CatalogName,ImageDefinitionName=ImageDefinitionName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinition_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinition_GetViaIdentity.cs new file mode 100644 index 000000000000..62fc647f71c3 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinition_GetViaIdentity.cs @@ -0,0 +1,426 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets an Image Definition from the catalog + /// + /// [OpenAPI] GetByDevCenterCatalog=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevCenterCatalogImageDefinition_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an Image Definition from the catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminDevCenterCatalogImageDefinition_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzDevCenterAdminDevCenterCatalogImageDefinition_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevCenterCatalogImageDefinitionsGetByDevCenterCatalogViaIdentity(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.DevCenterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevCenterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageDefinitionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageDefinitionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevCenterCatalogImageDefinitionsGetByDevCenterCatalog(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.DevCenterName ?? null, InputObject.CatalogName ?? null, InputObject.ImageDefinitionName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinition_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinition_List.cs new file mode 100644 index 000000000000..47ef892a87d4 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenterCatalogImageDefinition_List.cs @@ -0,0 +1,491 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// List Image Definitions in the catalog. + /// + /// [OpenAPI] ListByDevCenterCatalog=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevCenterCatalogImageDefinition_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"List Image Definitions in the catalog.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminDevCenterCatalogImageDefinition_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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 flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devCenterName; + + /// The name of the devcenter. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the devcenter.", + SerializedName = @"devCenterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string DevCenterName { get => this._devCenterName; set => this._devCenterName = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private int _top; + + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of resources to return from the operation. Example: '$top=10'.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of resources to return from the operation. Example: '$top=10'.", + SerializedName = @"$top", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DoNotExport] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Query)] + public int Top { get => this._top; set => this._top = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResult + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminDevCenterCatalogImageDefinition_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevCenterCatalogImageDefinitionsListByDevCenterCatalog(SubscriptionId, ResourceGroupName, DevCenterName, CatalogName, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,DevCenterName=DevCenterName,CatalogName=CatalogName,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResult + /// 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 + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevCenterCatalogImageDefinitionsListByDevCenterCatalog_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_Get.cs index 9f48f3800760..ca01c30c25bd 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevCenter_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminDevCenter", ChangeDescription="PlanId will be removed from the DevCenter output.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a devcenter.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminDevCenter_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -149,24 +148,24 @@ public partial class GetAzDevCenterAdminDevCenter_Get : global::System.Managemen /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter /// 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); + 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) @@ -374,12 +373,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -396,7 +395,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -414,12 +413,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -431,7 +430,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_GetViaIdentity.cs index c9c79bcd60a3..dc9ecf65d016 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevCenter_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminDevCenter", ChangeDescription="PlanId will be removed from the DevCenter output.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a devcenter.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminDevCenter_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminDevCenter_GetViaIdentity : global::Syste /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter /// 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); + 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) @@ -352,12 +351,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -374,7 +373,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -392,12 +391,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -409,7 +408,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_List.cs index 0fb545639bfc..ca227891ae36 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/devcenters" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevCenter_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminDevCenter", ChangeDescription="PlanId will be removed from the DevCenter output.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists all devcenters in a subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/devcenters", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/devcenters", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminDevCenter_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -143,24 +142,24 @@ public partial class GetAzDevCenterAdminDevCenter_List : global::System.Manageme /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResult /// 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); + 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) @@ -368,12 +367,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -390,7 +389,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -408,12 +407,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_List1.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_List1.cs index e52692fc2df9..815a9f71de79 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_List1.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminDevCenter_List1.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminDevCenter_List1")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminDevCenter", ChangeDescription="PlanId will be removed from the DevCenter output.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists all devcenters in a resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminDevCenter_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -157,24 +156,24 @@ public partial class GetAzDevCenterAdminDevCenter_List1 : global::System.Managem /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResult /// 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); + 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) @@ -382,12 +381,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -404,7 +403,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -422,12 +421,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEncryptionSet_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEncryptionSet_Get.cs index 612d1b5b4ee8..0b4fc422bd7c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEncryptionSet_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEncryptionSet_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminEncryptionSet_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a devcenter encryption set.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminEncryptionSet_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -163,24 +163,24 @@ public partial class GetAzDevCenterAdminEncryptionSet_Get : global::System.Manag /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet /// 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); + 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) @@ -388,12 +388,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,7 +410,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -428,12 +428,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,7 +445,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEncryptionSet_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEncryptionSet_GetViaIdentity.cs index 0169839b933c..2aced616be87 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEncryptionSet_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEncryptionSet_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminEncryptionSet_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a devcenter encryption set.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminEncryptionSet_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +110,24 @@ public partial class GetAzDevCenterAdminEncryptionSet_GetViaIdentity : global::S /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet /// 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); + 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) @@ -356,12 +356,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,7 +378,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -396,12 +396,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,7 +413,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEncryptionSet_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEncryptionSet_List.cs index 5c86f20d389b..408932a1c3b4 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEncryptionSet_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEncryptionSet_List.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminEncryptionSet_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists all encryption sets in the devcenter.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminEncryptionSet_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -171,24 +171,24 @@ public partial class GetAzDevCenterAdminEncryptionSet_List : global::System.Mana /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResult /// 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); + 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) @@ -396,12 +396,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,7 +418,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -436,12 +436,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinitionErrorDetail_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinitionErrorDetail_Get.cs index f063f2bb68d7..ac3693be8cef 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinitionErrorDetail_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinitionErrorDetail_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetErrorDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminEnvironmentDefinitionErrorDetail_Get", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminEnvironmentDefinitionErrorDetail", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets Environment Definition error details")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminEnvironmentDefinitionErrorDetail_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -176,24 +175,24 @@ public partial class GetAzDevCenterAdminEnvironmentDefinitionErrorDetail_Get : g /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails /// 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); + 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) @@ -404,12 +403,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,7 +425,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, EnvironmentDefinitionName=EnvironmentDefinitionName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -444,12 +443,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinitionErrorDetail_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinitionErrorDetail_GetViaIdentity.cs index 7bf943b1a960..9e45fb00d013 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinitionErrorDetail_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinitionErrorDetail_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetErrorDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminEnvironmentDefinitionErrorDetail_GetViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminEnvironmentDefinitionErrorDetail", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets Environment Definition error details")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminEnvironmentDefinitionErrorDetail_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminEnvironmentDefinitionErrorDetail_GetViaI /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails /// 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); + 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) @@ -364,12 +363,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -386,7 +385,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -404,12 +403,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinition_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinition_Get.cs index 7afa59fb0fdf..47bef33bfbde 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinition_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinition_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminEnvironmentDefinition_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminEnvironmentDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an environment definition from the catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminEnvironmentDefinition_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -177,24 +176,24 @@ public partial class GetAzDevCenterAdminEnvironmentDefinition_Get : global::Syst /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition /// 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); + 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) @@ -402,12 +401,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -424,7 +423,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -442,12 +441,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -459,7 +458,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinition_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinition_GetViaIdentity.cs index 3fe5454efde6..d6ac7df65cc6 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinition_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinition_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminEnvironmentDefinition_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminEnvironmentDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an environment definition from the catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminEnvironmentDefinition_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminEnvironmentDefinition_GetViaIdentity : g /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition /// 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); + 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) @@ -360,12 +359,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -382,7 +381,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -400,12 +399,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -417,7 +416,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinition_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinition_List.cs index 962cdc2a2d67..6f7fb9fbf4e3 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinition_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentDefinition_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByCatalog=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminEnvironmentDefinition_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminEnvironmentDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"List environment definitions in the catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/environmentDefinitions", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminEnvironmentDefinition_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -185,24 +184,24 @@ public partial class GetAzDevCenterAdminEnvironmentDefinition_List : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResult /// 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); + 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) @@ -410,12 +409,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -432,7 +431,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -450,12 +449,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentType_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentType_Get.cs index 6af2090925a6..60cf5ddc76ac 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentType_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentType_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminEnvironmentType_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminEnvironmentType_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -163,24 +162,24 @@ public partial class GetAzDevCenterAdminEnvironmentType_Get : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// 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); + 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) @@ -388,12 +387,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,7 +409,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -428,12 +427,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,7 +444,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentType_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentType_GetViaIdentity.cs index 5421a1b8fd66..8d555c673cf1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentType_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentType_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminEnvironmentType_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminEnvironmentType_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminEnvironmentType_GetViaIdentity : global: /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// 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); + 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) @@ -356,12 +355,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,7 +377,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,7 +412,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentType_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentType_List.cs index 9cd1344772e3..517892cacbde 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentType_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminEnvironmentType_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByDevCenter=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminEnvironmentType_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists environment types for the devcenter.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminEnvironmentType_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -171,24 +170,24 @@ public partial class GetAzDevCenterAdminEnvironmentType_List : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResult /// 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); + 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) @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,7 +417,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -436,12 +435,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminGallery_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminGallery_Get.cs index e0a3aca4093d..01742984bb09 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminGallery_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminGallery_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminGallery_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminGallery", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a gallery")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminGallery_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -163,24 +162,24 @@ public partial class GetAzDevCenterAdminGallery_Get : global::System.Management. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery /// 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); + 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) @@ -388,12 +387,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,7 +409,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -428,12 +427,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,7 +444,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminGallery_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminGallery_GetViaIdentity.cs index 8660e8cadb26..f6555f2ed982 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminGallery_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminGallery_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminGallery_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminGallery", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a gallery")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminGallery_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminGallery_GetViaIdentity : global::System. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery /// 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); + 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) @@ -356,12 +355,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,7 +377,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,7 +412,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminGallery_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminGallery_List.cs index 922862dd0fbf..04000f2c2014 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminGallery_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminGallery_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByDevCenter=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminGallery_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminGallery", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists galleries for a devcenter.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminGallery_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -171,24 +170,24 @@ public partial class GetAzDevCenterAdminGallery_List : global::System.Management /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResult /// 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); + 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) @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,7 +417,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -436,12 +435,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGalleryListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGalleryListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_Get.cs index 36d9c4dafc26..6cfa6e06cf16 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}/versions/{versionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminImageVersion_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminImageVersion", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an image version.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}/versions/{versionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}/versions/{versionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminImageVersion_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -190,24 +189,24 @@ public partial class GetAzDevCenterAdminImageVersion_Get : global::System.Manage /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion /// 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); + 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) @@ -415,12 +414,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -437,7 +436,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, GalleryName=GalleryName, ImageName=ImageName, VersionName=VersionName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -455,12 +454,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -472,7 +471,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_Get1.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_Get1.cs new file mode 100644 index 000000000000..d143599ebaed --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_Get1.cs @@ -0,0 +1,465 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets an image version. + /// + /// [OpenAPI] GetByProject=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminImageVersion_Get1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an image version.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminImageVersion_Get1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageName; + + /// The name of the image. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the image.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the image.", + SerializedName = @"imageName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageName { get => this._imageName; set => this._imageName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private string _versionName; + + /// The version of the image. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The version of the image.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The version of the image.", + SerializedName = @"versionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string VersionName { get => this._versionName; set => this._versionName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminImageVersion_Get1() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ImageVersionsGetByProject(SubscriptionId, ResourceGroupName, ProjectName, ImageName, VersionName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,ProjectName=ProjectName,ImageName=ImageName,VersionName=VersionName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, ImageName=ImageName, VersionName=VersionName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, ImageName=ImageName, VersionName=VersionName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_GetViaIdentity.cs index 13815e822f32..c86f733fba5d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}/versions/{versionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminImageVersion_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminImageVersion", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an image version.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}/versions/{versionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}/versions/{versionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminImageVersion_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminImageVersion_GetViaIdentity : global::Sy /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion /// 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); + 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) @@ -364,12 +363,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -386,7 +385,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -404,12 +403,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -421,7 +420,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_GetViaIdentity1.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_GetViaIdentity1.cs new file mode 100644 index 000000000000..9e99a2bc9150 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_GetViaIdentity1.cs @@ -0,0 +1,424 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets an image version. + /// + /// [OpenAPI] GetByProject=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminImageVersion_GetViaIdentity1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an image version.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions/{versionName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminImageVersion_GetViaIdentity1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminImageVersion_GetViaIdentity1() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ImageVersionsGetByProjectViaIdentity(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.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.VersionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.VersionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ImageVersionsGetByProject(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ProjectName ?? null, InputObject.ImageName ?? null, InputObject.VersionName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_List.cs index c8c8fc46db70..eac2576d2193 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_List.cs @@ -13,12 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByImage=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}/versions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminImageVersion_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminImageVersion", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ParameterSetBreakingChange(new string[] {"List"}, "15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The default parameter set will change from list dev center image versions to list project image versions.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersion))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists versions for an image.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}/versions", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}/versions", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminImageVersion_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -183,24 +181,24 @@ public partial class GetAzDevCenterAdminImageVersion_List : global::System.Manag /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResult /// 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); + 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) @@ -408,12 +406,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -430,7 +428,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, GalleryName=GalleryName, ImageName=ImageName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -448,12 +446,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageVersionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_List1.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_List1.cs new file mode 100644 index 000000000000..140b915ab442 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImageVersion_List1.cs @@ -0,0 +1,473 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Lists versions for an image. + /// + /// [OpenAPI] ListByProject=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminImageVersion_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists versions for an image.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}/versions", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminImageVersion_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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 flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageName; + + /// The name of the image. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the image.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the image.", + SerializedName = @"imageName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageName { get => this._imageName; set => this._imageName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResult + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminImageVersion_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ImageVersionsListByProject(SubscriptionId, ResourceGroupName, ProjectName, ImageName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,ProjectName=ProjectName,ImageName=ImageName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, ImageName=ImageName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, ImageName=ImageName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageVersionListResult + /// 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 + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ImageVersionsListByProject_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_Get.cs index f705381b5ea4..1f65d52a06f6 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminImage_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminImage", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a gallery image.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminImage_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -177,24 +176,24 @@ public partial class GetAzDevCenterAdminImage_Get : global::System.Management.Au /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage /// 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); + 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) @@ -402,12 +401,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -424,7 +423,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, GalleryName=GalleryName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -442,12 +441,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -459,7 +458,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_Get1.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_Get1.cs new file mode 100644 index 000000000000..bc51b9ee83ce --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_Get1.cs @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets an image. + /// + /// [OpenAPI] GetByProject=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminImage_Get1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an image.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminImage_Get1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the image. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the image.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the image.", + SerializedName = @"imageName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ImageName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminImage_Get1() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ImagesGetByProject(SubscriptionId, ResourceGroupName, ProjectName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,ProjectName=ProjectName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, Name=Name }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, Name=Name }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_GetViaIdentity.cs index 39283c90f91a..bcf5262e561e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminImage_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminImage", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a gallery image.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images/{imageName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminImage_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminImage_GetViaIdentity : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage /// 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); + 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) @@ -360,12 +359,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -382,7 +381,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -400,12 +399,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -417,7 +416,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_GetViaIdentity1.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_GetViaIdentity1.cs new file mode 100644 index 000000000000..ac06575aab49 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_GetViaIdentity1.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets an image. + /// + /// [OpenAPI] GetByProject=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminImage_GetViaIdentity1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an image.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images/{imageName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminImage_GetViaIdentity1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminImage_GetViaIdentity1() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ImagesGetByProjectViaIdentity(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.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ImagesGetByProject(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ProjectName ?? null, InputObject.ImageName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_List.cs index fbb3fd37d721..c0525662b725 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByDevCenter=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/images" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminImage_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminImage", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists images for a devcenter.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/images", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/images", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminImage_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -171,24 +170,24 @@ public partial class GetAzDevCenterAdminImage_List : global::System.Management.A /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResult /// 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); + 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) @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,7 +417,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -436,12 +435,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_List1.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_List1.cs index 782cd289b082..c6afa2ecf051 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_List1.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_List1.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByGallery=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminImage_List1")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminImage", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImage))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists images for a gallery.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}/images", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminImage_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -185,24 +184,24 @@ public partial class GetAzDevCenterAdminImage_List1 : global::System.Management. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResult /// 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); + 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) @@ -410,12 +409,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -432,7 +431,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, GalleryName=GalleryName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -450,12 +449,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IImageListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_List2.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_List2.cs new file mode 100644 index 000000000000..028f567af68e --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminImage_List2.cs @@ -0,0 +1,459 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Lists images for a project. + /// + /// [OpenAPI] ListByProject=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminImage_List2")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImage))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists images for a project.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/images", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminImage_List2 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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 flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResult + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminImage_List2() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ImagesListByProject(SubscriptionId, ResourceGroupName, ProjectName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,ProjectName=ProjectName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageListResult + /// 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 + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ImagesListByProject_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnectionHealthDetail_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnectionHealthDetail_GetViaIdentity.cs index 34f79001f8bc..1c7a14c8b163 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnectionHealthDetail_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnectionHealthDetail_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetHealthDetails=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/healthChecks/latest" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminNetworkConnectionHealthDetail_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminNetworkConnectionHealthDetail", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets health check status details.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/healthChecks/latest", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/healthChecks/latest", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminNetworkConnectionHealthDetail_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminNetworkConnectionHealthDetail_GetViaIden /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails /// 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); + 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) @@ -353,12 +352,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -375,7 +374,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -393,12 +392,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,7 +409,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnectionHealthDetail_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnectionHealthDetail_List.cs index 76a538afd711..f8c42ae59b29 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnectionHealthDetail_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnectionHealthDetail_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListHealthDetails=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/healthChecks" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminNetworkConnectionHealthDetail_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminNetworkConnectionHealthDetail", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetails))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetails))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists health check status details")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/healthChecks", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/healthChecks", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminNetworkConnectionHealthDetail_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -165,24 +164,24 @@ public partial class GetAzDevCenterAdminNetworkConnectionHealthDetail_List : glo /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResult /// 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); + 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) @@ -390,12 +389,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,7 +411,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), NetworkConnectionName=NetworkConnectionName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -430,12 +429,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IHealthCheckStatusDetailsListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IHealthCheckStatusDetailsListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint_List.cs index de5989fdb28c..512d417f7157 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint_List.cs @@ -16,10 +16,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListOutboundNetworkDependenciesEndpoints=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/outboundNetworkDependenciesEndpoints" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpoint))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpoint))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed for outbound access in order for the Dev Box service to function.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/outboundNetworkDependenciesEndpoints", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/outboundNetworkDependenciesEndpoints", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminNetworkConnectionOutboundNetworkDependencyEndpoint_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -173,24 +173,24 @@ public partial class GetAzDevCenterAdminNetworkConnectionOutboundNetworkDependen /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollection /// 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); + 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) @@ -399,12 +399,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -421,7 +421,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), NetworkConnectionName=NetworkConnectionName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -439,12 +439,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOutboundEnvironmentEndpointCollection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOutboundEnvironmentEndpointCollection /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_Get.cs index 51f4a9e45ca1..782688402646 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminNetworkConnection_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminNetworkConnection", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a network connection resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminNetworkConnection_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -149,24 +148,24 @@ public partial class GetAzDevCenterAdminNetworkConnection_Get : global::System.M /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection /// 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); + 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) @@ -374,12 +373,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -396,7 +395,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -414,12 +413,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -431,7 +430,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_GetViaIdentity.cs index f4e5489f26a8..a8d5e8c1a9fc 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminNetworkConnection_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminNetworkConnection", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a network connection resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminNetworkConnection_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminNetworkConnection_GetViaIdentity : globa /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection /// 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); + 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) @@ -352,12 +351,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -374,7 +373,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -392,12 +391,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -409,7 +408,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_List.cs index 710884b040a2..ab4cfc025377 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/networkConnections" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminNetworkConnection_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminNetworkConnection", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists network connections in a subscription")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/networkConnections", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/networkConnections", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminNetworkConnection_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -143,24 +142,24 @@ public partial class GetAzDevCenterAdminNetworkConnection_List : global::System. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResult /// 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); + 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) @@ -368,12 +367,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -390,7 +389,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -408,12 +407,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_List1.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_List1.cs index 1fe543032577..a3ff1a47d770 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_List1.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminNetworkConnection_List1.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminNetworkConnection_List1")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminNetworkConnection", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists network connections in a resource group")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminNetworkConnection_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -157,24 +156,24 @@ public partial class GetAzDevCenterAdminNetworkConnection_List1 : global::System /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResult /// 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); + 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) @@ -382,12 +381,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -404,7 +403,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -422,12 +421,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminOperationStatus_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminOperationStatus_Get.cs index 86964a9cbb92..8580df7bea0a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminOperationStatus_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminOperationStatus_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/locations/{location}/operationStatuses/{operationId}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminOperationStatus_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminOperationStatus", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets the current status of an async operation.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/locations/{location}/operationStatuses/{operationId}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/locations/{location}/operationStatuses/{operationId}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminOperationStatus_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -148,36 +147,36 @@ public partial class GetAzDevCenterAdminOperationStatus_Get : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus /// from the remote call /// /// Determines if the rest of the onAccepted method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -383,12 +382,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 202 (Accepted). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -400,7 +399,7 @@ protected override void StopProcessing() return ; } // onAccepted - response for 202 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } @@ -409,12 +408,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -431,7 +430,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, OperationId=OperationId }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -449,12 +448,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -466,7 +465,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminOperationStatus_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminOperationStatus_GetViaIdentity.cs index 404bcf7c867a..19cf405d0cc3 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminOperationStatus_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminOperationStatus_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/locations/{location}/operationStatuses/{operationId}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminOperationStatus_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminOperationStatus", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets the current status of an async operation.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/locations/{location}/operationStatuses/{operationId}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/locations/{location}/operationStatuses/{operationId}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminOperationStatus_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,36 +109,36 @@ public partial class GetAzDevCenterAdminOperationStatus_GetViaIdentity : global: /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus /// from the remote call /// /// Determines if the rest of the onAccepted method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -362,12 +361,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 202 (Accepted). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -379,7 +378,7 @@ protected override void StopProcessing() return ; } // onAccepted - response for 202 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } @@ -388,12 +387,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,7 +409,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -428,12 +427,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,7 +444,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminOperation_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminOperation_List.cs index 959c5cdfe34a..33642e6d683e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminOperation_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminOperation_List.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists all of the available resource provider operations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/providers/Microsoft.DevCenter/operations", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/providers/Microsoft.DevCenter/operations", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminOperation_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -108,12 +108,12 @@ public partial class GetAzDevCenterAdminOperation_List : global::System.Manageme /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -330,12 +330,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -352,7 +352,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlanMember_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlanMember_Get.cs deleted file mode 100644 index ee046813904e..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlanMember_Get.cs +++ /dev/null @@ -1,452 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Gets a devcenter plan member. - /// - /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminPlanMember_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a devcenter plan member.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}", ApiVersion = "2024-05-01-preview")] - public partial class GetAzDevCenterAdminPlanMember_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 _memberName; - - /// The name of a devcenter plan member. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of a devcenter plan member.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of a devcenter plan member.", - SerializedName = @"memberName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string MemberName { get => this._memberName; set => this._memberName = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } - - /// Backing field for property. - private string _planName; - - /// The name of the devcenter plan. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter plan.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the devcenter plan.", - SerializedName = @"planName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string PlanName { get => this._planName; set => this._planName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); - } - } - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public GetAzDevCenterAdminPlanMember_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - foreach( var SubscriptionId in this.SubscriptionId ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PlanMembersGet(SubscriptionId, ResourceGroupName, PlanName, MemberName, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,PlanName=PlanName,MemberName=MemberName}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, PlanName=PlanName, MemberName=MemberName }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, PlanName=PlanName, MemberName=MemberName }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlanMember_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlanMember_GetViaIdentity.cs deleted file mode 100644 index fad73761bdd7..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlanMember_GetViaIdentity.cs +++ /dev/null @@ -1,421 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Gets a devcenter plan member. - /// - /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminPlanMember_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a devcenter plan member.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}", ApiVersion = "2024-05-01-preview")] - public partial class GetAzDevCenterAdminPlanMember_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); - } - } - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public GetAzDevCenterAdminPlanMember_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.PlanMembersGetViaIdentity(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.PlanName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PlanName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.MemberName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.MemberName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.PlanMembersGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PlanName ?? null, InputObject.MemberName ?? null, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlanMember_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlanMember_List.cs deleted file mode 100644 index 85951a93c012..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlanMember_List.cs +++ /dev/null @@ -1,477 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Lists all of the members assigned to a devcenter plan. - /// - /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminPlanMember_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists all of the members assigned to a devcenter plan.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members", ApiVersion = "2024-05-01-preview")] - public partial class GetAzDevCenterAdminPlanMember_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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 flag to tell whether it is the first onOK call. - private bool _isFirst = true; - - /// Link to retrieve next page. - private string _nextLink; - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } - - /// Backing field for property. - private string _planName; - - /// The name of the devcenter plan. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter plan.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the devcenter plan.", - SerializedName = @"planName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string PlanName { get => this._planName; set => this._planName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// Backing field for property. - private int _top; - - /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of resources to return from the operation. Example: '$top=10'.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The maximum number of resources to return from the operation. Example: '$top=10'.", - SerializedName = @"$top", - PossibleTypes = new [] { typeof(int) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DoNotExport] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Query)] - public int Top { get => this._top; set => this._top = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResult - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); - } - } - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public GetAzDevCenterAdminPlanMember_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - foreach( var SubscriptionId in this.SubscriptionId ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PlanMembersList(SubscriptionId, ResourceGroupName, PlanName, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,PlanName=PlanName,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, PlanName=PlanName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, PlanName=PlanName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMembersListResult - /// 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 - // response should be returning an array of some kind. +Pageable - // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); - _nextLink = result.NextLink; - if (_isFirst) - { - _isFirst = false; - while (_nextLink != null) - { - if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) - { - requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get ); - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PlanMembersList_Call(requestMessage, onOk, onDefault, this, Pipeline); - } - } - } - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlan_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlan_Get.cs deleted file mode 100644 index 4b1ae704e047..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlan_Get.cs +++ /dev/null @@ -1,439 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Gets a devcenter plan. - /// - /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminPlan_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a devcenter plan.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}", ApiVersion = "2024-05-01-preview")] - public partial class GetAzDevCenterAdminPlan_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the devcenter plan. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter plan.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the devcenter plan.", - SerializedName = @"planName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("PlanName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); - } - } - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public GetAzDevCenterAdminPlan_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - foreach( var SubscriptionId in this.SubscriptionId ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PlansGet(SubscriptionId, ResourceGroupName, Name, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,Name=Name}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlan_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlan_GetViaIdentity.cs deleted file mode 100644 index 8aa955c0a8ec..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlan_GetViaIdentity.cs +++ /dev/null @@ -1,417 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Gets a devcenter plan. - /// - /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminPlan_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a devcenter plan.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}", ApiVersion = "2024-05-01-preview")] - public partial class GetAzDevCenterAdminPlan_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); - } - } - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public GetAzDevCenterAdminPlan_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.PlansGetViaIdentity(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.PlanName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PlanName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.PlansGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PlanName ?? null, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlan_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlan_List.cs deleted file mode 100644 index 8e71d689a014..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlan_List.cs +++ /dev/null @@ -1,449 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Lists all devcenter plans in a subscription. - /// - /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/plans" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminPlan_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists all devcenter plans in a subscription.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/plans", ApiVersion = "2024-05-01-preview")] - public partial class GetAzDevCenterAdminPlan_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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 flag to tell whether it is the first onOK call. - private bool _isFirst = true; - - /// Link to retrieve next page. - private string _nextLink; - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string[] _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// Backing field for property. - private int _top; - - /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of resources to return from the operation. Example: '$top=10'.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The maximum number of resources to return from the operation. Example: '$top=10'.", - SerializedName = @"$top", - PossibleTypes = new [] { typeof(int) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DoNotExport] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Query)] - public int Top { get => this._top; set => this._top = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResult - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); - } - } - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public GetAzDevCenterAdminPlan_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - foreach( var SubscriptionId in this.SubscriptionId ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PlansListBySubscription(SubscriptionId, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) - { - 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 { SubscriptionId=SubscriptionId, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResult - /// 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 - // response should be returning an array of some kind. +Pageable - // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); - _nextLink = result.NextLink; - if (_isFirst) - { - _isFirst = false; - while (_nextLink != null) - { - if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) - { - requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get ); - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PlansListBySubscription_Call(requestMessage, onOk, onDefault, this, Pipeline); - } - } - } - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlan_List1.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlan_List1.cs deleted file mode 100644 index 41054b5f43e3..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPlan_List1.cs +++ /dev/null @@ -1,463 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Lists all devcenter plans in a resource group. - /// - /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminPlan_List1")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists all devcenter plans in a resource group.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans", ApiVersion = "2024-05-01-preview")] - public partial class GetAzDevCenterAdminPlan_List1 : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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 flag to tell whether it is the first onOK call. - private bool _isFirst = true; - - /// Link to retrieve next page. - private string _nextLink; - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// Backing field for property. - private int _top; - - /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of resources to return from the operation. Example: '$top=10'.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The maximum number of resources to return from the operation. Example: '$top=10'.", - SerializedName = @"$top", - PossibleTypes = new [] { typeof(int) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DoNotExport] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Query)] - public int Top { get => this._top; set => this._top = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResult - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); - } - } - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public GetAzDevCenterAdminPlan_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - foreach( var SubscriptionId in this.SubscriptionId ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PlansListByResourceGroup(SubscriptionId, ResourceGroupName, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanListResult - /// 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 - // response should be returning an array of some kind. +Pageable - // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); - _nextLink = result.NextLink; - if (_isFirst) - { - _isFirst = false; - while (_nextLink != null) - { - if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) - { - requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get ); - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PlansListByResourceGroup_Call(requestMessage, onOk, onDefault, this, Pipeline); - } - } - } - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPool_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPool_Get.cs index 594bfc79fb76..30bd8d5be8b8 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPool_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPool_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminPool_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminPool", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a machine pool")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminPool_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -163,24 +162,24 @@ public partial class GetAzDevCenterAdminPool_Get : global::System.Management.Aut /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool /// 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); + 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) @@ -388,12 +387,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,7 +409,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -428,12 +427,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,7 +444,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPool_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPool_GetViaIdentity.cs index 9adb01730234..03266fcb4573 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPool_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPool_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminPool_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminPool", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a machine pool")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminPool_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminPool_GetViaIdentity : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool /// 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); + 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) @@ -356,12 +355,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,7 +377,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,7 +412,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPool_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPool_List.cs index 4c385f8e50ac..427c0ef1d514 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPool_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminPool_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByProject=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminPool_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminPool", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists pools for a project")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminPool_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -171,24 +170,24 @@ public partial class GetAzDevCenterAdminPool_List : global::System.Management.Au /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResult /// 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); + 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) @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,7 +417,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -436,12 +435,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectAllowedEnvironmentType_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectAllowedEnvironmentType_Get.cs index 229d3db11a81..e5f7ad46504f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectAllowedEnvironmentType_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectAllowedEnvironmentType_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectAllowedEnvironmentType_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectAllowedEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an allowed environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectAllowedEnvironmentType_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -162,24 +161,24 @@ public partial class GetAzDevCenterAdminProjectAllowedEnvironmentType_Get : glob /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType /// 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); + 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) @@ -387,12 +386,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -409,7 +408,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, EnvironmentTypeName=EnvironmentTypeName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -427,12 +426,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -444,7 +443,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectAllowedEnvironmentType_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectAllowedEnvironmentType_GetViaIdentity.cs index 7f9afecbe8e2..a561df26d85c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectAllowedEnvironmentType_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectAllowedEnvironmentType_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectAllowedEnvironmentType_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectAllowedEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an allowed environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectAllowedEnvironmentType_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminProjectAllowedEnvironmentType_GetViaIden /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType /// 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); + 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) @@ -357,12 +356,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -379,7 +378,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -397,12 +396,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -414,7 +413,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectAllowedEnvironmentType_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectAllowedEnvironmentType_List.cs index b74783e0add1..d20b296f7d9f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectAllowedEnvironmentType_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectAllowedEnvironmentType_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectAllowedEnvironmentType_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectAllowedEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists allowed environment types for a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/allowedEnvironmentTypes", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectAllowedEnvironmentType_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -171,24 +170,24 @@ public partial class GetAzDevCenterAdminProjectAllowedEnvironmentType_List : glo /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResult /// 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); + 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) @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,7 +417,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -436,12 +435,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAllowedEnvironmentTypeListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAllowedEnvironmentTypeListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_Get.cs new file mode 100644 index 000000000000..2d95da2477c3 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_Get.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets Build details + /// + /// [OpenAPI] GetBuildDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/getBuildDetails" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_Get", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets Build details")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/getBuildDetails", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _buildName; + + /// The ID of the Image Definition Build. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the Image Definition Build.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the Image Definition Build.", + SerializedName = @"buildName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string BuildName { get => this._buildName; set => this._buildName = value; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageDefinitionName; + + /// The name of the Image Definition. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Image Definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Image Definition.", + SerializedName = @"imageDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageDefinitionName { get => this._imageDefinitionName; set => this._imageDefinitionName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectCatalogImageDefinitionBuildGetBuildDetails' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectCatalogImageDefinitionBuildGetBuildDetails(SubscriptionId, ResourceGroupName, ProjectName, CatalogName, ImageDefinitionName, BuildName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,ProjectName=ProjectName,CatalogName=CatalogName,ImageDefinitionName=ImageDefinitionName,BuildName=BuildName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName, BuildName=BuildName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName, BuildName=BuildName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_GetViaIdentity.cs new file mode 100644 index 000000000000..80ad0af2edc9 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_GetViaIdentity.cs @@ -0,0 +1,432 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets Build details + /// + /// [OpenAPI] GetBuildDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/getBuildDetails" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_GetViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets Build details")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/getBuildDetails", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminProjectCatalogImageDefinitionBuildDetail_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectCatalogImageDefinitionBuildGetBuildDetails' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProjectCatalogImageDefinitionBuildGetBuildDetailsViaIdentity(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.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageDefinitionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageDefinitionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.BuildName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.BuildName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProjectCatalogImageDefinitionBuildGetBuildDetails(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ProjectName ?? null, InputObject.CatalogName ?? null, InputObject.ImageDefinitionName ?? null, InputObject.BuildName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionBuild_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionBuild_Get.cs new file mode 100644 index 000000000000..dc610176d81a --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionBuild_Get.cs @@ -0,0 +1,479 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets a build for a specified image definition. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectCatalogImageDefinitionBuild_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a build for a specified image definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminProjectCatalogImageDefinitionBuild_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _buildName; + + /// The ID of the Image Definition Build. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the Image Definition Build.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the Image Definition Build.", + SerializedName = @"buildName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string BuildName { get => this._buildName; set => this._buildName = value; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageDefinitionName; + + /// The name of the Image Definition. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Image Definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Image Definition.", + SerializedName = @"imageDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageDefinitionName { get => this._imageDefinitionName; set => this._imageDefinitionName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminProjectCatalogImageDefinitionBuild_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectCatalogImageDefinitionBuildGet(SubscriptionId, ResourceGroupName, ProjectName, CatalogName, ImageDefinitionName, BuildName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,ProjectName=ProjectName,CatalogName=CatalogName,ImageDefinitionName=ImageDefinitionName,BuildName=BuildName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName, BuildName=BuildName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName, BuildName=BuildName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionBuild_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionBuild_GetViaIdentity.cs new file mode 100644 index 000000000000..67c65c38e7c8 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionBuild_GetViaIdentity.cs @@ -0,0 +1,429 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets a build for a specified image definition. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectCatalogImageDefinitionBuild_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a build for a specified image definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminProjectCatalogImageDefinitionBuild_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzDevCenterAdminProjectCatalogImageDefinitionBuild_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProjectCatalogImageDefinitionBuildGetViaIdentity(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.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageDefinitionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageDefinitionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.BuildName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.BuildName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProjectCatalogImageDefinitionBuildGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ProjectName ?? null, InputObject.CatalogName ?? null, InputObject.ImageDefinitionName ?? null, InputObject.BuildName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionBuild_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionBuild_List.cs new file mode 100644 index 000000000000..f8312c065593 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionBuild_List.cs @@ -0,0 +1,487 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Lists builds for a specified image definition. + /// + /// [OpenAPI] ListByImageDefinition=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectCatalogImageDefinitionBuild_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists builds for a specified image definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminProjectCatalogImageDefinitionBuild_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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 flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageDefinitionName; + + /// The name of the Image Definition. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Image Definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Image Definition.", + SerializedName = @"imageDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageDefinitionName { get => this._imageDefinitionName; set => this._imageDefinitionName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResult + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminProjectCatalogImageDefinitionBuild_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectCatalogImageDefinitionBuildsListByImageDefinition(SubscriptionId, ResourceGroupName, ProjectName, CatalogName, ImageDefinitionName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,ProjectName=ProjectName,CatalogName=CatalogName,ImageDefinitionName=ImageDefinitionName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildListResult + /// 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 + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectCatalogImageDefinitionBuildsListByImageDefinition_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_Get.cs new file mode 100644 index 000000000000..a7fd0eba1128 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_Get.cs @@ -0,0 +1,470 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets Image Definition error details + /// + /// [OpenAPI] GetErrorDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/getErrorDetails" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_Get", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets Image Definition error details")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/getErrorDetails", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageDefinitionName; + + /// The name of the Image Definition. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Image Definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Image Definition.", + SerializedName = @"imageDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageDefinitionName { get => this._imageDefinitionName; set => this._imageDefinitionName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectCatalogImageDefinitionsGetErrorDetails' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectCatalogImageDefinitionsGetErrorDetails(SubscriptionId, ResourceGroupName, ProjectName, CatalogName, ImageDefinitionName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,ProjectName=ProjectName,CatalogName=CatalogName,ImageDefinitionName=ImageDefinitionName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails + /// 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 + // response should be returning an array of some kind. +Pageable + // nested-array / errors / + WriteObject((await response).Error, true); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_GetViaIdentity.cs new file mode 100644 index 000000000000..cb4605468aee --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_GetViaIdentity.cs @@ -0,0 +1,429 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets Image Definition error details + /// + /// [OpenAPI] GetErrorDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/getErrorDetails" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_GetViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets Image Definition error details")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/getErrorDetails", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminProjectCatalogImageDefinitionErrorDetail_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectCatalogImageDefinitionsGetErrorDetails' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProjectCatalogImageDefinitionsGetErrorDetailsViaIdentity(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.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageDefinitionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageDefinitionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProjectCatalogImageDefinitionsGetErrorDetails(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ProjectName ?? null, InputObject.CatalogName ?? null, InputObject.ImageDefinitionName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails + /// 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 + // response should be returning an array of some kind. +Pageable + // nested-array / errors / + WriteObject((await response).Error, true); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinition_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinition_Get.cs new file mode 100644 index 000000000000..1fe3e604e7d8 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinition_Get.cs @@ -0,0 +1,465 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets an Image Definition from the catalog + /// + /// [OpenAPI] GetByProjectCatalog=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectCatalogImageDefinition_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an Image Definition from the catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminProjectCatalogImageDefinition_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageDefinitionName; + + /// The name of the Image Definition. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Image Definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Image Definition.", + SerializedName = @"imageDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageDefinitionName { get => this._imageDefinitionName; set => this._imageDefinitionName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminProjectCatalogImageDefinition_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectCatalogImageDefinitionsGetByProjectCatalog(SubscriptionId, ResourceGroupName, ProjectName, CatalogName, ImageDefinitionName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,ProjectName=ProjectName,CatalogName=CatalogName,ImageDefinitionName=ImageDefinitionName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinition_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinition_GetViaIdentity.cs new file mode 100644 index 000000000000..b5a0b648baf8 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinition_GetViaIdentity.cs @@ -0,0 +1,425 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets an Image Definition from the catalog + /// + /// [OpenAPI] GetByProjectCatalog=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectCatalogImageDefinition_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an Image Definition from the catalog")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminProjectCatalogImageDefinition_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzDevCenterAdminProjectCatalogImageDefinition_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProjectCatalogImageDefinitionsGetByProjectCatalogViaIdentity(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.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageDefinitionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageDefinitionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProjectCatalogImageDefinitionsGetByProjectCatalog(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ProjectName ?? null, InputObject.CatalogName ?? null, InputObject.ImageDefinitionName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinition_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinition_List.cs new file mode 100644 index 000000000000..344af504faa5 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogImageDefinition_List.cs @@ -0,0 +1,490 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// List Image Definitions in the catalog. + /// + /// [OpenAPI] ListByProjectCatalog=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectCatalogImageDefinition_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"List Image Definitions in the catalog.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminProjectCatalogImageDefinition_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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 flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private int _top; + + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of resources to return from the operation. Example: '$top=10'.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of resources to return from the operation. Example: '$top=10'.", + SerializedName = @"$top", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DoNotExport] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Query)] + public int Top { get => this._top; set => this._top = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResult + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminProjectCatalogImageDefinition_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectCatalogImageDefinitionsListByProjectCatalog(SubscriptionId, ResourceGroupName, ProjectName, CatalogName, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,ProjectName=ProjectName,CatalogName=CatalogName,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionListResult + /// 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 + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectCatalogImageDefinitionsListByProjectCatalog_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogSyncErrorDetail_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogSyncErrorDetail_Get.cs index 02af72be015d..ff1f89d1ead9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogSyncErrorDetail_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogSyncErrorDetail_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetSyncErrorDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/getSyncErrorDetails" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectCatalogSyncErrorDetail_Get", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectCatalogSyncErrorDetail", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets project catalog synchronization error details")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/getSyncErrorDetails", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/getSyncErrorDetails", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectCatalogSyncErrorDetail_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -162,24 +161,24 @@ public partial class GetAzDevCenterAdminProjectCatalogSyncErrorDetail_Get : glob /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails /// 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); + 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) @@ -390,12 +389,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,7 +411,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -430,12 +429,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -447,7 +446,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogSyncErrorDetail_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogSyncErrorDetail_GetViaIdentity.cs index 47dd3fed8495..9b8efa0aaa24 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogSyncErrorDetail_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalogSyncErrorDetail_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetSyncErrorDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/getSyncErrorDetails" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectCatalogSyncErrorDetail_GetViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectCatalogSyncErrorDetail", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets project catalog synchronization error details")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/getSyncErrorDetails", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/getSyncErrorDetails", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectCatalogSyncErrorDetail_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminProjectCatalogSyncErrorDetail_GetViaIden /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails /// 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); + 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) @@ -360,12 +359,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -382,7 +381,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -400,12 +399,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -417,7 +416,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISyncErrorDetails + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISyncErrorDetails WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalog_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalog_Get.cs index 5cc82b351a10..6a43843d386b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalog_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalog_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectCatalog_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an associated project catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectCatalog_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -162,24 +161,24 @@ public partial class GetAzDevCenterAdminProjectCatalog_Get : global::System.Mana /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -387,12 +386,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -409,7 +408,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -427,12 +426,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -444,7 +443,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalog_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalog_GetViaIdentity.cs index 497c45d03bc9..dfd5de3a8a62 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalog_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalog_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectCatalog_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an associated project catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectCatalog_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminProjectCatalog_GetViaIdentity : global:: /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -356,12 +355,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,7 +377,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,7 +412,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalog_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalog_List.cs index ea9a86b3ed03..15f4f9ccba83 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalog_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectCatalog_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectCatalog_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists the catalogs associated with a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectCatalog_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -171,24 +170,24 @@ public partial class GetAzDevCenterAdminProjectCatalog_List : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResult /// 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); + 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) @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,7 +417,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -436,12 +435,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_Get.cs index 3158e29ec7af..2caa142c56af 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetErrorDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_Get", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets Environment Definition error details")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -176,24 +175,24 @@ public partial class GetAzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_ /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails /// 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); + 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) @@ -405,12 +404,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,7 +426,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, EnvironmentDefinitionName=EnvironmentDefinitionName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -445,12 +444,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_GetViaIdentity.cs index 29f566acc143..4f50dfd20d19 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetErrorDetails=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_GetViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectEnvironmentDefinitionErrorDetail", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogErrorDetails))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets Environment Definition error details")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}/getErrorDetails", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminProjectEnvironmentDefinitionErrorDetail_ /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails /// 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); + 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) @@ -364,12 +363,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -386,7 +385,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -404,12 +403,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogResourceValidationErrorDetails + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogResourceValidationErrorDetails /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinition_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinition_Get.cs index 08fb1c0fe9f9..1966d8a26225 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinition_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinition_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectEnvironmentDefinition_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectEnvironmentDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an environment definition from the catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectEnvironmentDefinition_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -176,24 +175,24 @@ public partial class GetAzDevCenterAdminProjectEnvironmentDefinition_Get : globa /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition /// 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); + 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) @@ -401,12 +400,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,7 +422,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, EnvironmentDefinitionName=EnvironmentDefinitionName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -441,12 +440,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -458,7 +457,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinition_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinition_GetViaIdentity.cs index 0b64fc865010..5410e355aa4b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinition_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinition_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectEnvironmentDefinition_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectEnvironmentDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets an environment definition from the catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{environmentDefinitionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectEnvironmentDefinition_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminProjectEnvironmentDefinition_GetViaIdent /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition /// 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); + 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) @@ -361,12 +360,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -383,7 +382,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -401,12 +400,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,7 +417,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinition_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinition_List.cs index 7871dbfba517..41785cbe6211 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinition_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentDefinition_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectEnvironmentDefinition_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectEnvironmentDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists the environment definitions in this project catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectEnvironmentDefinition_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -168,24 +167,24 @@ public partial class GetAzDevCenterAdminProjectEnvironmentDefinition_List : glob /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResult /// 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); + 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) @@ -393,12 +392,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -415,7 +414,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -433,12 +432,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentDefinitionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentDefinitionListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentType_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentType_Get.cs index e80786279dae..00c4524302a5 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentType_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentType_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectEnvironmentType_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a project environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectEnvironmentType_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -162,24 +161,24 @@ public partial class GetAzDevCenterAdminProjectEnvironmentType_Get : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// 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); + 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) @@ -387,12 +386,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -409,7 +408,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, EnvironmentTypeName=EnvironmentTypeName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -427,12 +426,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -444,7 +443,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentType_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentType_GetViaIdentity.cs index 0d359a51ea3d..01b917be190e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentType_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentType_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectEnvironmentType_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a project environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectEnvironmentType_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminProjectEnvironmentType_GetViaIdentity : /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// 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); + 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) @@ -356,12 +355,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,7 +377,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,7 +412,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentType_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentType_List.cs index 7ce70d00a470..a2ad0359e69b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentType_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectEnvironmentType_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectEnvironmentType_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists environment types for a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectEnvironmentType_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -171,24 +170,24 @@ public partial class GetAzDevCenterAdminProjectEnvironmentType_List : global::Sy /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResult /// 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); + 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) @@ -396,12 +395,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -418,7 +417,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -436,12 +435,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectInheritedSetting_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectInheritedSetting_Get.cs index 6cb6951c6d18..d9b1207140bd 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectInheritedSetting_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectInheritedSetting_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetInheritedSettings=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/getInheritedSettings" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectInheritedSetting_Get", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectInheritedSetting", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets applicable inherited settings for this project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/getInheritedSettings", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/getInheritedSettings", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectInheritedSetting_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -148,24 +147,24 @@ public partial class GetAzDevCenterAdminProjectInheritedSetting_Get : global::Sy /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject /// 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); + 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) @@ -376,12 +375,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -398,7 +397,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -416,12 +415,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -433,7 +432,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectInheritedSetting_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectInheritedSetting_GetViaIdentity.cs index 7f74da2534c0..79b3fd3a1531 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectInheritedSetting_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectInheritedSetting_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] GetInheritedSettings=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/getInheritedSettings" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectInheritedSetting_GetViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProjectInheritedSetting", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets applicable inherited settings for this project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/getInheritedSettings", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/getInheritedSettings", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProjectInheritedSetting_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminProjectInheritedSetting_GetViaIdentity : /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject /// 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); + 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) @@ -355,12 +354,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -377,7 +376,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -395,12 +394,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,7 +411,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IInheritedSettingsForProject + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IInheritedSettingsForProject WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectPolicy_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectPolicy_Get.cs new file mode 100644 index 000000000000..8215614460cf --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectPolicy_Get.cs @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets a specific project policy. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectPolicy_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a specific project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminProjectPolicy_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devCenterName; + + /// The name of the devcenter. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the devcenter.", + SerializedName = @"devCenterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string DevCenterName { get => this._devCenterName; set => this._devCenterName = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the project policy. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project policy.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project policy.", + SerializedName = @"projectPolicyName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProjectPolicyName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminProjectPolicy_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectPoliciesGet(SubscriptionId, ResourceGroupName, DevCenterName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,DevCenterName=DevCenterName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectPolicy_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectPolicy_GetViaIdentity.cs new file mode 100644 index 000000000000..7efb13d73378 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectPolicy_GetViaIdentity.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Gets a specific project policy. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectPolicy_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a specific project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminProjectPolicy_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminProjectPolicy_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProjectPoliciesGetViaIdentity(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.DevCenterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevCenterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProjectPolicyName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectPolicyName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProjectPoliciesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.DevCenterName ?? null, InputObject.ProjectPolicyName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectPolicy_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectPolicy_List.cs new file mode 100644 index 000000000000..296d6383d115 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProjectPolicy_List.cs @@ -0,0 +1,476 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Lists all project policies in the dev center + /// + /// [OpenAPI] ListByDevCenter=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProjectPolicy_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists all project policies in the dev center")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminProjectPolicy_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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 flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devCenterName; + + /// The name of the devcenter. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the devcenter.", + SerializedName = @"devCenterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string DevCenterName { get => this._devCenterName; set => this._devCenterName = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private int _top; + + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of resources to return from the operation. Example: '$top=10'.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of resources to return from the operation. Example: '$top=10'.", + SerializedName = @"$top", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DoNotExport] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Query)] + public int Top { get => this._top; set => this._top = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResult + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminProjectPolicy_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectPoliciesListByDevCenter(SubscriptionId, ResourceGroupName, DevCenterName, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,DevCenterName=DevCenterName,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyListResult + /// 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 + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectPoliciesListByDevCenter_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_Get.cs index 0e4607f5c85b..b4a6f3d121cd 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_Get.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProject_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProject", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a specific project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProject_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -149,24 +148,24 @@ public partial class GetAzDevCenterAdminProject_Get : global::System.Management. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject /// 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); + 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) @@ -374,12 +373,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -396,7 +395,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -414,12 +413,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -431,7 +430,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_GetViaIdentity.cs index c64740ced897..c80b723155f7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_GetViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProject_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProject", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a specific project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProject_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -110,24 +109,24 @@ public partial class GetAzDevCenterAdminProject_GetViaIdentity : global::System. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject /// 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); + 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) @@ -352,12 +351,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -374,7 +373,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } @@ -392,12 +391,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -409,7 +408,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_List.cs index 8b0b190121d5..7085db4caf36 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_List.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/projects" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProject_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProject", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists all projects in the subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/projects", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/projects", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProject_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -143,24 +142,24 @@ public partial class GetAzDevCenterAdminProject_List : global::System.Management /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResult /// 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); + 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) @@ -368,12 +367,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -390,7 +389,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -408,12 +407,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_List1.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_List1.cs index 8e75078c078a..7cb8524dee80 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_List1.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminProject_List1.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminProject_List1")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminProject", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists all projects in the resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminProject_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -157,24 +156,24 @@ public partial class GetAzDevCenterAdminProject_List1 : global::System.Managemen /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResult /// 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); + 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) @@ -382,12 +381,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -404,7 +403,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -422,12 +421,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSchedule_Get.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSchedule_Get.cs index 1f7508cdeb96..cc57950dd800 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSchedule_Get.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSchedule_Get.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminSchedule_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminSchedule", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a schedule resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminSchedule_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -200,24 +199,24 @@ public partial class GetAzDevCenterAdminSchedule_Get : global::System.Management /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule /// 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); + 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) @@ -425,12 +424,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -447,7 +446,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, PoolName=PoolName, Name=Name, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -465,12 +464,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -482,7 +481,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSchedule_GetViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSchedule_GetViaIdentity.cs index a1016d5ac8a8..da88a87f6100 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSchedule_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSchedule_GetViaIdentity.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminSchedule_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminSchedule", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Gets a schedule resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminSchedule_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -128,24 +127,24 @@ public partial class GetAzDevCenterAdminSchedule_GetViaIdentity : global::System /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule /// 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); + 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) @@ -378,12 +377,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -400,7 +399,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -418,12 +417,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -435,7 +434,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSchedule_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSchedule_List.cs index 088d5e5d4aef..f5639b4e018c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSchedule_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSchedule_List.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminSchedule_List")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Get-AzDevCenterAdminSchedule", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists schedules for a pool")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminSchedule_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -186,24 +185,24 @@ public partial class GetAzDevCenterAdminSchedule_List : global::System.Managemen /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResult /// 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); + 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) @@ -411,12 +410,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -433,7 +432,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, PoolName=PoolName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -451,12 +450,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSku_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSku_List.cs index 6a2ec985df64..c40cde7c4a4d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSku_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSku_List.cs @@ -8,15 +8,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; using System; - /// Lists the Microsoft.DevCenter SKUs available in a subscription + /// Lists SKUs available to the project /// - /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/skus" + /// [OpenAPI] ListByProject=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/listSkus" /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminSku_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterSku))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists the Microsoft.DevCenter SKUs available in a subscription")] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminSku_List", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists SKUs available to the project")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/skus", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/listSkus", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminSku_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -86,6 +86,20 @@ public partial class GetAzDevCenterAdminSku_List : global::System.Management.Aut /// private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } + /// Backing field for property. + private string _projectName; + + /// The name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] @@ -102,6 +116,20 @@ public partial class GetAzDevCenterAdminSku_List : global::System.Management.Aut [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + /// Backing field for property. private string[] _subscriptionId; @@ -120,46 +148,29 @@ public partial class GetAzDevCenterAdminSku_List : global::System.Management.Aut [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - /// Backing field for property. - private int _top; - - /// - /// The maximum number of resources to return from the operation. Example: '$top=10'. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of resources to return from the operation. Example: '$top=10'.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The maximum number of resources to return from the operation. Example: '$top=10'.", - SerializedName = @"$top", - PossibleTypes = new [] { typeof(int) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DoNotExport] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Query)] - public int Top { get => this._top; set => this._top = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResult /// 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); + 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) @@ -272,9 +283,12 @@ protected override void ProcessRecord() try { // work - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + if (ShouldProcess($"Call remote 'SkusListByProject' operation")) { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token); + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token); + } } } catch (global::System.AggregateException aggregateException) @@ -323,13 +337,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SkusListBySubscription(SubscriptionId, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); + await this.Client.SkusListByProject(SubscriptionId, ResourceGroupName, ProjectName, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ProjectName=ProjectName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -367,12 +381,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -389,15 +403,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName }) { 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 { SubscriptionId=SubscriptionId, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -407,12 +421,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISkuListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,7 +452,7 @@ protected override void StopProcessing() { requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get ); await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SkusListBySubscription_Call(requestMessage, onOk, onDefault, this, Pipeline); + await this.Client.SkusListByProject_Call(requestMessage, onOk, onDefault, this, Pipeline); } } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSku_List1.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSku_List1.cs new file mode 100644 index 000000000000..0587cb7f32fe --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminSku_List1.cs @@ -0,0 +1,448 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Lists the Microsoft.DevCenter SKUs available in a subscription + /// + /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/skus" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminSku_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterSku))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists the Microsoft.DevCenter SKUs available in a subscription")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/skus", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterAdminSku_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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 flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private int _top; + + /// + /// The maximum number of resources to return from the operation. Example: '$top=10'. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of resources to return from the operation. Example: '$top=10'.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of resources to return from the operation. Example: '$top=10'.", + SerializedName = @"$top", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DoNotExport] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Query)] + public int Top { get => this._top; set => this._top = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResult + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterAdminSku_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SkusListBySubscription(SubscriptionId, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?)}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + { + 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 { SubscriptionId=SubscriptionId, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISkuListResult + /// 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 + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SkusListBySubscription_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminUsage_List.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminUsage_List.cs index 13668bedba33..2435124a34f9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminUsage_List.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/GetAzDevCenterAdminUsage_List.cs @@ -15,10 +15,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/locations/{location}/usages" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterAdminUsage_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IUsage))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IUsage))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Lists the current usages and limits in this location for the provided subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/locations/{location}/usages", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/locations/{location}/usages", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterAdminUsage_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -141,24 +141,24 @@ public partial class GetAzDevCenterAdminUsage_List : global::System.Management.A /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResult /// 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); + 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) @@ -366,12 +366,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -388,7 +388,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -406,12 +406,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IListUsagesResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IListUsagesResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckNameAvailability_ExecuteExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckNameAvailability_ExecuteExpanded.cs index 2f898f637377..fbed8a1d8e30 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckNameAvailability_ExecuteExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckNameAvailability_ExecuteExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Execute=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkNameAvailability" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterAdminExecuteCheckNameAvailability_ExecuteExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Invoke-AzDevCenterAdminExecuteCheckNameAvailability", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Check the availability of name for resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkNameAvailability", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkNameAvailability", ApiVersion = "2025-04-01-preview")] public partial class InvokeAzDevCenterAdminExecuteCheckNameAvailability_ExecuteExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -145,12 +144,12 @@ public partial class InvokeAzDevCenterAdminExecuteCheckNameAvailability_ExecuteE /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -371,12 +370,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -393,7 +392,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_nameAvailabilityRequestBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckNameAvailability_ExecuteViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckNameAvailability_ExecuteViaIdentityExpanded.cs index d945f2ab123c..77ca4cd9a8fe 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckNameAvailability_ExecuteViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckNameAvailability_ExecuteViaIdentityExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Execute=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkNameAvailability" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterAdminExecuteCheckNameAvailability_ExecuteViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Invoke-AzDevCenterAdminExecuteCheckNameAvailability", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Check the availability of name for resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkNameAvailability", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkNameAvailability", ApiVersion = "2025-04-01-preview")] public partial class InvokeAzDevCenterAdminExecuteCheckNameAvailability_ExecuteViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -135,12 +134,12 @@ public partial class InvokeAzDevCenterAdminExecuteCheckNameAvailability_ExecuteV /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -373,12 +372,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -395,7 +394,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_nameAvailabilityRequestBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteExpanded.cs index 23578a3e3f8d..8fc4081ebe2e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Execute=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkScopedNameAvailability" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Check the availability of name for resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkScopedNameAvailability", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkScopedNameAvailability", ApiVersion = "2025-04-01-preview")] public partial class InvokeAzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -36,7 +35,7 @@ public partial class InvokeAzDevCenterAdminExecuteCheckScopedNameAvailability_Ex private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// The scoped name check availability request body. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequest _nameAvailabilityRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CheckScopedNameAvailabilityRequest(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequest _nameAvailabilityRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CheckScopedNameAvailabilityRequest(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -156,12 +155,12 @@ public partial class InvokeAzDevCenterAdminExecuteCheckScopedNameAvailability_Ex /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -382,12 +381,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -404,7 +403,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_nameAvailabilityRequestBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteViaIdentityExpanded.cs index 19aa5c6dac29..6b2505a6d2be 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/InvokeAzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteViaIdentityExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Execute=>POST:"/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkScopedNameAvailability" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Invoke-AzDevCenterAdminExecuteCheckScopedNameAvailability", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ICheckNameAvailabilityResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Check the availability of name for resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkScopedNameAvailability", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/checkScopedNameAvailability", ApiVersion = "2025-04-01-preview")] public partial class InvokeAzDevCenterAdminExecuteCheckScopedNameAvailability_ExecuteViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -36,7 +35,7 @@ public partial class InvokeAzDevCenterAdminExecuteCheckScopedNameAvailability_Ex private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// The scoped name check availability request body. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICheckScopedNameAvailabilityRequest _nameAvailabilityRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CheckScopedNameAvailabilityRequest(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICheckScopedNameAvailabilityRequest _nameAvailabilityRequestBody = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CheckScopedNameAvailabilityRequest(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] @@ -146,12 +145,12 @@ public partial class InvokeAzDevCenterAdminExecuteCheckScopedNameAvailability_Ex /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -384,12 +383,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -406,7 +405,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_nameAvailabilityRequestBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminAttachedNetwork_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminAttachedNetwork_CreateExpanded.cs index 49390ff77e28..def10632c241 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminAttachedNetwork_CreateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminAttachedNetwork_CreateExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminAttachedNetwork_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminAttachedNetwork", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates an attached NetworkConnection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks/{attachedNetworkConnectionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks/{attachedNetworkConnectionName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminAttachedNetwork_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminAttachedNetwork_CreateExpanded : global: private string __processRecordId; /// Represents an attached NetworkConnection. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnection(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnection(); /// /// The for this operation. @@ -191,24 +190,24 @@ public partial class NewAzDevCenterAdminAttachedNetwork_CreateExpanded : global: /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection /// 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); + 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) @@ -471,12 +470,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -493,7 +492,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, ConnectionName=ConnectionName, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -511,12 +510,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -528,7 +527,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminAttachedNetwork_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminAttachedNetwork_CreateViaIdentityExpanded.cs index d1a83d0f853a..5244159f3e09 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminAttachedNetwork_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminAttachedNetwork_CreateViaIdentityExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminAttachedNetwork_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminAttachedNetwork", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates an attached NetworkConnection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks/{attachedNetworkConnectionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks/{attachedNetworkConnectionName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminAttachedNetwork_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminAttachedNetwork_CreateViaIdentityExpande private string __processRecordId; /// Represents an attached NetworkConnection. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.AttachedNetworkConnection(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.AttachedNetworkConnection(); /// /// The for this operation. @@ -138,24 +137,24 @@ public partial class NewAzDevCenterAdminAttachedNetwork_CreateViaIdentityExpande /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection /// 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); + 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) @@ -440,12 +439,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -462,7 +461,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -480,12 +479,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -497,7 +496,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminCatalog_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminCatalog_CreateExpanded.cs index 4f1e8aabc5c7..bade66690a20 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminCatalog_CreateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminCatalog_CreateExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminCatalog_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminCatalog_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminCatalog_CreateExpanded : global::System. private string __processRecordId; /// Represents a catalog. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Catalog(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Catalog(); /// /// The for this operation. @@ -288,32 +287,32 @@ public partial class NewAzDevCenterAdminCatalog_CreateExpanded : global::System. ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -576,12 +575,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -598,7 +597,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -616,12 +615,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -633,7 +632,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminCatalog_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminCatalog_CreateViaIdentityExpanded.cs index 9eb0de327f67..02132da78fc6 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminCatalog_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminCatalog_CreateViaIdentityExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminCatalog_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminCatalog_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminCatalog_CreateViaIdentityExpanded : glob private string __processRecordId; /// Represents a catalog. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Catalog(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Catalog(); /// /// The for this operation. @@ -235,32 +234,32 @@ public partial class NewAzDevCenterAdminCatalog_CreateViaIdentityExpanded : glob ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -543,12 +542,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -565,7 +564,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -583,12 +582,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -600,7 +599,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevBoxDefinition_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevBoxDefinition_CreateExpanded.cs index 3640173bb6ec..690b2c8b6447 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevBoxDefinition_CreateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevBoxDefinition_CreateExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminDevBoxDefinition_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminDevBoxDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a Dev Box definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminDevBoxDefinition_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminDevBoxDefinition_CreateExpanded : global private string __processRecordId; /// Represents a definition for a Developer Machine. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinition(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinition(); /// /// The for this operation. @@ -302,32 +301,32 @@ public partial class NewAzDevCenterAdminDevBoxDefinition_CreateExpanded : global ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition /// 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); + 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) @@ -590,12 +589,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -612,7 +611,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -630,12 +629,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -647,7 +646,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevBoxDefinition_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevBoxDefinition_CreateViaIdentityExpanded.cs index 213eada3472d..9860ec6b5b6b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevBoxDefinition_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevBoxDefinition_CreateViaIdentityExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminDevBoxDefinition_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminDevBoxDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a Dev Box definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminDevBoxDefinition_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminDevBoxDefinition_CreateViaIdentityExpand private string __processRecordId; /// Represents a definition for a Developer Machine. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinition(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinition(); /// /// The for this operation. @@ -249,32 +248,32 @@ public partial class NewAzDevCenterAdminDevBoxDefinition_CreateViaIdentityExpand ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition /// 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); + 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) @@ -559,12 +558,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -581,7 +580,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -599,12 +598,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -616,7 +615,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevCenter_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevCenter_CreateExpanded.cs index f3fdc2ee4d8b..2c4bde128407 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevCenter_CreateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevCenter_CreateExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminDevCenter_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminDevCenter", ChangeDescription="PlanId will be removed from the DevCenter output.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a devcenter resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminDevCenter_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -31,7 +30,7 @@ public partial class NewAzDevCenterAdminDevCenter_CreateExpanded : global::Syste private string __processRecordId; /// Represents a devcenter resource. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenter(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenter(); /// /// The for this operation. @@ -252,18 +251,6 @@ public partial class NewAzDevCenterAdminDevCenter_CreateExpanded : global::Syste /// private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } - /// Resource Id of an associated Plan - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource Id of an associated Plan")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource Id of an associated Plan", - SerializedName = @"planId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ParameterBreakingChange("PlanId", "15.0.0", "3.0.0", "2025/11/18", ChangeDescription="PlanId parameter will be removed.")] - public string PlanId { get => _body.PlanId ?? null; set => _body.PlanId = value; } - /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// @@ -335,32 +322,32 @@ public partial class NewAzDevCenterAdminDevCenter_CreateExpanded : global::Syste ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter /// 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); + 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) @@ -622,12 +609,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -644,7 +631,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -662,12 +649,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -679,7 +666,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevCenter_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevCenter_CreateViaIdentityExpanded.cs index 06a80ed802d5..685e2ba6c965 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevCenter_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminDevCenter_CreateViaIdentityExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminDevCenter_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminDevCenter", ChangeDescription="PlanId will be removed from the DevCenter output.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a devcenter resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminDevCenter_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -31,7 +30,7 @@ public partial class NewAzDevCenterAdminDevCenter_CreateViaIdentityExpanded : gl private string __processRecordId; /// Represents a devcenter resource. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenter(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenter(); /// /// The for this operation. @@ -245,18 +244,6 @@ public partial class NewAzDevCenterAdminDevCenter_CreateViaIdentityExpanded : gl /// private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } - /// Resource Id of an associated Plan - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource Id of an associated Plan")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource Id of an associated Plan", - SerializedName = @"planId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ParameterBreakingChange("PlanId", "15.0.0", "3.0.0", "2025/11/18", ChangeDescription="PlanId parameter will be removed.")] - public string PlanId { get => _body.PlanId ?? null; set => _body.PlanId = value; } - /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// @@ -296,32 +283,32 @@ public partial class NewAzDevCenterAdminDevCenter_CreateViaIdentityExpanded : gl ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter /// 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); + 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) @@ -600,12 +587,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -622,7 +609,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -640,12 +627,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -657,7 +644,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEncryptionSet_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEncryptionSet_CreateExpanded.cs index ea6f1950617e..572fdf0d681d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEncryptionSet_CreateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEncryptionSet_CreateExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminEncryptionSet_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a devcenter encryption set resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminEncryptionSet_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -31,7 +31,7 @@ public partial class NewAzDevCenterAdminEncryptionSet_CreateExpanded : global::S private string __processRecordId; /// Represents a devcenter encryption set resource. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSet(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSet(); /// /// The for this operation. @@ -253,32 +253,32 @@ public partial class NewAzDevCenterAdminEncryptionSet_CreateExpanded : global::S ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet /// 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); + 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) @@ -541,12 +541,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -563,7 +563,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -581,12 +581,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -598,7 +598,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEncryptionSet_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEncryptionSet_CreateViaIdentityExpanded.cs index 300f321b1a73..74e6da718c16 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEncryptionSet_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEncryptionSet_CreateViaIdentityExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminEncryptionSet_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a devcenter encryption set resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminEncryptionSet_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -31,7 +31,7 @@ public partial class NewAzDevCenterAdminEncryptionSet_CreateViaIdentityExpanded private string __processRecordId; /// Represents a devcenter encryption set resource. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterEncryptionSet(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterEncryptionSet(); /// /// The for this operation. @@ -200,32 +200,32 @@ public partial class NewAzDevCenterAdminEncryptionSet_CreateViaIdentityExpanded ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet /// 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); + 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) @@ -510,12 +510,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -532,7 +532,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -550,12 +550,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -567,7 +567,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEnvironmentType_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEnvironmentType_CreateExpanded.cs index fe51d35c3b45..a801f6ac2edb 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEnvironmentType_CreateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEnvironmentType_CreateExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminEnvironmentType_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates an environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminEnvironmentType_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -31,7 +30,7 @@ public partial class NewAzDevCenterAdminEnvironmentType_CreateExpanded : global: private string __processRecordId; /// Represents an environment type. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentType(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentType(); /// /// The for this operation. @@ -181,44 +180,44 @@ public partial class NewAzDevCenterAdminEnvironmentType_CreateExpanded : global: ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } /// /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// 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); + 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) @@ -424,12 +423,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -441,7 +440,7 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType WriteObject((await response)); } } @@ -450,12 +449,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -472,7 +471,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -490,12 +489,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -507,7 +506,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEnvironmentType_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEnvironmentType_CreateViaIdentityExpanded.cs index 2f5d251b7ffa..346e289c43b7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEnvironmentType_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminEnvironmentType_CreateViaIdentityExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminEnvironmentType_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates an environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminEnvironmentType_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -31,7 +30,7 @@ public partial class NewAzDevCenterAdminEnvironmentType_CreateViaIdentityExpande private string __processRecordId; /// Represents an environment type. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentType(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentType(); /// /// The for this operation. @@ -128,44 +127,44 @@ public partial class NewAzDevCenterAdminEnvironmentType_CreateViaIdentityExpande ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } /// /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// 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); + 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) @@ -395,12 +394,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,7 +411,7 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType WriteObject((await response)); } } @@ -421,12 +420,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -443,7 +442,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -461,12 +460,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -478,7 +477,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminGallery_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminGallery_CreateExpanded.cs index 478fe7c25b2e..697bc44f3d6d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminGallery_CreateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminGallery_CreateExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminGallery_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminGallery", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a gallery.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminGallery_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminGallery_CreateExpanded : global::System. private string __processRecordId; /// Represents a gallery. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Gallery(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Gallery(); /// /// The for this operation. @@ -191,24 +190,24 @@ public partial class NewAzDevCenterAdminGallery_CreateExpanded : global::System. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery /// 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); + 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) @@ -471,12 +470,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -493,7 +492,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -511,12 +510,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -528,7 +527,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminGallery_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminGallery_CreateViaIdentityExpanded.cs index 2bc3cf415322..0e9e9b59f100 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminGallery_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminGallery_CreateViaIdentityExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminGallery_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminGallery", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a gallery.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminGallery_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminGallery_CreateViaIdentityExpanded : glob private string __processRecordId; /// Represents a gallery. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Gallery(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Gallery(); /// /// The for this operation. @@ -138,24 +137,24 @@ public partial class NewAzDevCenterAdminGallery_CreateViaIdentityExpanded : glob /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery /// 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); + 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) @@ -438,12 +437,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -460,7 +459,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -478,12 +477,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -495,7 +494,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminNetworkConnection_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminNetworkConnection_CreateExpanded.cs index eaa5bd1b2bc0..8e5d963d3d14 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminNetworkConnection_CreateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminNetworkConnection_CreateExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminNetworkConnection_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminNetworkConnection", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a Network Connections resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminNetworkConnection_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminNetworkConnection_CreateExpanded : globa private string __processRecordId; /// Network related settings - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnection(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnection(); /// /// The for this operation. @@ -262,32 +261,32 @@ public partial class NewAzDevCenterAdminNetworkConnection_CreateExpanded : globa ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection /// 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); + 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) @@ -549,12 +548,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -571,7 +570,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -589,12 +588,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -606,7 +605,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminNetworkConnection_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminNetworkConnection_CreateViaIdentityExpanded.cs index 43af9a4adf62..cc1d979b2626 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminNetworkConnection_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminNetworkConnection_CreateViaIdentityExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminNetworkConnection_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminNetworkConnection", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a Network Connections resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminNetworkConnection_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminNetworkConnection_CreateViaIdentityExpan private string __processRecordId; /// Network related settings - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnection(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnection(); /// /// The for this operation. @@ -223,32 +222,32 @@ public partial class NewAzDevCenterAdminNetworkConnection_CreateViaIdentityExpan ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection /// 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); + 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) @@ -530,12 +529,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -552,7 +551,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -570,12 +569,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -587,7 +586,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPlanMember_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPlanMember_CreateExpanded.cs deleted file mode 100644 index 37ecd1c23e49..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPlanMember_CreateExpanded.cs +++ /dev/null @@ -1,571 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Creates or updates a devcenter plan member resource - /// - /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}" - /// - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminPlanMember_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a devcenter plan member resource")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}", ApiVersion = "2024-05-01-preview")] - public partial class NewAzDevCenterAdminPlanMember_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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; - - /// Represents a devcenter plan member resource. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlanMember(); - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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; } } - - /// The unique id of the member. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The unique id of the member.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The unique id of the member.", - SerializedName = @"memberId", - PossibleTypes = new [] { typeof(string) })] - public string MemberId { get => _body.MemberId ?? null; set => _body.MemberId = value; } - - /// Backing field for property. - private string _memberName; - - /// The name of a devcenter plan member. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of a devcenter plan member.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of a devcenter plan member.", - SerializedName = @"memberName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string MemberName { get => this._memberName; set => this._memberName = value; } - - /// The type of the member (user, group) - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The type of the member (user, group)")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of the member (user, group)", - SerializedName = @"memberType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType))] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType MemberType { get => _body.MemberType ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType)""); set => _body.MemberType = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } - - /// Backing field for property. - private string _planName; - - /// The name of the devcenter plan. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter plan.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the devcenter plan.", - SerializedName = @"planName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string PlanName { get => this._planName; set => this._planName = value; } - - /// Resource tags. - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags PropertiesTag { get => _body.PropertiesTag ?? null /* object */; set => _body.PropertiesTag = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// Resource tags. - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of NewAzDevCenterAdminPlanMember_CreateExpanded - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.NewAzDevCenterAdminPlanMember_CreateExpanded Clone() - { - var clone = new NewAzDevCenterAdminPlanMember_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._body = this._body; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.PlanName = this.PlanName; - clone.MemberName = this.MemberName; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public NewAzDevCenterAdminPlanMember_CreateExpanded() - { - - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'PlanMembersCreateOrUpdate' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PlanMembersCreateOrUpdate(SubscriptionId, ResourceGroupName, PlanName, MemberName, _body, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,PlanName=PlanName,MemberName=MemberName,body=_body}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, PlanName=PlanName, MemberName=MemberName, body=_body }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, PlanName=PlanName, MemberName=MemberName, body=_body }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPlanMember_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPlanMember_CreateViaIdentityExpanded.cs deleted file mode 100644 index 183cac13da3c..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPlanMember_CreateViaIdentityExpanded.cs +++ /dev/null @@ -1,539 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Creates or updates a devcenter plan member resource - /// - /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}" - /// - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminPlanMember_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a devcenter plan member resource")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}", ApiVersion = "2024-05-01-preview")] - public partial class NewAzDevCenterAdminPlanMember_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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; - - /// Represents a devcenter plan member resource. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlanMember(); - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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; } } - - /// The unique id of the member. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The unique id of the member.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The unique id of the member.", - SerializedName = @"memberId", - PossibleTypes = new [] { typeof(string) })] - public string MemberId { get => _body.MemberId ?? null; set => _body.MemberId = value; } - - /// The type of the member (user, group) - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The type of the member (user, group)")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of the member (user, group)", - SerializedName = @"memberType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType))] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType MemberType { get => _body.MemberType ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType)""); set => _body.MemberType = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } - - /// Resource tags. - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags PropertiesTag { get => _body.PropertiesTag ?? null /* object */; set => _body.PropertiesTag = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Resource tags. - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of NewAzDevCenterAdminPlanMember_CreateViaIdentityExpanded - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.NewAzDevCenterAdminPlanMember_CreateViaIdentityExpanded Clone() - { - var clone = new NewAzDevCenterAdminPlanMember_CreateViaIdentityExpanded(); - 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._body = this._body; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public NewAzDevCenterAdminPlanMember_CreateViaIdentityExpanded() - { - - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'PlanMembersCreateOrUpdate' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.PlanMembersCreateOrUpdateViaIdentity(InputObject.Id, _body, 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.PlanName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PlanName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.MemberName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.MemberName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.PlanMembersCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PlanName ?? null, InputObject.MemberName ?? null, _body, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) - { - 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 { body=_body }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPlan_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPlan_CreateExpanded.cs deleted file mode 100644 index 29df35427df7..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPlan_CreateExpanded.cs +++ /dev/null @@ -1,599 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Creates or updates a devcenter plan resource - /// - /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}" - /// - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminPlan_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a devcenter plan resource")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}", ApiVersion = "2024-05-01-preview")] - public partial class NewAzDevCenterAdminPlan_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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; - - /// Represents a devcenter plan resource. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlan(); - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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; } } - - /// The geo-location where the resource lives - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - public string Location { get => _body.Location ?? null; set => _body.Location = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the devcenter plan. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter plan.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the devcenter plan.", - SerializedName = @"planName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("PlanName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the - /// resource this may be omitted. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", - SerializedName = @"capacity", - PossibleTypes = new [] { typeof(int) })] - public int SkuCapacity { get => _body.SkuCapacity ?? default(int); set => _body.SkuCapacity = value; } - - /// - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the service has different generations of hardware, for the same SKU, then that can be captured here.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", - SerializedName = @"family", - PossibleTypes = new [] { typeof(string) })] - public string SkuFamily { get => _body.SkuFamily ?? null; set => _body.SkuFamily = value; } - - /// The name of the SKU. E.g. P3. It is typically a letter+number code - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the SKU. E.g. P3. It is typically a letter+number code")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - public string SkuName { get => _body.SkuName ?? null; set => _body.SkuName = value; } - - /// - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", - SerializedName = @"size", - PossibleTypes = new [] { typeof(string) })] - public string SkuSize { get => _body.SkuSize ?? null; set => _body.SkuSize = value; } - - /// - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required - /// on a PUT. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", - SerializedName = @"tier", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier))] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier SkuTier { get => _body.SkuTier ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); set => _body.SkuTier = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// Resource tags. - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of NewAzDevCenterAdminPlan_CreateExpanded - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.NewAzDevCenterAdminPlan_CreateExpanded Clone() - { - var clone = new NewAzDevCenterAdminPlan_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._body = this._body; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.Name = this.Name; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public NewAzDevCenterAdminPlan_CreateExpanded() - { - - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'PlansCreateOrUpdate' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PlansCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, _body, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,Name=Name,body=_body}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_body }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_body }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPlan_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPlan_CreateViaIdentityExpanded.cs deleted file mode 100644 index 252f27b62270..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPlan_CreateViaIdentityExpanded.cs +++ /dev/null @@ -1,577 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Creates or updates a devcenter plan resource - /// - /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}" - /// - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminPlan_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a devcenter plan resource")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}", ApiVersion = "2024-05-01-preview")] - public partial class NewAzDevCenterAdminPlan_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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; - - /// Represents a devcenter plan resource. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterPlan(); - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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; } } - - /// The geo-location where the resource lives - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - public string Location { get => _body.Location ?? null; set => _body.Location = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the - /// resource this may be omitted. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", - SerializedName = @"capacity", - PossibleTypes = new [] { typeof(int) })] - public int SkuCapacity { get => _body.SkuCapacity ?? default(int); set => _body.SkuCapacity = value; } - - /// - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the service has different generations of hardware, for the same SKU, then that can be captured here.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", - SerializedName = @"family", - PossibleTypes = new [] { typeof(string) })] - public string SkuFamily { get => _body.SkuFamily ?? null; set => _body.SkuFamily = value; } - - /// The name of the SKU. E.g. P3. It is typically a letter+number code - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the SKU. E.g. P3. It is typically a letter+number code")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - public string SkuName { get => _body.SkuName ?? null; set => _body.SkuName = value; } - - /// - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", - SerializedName = @"size", - PossibleTypes = new [] { typeof(string) })] - public string SkuSize { get => _body.SkuSize ?? null; set => _body.SkuSize = value; } - - /// - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required - /// on a PUT. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", - SerializedName = @"tier", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier))] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier SkuTier { get => _body.SkuTier ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); set => _body.SkuTier = value; } - - /// Resource tags. - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of NewAzDevCenterAdminPlan_CreateViaIdentityExpanded - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.NewAzDevCenterAdminPlan_CreateViaIdentityExpanded Clone() - { - var clone = new NewAzDevCenterAdminPlan_CreateViaIdentityExpanded(); - 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._body = this._body; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public NewAzDevCenterAdminPlan_CreateViaIdentityExpanded() - { - - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'PlansCreateOrUpdate' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.PlansCreateOrUpdateViaIdentity(InputObject.Id, _body, 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.PlanName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PlanName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.PlansCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PlanName ?? null, _body, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) - { - 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 { body=_body }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPool_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPool_CreateExpanded.cs index 97128baaaf6a..4df1d189070b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPool_CreateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPool_CreateExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminPool_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminPool", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a machine pool")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminPool_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,13 +31,74 @@ public partial class NewAzDevCenterAdminPool_CreateExpanded : global::System.Man private string __processRecordId; /// A pool of Virtual Machines. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Pool(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Pool(); /// /// The for this operation. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enables or disables whether the Dev Box should be automatically started at commencement of active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be automatically started at commencement of active hours.", + SerializedName = @"autoStartEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus ActiveHourConfigurationAutoStartEnableStatus { get => _body.ActiveHourConfigurationAutoStartEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus)""); set => _body.ActiveHourConfigurationAutoStartEnableStatus = value; } + + /// The default end time of the active hours + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default end time of the active hours")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default end time of the active hours", + SerializedName = @"defaultEndTimeHour", + PossibleTypes = new [] { typeof(int) })] + public int ActiveHourConfigurationDefaultEndTimeHour { get => _body.ActiveHourConfigurationDefaultEndTimeHour ?? default(int); set => _body.ActiveHourConfigurationDefaultEndTimeHour = value; } + + /// The default start time of the active hours. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default start time of the active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default start time of the active hours.", + SerializedName = @"defaultStartTimeHour", + PossibleTypes = new [] { typeof(int) })] + public int ActiveHourConfigurationDefaultStartTimeHour { get => _body.ActiveHourConfigurationDefaultStartTimeHour ?? default(int); set => _body.ActiveHourConfigurationDefaultStartTimeHour = value; } + + /// The default IANA timezone id of the active hours. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default IANA timezone id of the active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default IANA timezone id of the active hours.", + SerializedName = @"defaultTimeZone", + PossibleTypes = new [] { typeof(string) })] + public string ActiveHourConfigurationDefaultTimeZone { get => _body.ActiveHourConfigurationDefaultTimeZone ?? null; set => _body.ActiveHourConfigurationDefaultTimeZone = value; } + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enables or disables whether the Dev Box should be kept awake during active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be kept awake during active hours.", + SerializedName = @"keepAwakeEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus ActiveHourConfigurationKeepAwakeEnableStatus { get => _body.ActiveHourConfigurationKeepAwakeEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus)""); set => _body.ActiveHourConfigurationKeepAwakeEnableStatus = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] @@ -62,17 +122,45 @@ public partial class NewAzDevCenterAdminPool_CreateExpanded : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - /// Name of a Dev Box definition in parent Project of this Pool - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a Dev Box definition in parent Project of this Pool")] + /// + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Name of a Dev Box definition in parent Project of this Pool", + Description = @"Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value.", SerializedName = @"devBoxDefinitionName", PossibleTypes = new [] { typeof(string) })] public string DevBoxDefinitionName { get => _body.DevBoxDefinitionName ?? null; set => _body.DevBoxDefinitionName = value; } + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly.", + SerializedName = @"devBoxDefinitionType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType DevBoxDefinitionType { get => _body.DevBoxDefinitionType ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType)""); set => _body.DevBoxDefinitionType = value; } + + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether Dev Box Tunnel is enabled for a the pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether Dev Box Tunnel is enabled for a the pool.", + SerializedName = @"devBoxTunnelEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus DevBoxTunnelEnableStatus { get => _body.DevBoxTunnelEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus)""); set => _body.DevBoxTunnelEnableStatus = value; } + /// The display name of the pool. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The display name of the pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] @@ -96,6 +184,19 @@ public partial class NewAzDevCenterAdminPool_CreateExpanded : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Image ID, or Image version ID. When Image ID is provided, its latest version will be used.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string ImageReferenceId { get => _body.ImageReferenceId ?? null; set => _body.ImageReferenceId = value; } + /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -263,6 +364,72 @@ public partial class NewAzDevCenterAdminPool_CreateExpanded : global::System.Man [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus))] public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus SingleSignOnStatus { get => _body.SingleSignOnStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus)""); set => _body.SingleSignOnStatus = value; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + public int SkuCapacity { get => _body.SkuCapacity ?? default(int); set => _body.SkuCapacity = value; } + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the service has different generations of hardware, for the same SKU, then that can be captured here.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + public string SkuFamily { get => _body.SkuFamily ?? null; set => _body.SkuFamily = value; } + + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the SKU. E.g. P3. It is typically a letter+number code")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + public string SkuName { get => _body.SkuName ?? null; set => _body.SkuName = value; } + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + public string SkuSize { get => _body.SkuSize ?? null; set => _body.SkuSize = value; } + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier SkuTier { get => _body.SkuTier ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); set => _body.SkuTier = value; } + /// /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. /// @@ -290,6 +457,33 @@ public partial class NewAzDevCenterAdminPool_CreateExpanded : global::System.Man [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus))] public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus StopOnDisconnectStatus { get => _body.StopOnDisconnectStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus)""); set => _body.StopOnDisconnectStatus = value; } + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The specified time in minutes to wait before stopping a Dev Box if no connection is made.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box if no connection is made.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + public int StopOnNoConnectGracePeriodMinute { get => _body.StopOnNoConnectGracePeriodMinute ?? default(int); set => _body.StopOnNoConnectGracePeriodMinute = value; } + + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus StopOnNoConnectStatus { get => _body.StopOnNoConnectStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus)""); set => _body.StopOnNoConnectStatus = value; } + /// Backing field for property. private string _subscriptionId; @@ -317,8 +511,8 @@ public partial class NewAzDevCenterAdminPool_CreateExpanded : global::System.Man ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } /// /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. @@ -339,24 +533,24 @@ public partial class NewAzDevCenterAdminPool_CreateExpanded : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool /// 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); + 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) @@ -619,12 +813,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -641,7 +835,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -659,12 +853,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -676,7 +870,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPool_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPool_CreateViaIdentityExpanded.cs index c546cc9d5221..47bc81a9b01c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPool_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminPool_CreateViaIdentityExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminPool_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminPool", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a machine pool")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminPool_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,13 +31,74 @@ public partial class NewAzDevCenterAdminPool_CreateViaIdentityExpanded : global: private string __processRecordId; /// A pool of Virtual Machines. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Pool(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Pool(); /// /// The for this operation. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enables or disables whether the Dev Box should be automatically started at commencement of active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be automatically started at commencement of active hours.", + SerializedName = @"autoStartEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus ActiveHourConfigurationAutoStartEnableStatus { get => _body.ActiveHourConfigurationAutoStartEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus)""); set => _body.ActiveHourConfigurationAutoStartEnableStatus = value; } + + /// The default end time of the active hours + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default end time of the active hours")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default end time of the active hours", + SerializedName = @"defaultEndTimeHour", + PossibleTypes = new [] { typeof(int) })] + public int ActiveHourConfigurationDefaultEndTimeHour { get => _body.ActiveHourConfigurationDefaultEndTimeHour ?? default(int); set => _body.ActiveHourConfigurationDefaultEndTimeHour = value; } + + /// The default start time of the active hours. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default start time of the active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default start time of the active hours.", + SerializedName = @"defaultStartTimeHour", + PossibleTypes = new [] { typeof(int) })] + public int ActiveHourConfigurationDefaultStartTimeHour { get => _body.ActiveHourConfigurationDefaultStartTimeHour ?? default(int); set => _body.ActiveHourConfigurationDefaultStartTimeHour = value; } + + /// The default IANA timezone id of the active hours. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default IANA timezone id of the active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default IANA timezone id of the active hours.", + SerializedName = @"defaultTimeZone", + PossibleTypes = new [] { typeof(string) })] + public string ActiveHourConfigurationDefaultTimeZone { get => _body.ActiveHourConfigurationDefaultTimeZone ?? null; set => _body.ActiveHourConfigurationDefaultTimeZone = value; } + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enables or disables whether the Dev Box should be kept awake during active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be kept awake during active hours.", + SerializedName = @"keepAwakeEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus ActiveHourConfigurationKeepAwakeEnableStatus { get => _body.ActiveHourConfigurationKeepAwakeEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus)""); set => _body.ActiveHourConfigurationKeepAwakeEnableStatus = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] @@ -62,17 +122,45 @@ public partial class NewAzDevCenterAdminPool_CreateViaIdentityExpanded : global: [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - /// Name of a Dev Box definition in parent Project of this Pool - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a Dev Box definition in parent Project of this Pool")] + /// + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Name of a Dev Box definition in parent Project of this Pool", + Description = @"Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value.", SerializedName = @"devBoxDefinitionName", PossibleTypes = new [] { typeof(string) })] public string DevBoxDefinitionName { get => _body.DevBoxDefinitionName ?? null; set => _body.DevBoxDefinitionName = value; } + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly.", + SerializedName = @"devBoxDefinitionType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType DevBoxDefinitionType { get => _body.DevBoxDefinitionType ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType)""); set => _body.DevBoxDefinitionType = value; } + + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether Dev Box Tunnel is enabled for a the pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether Dev Box Tunnel is enabled for a the pool.", + SerializedName = @"devBoxTunnelEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus DevBoxTunnelEnableStatus { get => _body.DevBoxTunnelEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus)""); set => _body.DevBoxTunnelEnableStatus = value; } + /// The display name of the pool. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The display name of the pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] @@ -96,6 +184,19 @@ public partial class NewAzDevCenterAdminPool_CreateViaIdentityExpanded : global: [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Image ID, or Image version ID. When Image ID is provided, its latest version will be used.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string ImageReferenceId { get => _body.ImageReferenceId ?? null; set => _body.ImageReferenceId = value; } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; @@ -228,6 +329,72 @@ public partial class NewAzDevCenterAdminPool_CreateViaIdentityExpanded : global: [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus))] public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus SingleSignOnStatus { get => _body.SingleSignOnStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus)""); set => _body.SingleSignOnStatus = value; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + public int SkuCapacity { get => _body.SkuCapacity ?? default(int); set => _body.SkuCapacity = value; } + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the service has different generations of hardware, for the same SKU, then that can be captured here.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + public string SkuFamily { get => _body.SkuFamily ?? null; set => _body.SkuFamily = value; } + + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the SKU. E.g. P3. It is typically a letter+number code")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + public string SkuName { get => _body.SkuName ?? null; set => _body.SkuName = value; } + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + public string SkuSize { get => _body.SkuSize ?? null; set => _body.SkuSize = value; } + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier SkuTier { get => _body.SkuTier ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); set => _body.SkuTier = value; } + /// /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. /// @@ -255,6 +422,33 @@ public partial class NewAzDevCenterAdminPool_CreateViaIdentityExpanded : global: [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus))] public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus StopOnDisconnectStatus { get => _body.StopOnDisconnectStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus)""); set => _body.StopOnDisconnectStatus = value; } + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The specified time in minutes to wait before stopping a Dev Box if no connection is made.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box if no connection is made.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + public int StopOnNoConnectGracePeriodMinute { get => _body.StopOnNoConnectGracePeriodMinute ?? default(int); set => _body.StopOnNoConnectGracePeriodMinute = value; } + + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus StopOnNoConnectStatus { get => _body.StopOnNoConnectStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus)""); set => _body.StopOnNoConnectStatus = value; } + /// Resource tags. [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ExportAs(typeof(global::System.Collections.Hashtable))] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] @@ -264,8 +458,8 @@ public partial class NewAzDevCenterAdminPool_CreateViaIdentityExpanded : global: ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } /// /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. @@ -286,24 +480,24 @@ public partial class NewAzDevCenterAdminPool_CreateViaIdentityExpanded : global: /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool /// 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); + 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) @@ -586,12 +780,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -608,7 +802,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -626,12 +820,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -643,7 +837,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectCatalog_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectCatalog_CreateExpanded.cs index f33b24357bcb..8258652d0d4b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectCatalog_CreateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectCatalog_CreateExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminProjectCatalog_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminProjectCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a project catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminProjectCatalog_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminProjectCatalog_CreateExpanded : global:: private string __processRecordId; /// Represents a catalog. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Catalog(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Catalog(); /// /// The for this operation. @@ -287,32 +286,32 @@ public partial class NewAzDevCenterAdminProjectCatalog_CreateExpanded : global:: ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -575,12 +574,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -597,7 +596,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -615,12 +614,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -632,7 +631,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectCatalog_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectCatalog_CreateViaIdentityExpanded.cs index 0697b66e8c56..a63c04d8cd7e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectCatalog_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectCatalog_CreateViaIdentityExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminProjectCatalog_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminProjectCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a project catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminProjectCatalog_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminProjectCatalog_CreateViaIdentityExpanded private string __processRecordId; /// Represents a catalog. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Catalog(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Catalog(); /// /// The for this operation. @@ -235,32 +234,32 @@ public partial class NewAzDevCenterAdminProjectCatalog_CreateViaIdentityExpanded ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -545,12 +544,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -567,7 +566,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -585,12 +584,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -602,7 +601,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectEnvironmentType_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectEnvironmentType_CreateExpanded.cs index 83a4d081f87a..8349f40d4ed2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectEnvironmentType_CreateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectEnvironmentType_CreateExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminProjectEnvironmentType_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminProjectEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a project environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminProjectEnvironmentType_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminProjectEnvironmentType_CreateExpanded : private string __processRecordId; /// Represents an environment type. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentType(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentType(); /// /// The for this operation. @@ -56,8 +55,8 @@ public partial class NewAzDevCenterAdminProjectEnvironmentType_CreateExpanded : ReadOnly = false, Description = @"A map of roles to assign to the environment creator.", SerializedName = @"roles", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => _body.CreatorRoleAssignmentRole ?? null /* object */; set => _body.CreatorRoleAssignmentRole = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => _body.CreatorRoleAssignmentRole ?? null /* object */; set => _body.CreatorRoleAssignmentRole = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -260,8 +259,8 @@ public partial class NewAzDevCenterAdminProjectEnvironmentType_CreateExpanded : ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } /// /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role @@ -275,44 +274,44 @@ public partial class NewAzDevCenterAdminProjectEnvironmentType_CreateExpanded : ReadOnly = false, Description = @"Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs.", SerializedName = @"userRoleAssignments", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => _body.UserRoleAssignment ?? null /* object */; set => _body.UserRoleAssignment = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => _body.UserRoleAssignment ?? null /* object */; set => _body.UserRoleAssignment = value; } /// /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// 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); + 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) @@ -518,12 +517,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -535,7 +534,7 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType WriteObject((await response)); } } @@ -544,12 +543,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -566,7 +565,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, EnvironmentTypeName=EnvironmentTypeName, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -584,12 +583,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -601,7 +600,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectEnvironmentType_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectEnvironmentType_CreateViaIdentityExpanded.cs index 57627f1d4412..0bd6164b1c5c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectEnvironmentType_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectEnvironmentType_CreateViaIdentityExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminProjectEnvironmentType_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminProjectEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a project environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminProjectEnvironmentType_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminProjectEnvironmentType_CreateViaIdentity private string __processRecordId; /// Represents an environment type. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentType(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentType(); /// /// The for this operation. @@ -56,8 +55,8 @@ public partial class NewAzDevCenterAdminProjectEnvironmentType_CreateViaIdentity ReadOnly = false, Description = @"A map of roles to assign to the environment creator.", SerializedName = @"roles", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => _body.CreatorRoleAssignmentRole ?? null /* object */; set => _body.CreatorRoleAssignmentRole = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => _body.CreatorRoleAssignmentRole ?? null /* object */; set => _body.CreatorRoleAssignmentRole = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -208,8 +207,8 @@ public partial class NewAzDevCenterAdminProjectEnvironmentType_CreateViaIdentity ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } /// /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role @@ -223,44 +222,44 @@ public partial class NewAzDevCenterAdminProjectEnvironmentType_CreateViaIdentity ReadOnly = false, Description = @"Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs.", SerializedName = @"userRoleAssignments", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => _body.UserRoleAssignment ?? null /* object */; set => _body.UserRoleAssignment = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => _body.UserRoleAssignment ?? null /* object */; set => _body.UserRoleAssignment = value; } /// /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); /// /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// 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); + 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) @@ -491,12 +490,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -508,7 +507,7 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType WriteObject((await response)); } } @@ -517,12 +516,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -539,7 +538,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -557,12 +556,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -574,7 +573,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectPolicy_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectPolicy_CreateExpanded.cs new file mode 100644 index 000000000000..fd5e05b9332b --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectPolicy_CreateExpanded.cs @@ -0,0 +1,549 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Creates or updates an project policy. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminProjectPolicy_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates an project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}", ApiVersion = "2025-04-01-preview")] + public partial class NewAzDevCenterAdminProjectPolicy_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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; + + /// Represents an project policy resource. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicy(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devCenterName; + + /// The name of the devcenter. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the devcenter.", + SerializedName = @"devCenterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string DevCenterName { get => this._devCenterName; set => this._devCenterName = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the project policy. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project policy.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project policy.", + SerializedName = @"projectPolicyName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProjectPolicyName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Resource policies that are a part of this project policy. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource policies that are a part of this project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource policies that are a part of this project policy.", + SerializedName = @"resourcePolicies", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[] ResourcePolicy { get => _body.ResourcePolicy ?? null /* arrayOf */; set => _body.ResourcePolicy = value; } + + /// + /// Resources that have access to the shared resources that are a part of this project policy. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resources that have access to the shared resources that are a part of this project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resources that have access to the shared resources that are a part of this project policy.", + SerializedName = @"scopes", + PossibleTypes = new [] { typeof(string) })] + public string[] Scope { get => _body.Scope ?? null /* arrayOf */; set => _body.Scope = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzDevCenterAdminProjectPolicy_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.NewAzDevCenterAdminProjectPolicy_CreateExpanded Clone() + { + var clone = new NewAzDevCenterAdminProjectPolicy_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._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.DevCenterName = this.DevCenterName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzDevCenterAdminProjectPolicy_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectPoliciesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectPoliciesCreateOrUpdate(SubscriptionId, ResourceGroupName, DevCenterName, Name, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,DevCenterName=DevCenterName,Name=Name,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name, body=_body }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name, body=_body }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectPolicy_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectPolicy_CreateViaIdentityExpanded.cs new file mode 100644 index 000000000000..9a5c8878e357 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProjectPolicy_CreateViaIdentityExpanded.cs @@ -0,0 +1,518 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Creates or updates an project policy. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminProjectPolicy_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates an project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}", ApiVersion = "2025-04-01-preview")] + public partial class NewAzDevCenterAdminProjectPolicy_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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; + + /// Represents an project policy resource. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicy(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Resource policies that are a part of this project policy. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource policies that are a part of this project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource policies that are a part of this project policy.", + SerializedName = @"resourcePolicies", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[] ResourcePolicy { get => _body.ResourcePolicy ?? null /* arrayOf */; set => _body.ResourcePolicy = value; } + + /// + /// Resources that have access to the shared resources that are a part of this project policy. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resources that have access to the shared resources that are a part of this project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resources that have access to the shared resources that are a part of this project policy.", + SerializedName = @"scopes", + PossibleTypes = new [] { typeof(string) })] + public string[] Scope { get => _body.Scope ?? null /* arrayOf */; set => _body.Scope = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzDevCenterAdminProjectPolicy_CreateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.NewAzDevCenterAdminProjectPolicy_CreateViaIdentityExpanded Clone() + { + var clone = new NewAzDevCenterAdminProjectPolicy_CreateViaIdentityExpanded(); + 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._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzDevCenterAdminProjectPolicy_CreateViaIdentityExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectPoliciesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProjectPoliciesCreateOrUpdateViaIdentity(InputObject.Id, _body, 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.DevCenterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevCenterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProjectPolicyName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectPolicyName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProjectPoliciesCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.DevCenterName ?? null, InputObject.ProjectPolicyName ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + 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 { body=_body }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProject_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProject_CreateExpanded.cs index cad411e1042f..b91647c913b1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProject_CreateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProject_CreateExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminProject_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminProject", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminProject_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminProject_CreateExpanded : global::System. private string __processRecordId; /// Represents a project resource. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Project(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Project(); /// /// The for this operation. @@ -44,6 +43,18 @@ public partial class NewAzDevCenterAdminProject_CreateExpanded : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + /// The property indicates whether Azure AI services is enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The property indicates whether Azure AI services is enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether Azure AI services is enabled.", + SerializedName = @"azureAiServicesMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode AzureAiServiceSettingAzureAiServicesMode { get => _body.AzureAiServiceSettingAzureAiServicesMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode)""); set => _body.AzureAiServiceSettingAzureAiServicesMode = value; } + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] @@ -65,6 +76,32 @@ public partial class NewAzDevCenterAdminProject_CreateExpanded : global::System. /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.ClientAPI; + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The identities that can to be used in customization scenarios; e.g., to clone a repository.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identities that can to be used in customization scenarios; e.g., to clone a repository.", + SerializedName = @"identities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] CustomizationSettingIdentity { get => _body.CustomizationSettingIdentity ?? null /* arrayOf */; set => _body.CustomizationSettingIdentity = value; } + + /// Indicates whether user customizations are enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether user customizations are enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether user customizations are enabled.", + SerializedName = @"userCustomizationsEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus CustomizationSettingUserCustomizationsEnableStatus { get => _body.CustomizationSettingUserCustomizationsEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus)""); set => _body.CustomizationSettingUserCustomizationsEnableStatus = value; } + /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet /// against a different subscription @@ -86,6 +123,45 @@ public partial class NewAzDevCenterAdminProject_CreateExpanded : global::System. PossibleTypes = new [] { typeof(string) })] public string Description { get => _body.Description ?? null; set => _body.Description = value; } + /// Indicates the delete mode for Dev Boxes within this project. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the delete mode for Dev Boxes within this project.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the delete mode for Dev Boxes within this project.", + SerializedName = @"deleteMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode DevBoxAutoDeleteSettingDeleteMode { get => _body.DevBoxAutoDeleteSettingDeleteMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode)""); set => _body.DevBoxAutoDeleteSettingDeleteMode = value; } + + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"gracePeriod", + PossibleTypes = new [] { typeof(string) })] + public string DevBoxAutoDeleteSettingGracePeriod { get => _body.DevBoxAutoDeleteSettingGracePeriod ?? null; set => _body.DevBoxAutoDeleteSettingGracePeriod = value; } + + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format PT[n]H[n]M[n]S.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"inactiveThreshold", + PossibleTypes = new [] { typeof(string) })] + public string DevBoxAutoDeleteSettingInactiveThreshold { get => _body.DevBoxAutoDeleteSettingInactiveThreshold ?? null; set => _body.DevBoxAutoDeleteSettingInactiveThreshold = value; } + /// Resource Id of an associated DevCenter [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource Id of an associated DevCenter")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] @@ -244,6 +320,31 @@ public partial class NewAzDevCenterAdminProject_CreateExpanded : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "When specified, limits the maximum number of concurrent sessions across all pools in the project.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"When specified, limits the maximum number of concurrent sessions across all pools in the project.", + SerializedName = @"maxConcurrentSessionsPerProject", + PossibleTypes = new [] { typeof(int) })] + public int ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject { get => _body.ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject ?? default(int); set => _body.ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject = value; } + + /// The property indicates whether serverless GPU access is enabled on the project. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The property indicates whether serverless GPU access is enabled on the project.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether serverless GPU access is enabled on the project.", + SerializedName = @"serverlessGpuSessionsMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode ServerlessGpuSessionSettingServerlessGpuSessionsMode { get => _body.ServerlessGpuSessionSettingServerlessGpuSessionsMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode)""); set => _body.ServerlessGpuSessionSettingServerlessGpuSessionsMode = value; } + /// Backing field for property. private string _subscriptionId; @@ -271,32 +372,44 @@ public partial class NewAzDevCenterAdminProject_CreateExpanded : global::System. ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + + /// Indicates whether workspace storage is enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether workspace storage is enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether workspace storage is enabled.", + SerializedName = @"workspaceStorageMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode WorkspaceStorageSettingWorkspaceStorageMode { get => _body.WorkspaceStorageSettingWorkspaceStorageMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode)""); set => _body.WorkspaceStorageSettingWorkspaceStorageMode = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject /// 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); + 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) @@ -558,12 +671,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -580,7 +693,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -598,12 +711,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -615,7 +728,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProject_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProject_CreateViaIdentityExpanded.cs index 0e5e5c72c90f..7a5ba30ded90 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProject_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminProject_CreateViaIdentityExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminProject_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminProject", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminProject_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminProject_CreateViaIdentityExpanded : glob private string __processRecordId; /// Represents a project resource. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Project(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Project(); /// /// The for this operation. @@ -44,6 +43,18 @@ public partial class NewAzDevCenterAdminProject_CreateViaIdentityExpanded : glob [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + /// The property indicates whether Azure AI services is enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The property indicates whether Azure AI services is enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether Azure AI services is enabled.", + SerializedName = @"azureAiServicesMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode AzureAiServiceSettingAzureAiServicesMode { get => _body.AzureAiServiceSettingAzureAiServicesMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode)""); set => _body.AzureAiServiceSettingAzureAiServicesMode = value; } + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] @@ -65,6 +76,32 @@ public partial class NewAzDevCenterAdminProject_CreateViaIdentityExpanded : glob /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.ClientAPI; + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The identities that can to be used in customization scenarios; e.g., to clone a repository.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identities that can to be used in customization scenarios; e.g., to clone a repository.", + SerializedName = @"identities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] CustomizationSettingIdentity { get => _body.CustomizationSettingIdentity ?? null /* arrayOf */; set => _body.CustomizationSettingIdentity = value; } + + /// Indicates whether user customizations are enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether user customizations are enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether user customizations are enabled.", + SerializedName = @"userCustomizationsEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus CustomizationSettingUserCustomizationsEnableStatus { get => _body.CustomizationSettingUserCustomizationsEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus)""); set => _body.CustomizationSettingUserCustomizationsEnableStatus = value; } + /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet /// against a different subscription @@ -86,6 +123,45 @@ public partial class NewAzDevCenterAdminProject_CreateViaIdentityExpanded : glob PossibleTypes = new [] { typeof(string) })] public string Description { get => _body.Description ?? null; set => _body.Description = value; } + /// Indicates the delete mode for Dev Boxes within this project. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the delete mode for Dev Boxes within this project.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the delete mode for Dev Boxes within this project.", + SerializedName = @"deleteMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode DevBoxAutoDeleteSettingDeleteMode { get => _body.DevBoxAutoDeleteSettingDeleteMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode)""); set => _body.DevBoxAutoDeleteSettingDeleteMode = value; } + + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"gracePeriod", + PossibleTypes = new [] { typeof(string) })] + public string DevBoxAutoDeleteSettingGracePeriod { get => _body.DevBoxAutoDeleteSettingGracePeriod ?? null; set => _body.DevBoxAutoDeleteSettingGracePeriod = value; } + + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format PT[n]H[n]M[n]S.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"inactiveThreshold", + PossibleTypes = new [] { typeof(string) })] + public string DevBoxAutoDeleteSettingInactiveThreshold { get => _body.DevBoxAutoDeleteSettingInactiveThreshold ?? null; set => _body.DevBoxAutoDeleteSettingInactiveThreshold = value; } + /// Resource Id of an associated DevCenter [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource Id of an associated DevCenter")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] @@ -223,6 +299,31 @@ public partial class NewAzDevCenterAdminProject_CreateViaIdentityExpanded : glob [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "When specified, limits the maximum number of concurrent sessions across all pools in the project.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"When specified, limits the maximum number of concurrent sessions across all pools in the project.", + SerializedName = @"maxConcurrentSessionsPerProject", + PossibleTypes = new [] { typeof(int) })] + public int ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject { get => _body.ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject ?? default(int); set => _body.ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject = value; } + + /// The property indicates whether serverless GPU access is enabled on the project. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The property indicates whether serverless GPU access is enabled on the project.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether serverless GPU access is enabled on the project.", + SerializedName = @"serverlessGpuSessionsMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode ServerlessGpuSessionSettingServerlessGpuSessionsMode { get => _body.ServerlessGpuSessionSettingServerlessGpuSessionsMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode)""); set => _body.ServerlessGpuSessionSettingServerlessGpuSessionsMode = value; } + /// Resource tags. [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ExportAs(typeof(global::System.Collections.Hashtable))] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] @@ -232,32 +333,44 @@ public partial class NewAzDevCenterAdminProject_CreateViaIdentityExpanded : glob ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + + /// Indicates whether workspace storage is enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether workspace storage is enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether workspace storage is enabled.", + SerializedName = @"workspaceStorageMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode WorkspaceStorageSettingWorkspaceStorageMode { get => _body.WorkspaceStorageSettingWorkspaceStorageMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode)""); set => _body.WorkspaceStorageSettingWorkspaceStorageMode = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject /// 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); + 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) @@ -536,12 +649,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -558,7 +671,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -576,12 +689,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -593,7 +706,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminSchedule_CreateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminSchedule_CreateExpanded.cs index be64ee3f228f..509cbfbdedfa 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminSchedule_CreateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminSchedule_CreateExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminSchedule_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminSchedule", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a Schedule.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminSchedule_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminSchedule_CreateExpanded : global::System private string __processRecordId; /// Represents a Schedule to execute a task. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Schedule(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Schedule(); /// /// The for this operation. @@ -260,8 +259,8 @@ public partial class NewAzDevCenterAdminSchedule_CreateExpanded : global::System ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } /// The target time to trigger the action. The format is HH:MM. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The target time to trigger the action. The format is HH:MM.")] @@ -307,24 +306,24 @@ public partial class NewAzDevCenterAdminSchedule_CreateExpanded : global::System /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule /// 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); + 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) @@ -589,12 +588,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -611,7 +610,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, PoolName=PoolName, Name=Name, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -629,12 +628,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -646,7 +645,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminSchedule_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminSchedule_CreateViaIdentityExpanded.cs index aabf1fa26c73..efa905c7832a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminSchedule_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/NewAzDevCenterAdminSchedule_CreateViaIdentityExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterAdminSchedule_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="New-AzDevCenterAdminSchedule", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Creates or updates a Schedule.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterAdminSchedule_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -32,7 +31,7 @@ public partial class NewAzDevCenterAdminSchedule_CreateViaIdentityExpanded : glo private string __processRecordId; /// Represents a Schedule to execute a task. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.Schedule(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.Schedule(); /// /// The for this operation. @@ -188,8 +187,8 @@ public partial class NewAzDevCenterAdminSchedule_CreateViaIdentityExpanded : glo ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } /// The target time to trigger the action. The format is HH:MM. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The target time to trigger the action. The format is HH:MM.")] @@ -235,24 +234,24 @@ public partial class NewAzDevCenterAdminSchedule_CreateViaIdentityExpanded : glo /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule /// 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); + 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) @@ -540,12 +539,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -562,7 +561,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -580,12 +579,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -597,7 +596,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminAttachedNetwork_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminAttachedNetwork_Delete.cs index a1f338c3a15b..e1182064e9b1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminAttachedNetwork_Delete.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminAttachedNetwork_Delete.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks/{attachedNetworkConnectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminAttachedNetwork_Delete", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminAttachedNetwork", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Un-attach a NetworkConnection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks/{attachedNetworkConnectionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks/{attachedNetworkConnectionName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminAttachedNetwork_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -183,12 +182,12 @@ public partial class RemoveAzDevCenterAdminAttachedNetwork_Delete : global::Syst /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -470,12 +469,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -492,7 +491,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, ConnectionName=ConnectionName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminAttachedNetwork_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminAttachedNetwork_DeleteViaIdentity.cs index fb5f0053e21c..a58efe9d5fa1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminAttachedNetwork_DeleteViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminAttachedNetwork_DeleteViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks/{attachedNetworkConnectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminAttachedNetwork_DeleteViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminAttachedNetwork", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Un-attach a NetworkConnection.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks/{attachedNetworkConnectionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/attachednetworks/{attachedNetworkConnectionName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminAttachedNetwork_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -130,12 +129,12 @@ public partial class RemoveAzDevCenterAdminAttachedNetwork_DeleteViaIdentity : g /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -437,12 +436,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -459,7 +458,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminCatalog_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminCatalog_Delete.cs index d7a0151716ea..2dd257fafbcd 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminCatalog_Delete.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminCatalog_Delete.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminCatalog_Delete", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a catalog resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminCatalog_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -183,12 +182,12 @@ public partial class RemoveAzDevCenterAdminCatalog_Delete : global::System.Manag /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -470,12 +469,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -492,7 +491,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminCatalog_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminCatalog_DeleteViaIdentity.cs index 5b2d2c81c727..95c0bfb45bc7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminCatalog_DeleteViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminCatalog_DeleteViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminCatalog_DeleteViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a catalog resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminCatalog_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -130,12 +129,12 @@ public partial class RemoveAzDevCenterAdminCatalog_DeleteViaIdentity : global::S /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -437,12 +436,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -459,7 +458,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevBoxDefinition_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevBoxDefinition_Delete.cs index d4444d4c58ab..b6c8f1922c62 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevBoxDefinition_Delete.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevBoxDefinition_Delete.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminDevBoxDefinition_Delete", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminDevBoxDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a Dev Box definition")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminDevBoxDefinition_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -183,12 +182,12 @@ public partial class RemoveAzDevCenterAdminDevBoxDefinition_Delete : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -470,12 +469,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -492,7 +491,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevBoxDefinition_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevBoxDefinition_DeleteViaIdentity.cs index abf6278a4ba0..9734d3d9e8ac 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevBoxDefinition_DeleteViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevBoxDefinition_DeleteViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminDevBoxDefinition_DeleteViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminDevBoxDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a Dev Box definition")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminDevBoxDefinition_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -130,12 +129,12 @@ public partial class RemoveAzDevCenterAdminDevBoxDefinition_DeleteViaIdentity : /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -439,12 +438,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -461,7 +460,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevCenter_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevCenter_Delete.cs index 82011f6a5878..73fda0892585 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevCenter_Delete.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevCenter_Delete.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminDevCenter_Delete", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminDevCenter", ChangeDescription="PlanId will be removed from the DevCenter output.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a devcenter")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminDevCenter_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -169,12 +168,12 @@ public partial class RemoveAzDevCenterAdminDevCenter_Delete : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -455,12 +454,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -477,7 +476,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevCenter_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevCenter_DeleteViaIdentity.cs index 41eb4b48b7fe..3d2316221763 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevCenter_DeleteViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminDevCenter_DeleteViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminDevCenter_DeleteViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminDevCenter", ChangeDescription="PlanId will be removed from the DevCenter output.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a devcenter")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminDevCenter_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -130,12 +129,12 @@ public partial class RemoveAzDevCenterAdminDevCenter_DeleteViaIdentity : global: /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -433,12 +432,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -455,7 +454,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEncryptionSet_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEncryptionSet_Delete.cs index 748e4b8e50d1..f0ffce071d1f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEncryptionSet_Delete.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEncryptionSet_Delete.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a devcenter encryption set")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminEncryptionSet_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -183,12 +183,12 @@ public partial class RemoveAzDevCenterAdminEncryptionSet_Delete : global::System /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -460,12 +460,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -482,7 +482,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEncryptionSet_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEncryptionSet_DeleteViaIdentity.cs index 40e7f86b5556..edd56499d060 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEncryptionSet_DeleteViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEncryptionSet_DeleteViaIdentity.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a devcenter encryption set")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminEncryptionSet_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -130,12 +130,12 @@ public partial class RemoveAzDevCenterAdminEncryptionSet_DeleteViaIdentity : glo /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -427,12 +427,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -449,7 +449,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEnvironmentType_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEnvironmentType_Delete.cs index a15f1782e036..3d4c4bb80f87 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEnvironmentType_Delete.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEnvironmentType_Delete.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminEnvironmentType_Delete", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes an environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminEnvironmentType_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -170,12 +169,12 @@ public partial class RemoveAzDevCenterAdminEnvironmentType_Delete : global::Syst /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -403,12 +402,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -425,7 +424,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEnvironmentType_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEnvironmentType_DeleteViaIdentity.cs index 472e6f6985ef..fe18e2a2ae77 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEnvironmentType_DeleteViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminEnvironmentType_DeleteViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminEnvironmentType_DeleteViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes an environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminEnvironmentType_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -117,12 +116,12 @@ public partial class RemoveAzDevCenterAdminEnvironmentType_DeleteViaIdentity : g /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -374,12 +373,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -396,7 +395,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminGallery_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminGallery_Delete.cs index fd6027222d37..7971c7400c53 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminGallery_Delete.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminGallery_Delete.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminGallery_Delete", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminGallery", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a gallery resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminGallery_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -183,12 +182,12 @@ public partial class RemoveAzDevCenterAdminGallery_Delete : global::System.Manag /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -470,12 +469,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -492,7 +491,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminGallery_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminGallery_DeleteViaIdentity.cs index 9067526e6388..db17d4063c56 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminGallery_DeleteViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminGallery_DeleteViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminGallery_DeleteViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminGallery", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a gallery resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/galleries/{galleryName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminGallery_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -130,12 +129,12 @@ public partial class RemoveAzDevCenterAdminGallery_DeleteViaIdentity : global::S /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -437,12 +436,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -459,7 +458,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminNetworkConnection_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminNetworkConnection_Delete.cs index 34a48230373b..35f2ea699e3a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminNetworkConnection_Delete.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminNetworkConnection_Delete.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminNetworkConnection_Delete", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminNetworkConnection", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a Network Connections resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminNetworkConnection_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -169,12 +168,12 @@ public partial class RemoveAzDevCenterAdminNetworkConnection_Delete : global::Sy /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -455,12 +454,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -477,7 +476,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminNetworkConnection_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminNetworkConnection_DeleteViaIdentity.cs index 6b8bf771a98c..6de23d60f605 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminNetworkConnection_DeleteViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminNetworkConnection_DeleteViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminNetworkConnection_DeleteViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminNetworkConnection", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a Network Connections resource")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminNetworkConnection_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -130,12 +129,12 @@ public partial class RemoveAzDevCenterAdminNetworkConnection_DeleteViaIdentity : /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -435,12 +434,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -457,7 +456,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPlanMember_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPlanMember_Delete.cs deleted file mode 100644 index f60b77645efd..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPlanMember_Delete.cs +++ /dev/null @@ -1,558 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Deletes a devcenter plan member - /// - /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminPlanMember_Delete", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a devcenter plan member")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}", ApiVersion = "2024-05-01-preview")] - public partial class RemoveAzDevCenterAdminPlanMember_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 _memberName; - - /// The name of a devcenter plan member. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of a devcenter plan member.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of a devcenter plan member.", - SerializedName = @"memberName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string MemberName { get => this._memberName; set => this._memberName = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter PassThru { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } - - /// Backing field for property. - private string _planName; - - /// The name of the devcenter plan. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter plan.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the devcenter plan.", - SerializedName = @"planName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string PlanName { get => this._planName; set => this._planName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of RemoveAzDevCenterAdminPlanMember_Delete - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.RemoveAzDevCenterAdminPlanMember_Delete Clone() - { - var clone = new RemoveAzDevCenterAdminPlanMember_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.PlanName = this.PlanName; - clone.MemberName = this.MemberName; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'PlanMembersDelete' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PlanMembersDelete(SubscriptionId, ResourceGroupName, PlanName, MemberName, onOk, onNoContent, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,PlanName=PlanName,MemberName=MemberName}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public RemoveAzDevCenterAdminPlanMember_Delete() - { - - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, PlanName=PlanName, MemberName=MemberName }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, PlanName=PlanName, MemberName=MemberName }) - { - 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 == MyInvocation?.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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPlanMember_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPlanMember_DeleteViaIdentity.cs deleted file mode 100644 index 2aa1fc3bdfe9..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPlanMember_DeleteViaIdentity.cs +++ /dev/null @@ -1,526 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Deletes a devcenter plan member - /// - /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminPlanMember_DeleteViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a devcenter plan member")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}", ApiVersion = "2024-05-01-preview")] - public partial class RemoveAzDevCenterAdminPlanMember_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter PassThru { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of RemoveAzDevCenterAdminPlanMember_DeleteViaIdentity - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.RemoveAzDevCenterAdminPlanMember_DeleteViaIdentity Clone() - { - var clone = new RemoveAzDevCenterAdminPlanMember_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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'PlanMembersDelete' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.PlanMembersDeleteViaIdentity(InputObject.Id, onOk, onNoContent, 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.PlanName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PlanName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.MemberName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.MemberName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.PlanMembersDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PlanName ?? null, InputObject.MemberName ?? null, onOk, onNoContent, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public RemoveAzDevCenterAdminPlanMember_DeleteViaIdentity() - { - - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 == MyInvocation?.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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPlan_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPlan_Delete.cs deleted file mode 100644 index 3bf2bfd39a3e..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPlan_Delete.cs +++ /dev/null @@ -1,544 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Deletes a devcenter plan - /// - /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminPlan_Delete", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a devcenter plan")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}", ApiVersion = "2024-05-01-preview")] - public partial class RemoveAzDevCenterAdminPlan_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the devcenter plan. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter plan.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the devcenter plan.", - SerializedName = @"planName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("PlanName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter PassThru { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of RemoveAzDevCenterAdminPlan_Delete - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.RemoveAzDevCenterAdminPlan_Delete Clone() - { - var clone = new RemoveAzDevCenterAdminPlan_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.Name = this.Name; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'PlansDelete' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PlansDelete(SubscriptionId, ResourceGroupName, Name, onOk, onNoContent, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,Name=Name}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public RemoveAzDevCenterAdminPlan_Delete() - { - - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) - { - 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 == MyInvocation?.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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPlan_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPlan_DeleteViaIdentity.cs deleted file mode 100644 index cacd4a5d418c..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPlan_DeleteViaIdentity.cs +++ /dev/null @@ -1,522 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Deletes a devcenter plan - /// - /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminPlan_DeleteViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a devcenter plan")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}", ApiVersion = "2024-05-01-preview")] - public partial class RemoveAzDevCenterAdminPlan_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter PassThru { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of RemoveAzDevCenterAdminPlan_DeleteViaIdentity - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.RemoveAzDevCenterAdminPlan_DeleteViaIdentity Clone() - { - var clone = new RemoveAzDevCenterAdminPlan_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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'PlansDelete' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.PlansDeleteViaIdentity(InputObject.Id, onOk, onNoContent, 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.PlanName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PlanName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.PlansDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PlanName ?? null, onOk, onNoContent, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public RemoveAzDevCenterAdminPlan_DeleteViaIdentity() - { - - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 == MyInvocation?.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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) - { - WriteObject(true); - } - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPool_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPool_Delete.cs index 5cd72fdc31f9..3015ac78e8d5 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPool_Delete.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPool_Delete.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminPool_Delete", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminPool", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a machine pool")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminPool_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -183,12 +182,12 @@ public partial class RemoveAzDevCenterAdminPool_Delete : global::System.Manageme /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -470,12 +469,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -492,7 +491,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPool_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPool_DeleteViaIdentity.cs index 289e4041a2d1..aff1c8b7ae2f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPool_DeleteViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminPool_DeleteViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminPool_DeleteViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminPool", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a machine pool")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminPool_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -130,12 +129,12 @@ public partial class RemoveAzDevCenterAdminPool_DeleteViaIdentity : global::Syst /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -437,12 +436,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -459,7 +458,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectCatalog_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectCatalog_Delete.cs index 65904b6364c9..6b32e87c9dc5 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectCatalog_Delete.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectCatalog_Delete.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminProjectCatalog_Delete", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminProjectCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a project catalog resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminProjectCatalog_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -182,12 +181,12 @@ public partial class RemoveAzDevCenterAdminProjectCatalog_Delete : global::Syste /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -469,12 +468,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -491,7 +490,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectCatalog_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectCatalog_DeleteViaIdentity.cs index bc77544a6870..1c70ad46b740 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectCatalog_DeleteViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectCatalog_DeleteViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminProjectCatalog_DeleteViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminProjectCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a project catalog resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminProjectCatalog_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -130,12 +129,12 @@ public partial class RemoveAzDevCenterAdminProjectCatalog_DeleteViaIdentity : gl /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -437,12 +436,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -459,7 +458,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectEnvironmentType_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectEnvironmentType_Delete.cs index b962e8f6fccd..e7bb297eb465 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectEnvironmentType_Delete.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectEnvironmentType_Delete.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminProjectEnvironmentType_Delete", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminProjectEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a project environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminProjectEnvironmentType_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -169,12 +168,12 @@ public partial class RemoveAzDevCenterAdminProjectEnvironmentType_Delete : globa /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -402,12 +401,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -424,7 +423,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, EnvironmentTypeName=EnvironmentTypeName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectEnvironmentType_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectEnvironmentType_DeleteViaIdentity.cs index 43100ce0e60d..eb8e63b75eb5 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectEnvironmentType_DeleteViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectEnvironmentType_DeleteViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminProjectEnvironmentType_DeleteViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminProjectEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a project environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminProjectEnvironmentType_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -117,12 +116,12 @@ public partial class RemoveAzDevCenterAdminProjectEnvironmentType_DeleteViaIdent /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -375,12 +374,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -397,7 +396,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectPolicy_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectPolicy_Delete.cs new file mode 100644 index 000000000000..01ff5c306583 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectPolicy_Delete.cs @@ -0,0 +1,558 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Deletes an project policy. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminProjectPolicy_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes an project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}", ApiVersion = "2025-04-01-preview")] + public partial class RemoveAzDevCenterAdminProjectPolicy_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devCenterName; + + /// The name of the devcenter. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the devcenter.", + SerializedName = @"devCenterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string DevCenterName { get => this._devCenterName; set => this._devCenterName = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the project policy. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project policy.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project policy.", + SerializedName = @"projectPolicyName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProjectPolicyName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzDevCenterAdminProjectPolicy_Delete + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.RemoveAzDevCenterAdminProjectPolicy_Delete Clone() + { + var clone = new RemoveAzDevCenterAdminProjectPolicy_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.DevCenterName = this.DevCenterName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectPoliciesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectPoliciesDelete(SubscriptionId, ResourceGroupName, DevCenterName, Name, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,DevCenterName=DevCenterName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzDevCenterAdminProjectPolicy_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) + { + 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 == MyInvocation?.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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectPolicy_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectPolicy_DeleteViaIdentity.cs new file mode 100644 index 000000000000..fbf6be821d66 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProjectPolicy_DeleteViaIdentity.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Deletes an project policy. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminProjectPolicy_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes an project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}", ApiVersion = "2025-04-01-preview")] + public partial class RemoveAzDevCenterAdminProjectPolicy_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzDevCenterAdminProjectPolicy_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.RemoveAzDevCenterAdminProjectPolicy_DeleteViaIdentity Clone() + { + var clone = new RemoveAzDevCenterAdminProjectPolicy_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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectPoliciesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProjectPoliciesDeleteViaIdentity(InputObject.Id, onOk, onNoContent, 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.DevCenterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevCenterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProjectPolicyName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectPolicyName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProjectPoliciesDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.DevCenterName ?? null, InputObject.ProjectPolicyName ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzDevCenterAdminProjectPolicy_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 == MyInvocation?.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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProject_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProject_Delete.cs index 8fa37b6787a6..595207ad2b0c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProject_Delete.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProject_Delete.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminProject_Delete", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminProject", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a project resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminProject_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -169,12 +168,12 @@ public partial class RemoveAzDevCenterAdminProject_Delete : global::System.Manag /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -455,12 +454,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -477,7 +476,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProject_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProject_DeleteViaIdentity.cs index cc7d7409c64c..20b5b3926b68 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProject_DeleteViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminProject_DeleteViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminProject_DeleteViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminProject", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a project resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminProject_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -130,12 +129,12 @@ public partial class RemoveAzDevCenterAdminProject_DeleteViaIdentity : global::S /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -433,12 +432,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -455,7 +454,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminSchedule_Delete.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminSchedule_Delete.cs index 54abec7213d9..cec6f2e1ffaa 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminSchedule_Delete.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminSchedule_Delete.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminSchedule_Delete", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminSchedule", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a Scheduled.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminSchedule_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -220,12 +219,12 @@ public partial class RemoveAzDevCenterAdminSchedule_Delete : global::System.Mana /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -509,12 +508,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -531,7 +530,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, PoolName=PoolName, Name=Name, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminSchedule_DeleteViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminSchedule_DeleteViaIdentity.cs index b3091f54bc95..f9f049b6fab9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminSchedule_DeleteViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/RemoveAzDevCenterAdminSchedule_DeleteViaIdentity.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterAdminSchedule_DeleteViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Remove-AzDevCenterAdminSchedule", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Deletes a Scheduled.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterAdminSchedule_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -148,12 +147,12 @@ public partial class RemoveAzDevCenterAdminSchedule_DeleteViaIdentity : global:: /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -460,12 +459,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -482,7 +481,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminNetworkConnectionHealthCheck_Run.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminNetworkConnectionHealthCheck_Run.cs index a29dd5d880d9..fbc3790b4c8d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminNetworkConnectionHealthCheck_Run.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminNetworkConnectionHealthCheck_Run.cs @@ -16,11 +16,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] RunHealthChecks=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/runHealthChecks" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzDevCenterAdminNetworkConnectionHealthCheck_Run", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Start-AzDevCenterAdminNetworkConnectionHealthCheck", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Triggers a new health check run. The execution and health check result can be tracked via the network Connection health check details")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/runHealthChecks", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/runHealthChecks", ApiVersion = "2025-04-01-preview")] public partial class StartAzDevCenterAdminNetworkConnectionHealthCheck_Run : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -171,12 +170,12 @@ public partial class StartAzDevCenterAdminNetworkConnectionHealthCheck_Run : glo /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -447,12 +446,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -469,7 +468,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, NetworkConnectionName=NetworkConnectionName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminNetworkConnectionHealthCheck_RunViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminNetworkConnectionHealthCheck_RunViaIdentity.cs index 46424b0ee9ed..a4349098cf13 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminNetworkConnectionHealthCheck_RunViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminNetworkConnectionHealthCheck_RunViaIdentity.cs @@ -16,11 +16,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] RunHealthChecks=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/runHealthChecks" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzDevCenterAdminNetworkConnectionHealthCheck_RunViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Start-AzDevCenterAdminNetworkConnectionHealthCheck", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Triggers a new health check run. The execution and health check result can be tracked via the network Connection health check details")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/runHealthChecks", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}/runHealthChecks", ApiVersion = "2025-04-01-preview")] public partial class StartAzDevCenterAdminNetworkConnectionHealthCheck_RunViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -133,12 +132,12 @@ public partial class StartAzDevCenterAdminNetworkConnectionHealthCheck_RunViaIde /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -429,12 +428,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -451,7 +450,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminPoolHealthCheck_Run.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminPoolHealthCheck_Run.cs index 09614d2aece8..2c9addc54983 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminPoolHealthCheck_Run.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminPoolHealthCheck_Run.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] RunHealthChecks=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/runHealthChecks" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzDevCenterAdminPoolHealthCheck_Run", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Start-AzDevCenterAdminPoolHealthCheck", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Triggers a refresh of the pool status.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/runHealthChecks", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/runHealthChecks", ApiVersion = "2025-04-01-preview")] public partial class StartAzDevCenterAdminPoolHealthCheck_Run : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -182,12 +181,12 @@ public partial class StartAzDevCenterAdminPoolHealthCheck_Run : global::System.M /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -459,12 +458,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -481,7 +480,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, PoolName=PoolName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminPoolHealthCheck_RunViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminPoolHealthCheck_RunViaIdentity.cs index ab7b62dffdba..8bfe89256f13 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminPoolHealthCheck_RunViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StartAzDevCenterAdminPoolHealthCheck_RunViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] RunHealthChecks=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/runHealthChecks" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzDevCenterAdminPoolHealthCheck_RunViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Start-AzDevCenterAdminPoolHealthCheck", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Triggers a refresh of the pool status.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/runHealthChecks", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/runHealthChecks", ApiVersion = "2025-04-01-preview")] public partial class StartAzDevCenterAdminPoolHealthCheck_RunViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -130,12 +129,12 @@ public partial class StartAzDevCenterAdminPoolHealthCheck_RunViaIdentity : globa /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -427,12 +426,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -449,7 +448,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Cancel.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Cancel.cs new file mode 100644 index 000000000000..90a1f80fc35d --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Cancel.cs @@ -0,0 +1,516 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Cancels the specified build for an image definition. + /// + /// [OpenAPI] Cancel=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/cancel" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Stop, @"AzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Cancel", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Cancels the specified build for an image definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/cancel", ApiVersion = "2025-04-01-preview")] + public partial class StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Cancel : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _buildName; + + /// The ID of the Image Definition Build. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the Image Definition Build.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the Image Definition Build.", + SerializedName = @"buildName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string BuildName { get => this._buildName; set => this._buildName = value; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devCenterName; + + /// The name of the devcenter. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the devcenter.", + SerializedName = @"devCenterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string DevCenterName { get => this._devCenterName; set => this._devCenterName = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageDefinitionName; + + /// The name of the Image Definition. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Image Definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Image Definition.", + SerializedName = @"imageDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageDefinitionName { get => this._imageDefinitionName; set => this._imageDefinitionName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Cancel + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Cancel Clone() + { + var clone = new StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Cancel(); + 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.DevCenterName = this.DevCenterName; + clone.CatalogName = this.CatalogName; + clone.ImageDefinitionName = this.ImageDefinitionName; + clone.BuildName = this.BuildName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevCenterCatalogImageDefinitionBuildCancel' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevCenterCatalogImageDefinitionBuildCancel(SubscriptionId, ResourceGroupName, DevCenterName, CatalogName, ImageDefinitionName, BuildName, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,DevCenterName=DevCenterName,CatalogName=CatalogName,ImageDefinitionName=ImageDefinitionName,BuildName=BuildName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Cancel() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName, BuildName=BuildName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName, BuildName=BuildName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_CancelViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_CancelViaIdentity.cs new file mode 100644 index 000000000000..36a2a1e0c521 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_CancelViaIdentity.cs @@ -0,0 +1,462 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Cancels the specified build for an image definition. + /// + /// [OpenAPI] Cancel=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/cancel" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Stop, @"AzDevCenterAdminDevCenterCatalogImageDefinitionBuild_CancelViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Cancels the specified build for an image definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/cancel", ApiVersion = "2025-04-01-preview")] + public partial class StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_CancelViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_CancelViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_CancelViaIdentity Clone() + { + var clone = new StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_CancelViaIdentity(); + 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevCenterCatalogImageDefinitionBuildCancel' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevCenterCatalogImageDefinitionBuildCancelViaIdentity(InputObject.Id, 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.DevCenterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevCenterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageDefinitionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageDefinitionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.BuildName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.BuildName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevCenterCatalogImageDefinitionBuildCancel(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.DevCenterName ?? null, InputObject.CatalogName ?? null, InputObject.ImageDefinitionName ?? null, InputObject.BuildName ?? null, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public StopAzDevCenterAdminDevCenterCatalogImageDefinitionBuild_CancelViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } + }); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_Cancel.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_Cancel.cs new file mode 100644 index 000000000000..2d7da372c6c8 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_Cancel.cs @@ -0,0 +1,559 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Cancels the specified build for an image definition. + /// + /// [OpenAPI] Cancel=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/cancel" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Stop, @"AzDevCenterAdminProjectCatalogImageDefinitionBuild_Cancel", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Cancels the specified build for an image definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/cancel", ApiVersion = "2025-04-01-preview")] + public partial class StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_Cancel : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Backing field for property. + private string _buildName; + + /// The ID of the Image Definition Build. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the Image Definition Build.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the Image Definition Build.", + SerializedName = @"buildName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string BuildName { get => this._buildName; set => this._buildName = value; } + + /// Backing field for property. + private string _catalogName; + + /// The name of the Catalog. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Catalog.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageDefinitionName; + + /// The name of the Image Definition. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Image Definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Image Definition.", + SerializedName = @"imageDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ImageDefinitionName { get => this._imageDefinitionName; set => this._imageDefinitionName = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 header result as a 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 headers, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_Cancel + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_Cancel Clone() + { + var clone = new StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_Cancel(); + 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.ProjectName = this.ProjectName; + clone.CatalogName = this.CatalogName; + clone.ImageDefinitionName = this.ImageDefinitionName; + clone.BuildName = this.BuildName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectCatalogImageDefinitionBuildCancel' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectCatalogImageDefinitionBuildCancel(SubscriptionId, ResourceGroupName, ProjectName, CatalogName, ImageDefinitionName, BuildName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,ProjectName=ProjectName,CatalogName=CatalogName,ImageDefinitionName=ImageDefinitionName,BuildName=BuildName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_Cancel() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName, BuildName=BuildName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, ImageDefinitionName=ImageDefinitionName, BuildName=BuildName }) + { + 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 header result as a 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 headers) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, headers, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_CancelViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_CancelViaIdentity.cs new file mode 100644 index 000000000000..fa3bcf75352b --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_CancelViaIdentity.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Cancels the specified build for an image definition. + /// + /// [OpenAPI] Cancel=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/cancel" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Stop, @"AzDevCenterAdminProjectCatalogImageDefinitionBuild_CancelViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Cancels the specified build for an image definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/imageDefinitions/{imageDefinitionName}/builds/{buildName}/cancel", ApiVersion = "2025-04-01-preview")] + public partial class StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_CancelViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 header result as a 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 headers, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_CancelViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_CancelViaIdentity Clone() + { + var clone = new StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_CancelViaIdentity(); + 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectCatalogImageDefinitionBuildCancel' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProjectCatalogImageDefinitionBuildCancelViaIdentity(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.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.CatalogName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CatalogName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageDefinitionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageDefinitionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.BuildName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.BuildName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProjectCatalogImageDefinitionBuildCancel(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ProjectName ?? null, InputObject.CatalogName ?? null, InputObject.ImageDefinitionName ?? null, InputObject.BuildName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public StopAzDevCenterAdminProjectCatalogImageDefinitionBuild_CancelViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 header result as a 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 headers) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, headers, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminCatalog_Sync.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminCatalog_Sync.cs index ad5c9a789851..5c9dba9e2c21 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminCatalog_Sync.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminCatalog_Sync.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Sync=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/sync" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Sync, @"AzDevCenterAdminCatalog_Sync", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Sync-AzDevCenterAdminCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Syncs templates for a template source.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/sync", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/sync", ApiVersion = "2025-04-01-preview")] public partial class SyncAzDevCenterAdminCatalog_Sync : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -183,12 +182,12 @@ public partial class SyncAzDevCenterAdminCatalog_Sync : global::System.Managemen /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -460,12 +459,12 @@ public SyncAzDevCenterAdminCatalog_Sync() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -482,7 +481,7 @@ public SyncAzDevCenterAdminCatalog_Sync() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminCatalog_SyncViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminCatalog_SyncViaIdentity.cs index 857f9519024a..536c20695a21 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminCatalog_SyncViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminCatalog_SyncViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Sync=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/sync" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Sync, @"AzDevCenterAdminCatalog_SyncViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Sync-AzDevCenterAdminCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Syncs templates for a template source.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/sync", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}/sync", ApiVersion = "2025-04-01-preview")] public partial class SyncAzDevCenterAdminCatalog_SyncViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -130,12 +129,12 @@ public partial class SyncAzDevCenterAdminCatalog_SyncViaIdentity : global::Syste /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -427,12 +426,12 @@ public SyncAzDevCenterAdminCatalog_SyncViaIdentity() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -449,7 +448,7 @@ public SyncAzDevCenterAdminCatalog_SyncViaIdentity() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminProjectCatalog_Sync.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminProjectCatalog_Sync.cs index 6e1a37f569bf..b478d42e16f2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminProjectCatalog_Sync.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminProjectCatalog_Sync.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Sync=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/sync" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Sync, @"AzDevCenterAdminProjectCatalog_Sync", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Sync-AzDevCenterAdminProjectCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Syncs templates for a template source.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/sync", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/sync", ApiVersion = "2025-04-01-preview")] public partial class SyncAzDevCenterAdminProjectCatalog_Sync : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -182,12 +181,12 @@ public partial class SyncAzDevCenterAdminProjectCatalog_Sync : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -459,12 +458,12 @@ public SyncAzDevCenterAdminProjectCatalog_Sync() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -481,7 +480,7 @@ public SyncAzDevCenterAdminProjectCatalog_Sync() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminProjectCatalog_SyncViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminProjectCatalog_SyncViaIdentity.cs index ef686c1b9227..067e92f54a05 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminProjectCatalog_SyncViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/SyncAzDevCenterAdminProjectCatalog_SyncViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Sync=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/sync" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Sync, @"AzDevCenterAdminProjectCatalog_SyncViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Sync-AzDevCenterAdminProjectCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Syncs templates for a template source.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/sync", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}/sync", ApiVersion = "2025-04-01-preview")] public partial class SyncAzDevCenterAdminProjectCatalog_SyncViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -130,12 +129,12 @@ public partial class SyncAzDevCenterAdminProjectCatalog_SyncViaIdentity : global /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 @@ -427,12 +426,12 @@ public SyncAzDevCenterAdminProjectCatalog_SyncViaIdentity() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -449,7 +448,7 @@ public SyncAzDevCenterAdminProjectCatalog_SyncViaIdentity() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminCatalog_UpdateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminCatalog_UpdateExpanded.cs index d7255079e3f1..13c2c4772760 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminCatalog_UpdateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminCatalog_UpdateExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminCatalog_UpdateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminCatalog_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +32,7 @@ public partial class UpdateAzDevCenterAdminCatalog_UpdateExpanded : global::Syst /// /// The catalog's properties for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdate(); /// /// The for this operation. @@ -289,32 +288,32 @@ public partial class UpdateAzDevCenterAdminCatalog_UpdateExpanded : global::Syst ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -577,12 +576,12 @@ public UpdateAzDevCenterAdminCatalog_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -599,7 +598,7 @@ public UpdateAzDevCenterAdminCatalog_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -617,12 +616,12 @@ public UpdateAzDevCenterAdminCatalog_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -634,7 +633,7 @@ public UpdateAzDevCenterAdminCatalog_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminCatalog_UpdateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminCatalog_UpdateViaIdentityExpanded.cs index e45c82cc6f73..0434449505c7 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminCatalog_UpdateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminCatalog_UpdateViaIdentityExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminCatalog_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminCatalog_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +32,7 @@ public partial class UpdateAzDevCenterAdminCatalog_UpdateViaIdentityExpanded : g /// /// The catalog's properties for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdate(); /// /// The for this operation. @@ -236,32 +235,32 @@ public partial class UpdateAzDevCenterAdminCatalog_UpdateViaIdentityExpanded : g ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -544,12 +543,12 @@ public UpdateAzDevCenterAdminCatalog_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -566,7 +565,7 @@ public UpdateAzDevCenterAdminCatalog_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -584,12 +583,12 @@ public UpdateAzDevCenterAdminCatalog_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -601,7 +600,7 @@ public UpdateAzDevCenterAdminCatalog_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevBoxDefinition_UpdateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevBoxDefinition_UpdateExpanded.cs index 86524910a104..27347a3bd77b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevBoxDefinition_UpdateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevBoxDefinition_UpdateExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminDevBoxDefinition_UpdateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminDevBoxDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a Dev Box definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminDevBoxDefinition_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -31,7 +30,7 @@ public partial class UpdateAzDevCenterAdminDevBoxDefinition_UpdateExpanded : glo private string __processRecordId; /// Partial update of a Dev Box definition resource. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionUpdate(); /// /// The for this operation. @@ -302,32 +301,32 @@ public partial class UpdateAzDevCenterAdminDevBoxDefinition_UpdateExpanded : glo ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition /// 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); + 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) @@ -590,12 +589,12 @@ public UpdateAzDevCenterAdminDevBoxDefinition_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -612,7 +611,7 @@ public UpdateAzDevCenterAdminDevBoxDefinition_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -630,12 +629,12 @@ public UpdateAzDevCenterAdminDevBoxDefinition_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -647,7 +646,7 @@ public UpdateAzDevCenterAdminDevBoxDefinition_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevBoxDefinition_UpdateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevBoxDefinition_UpdateViaIdentityExpanded.cs index 467b582c1b63..a13b77ad9b0f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevBoxDefinition_UpdateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevBoxDefinition_UpdateViaIdentityExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminDevBoxDefinition_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminDevBoxDefinition", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a Dev Box definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/devboxdefinitions/{devBoxDefinitionName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminDevBoxDefinition_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -31,7 +30,7 @@ public partial class UpdateAzDevCenterAdminDevBoxDefinition_UpdateViaIdentityExp private string __processRecordId; /// Partial update of a Dev Box definition resource. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinitionUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevBoxDefinitionUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinitionUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevBoxDefinitionUpdate(); /// /// The for this operation. @@ -249,32 +248,32 @@ public partial class UpdateAzDevCenterAdminDevBoxDefinition_UpdateViaIdentityExp ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition /// 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); + 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) @@ -560,12 +559,12 @@ public UpdateAzDevCenterAdminDevBoxDefinition_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -582,7 +581,7 @@ public UpdateAzDevCenterAdminDevBoxDefinition_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -600,12 +599,12 @@ public UpdateAzDevCenterAdminDevBoxDefinition_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -617,7 +616,7 @@ public UpdateAzDevCenterAdminDevBoxDefinition_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevCenter_UpdateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevCenter_UpdateExpanded.cs index a69677b7595f..d7e5a7ba834b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevCenter_UpdateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevCenter_UpdateExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminDevCenter_UpdateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminDevCenter", ChangeDescription="PlanId will be removed from the DevCenter output.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a devcenter.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminDevCenter_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +32,7 @@ public partial class UpdateAzDevCenterAdminDevCenter_UpdateExpanded : global::Sy /// /// The devcenter resource for partial updates. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterUpdate(); /// /// The for this operation. @@ -255,18 +254,6 @@ public partial class UpdateAzDevCenterAdminDevCenter_UpdateExpanded : global::Sy /// private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } - /// Resource Id of an associated Plan - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource Id of an associated Plan")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource Id of an associated Plan", - SerializedName = @"planId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ParameterBreakingChange("PlanId", "15.0.0", "3.0.0", "2025/11/18", ChangeDescription="PlanId parameter will be removed.")] - public string PlanId { get => _body.PlanId ?? null; set => _body.PlanId = value; } - /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// @@ -338,32 +325,32 @@ public partial class UpdateAzDevCenterAdminDevCenter_UpdateExpanded : global::Sy ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter /// 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); + 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) @@ -625,12 +612,12 @@ public UpdateAzDevCenterAdminDevCenter_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -647,7 +634,7 @@ public UpdateAzDevCenterAdminDevCenter_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -665,12 +652,12 @@ public UpdateAzDevCenterAdminDevCenter_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -682,7 +669,7 @@ public UpdateAzDevCenterAdminDevCenter_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevCenter_UpdateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevCenter_UpdateViaIdentityExpanded.cs index 71b38dd685ab..bb51bca8988e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevCenter_UpdateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminDevCenter_UpdateViaIdentityExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminDevCenter_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminDevCenter", ChangeDescription="PlanId will be removed from the DevCenter output.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a devcenter.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminDevCenter_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +32,7 @@ public partial class UpdateAzDevCenterAdminDevCenter_UpdateViaIdentityExpanded : /// /// The devcenter resource for partial updates. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.DevCenterUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.DevCenterUpdate(); /// /// The for this operation. @@ -248,18 +247,6 @@ public partial class UpdateAzDevCenterAdminDevCenter_UpdateViaIdentityExpanded : /// private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } - /// Resource Id of an associated Plan - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource Id of an associated Plan")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource Id of an associated Plan", - SerializedName = @"planId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.ParameterBreakingChange("PlanId", "15.0.0", "3.0.0", "2025/11/18", ChangeDescription="PlanId parameter will be removed.")] - public string PlanId { get => _body.PlanId ?? null; set => _body.PlanId = value; } - /// /// Whether project catalogs associated with projects in this dev center can be configured to sync catalog items. /// @@ -299,32 +286,32 @@ public partial class UpdateAzDevCenterAdminDevCenter_UpdateViaIdentityExpanded : ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter /// 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); + 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) @@ -605,12 +592,12 @@ public UpdateAzDevCenterAdminDevCenter_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -627,7 +614,7 @@ public UpdateAzDevCenterAdminDevCenter_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -645,12 +632,12 @@ public UpdateAzDevCenterAdminDevCenter_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -662,7 +649,7 @@ public UpdateAzDevCenterAdminDevCenter_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenter + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenter WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEncryptionSet_UpdateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEncryptionSet_UpdateExpanded.cs index 7800e453871e..4c49b65ece44 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEncryptionSet_UpdateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEncryptionSet_UpdateExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminEncryptionSet_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a devcenter encryption set.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminEncryptionSet_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +33,7 @@ public partial class UpdateAzDevCenterAdminEncryptionSet_UpdateExpanded : global /// /// The devcenter encryption set resource for partial updates. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EncryptionSetUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EncryptionSetUpdate(); /// /// The for this operation. @@ -256,32 +256,32 @@ public partial class UpdateAzDevCenterAdminEncryptionSet_UpdateExpanded : global ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet /// 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); + 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) @@ -544,12 +544,12 @@ public UpdateAzDevCenterAdminEncryptionSet_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -566,7 +566,7 @@ public UpdateAzDevCenterAdminEncryptionSet_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -584,12 +584,12 @@ public UpdateAzDevCenterAdminEncryptionSet_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -601,7 +601,7 @@ public UpdateAzDevCenterAdminEncryptionSet_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEncryptionSet_UpdateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEncryptionSet_UpdateViaIdentityExpanded.cs index 3eaf1c77a6dd..856621b5315c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEncryptionSet_UpdateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEncryptionSet_UpdateViaIdentityExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminEncryptionSet_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a devcenter encryption set.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/encryptionSets/{encryptionSetName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminEncryptionSet_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +33,7 @@ public partial class UpdateAzDevCenterAdminEncryptionSet_UpdateViaIdentityExpand /// /// The devcenter encryption set resource for partial updates. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEncryptionSetUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EncryptionSetUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEncryptionSetUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EncryptionSetUpdate(); /// /// The for this operation. @@ -203,32 +203,32 @@ public partial class UpdateAzDevCenterAdminEncryptionSet_UpdateViaIdentityExpand ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet /// 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); + 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) @@ -513,12 +513,12 @@ public UpdateAzDevCenterAdminEncryptionSet_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -535,7 +535,7 @@ public UpdateAzDevCenterAdminEncryptionSet_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -553,12 +553,12 @@ public UpdateAzDevCenterAdminEncryptionSet_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -570,7 +570,7 @@ public UpdateAzDevCenterAdminEncryptionSet_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEnvironmentType_UpdateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEnvironmentType_UpdateExpanded.cs index 14011c51b90f..b528f683226f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEnvironmentType_UpdateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEnvironmentType_UpdateExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminEnvironmentType_UpdateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates an environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminEnvironmentType_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +32,7 @@ public partial class UpdateAzDevCenterAdminEnvironmentType_UpdateExpanded : glob /// /// The environment type for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeUpdate(); /// /// The for this operation. @@ -183,32 +182,32 @@ public partial class UpdateAzDevCenterAdminEnvironmentType_UpdateExpanded : glob ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// 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); + 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) @@ -416,12 +415,12 @@ public UpdateAzDevCenterAdminEnvironmentType_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,7 +437,7 @@ public UpdateAzDevCenterAdminEnvironmentType_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -456,12 +455,12 @@ public UpdateAzDevCenterAdminEnvironmentType_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -473,7 +472,7 @@ public UpdateAzDevCenterAdminEnvironmentType_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEnvironmentType_UpdateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEnvironmentType_UpdateViaIdentityExpanded.cs index 7da144a96197..0b49627fe5ac 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEnvironmentType_UpdateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminEnvironmentType_UpdateViaIdentityExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminEnvironmentType_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates an environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminEnvironmentType_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +32,7 @@ public partial class UpdateAzDevCenterAdminEnvironmentType_UpdateViaIdentityExpa /// /// The environment type for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentTypeUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.EnvironmentTypeUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentTypeUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.EnvironmentTypeUpdate(); /// /// The for this operation. @@ -130,32 +129,32 @@ public partial class UpdateAzDevCenterAdminEnvironmentType_UpdateViaIdentityExpa ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// 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); + 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) @@ -388,12 +387,12 @@ public UpdateAzDevCenterAdminEnvironmentType_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,7 +409,7 @@ public UpdateAzDevCenterAdminEnvironmentType_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -428,12 +427,12 @@ public UpdateAzDevCenterAdminEnvironmentType_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,7 +444,7 @@ public UpdateAzDevCenterAdminEnvironmentType_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminNetworkConnection_UpdateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminNetworkConnection_UpdateExpanded.cs index 2afe9ab958ad..a3238f509348 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminNetworkConnection_UpdateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminNetworkConnection_UpdateExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminNetworkConnection_UpdateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminNetworkConnection", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a Network Connection")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminNetworkConnection_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +32,7 @@ public partial class UpdateAzDevCenterAdminNetworkConnection_UpdateExpanded : gl /// /// The network connection properties for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionUpdate(); /// /// The for this operation. @@ -241,32 +240,32 @@ public partial class UpdateAzDevCenterAdminNetworkConnection_UpdateExpanded : gl ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection /// 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); + 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) @@ -528,12 +527,12 @@ public UpdateAzDevCenterAdminNetworkConnection_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -550,7 +549,7 @@ public UpdateAzDevCenterAdminNetworkConnection_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -568,12 +567,12 @@ public UpdateAzDevCenterAdminNetworkConnection_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -585,7 +584,7 @@ public UpdateAzDevCenterAdminNetworkConnection_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminNetworkConnection_UpdateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminNetworkConnection_UpdateViaIdentityExpanded.cs index 2d90fde64c14..3538cf9aa757 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminNetworkConnection_UpdateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminNetworkConnection_UpdateViaIdentityExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminNetworkConnection_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminNetworkConnection", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a Network Connection")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/networkConnections/{networkConnectionName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminNetworkConnection_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +32,7 @@ public partial class UpdateAzDevCenterAdminNetworkConnection_UpdateViaIdentityEx /// /// The network connection properties for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnectionUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.NetworkConnectionUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnectionUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.NetworkConnectionUpdate(); /// /// The for this operation. @@ -202,32 +201,32 @@ public partial class UpdateAzDevCenterAdminNetworkConnection_UpdateViaIdentityEx ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection /// 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); + 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) @@ -509,12 +508,12 @@ public UpdateAzDevCenterAdminNetworkConnection_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -531,7 +530,7 @@ public UpdateAzDevCenterAdminNetworkConnection_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -549,12 +548,12 @@ public UpdateAzDevCenterAdminNetworkConnection_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -566,7 +565,7 @@ public UpdateAzDevCenterAdminNetworkConnection_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPlanMember_UpdateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPlanMember_UpdateExpanded.cs deleted file mode 100644 index 8034354c3ba4..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPlanMember_UpdateExpanded.cs +++ /dev/null @@ -1,537 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Partially updates a devcenter plan. - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminPlanMember_UpdateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a devcenter plan.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}", ApiVersion = "2024-05-01-preview")] - public partial class UpdateAzDevCenterAdminPlanMember_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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 devcenter plan member resource for partial updates. Properties not provided in the update request will not be changed. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanMemberUpdate(); - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 _memberName; - - /// The name of a devcenter plan member. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of a devcenter plan member.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of a devcenter plan member.", - SerializedName = @"memberName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string MemberName { get => this._memberName; set => this._memberName = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.HttpPipeline Pipeline { get; set; } - - /// Backing field for property. - private string _planName; - - /// The name of the devcenter plan. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter plan.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the devcenter plan.", - SerializedName = @"planName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string PlanName { get => this._planName; set => this._planName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// Resource tags. - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of UpdateAzDevCenterAdminPlanMember_UpdateExpanded - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.UpdateAzDevCenterAdminPlanMember_UpdateExpanded Clone() - { - var clone = new UpdateAzDevCenterAdminPlanMember_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._body = this._body; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.PlanName = this.PlanName; - clone.MemberName = this.MemberName; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'PlanMembersUpdate' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PlanMembersUpdate(SubscriptionId, ResourceGroupName, PlanName, MemberName, _body, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,PlanName=PlanName,MemberName=MemberName,body=_body}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public UpdateAzDevCenterAdminPlanMember_UpdateExpanded() - { - - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, PlanName=PlanName, MemberName=MemberName, body=_body }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, PlanName=PlanName, MemberName=MemberName, body=_body }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPlanMember_UpdateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPlanMember_UpdateViaIdentityExpanded.cs deleted file mode 100644 index 24c3b2bc312c..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPlanMember_UpdateViaIdentityExpanded.cs +++ /dev/null @@ -1,507 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Partially updates a devcenter plan. - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminPlanMember_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a devcenter plan.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}/members/{memberName}", ApiVersion = "2024-05-01-preview")] - public partial class UpdateAzDevCenterAdminPlanMember_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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 devcenter plan member resource for partial updates. Properties not provided in the update request will not be changed. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanMemberUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanMemberUpdate(); - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Resource tags. - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// - /// a duplicate instance of UpdateAzDevCenterAdminPlanMember_UpdateViaIdentityExpanded - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.UpdateAzDevCenterAdminPlanMember_UpdateViaIdentityExpanded Clone() - { - var clone = new UpdateAzDevCenterAdminPlanMember_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._body = this._body; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'PlanMembersUpdate' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.PlanMembersUpdateViaIdentity(InputObject.Id, _body, 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.PlanName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PlanName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.MemberName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.MemberName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.PlanMembersUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PlanName ?? null, InputObject.MemberName ?? null, _body, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public UpdateAzDevCenterAdminPlanMember_UpdateViaIdentityExpanded() - { - - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) - { - 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 { body=_body }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPlan_UpdateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPlan_UpdateExpanded.cs deleted file mode 100644 index 4e70b0aebaed..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPlan_UpdateExpanded.cs +++ /dev/null @@ -1,601 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Partially updates a devcenter plan. - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminPlan_UpdateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a devcenter plan.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}", ApiVersion = "2024-05-01-preview")] - public partial class UpdateAzDevCenterAdminPlan_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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 devcenter plan resource for partial updates. Properties not provided in the update request will not be changed. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanUpdate(); - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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; } } - - /// The geo-location where the resource lives - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The geo-location where the resource lives")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DoNotExport] - public string Location { get => _body.Location ?? null; set => _body.Location = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the devcenter plan. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter plan.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the devcenter plan.", - SerializedName = @"planName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("PlanName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the - /// resource this may be omitted. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", - SerializedName = @"capacity", - PossibleTypes = new [] { typeof(int) })] - public int SkuCapacity { get => _body.SkuCapacity ?? default(int); set => _body.SkuCapacity = value; } - - /// - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the service has different generations of hardware, for the same SKU, then that can be captured here.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", - SerializedName = @"family", - PossibleTypes = new [] { typeof(string) })] - public string SkuFamily { get => _body.SkuFamily ?? null; set => _body.SkuFamily = value; } - - /// The name of the SKU. E.g. P3. It is typically a letter+number code - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the SKU. E.g. P3. It is typically a letter+number code")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - public string SkuName { get => _body.SkuName ?? null; set => _body.SkuName = value; } - - /// - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", - SerializedName = @"size", - PossibleTypes = new [] { typeof(string) })] - public string SkuSize { get => _body.SkuSize ?? null; set => _body.SkuSize = value; } - - /// - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required - /// on a PUT. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", - SerializedName = @"tier", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier))] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier SkuTier { get => _body.SkuTier ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); set => _body.SkuTier = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// Resource tags. - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of UpdateAzDevCenterAdminPlan_UpdateExpanded - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.UpdateAzDevCenterAdminPlan_UpdateExpanded Clone() - { - var clone = new UpdateAzDevCenterAdminPlan_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._body = this._body; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.Name = this.Name; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'PlansUpdate' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PlansUpdate(SubscriptionId, ResourceGroupName, Name, _body, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,Name=Name,body=_body}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public UpdateAzDevCenterAdminPlan_UpdateExpanded() - { - - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_body }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_body }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPlan_UpdateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPlan_UpdateViaIdentityExpanded.cs deleted file mode 100644 index 257828ddae58..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPlan_UpdateViaIdentityExpanded.cs +++ /dev/null @@ -1,579 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; - using System; - - /// Partially updates a devcenter plan. - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminPlan_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ChangeDescription="The Plan and PlanMember resources will be removed.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a devcenter plan.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/plans/{planName}", ApiVersion = "2024-05-01-preview")] - public partial class UpdateAzDevCenterAdminPlan_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener - { - /// 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 devcenter plan resource for partial updates. Properties not provided in the update request will not be changed. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPlanUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PlanUpdate(); - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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; } } - - /// The geo-location where the resource lives - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The geo-location where the resource lives")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DoNotExport] - public string Location { get => _body.Location ?? null; set => _body.Location = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the - /// resource this may be omitted. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", - SerializedName = @"capacity", - PossibleTypes = new [] { typeof(int) })] - public int SkuCapacity { get => _body.SkuCapacity ?? default(int); set => _body.SkuCapacity = value; } - - /// - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the service has different generations of hardware, for the same SKU, then that can be captured here.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", - SerializedName = @"family", - PossibleTypes = new [] { typeof(string) })] - public string SkuFamily { get => _body.SkuFamily ?? null; set => _body.SkuFamily = value; } - - /// The name of the SKU. E.g. P3. It is typically a letter+number code - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the SKU. E.g. P3. It is typically a letter+number code")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - public string SkuName { get => _body.SkuName ?? null; set => _body.SkuName = value; } - - /// - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", - SerializedName = @"size", - PossibleTypes = new [] { typeof(string) })] - public string SkuSize { get => _body.SkuSize ?? null; set => _body.SkuSize = value; } - - /// - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required - /// on a PUT. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", - SerializedName = @"tier", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier))] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier SkuTier { get => _body.SkuTier ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); set => _body.SkuTier = value; } - - /// Resource tags. - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of UpdateAzDevCenterAdminPlan_UpdateViaIdentityExpanded - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.UpdateAzDevCenterAdminPlan_UpdateViaIdentityExpanded Clone() - { - var clone = new UpdateAzDevCenterAdminPlan_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._body = this._body; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'PlansUpdate' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.PlansUpdateViaIdentity(InputObject.Id, _body, 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.PlanName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PlanName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.PlansUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PlanName ?? null, _body, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public UpdateAzDevCenterAdminPlan_UpdateViaIdentityExpanded() - { - - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) - { - 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 { body=_body }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPool_UpdateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPool_UpdateExpanded.cs index ca860602d29b..5b55a5aaf0a6 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPool_UpdateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPool_UpdateExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminPool_UpdateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminPool", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a machine pool")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminPool_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,13 +32,74 @@ public partial class UpdateAzDevCenterAdminPool_UpdateExpanded : global::System. /// /// The pool properties for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolUpdate(); /// /// The for this operation. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enables or disables whether the Dev Box should be automatically started at commencement of active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be automatically started at commencement of active hours.", + SerializedName = @"autoStartEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus ActiveHourConfigurationAutoStartEnableStatus { get => _body.ActiveHourConfigurationAutoStartEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus)""); set => _body.ActiveHourConfigurationAutoStartEnableStatus = value; } + + /// The default end time of the active hours + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default end time of the active hours")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default end time of the active hours", + SerializedName = @"defaultEndTimeHour", + PossibleTypes = new [] { typeof(int) })] + public int ActiveHourConfigurationDefaultEndTimeHour { get => _body.ActiveHourConfigurationDefaultEndTimeHour ?? default(int); set => _body.ActiveHourConfigurationDefaultEndTimeHour = value; } + + /// The default start time of the active hours. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default start time of the active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default start time of the active hours.", + SerializedName = @"defaultStartTimeHour", + PossibleTypes = new [] { typeof(int) })] + public int ActiveHourConfigurationDefaultStartTimeHour { get => _body.ActiveHourConfigurationDefaultStartTimeHour ?? default(int); set => _body.ActiveHourConfigurationDefaultStartTimeHour = value; } + + /// The default IANA timezone id of the active hours. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default IANA timezone id of the active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default IANA timezone id of the active hours.", + SerializedName = @"defaultTimeZone", + PossibleTypes = new [] { typeof(string) })] + public string ActiveHourConfigurationDefaultTimeZone { get => _body.ActiveHourConfigurationDefaultTimeZone ?? null; set => _body.ActiveHourConfigurationDefaultTimeZone = value; } + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enables or disables whether the Dev Box should be kept awake during active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be kept awake during active hours.", + SerializedName = @"keepAwakeEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus ActiveHourConfigurationKeepAwakeEnableStatus { get => _body.ActiveHourConfigurationKeepAwakeEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus)""); set => _body.ActiveHourConfigurationKeepAwakeEnableStatus = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] @@ -63,17 +123,45 @@ public partial class UpdateAzDevCenterAdminPool_UpdateExpanded : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - /// Name of a Dev Box definition in parent Project of this Pool - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a Dev Box definition in parent Project of this Pool")] + /// + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Name of a Dev Box definition in parent Project of this Pool", + Description = @"Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value.", SerializedName = @"devBoxDefinitionName", PossibleTypes = new [] { typeof(string) })] public string DevBoxDefinitionName { get => _body.DevBoxDefinitionName ?? null; set => _body.DevBoxDefinitionName = value; } + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly.", + SerializedName = @"devBoxDefinitionType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType DevBoxDefinitionType { get => _body.DevBoxDefinitionType ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType)""); set => _body.DevBoxDefinitionType = value; } + + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether Dev Box Tunnel is enabled for a the pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether Dev Box Tunnel is enabled for a the pool.", + SerializedName = @"devBoxTunnelEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus DevBoxTunnelEnableStatus { get => _body.DevBoxTunnelEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus)""); set => _body.DevBoxTunnelEnableStatus = value; } + /// The display name of the pool. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The display name of the pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] @@ -97,6 +185,19 @@ public partial class UpdateAzDevCenterAdminPool_UpdateExpanded : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Image ID, or Image version ID. When Image ID is provided, its latest version will be used.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string ImageReferenceId { get => _body.ImageReferenceId ?? null; set => _body.ImageReferenceId = value; } + /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -265,6 +366,72 @@ public partial class UpdateAzDevCenterAdminPool_UpdateExpanded : global::System. [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus))] public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus SingleSignOnStatus { get => _body.SingleSignOnStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus)""); set => _body.SingleSignOnStatus = value; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + public int SkuCapacity { get => _body.SkuCapacity ?? default(int); set => _body.SkuCapacity = value; } + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the service has different generations of hardware, for the same SKU, then that can be captured here.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + public string SkuFamily { get => _body.SkuFamily ?? null; set => _body.SkuFamily = value; } + + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the SKU. E.g. P3. It is typically a letter+number code")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + public string SkuName { get => _body.SkuName ?? null; set => _body.SkuName = value; } + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + public string SkuSize { get => _body.SkuSize ?? null; set => _body.SkuSize = value; } + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier SkuTier { get => _body.SkuTier ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); set => _body.SkuTier = value; } + /// /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. /// @@ -292,6 +459,33 @@ public partial class UpdateAzDevCenterAdminPool_UpdateExpanded : global::System. [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus))] public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus StopOnDisconnectStatus { get => _body.StopOnDisconnectStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus)""); set => _body.StopOnDisconnectStatus = value; } + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The specified time in minutes to wait before stopping a Dev Box if no connection is made.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box if no connection is made.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + public int StopOnNoConnectGracePeriodMinute { get => _body.StopOnNoConnectGracePeriodMinute ?? default(int); set => _body.StopOnNoConnectGracePeriodMinute = value; } + + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus StopOnNoConnectStatus { get => _body.StopOnNoConnectStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus)""); set => _body.StopOnNoConnectStatus = value; } + /// Backing field for property. private string _subscriptionId; @@ -319,8 +513,8 @@ public partial class UpdateAzDevCenterAdminPool_UpdateExpanded : global::System. ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } /// /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. @@ -341,24 +535,24 @@ public partial class UpdateAzDevCenterAdminPool_UpdateExpanded : global::System. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool /// 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); + 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) @@ -621,12 +815,12 @@ public UpdateAzDevCenterAdminPool_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -643,7 +837,7 @@ public UpdateAzDevCenterAdminPool_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -661,12 +855,12 @@ public UpdateAzDevCenterAdminPool_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -678,7 +872,7 @@ public UpdateAzDevCenterAdminPool_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded.cs index 53a6dce4db23..28fe9f3c2977 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminPool_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminPool", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a machine pool")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,13 +32,74 @@ public partial class UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded : glob /// /// The pool properties for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPoolUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.PoolUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPoolUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.PoolUpdate(); /// /// The for this operation. /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enables or disables whether the Dev Box should be automatically started at commencement of active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be automatically started at commencement of active hours.", + SerializedName = @"autoStartEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus ActiveHourConfigurationAutoStartEnableStatus { get => _body.ActiveHourConfigurationAutoStartEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus)""); set => _body.ActiveHourConfigurationAutoStartEnableStatus = value; } + + /// The default end time of the active hours + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default end time of the active hours")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default end time of the active hours", + SerializedName = @"defaultEndTimeHour", + PossibleTypes = new [] { typeof(int) })] + public int ActiveHourConfigurationDefaultEndTimeHour { get => _body.ActiveHourConfigurationDefaultEndTimeHour ?? default(int); set => _body.ActiveHourConfigurationDefaultEndTimeHour = value; } + + /// The default start time of the active hours. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default start time of the active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default start time of the active hours.", + SerializedName = @"defaultStartTimeHour", + PossibleTypes = new [] { typeof(int) })] + public int ActiveHourConfigurationDefaultStartTimeHour { get => _body.ActiveHourConfigurationDefaultStartTimeHour ?? default(int); set => _body.ActiveHourConfigurationDefaultStartTimeHour = value; } + + /// The default IANA timezone id of the active hours. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default IANA timezone id of the active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default IANA timezone id of the active hours.", + SerializedName = @"defaultTimeZone", + PossibleTypes = new [] { typeof(string) })] + public string ActiveHourConfigurationDefaultTimeZone { get => _body.ActiveHourConfigurationDefaultTimeZone ?? null; set => _body.ActiveHourConfigurationDefaultTimeZone = value; } + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enables or disables whether the Dev Box should be kept awake during active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be kept awake during active hours.", + SerializedName = @"keepAwakeEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus ActiveHourConfigurationKeepAwakeEnableStatus { get => _body.ActiveHourConfigurationKeepAwakeEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus)""); set => _body.ActiveHourConfigurationKeepAwakeEnableStatus = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] @@ -63,17 +123,45 @@ public partial class UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded : glob [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - /// Name of a Dev Box definition in parent Project of this Pool - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a Dev Box definition in parent Project of this Pool")] + /// + /// Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Name of a Dev Box definition in parent Project of this Pool", + Description = @"Name of a Dev Box definition in parent Project of this Pool. Will be ignored if devBoxDefinitionType is Value.", SerializedName = @"devBoxDefinitionName", PossibleTypes = new [] { typeof(string) })] public string DevBoxDefinitionName { get => _body.DevBoxDefinitionName ?? null; set => _body.DevBoxDefinitionName = value; } + /// + /// Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly.", + SerializedName = @"devBoxDefinitionType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType DevBoxDefinitionType { get => _body.DevBoxDefinitionType ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType)""); set => _body.DevBoxDefinitionType = value; } + + /// Indicates whether Dev Box Tunnel is enabled for a the pool. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether Dev Box Tunnel is enabled for a the pool.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether Dev Box Tunnel is enabled for a the pool.", + SerializedName = @"devBoxTunnelEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus DevBoxTunnelEnableStatus { get => _body.DevBoxTunnelEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus)""); set => _body.DevBoxTunnelEnableStatus = value; } + /// The display name of the pool. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The display name of the pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] @@ -97,6 +185,19 @@ public partial class UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded : glob [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + /// + /// Image ID, or Image version ID. When Image ID is provided, its latest version will be used. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Image ID, or Image version ID. When Image ID is provided, its latest version will be used.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image ID, or Image version ID. When Image ID is provided, its latest version will be used.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + public string ImageReferenceId { get => _body.ImageReferenceId ?? null; set => _body.ImageReferenceId = value; } + /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; @@ -230,6 +331,72 @@ public partial class UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded : glob [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus))] public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus SingleSignOnStatus { get => _body.SingleSignOnStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus)""); set => _body.SingleSignOnStatus = value; } + /// + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the + /// resource this may be omitted. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + public int SkuCapacity { get => _body.SkuCapacity ?? default(int); set => _body.SkuCapacity = value; } + + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If the service has different generations of hardware, for the same SKU, then that can be captured here.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If the service has different generations of hardware, for the same SKU, then that can be captured here.", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + public string SkuFamily { get => _body.SkuFamily ?? null; set => _body.SkuFamily = value; } + + /// The name of the SKU. E.g. P3. It is typically a letter+number code + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the SKU. E.g. P3. It is typically a letter+number code")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the SKU. E.g. P3. It is typically a letter+number code", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + public string SkuName { get => _body.SkuName ?? null; set => _body.SkuName = value; } + + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ", + SerializedName = @"size", + PossibleTypes = new [] { typeof(string) })] + public string SkuSize { get => _body.SkuSize ?? null; set => _body.SkuSize = value; } + + /// + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required + /// on a PUT. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier SkuTier { get => _body.SkuTier ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier)""); set => _body.SkuTier = value; } + /// /// The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. /// @@ -257,6 +424,33 @@ public partial class UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded : glob [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus))] public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus StopOnDisconnectStatus { get => _body.StopOnDisconnectStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus)""); set => _body.StopOnDisconnectStatus = value; } + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The specified time in minutes to wait before stopping a Dev Box if no connection is made.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box if no connection is made.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + public int StopOnNoConnectGracePeriodMinute { get => _body.StopOnNoConnectGracePeriodMinute ?? default(int); set => _body.StopOnNoConnectGracePeriodMinute = value; } + + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus StopOnNoConnectStatus { get => _body.StopOnNoConnectStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus)""); set => _body.StopOnNoConnectStatus = value; } + /// Resource tags. [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ExportAs(typeof(global::System.Collections.Hashtable))] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] @@ -266,8 +460,8 @@ public partial class UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded : glob ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } /// /// Indicates whether the pool uses a Virtual Network managed by Microsoft or a customer provided network. @@ -288,24 +482,24 @@ public partial class UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded : glob /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool /// 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); + 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) @@ -588,12 +782,12 @@ public UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -610,7 +804,7 @@ public UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -628,12 +822,12 @@ public UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -645,7 +839,7 @@ public UpdateAzDevCenterAdminPool_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_Patch.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_Patch.cs index 88accddb53b1..828b25b08c56 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_Patch.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_Patch.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Patch=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminProjectCatalog_Patch", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminProjectCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a project catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminProjectCatalog_Patch : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -41,7 +40,7 @@ public partial class UpdateAzDevCenterAdminProjectCatalog_Patch : global::System public global::System.Management.Automation.SwitchParameter AsJob { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate _body; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate _body; /// /// The catalog's properties for partial update. Properties not provided in the update request will not be changed. @@ -52,8 +51,8 @@ public partial class UpdateAzDevCenterAdminProjectCatalog_Patch : global::System ReadOnly = false, Description = @"The catalog's properties for partial update. Properties not provided in the update request will not be changed.", SerializedName = @"body", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate Body { get => this._body; set => this._body = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate 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")] @@ -190,24 +189,24 @@ public partial class UpdateAzDevCenterAdminProjectCatalog_Patch : global::System /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -470,12 +469,12 @@ public UpdateAzDevCenterAdminProjectCatalog_Patch() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -492,7 +491,7 @@ public UpdateAzDevCenterAdminProjectCatalog_Patch() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, body=Body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -510,12 +509,12 @@ public UpdateAzDevCenterAdminProjectCatalog_Patch() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -527,7 +526,7 @@ public UpdateAzDevCenterAdminProjectCatalog_Patch() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_PatchExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_PatchExpanded.cs index b8da39b6c1c2..52586b262110 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_PatchExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_PatchExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Patch=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminProjectCatalog_PatchExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminProjectCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a project catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminProjectCatalog_PatchExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +32,7 @@ public partial class UpdateAzDevCenterAdminProjectCatalog_PatchExpanded : global /// /// The catalog's properties for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdate(); /// /// The for this operation. @@ -288,32 +287,32 @@ public partial class UpdateAzDevCenterAdminProjectCatalog_PatchExpanded : global ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -576,12 +575,12 @@ public UpdateAzDevCenterAdminProjectCatalog_PatchExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -598,7 +597,7 @@ public UpdateAzDevCenterAdminProjectCatalog_PatchExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, CatalogName=CatalogName, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -616,12 +615,12 @@ public UpdateAzDevCenterAdminProjectCatalog_PatchExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -633,7 +632,7 @@ public UpdateAzDevCenterAdminProjectCatalog_PatchExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentity.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentity.cs index 2d8cab58afed..65b4335a1a2a 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentity.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentity.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Patch=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminProjectCatalog_PatchViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminProjectCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a project catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -41,7 +40,7 @@ public partial class UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentity : glo public global::System.Management.Automation.SwitchParameter AsJob { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate _body; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate _body; /// /// The catalog's properties for partial update. Properties not provided in the update request will not be changed. @@ -52,8 +51,8 @@ public partial class UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentity : glo ReadOnly = false, Description = @"The catalog's properties for partial update. Properties not provided in the update request will not be changed.", SerializedName = @"body", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate Body { get => this._body; set => this._body = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate 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")] @@ -138,24 +137,24 @@ public partial class UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentity : glo /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -438,12 +437,12 @@ public UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentity() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -460,7 +459,7 @@ public UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentity() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -478,12 +477,12 @@ public UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentity() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -495,7 +494,7 @@ public UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentity() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentityExpanded.cs index 08ef5d713c04..a8837134bdf6 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentityExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Patch=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminProjectCatalog_PatchViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminProjectCatalog", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a project catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +32,7 @@ public partial class UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentityExpand /// /// The catalog's properties for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.CatalogUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.CatalogUpdate(); /// /// The for this operation. @@ -236,32 +235,32 @@ public partial class UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentityExpand ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -546,12 +545,12 @@ public UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -568,7 +567,7 @@ public UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -586,12 +585,12 @@ public UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -603,7 +602,7 @@ public UpdateAzDevCenterAdminProjectCatalog_PatchViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectEnvironmentType_UpdateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectEnvironmentType_UpdateExpanded.cs index 0dc404ab7702..acdb74fc84fd 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectEnvironmentType_UpdateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectEnvironmentType_UpdateExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminProjectEnvironmentType_UpdateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminProjectEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a project environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminProjectEnvironmentType_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +32,7 @@ public partial class UpdateAzDevCenterAdminProjectEnvironmentType_UpdateExpanded /// /// The project environment type for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdate(); /// /// The for this operation. @@ -57,8 +56,8 @@ public partial class UpdateAzDevCenterAdminProjectEnvironmentType_UpdateExpanded ReadOnly = false, Description = @"A map of roles to assign to the environment creator.", SerializedName = @"roles", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => _body.CreatorRoleAssignmentRole ?? null /* object */; set => _body.CreatorRoleAssignmentRole = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => _body.CreatorRoleAssignmentRole ?? null /* object */; set => _body.CreatorRoleAssignmentRole = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -250,8 +249,8 @@ public partial class UpdateAzDevCenterAdminProjectEnvironmentType_UpdateExpanded ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } /// /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role @@ -265,32 +264,32 @@ public partial class UpdateAzDevCenterAdminProjectEnvironmentType_UpdateExpanded ReadOnly = false, Description = @"Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs.", SerializedName = @"userRoleAssignments", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => _body.UserRoleAssignment ?? null /* object */; set => _body.UserRoleAssignment = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => _body.UserRoleAssignment ?? null /* object */; set => _body.UserRoleAssignment = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// 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); + 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) @@ -498,12 +497,12 @@ public UpdateAzDevCenterAdminProjectEnvironmentType_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -520,7 +519,7 @@ public UpdateAzDevCenterAdminProjectEnvironmentType_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, EnvironmentTypeName=EnvironmentTypeName, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -538,12 +537,12 @@ public UpdateAzDevCenterAdminProjectEnvironmentType_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -555,7 +554,7 @@ public UpdateAzDevCenterAdminProjectEnvironmentType_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectEnvironmentType_UpdateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectEnvironmentType_UpdateViaIdentityExpanded.cs index cec5f6fdd1d9..ab436a49c49f 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectEnvironmentType_UpdateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectEnvironmentType_UpdateViaIdentityExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminProjectEnvironmentType_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminProjectEnvironmentType", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a project environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminProjectEnvironmentType_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +32,7 @@ public partial class UpdateAzDevCenterAdminProjectEnvironmentType_UpdateViaIdent /// /// The project environment type for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectEnvironmentTypeUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectEnvironmentTypeUpdate(); /// /// The for this operation. @@ -57,8 +56,8 @@ public partial class UpdateAzDevCenterAdminProjectEnvironmentType_UpdateViaIdent ReadOnly = false, Description = @"A map of roles to assign to the environment creator.", SerializedName = @"roles", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => _body.CreatorRoleAssignmentRole ?? null /* object */; set => _body.CreatorRoleAssignmentRole = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles CreatorRoleAssignmentRole { get => _body.CreatorRoleAssignmentRole ?? null /* object */; set => _body.CreatorRoleAssignmentRole = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -198,8 +197,8 @@ public partial class UpdateAzDevCenterAdminProjectEnvironmentType_UpdateViaIdent ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } /// /// Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role @@ -213,32 +212,32 @@ public partial class UpdateAzDevCenterAdminProjectEnvironmentType_UpdateViaIdent ReadOnly = false, Description = @"Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs.", SerializedName = @"userRoleAssignments", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => _body.UserRoleAssignment ?? null /* object */; set => _body.UserRoleAssignment = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments UserRoleAssignment { get => _body.UserRoleAssignment ?? null /* object */; set => _body.UserRoleAssignment = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// 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); + 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) @@ -471,12 +470,12 @@ public UpdateAzDevCenterAdminProjectEnvironmentType_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -493,7 +492,7 @@ public UpdateAzDevCenterAdminProjectEnvironmentType_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -511,12 +510,12 @@ public UpdateAzDevCenterAdminProjectEnvironmentType_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -528,7 +527,7 @@ public UpdateAzDevCenterAdminProjectEnvironmentType_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectPolicy_UpdateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectPolicy_UpdateExpanded.cs new file mode 100644 index 000000000000..e181a6339886 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectPolicy_UpdateExpanded.cs @@ -0,0 +1,551 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Partially updates an project policy. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminProjectPolicy_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates an project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}", ApiVersion = "2025-04-01-preview")] + public partial class UpdateAzDevCenterAdminProjectPolicy_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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 project policy properties for partial update. Properties not provided in the update request will not be changed. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyUpdate(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devCenterName; + + /// The name of the devcenter. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the devcenter.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the devcenter.", + SerializedName = @"devCenterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string DevCenterName { get => this._devCenterName; set => this._devCenterName = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the project policy. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the project policy.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the project policy.", + SerializedName = @"projectPolicyName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProjectPolicyName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Resource policies that are a part of this project policy. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource policies that are a part of this project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource policies that are a part of this project policy.", + SerializedName = @"resourcePolicies", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[] ResourcePolicy { get => _body.ResourcePolicy ?? null /* arrayOf */; set => _body.ResourcePolicy = value; } + + /// + /// Resources that have access to the shared resources that are a part of this project policy. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resources that have access to the shared resources that are a part of this project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resources that have access to the shared resources that are a part of this project policy.", + SerializedName = @"scopes", + PossibleTypes = new [] { typeof(string) })] + public string[] Scope { get => _body.Scope ?? null /* arrayOf */; set => _body.Scope = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzDevCenterAdminProjectPolicy_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.UpdateAzDevCenterAdminProjectPolicy_UpdateExpanded Clone() + { + var clone = new UpdateAzDevCenterAdminProjectPolicy_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._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.DevCenterName = this.DevCenterName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectPoliciesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectPoliciesUpdate(SubscriptionId, ResourceGroupName, DevCenterName, Name, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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,DevCenterName=DevCenterName,Name=Name,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzDevCenterAdminProjectPolicy_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name, body=_body }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, DevCenterName=DevCenterName, Name=Name, body=_body }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectPolicy_UpdateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectPolicy_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..1ced99cfe1fc --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProjectPolicy_UpdateViaIdentityExpanded.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Extensions; + using System; + + /// Partially updates an project policy. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminProjectPolicy_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates an project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/devcenters/{devCenterName}/projectPolicies/{projectPolicyName}", ApiVersion = "2025-04-01-preview")] + public partial class UpdateAzDevCenterAdminProjectPolicy_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener + { + /// 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 project policy properties for partial update. Properties not provided in the update request will not be changed. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicyUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectPolicyUpdate(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Resource policies that are a part of this project policy. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource policies that are a part of this project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource policies that are a part of this project policy.", + SerializedName = @"resourcePolicies", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IResourcePolicy[] ResourcePolicy { get => _body.ResourcePolicy ?? null /* arrayOf */; set => _body.ResourcePolicy = value; } + + /// + /// Resources that have access to the shared resources that are a part of this project policy. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resources that have access to the shared resources that are a part of this project policy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resources that have access to the shared resources that are a part of this project policy.", + SerializedName = @"scopes", + PossibleTypes = new [] { typeof(string) })] + public string[] Scope { get => _body.Scope ?? null /* arrayOf */; set => _body.Scope = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzDevCenterAdminProjectPolicy_UpdateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets.UpdateAzDevCenterAdminProjectPolicy_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzDevCenterAdminProjectPolicy_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._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectPoliciesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ProjectPoliciesUpdateViaIdentity(InputObject.Id, _body, 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.DevCenterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevCenterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ProjectPolicyName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectPolicyName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ProjectPoliciesUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.DevCenterName ?? null, InputObject.ProjectPolicyName ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzDevCenterAdminProjectPolicy_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + 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 { body=_body }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectPolicy + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProject_UpdateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProject_UpdateExpanded.cs index 75ed2e8d189f..afa27e941d3b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProject_UpdateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProject_UpdateExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminProject_UpdateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminProject", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminProject_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +32,7 @@ public partial class UpdateAzDevCenterAdminProject_UpdateExpanded : global::Syst /// /// The project properties for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectUpdate(); /// /// The for this operation. @@ -45,6 +44,18 @@ public partial class UpdateAzDevCenterAdminProject_UpdateExpanded : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + /// The property indicates whether Azure AI services is enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The property indicates whether Azure AI services is enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether Azure AI services is enabled.", + SerializedName = @"azureAiServicesMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode AzureAiServiceSettingAzureAiServicesMode { get => _body.AzureAiServiceSettingAzureAiServicesMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode)""); set => _body.AzureAiServiceSettingAzureAiServicesMode = value; } + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] @@ -66,6 +77,32 @@ public partial class UpdateAzDevCenterAdminProject_UpdateExpanded : global::Syst /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.ClientAPI; + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The identities that can to be used in customization scenarios; e.g., to clone a repository.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identities that can to be used in customization scenarios; e.g., to clone a repository.", + SerializedName = @"identities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] CustomizationSettingIdentity { get => _body.CustomizationSettingIdentity ?? null /* arrayOf */; set => _body.CustomizationSettingIdentity = value; } + + /// Indicates whether user customizations are enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether user customizations are enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether user customizations are enabled.", + SerializedName = @"userCustomizationsEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus CustomizationSettingUserCustomizationsEnableStatus { get => _body.CustomizationSettingUserCustomizationsEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus)""); set => _body.CustomizationSettingUserCustomizationsEnableStatus = value; } + /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet /// against a different subscription @@ -87,6 +124,45 @@ public partial class UpdateAzDevCenterAdminProject_UpdateExpanded : global::Syst PossibleTypes = new [] { typeof(string) })] public string Description { get => _body.Description ?? null; set => _body.Description = value; } + /// Indicates the delete mode for Dev Boxes within this project. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the delete mode for Dev Boxes within this project.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the delete mode for Dev Boxes within this project.", + SerializedName = @"deleteMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode DevBoxAutoDeleteSettingDeleteMode { get => _body.DevBoxAutoDeleteSettingDeleteMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode)""); set => _body.DevBoxAutoDeleteSettingDeleteMode = value; } + + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"gracePeriod", + PossibleTypes = new [] { typeof(string) })] + public string DevBoxAutoDeleteSettingGracePeriod { get => _body.DevBoxAutoDeleteSettingGracePeriod ?? null; set => _body.DevBoxAutoDeleteSettingGracePeriod = value; } + + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format PT[n]H[n]M[n]S.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"inactiveThreshold", + PossibleTypes = new [] { typeof(string) })] + public string DevBoxAutoDeleteSettingInactiveThreshold { get => _body.DevBoxAutoDeleteSettingInactiveThreshold ?? null; set => _body.DevBoxAutoDeleteSettingInactiveThreshold = value; } + /// Resource Id of an associated DevCenter [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource Id of an associated DevCenter")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] @@ -247,6 +323,31 @@ public partial class UpdateAzDevCenterAdminProject_UpdateExpanded : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Path)] public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "When specified, limits the maximum number of concurrent sessions across all pools in the project.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"When specified, limits the maximum number of concurrent sessions across all pools in the project.", + SerializedName = @"maxConcurrentSessionsPerProject", + PossibleTypes = new [] { typeof(int) })] + public int ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject { get => _body.ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject ?? default(int); set => _body.ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject = value; } + + /// The property indicates whether serverless GPU access is enabled on the project. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The property indicates whether serverless GPU access is enabled on the project.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether serverless GPU access is enabled on the project.", + SerializedName = @"serverlessGpuSessionsMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode ServerlessGpuSessionSettingServerlessGpuSessionsMode { get => _body.ServerlessGpuSessionSettingServerlessGpuSessionsMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode)""); set => _body.ServerlessGpuSessionSettingServerlessGpuSessionsMode = value; } + /// Backing field for property. private string _subscriptionId; @@ -274,32 +375,44 @@ public partial class UpdateAzDevCenterAdminProject_UpdateExpanded : global::Syst ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + + /// Indicates whether workspace storage is enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether workspace storage is enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether workspace storage is enabled.", + SerializedName = @"workspaceStorageMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode WorkspaceStorageSettingWorkspaceStorageMode { get => _body.WorkspaceStorageSettingWorkspaceStorageMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode)""); set => _body.WorkspaceStorageSettingWorkspaceStorageMode = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject /// 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); + 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) @@ -561,12 +674,12 @@ public UpdateAzDevCenterAdminProject_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -583,7 +696,7 @@ public UpdateAzDevCenterAdminProject_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -601,12 +714,12 @@ public UpdateAzDevCenterAdminProject_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -618,7 +731,7 @@ public UpdateAzDevCenterAdminProject_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProject_UpdateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProject_UpdateViaIdentityExpanded.cs index f55b46d4f1d1..f3a8035aa82b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProject_UpdateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminProject_UpdateViaIdentityExpanded.cs @@ -13,11 +13,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminProject_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminProject", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminProject_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -33,7 +32,7 @@ public partial class UpdateAzDevCenterAdminProject_UpdateViaIdentityExpanded : g /// /// The project properties for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ProjectUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ProjectUpdate(); /// /// The for this operation. @@ -45,6 +44,18 @@ public partial class UpdateAzDevCenterAdminProject_UpdateViaIdentityExpanded : g [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + /// The property indicates whether Azure AI services is enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The property indicates whether Azure AI services is enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether Azure AI services is enabled.", + SerializedName = @"azureAiServicesMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode AzureAiServiceSettingAzureAiServicesMode { get => _body.AzureAiServiceSettingAzureAiServicesMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode)""); set => _body.AzureAiServiceSettingAzureAiServicesMode = value; } + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] @@ -66,6 +77,32 @@ public partial class UpdateAzDevCenterAdminProject_UpdateViaIdentityExpanded : g /// The reference to the client API class. public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.DevCenter Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Module.Instance.ClientAPI; + /// + /// The identities that can to be used in customization scenarios; e.g., to clone a repository. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The identities that can to be used in customization scenarios; e.g., to clone a repository.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identities that can to be used in customization scenarios; e.g., to clone a repository.", + SerializedName = @"identities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[] CustomizationSettingIdentity { get => _body.CustomizationSettingIdentity ?? null /* arrayOf */; set => _body.CustomizationSettingIdentity = value; } + + /// Indicates whether user customizations are enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether user customizations are enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether user customizations are enabled.", + SerializedName = @"userCustomizationsEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus CustomizationSettingUserCustomizationsEnableStatus { get => _body.CustomizationSettingUserCustomizationsEnableStatus ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus)""); set => _body.CustomizationSettingUserCustomizationsEnableStatus = value; } + /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet /// against a different subscription @@ -87,6 +124,45 @@ public partial class UpdateAzDevCenterAdminProject_UpdateViaIdentityExpanded : g PossibleTypes = new [] { typeof(string) })] public string Description { get => _body.Description ?? null; set => _body.Description = value; } + /// Indicates the delete mode for Dev Boxes within this project. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the delete mode for Dev Boxes within this project.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the delete mode for Dev Boxes within this project.", + SerializedName = @"deleteMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode DevBoxAutoDeleteSettingDeleteMode { get => _body.DevBoxAutoDeleteSettingDeleteMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode)""); set => _body.DevBoxAutoDeleteSettingDeleteMode = value; } + + /// + /// ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"gracePeriod", + PossibleTypes = new [] { typeof(string) })] + public string DevBoxAutoDeleteSettingGracePeriod { get => _body.DevBoxAutoDeleteSettingGracePeriod ?? null; set => _body.DevBoxAutoDeleteSettingGracePeriod = value; } + + /// + /// ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format + /// PT[n]H[n]M[n]S. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format PT[n]H[n]M[n]S.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. ISO8601 format PT[n]H[n]M[n]S.", + SerializedName = @"inactiveThreshold", + PossibleTypes = new [] { typeof(string) })] + public string DevBoxAutoDeleteSettingInactiveThreshold { get => _body.DevBoxAutoDeleteSettingInactiveThreshold ?? null; set => _body.DevBoxAutoDeleteSettingInactiveThreshold = value; } + /// Resource Id of an associated DevCenter [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource Id of an associated DevCenter")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] @@ -226,6 +302,31 @@ public partial class UpdateAzDevCenterAdminProject_UpdateViaIdentityExpanded : g [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// + /// When specified, limits the maximum number of concurrent sessions across all pools in the project. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "When specified, limits the maximum number of concurrent sessions across all pools in the project.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"When specified, limits the maximum number of concurrent sessions across all pools in the project.", + SerializedName = @"maxConcurrentSessionsPerProject", + PossibleTypes = new [] { typeof(int) })] + public int ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject { get => _body.ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject ?? default(int); set => _body.ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject = value; } + + /// The property indicates whether serverless GPU access is enabled on the project. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The property indicates whether serverless GPU access is enabled on the project.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The property indicates whether serverless GPU access is enabled on the project.", + SerializedName = @"serverlessGpuSessionsMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode ServerlessGpuSessionSettingServerlessGpuSessionsMode { get => _body.ServerlessGpuSessionSettingServerlessGpuSessionsMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode)""); set => _body.ServerlessGpuSessionSettingServerlessGpuSessionsMode = value; } + /// Resource tags. [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ExportAs(typeof(global::System.Collections.Hashtable))] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] @@ -235,32 +336,44 @@ public partial class UpdateAzDevCenterAdminProject_UpdateViaIdentityExpanded : g ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + + /// Indicates whether workspace storage is enabled. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether workspace storage is enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether workspace storage is enabled.", + SerializedName = @"workspaceStorageMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode WorkspaceStorageSettingWorkspaceStorageMode { get => _body.WorkspaceStorageSettingWorkspaceStorageMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode)""); set => _body.WorkspaceStorageSettingWorkspaceStorageMode = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject /// 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); + 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) @@ -539,12 +652,12 @@ public UpdateAzDevCenterAdminProject_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -561,7 +674,7 @@ public UpdateAzDevCenterAdminProject_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -579,12 +692,12 @@ public UpdateAzDevCenterAdminProject_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -596,7 +709,7 @@ public UpdateAzDevCenterAdminProject_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminSchedule_UpdateExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminSchedule_UpdateExpanded.cs index 4bb3e801fefd..e4e3aad62008 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminSchedule_UpdateExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminSchedule_UpdateExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminSchedule_UpdateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminSchedule", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a Scheduled.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminSchedule_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -34,7 +33,7 @@ public partial class UpdateAzDevCenterAdminSchedule_UpdateExpanded : global::Sys /// /// The schedule properties for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleUpdate(); /// /// The for this operation. @@ -246,8 +245,8 @@ public partial class UpdateAzDevCenterAdminSchedule_UpdateExpanded : global::Sys ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } /// The target time to trigger the action. The format is HH:MM. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The target time to trigger the action. The format is HH:MM.")] @@ -305,24 +304,24 @@ public partial class UpdateAzDevCenterAdminSchedule_UpdateExpanded : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule /// 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); + 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) @@ -587,12 +586,12 @@ public UpdateAzDevCenterAdminSchedule_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -609,7 +608,7 @@ public UpdateAzDevCenterAdminSchedule_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ProjectName=ProjectName, PoolName=PoolName, Name=Name, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -627,12 +626,12 @@ public UpdateAzDevCenterAdminSchedule_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -644,7 +643,7 @@ public UpdateAzDevCenterAdminSchedule_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminSchedule_UpdateViaIdentityExpanded.cs b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminSchedule_UpdateViaIdentityExpanded.cs index 80bb4c7c350a..13441f824108 100644 --- a/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminSchedule_UpdateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenter.AutoRest/generated/cmdlets/UpdateAzDevCenterAdminSchedule_UpdateViaIdentityExpanded.cs @@ -14,11 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterAdminSchedule_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.CmdletBreakingChange("15.0.0", "3.0.0", "2025/11/18", ReplacementCmdletName="Update-AzDevCenterAdminSchedule", ChangeDescription="PlanName and MemberName will be removed from the InputObject parameter.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Description(@"Partially updates a Scheduled.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenter.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterAdminSchedule_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.IEventListener { @@ -34,7 +33,7 @@ public partial class UpdateAzDevCenterAdminSchedule_UpdateViaIdentityExpanded : /// /// The schedule properties for partial update. Properties not provided in the update request will not be changed. /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IScheduleUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ScheduleUpdate(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IScheduleUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ScheduleUpdate(); /// /// The for this operation. @@ -174,8 +173,8 @@ public partial class UpdateAzDevCenterAdminSchedule_UpdateViaIdentityExpanded : ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags Tag { get => _body.Tag ?? null /* object */; set => _body.Tag = value; } /// The target time to trigger the action. The format is HH:MM. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The target time to trigger the action. The format is HH:MM.")] @@ -233,24 +232,24 @@ public partial class UpdateAzDevCenterAdminSchedule_UpdateViaIdentityExpanded : /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule /// 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); + 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) @@ -540,12 +539,12 @@ public UpdateAzDevCenterAdminSchedule_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -562,7 +561,7 @@ public UpdateAzDevCenterAdminSchedule_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -580,12 +579,12 @@ public UpdateAzDevCenterAdminSchedule_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -597,7 +596,7 @@ public UpdateAzDevCenterAdminSchedule_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/Build-AzDevCenterAdminDevCenterCatalogImageDefinitionImage.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/Build-AzDevCenterAdminDevCenterCatalogImageDefinitionImage.ps1 new file mode 100644 index 000000000000..17dd8f19baf0 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/internal/Build-AzDevCenterAdminDevCenterCatalogImageDefinitionImage.ps1 @@ -0,0 +1,217 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Builds an image for the specified Image Definition. +.Description +Builds an image for the specified Image Definition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/build-azdevcenteradmindevcentercatalogimagedefinitionimage +#> +function Build-AzDevCenterAdminDevCenterCatalogImageDefinitionImage { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Build', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Build', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Build', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='Build', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Build', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Build')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='BuildViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + + $mapping = @{ + Build = 'Az.DevCenter.private\Build-AzDevCenterAdminDevCenterCatalogImageDefinitionImage_Build'; + BuildViaIdentity = 'Az.DevCenter.private\Build-AzDevCenterAdminDevCenterCatalogImageDefinitionImage_BuildViaIdentity'; + } + if (('Build') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + 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) + $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/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminDevCenterCatalogImageDefinition.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminDevCenterCatalogImageDefinition.ps1 new file mode 100644 index 000000000000..4bccd5df8158 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminDevCenterCatalogImageDefinition.ps1 @@ -0,0 +1,210 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets an Image Definition from the catalog +.Description +Gets an Image Definition from the catalog +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmindevcentercatalogimagedefinition +#> +function Get-AzDevCenterAdminDevCenterCatalogImageDefinition { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + + $mapping = @{ + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinition_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinition_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinition_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + 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) + $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/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild.ps1 new file mode 100644 index 000000000000..959c75e93c58 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild.ps1 @@ -0,0 +1,217 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets a build for a specified image definition. +.Description +Gets a build for a specified image definition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmindevcentercatalogimagedefinitionbuild +#> +function Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The ID of the Image Definition Build. + ${BuildName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + + $mapping = @{ + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + 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) + $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/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail.ps1 new file mode 100644 index 000000000000..3b1675e16dfd --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail.ps1 @@ -0,0 +1,211 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets Build details +.Description +Gets Build details +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmindevcentercatalogimagedefinitionbuilddetail +#> +function Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The ID of the Image Definition Build. + ${BuildName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + + $mapping = @{ + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + 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) + $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/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail.ps1 new file mode 100644 index 000000000000..3b2d30000bdc --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail.ps1 @@ -0,0 +1,205 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets Image Definition error details +.Description +Gets Image Definition error details +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmindevcentercatalogimagedefinitionerrordetail +#> +function Get-AzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + + $mapping = @{ + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + 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) + $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/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminEncryptionSet.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminEncryptionSet.ps1 index 36035fd7573f..39a37c11f38e 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminEncryptionSet.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminEncryptionSet.ps1 @@ -27,7 +27,7 @@ Gets a devcenter encryption set. .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet .Notes COMPLEX PARAMETER PROPERTIES @@ -35,6 +35,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -43,14 +44,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -60,7 +61,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminencryptionset #> function Get-AzDevCenterAdminEncryptionSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminSchedule.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminSchedule.ps1 index 143bb060cb17..8153a29c6785 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminSchedule.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/Get-AzDevCenterAdminSchedule.ps1 @@ -28,7 +28,7 @@ Get-AzDevCenterAdminSchedule -InputObject $schedule .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminschedule #> function Get-AzDevCenterAdminSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminAttachedNetwork.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminAttachedNetwork.ps1 index 4bc7b4482180..422af4ac9c85 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminAttachedNetwork.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminAttachedNetwork.ps1 @@ -28,7 +28,7 @@ New-AzDevCenterAdminAttachedNetwork -InputObject $attachedNetwork -NetworkConnec .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminattachednetwork #> function New-AzDevCenterAdminAttachedNetwork { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminCatalog.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminCatalog.ps1 index 33f8547670ec..14054a8795b9 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminCatalog.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminCatalog.ps1 @@ -33,7 +33,7 @@ New-AzDevCenterAdminCatalog -InputObject $catalog -GitHubBranch main -GitHubPath .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -49,14 +50,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -66,7 +67,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmincatalog #> function New-AzDevCenterAdminCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -160,7 +161,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminDevBoxDefinition.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminDevBoxDefinition.ps1 index d1ca31ab0b19..28dd25768327 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminDevBoxDefinition.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminDevBoxDefinition.ps1 @@ -28,7 +28,7 @@ New-AzDevCenterAdminDevBoxDefinition -InputObject $devBoxDefinition -Location "w .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmindevboxdefinition #> function New-AzDevCenterAdminDevBoxDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -164,7 +165,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminEncryptionSet.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminEncryptionSet.ps1 index 90470037d73a..1e6e0ad0397d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminEncryptionSet.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminEncryptionSet.ps1 @@ -27,7 +27,7 @@ Creates or updates a devcenter encryption set resource .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet .Notes COMPLEX PARAMETER PROPERTIES @@ -35,6 +35,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -43,14 +44,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -60,7 +61,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminencryptionset #> function New-AzDevCenterAdminEncryptionSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -136,7 +137,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminGallery.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminGallery.ps1 index 3cb2f68f8862..b9374906c8d4 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminGallery.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminGallery.ps1 @@ -28,7 +28,7 @@ New-AzDevCenterAdminGallery -InputObject $gallery -GalleryResourceId "/subscript .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmingallery #> function New-AzDevCenterAdminGallery { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminNetworkConnection.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminNetworkConnection.ps1 index 573464c48a33..737ce087b680 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminNetworkConnection.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminNetworkConnection.ps1 @@ -34,7 +34,7 @@ New-AzDevCenterAdminNetworkConnection -InputObject $networkConnection -Location .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -42,6 +42,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -50,14 +51,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -67,7 +68,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminnetworkconnection #> function New-AzDevCenterAdminNetworkConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -150,7 +151,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminPlan.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminPlan.ps1 deleted file mode 100644 index 0e60dd85b940..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminPlan.ps1 +++ /dev/null @@ -1,255 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code -# is regenerated. -# ---------------------------------------------------------------------------------- - -<# -.Synopsis -Creates or updates a devcenter plan resource -.Description -Creates or updates a devcenter plan resource -.Example -New-AzDevCenterAdminPlan -Name ContosoPlan -ResourceGroupName testRg -Location eastus -SkuName CCOG_Standard -.Example -$plan = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminPlan -InputObject $plan -Location eastus -SkuName CCOG_Standard - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan -.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 - [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. - [CatalogName ]: The name of the Catalog. - [DevBoxDefinitionName ]: The name of the Dev Box definition. - [DevCenterName ]: The name of the devcenter. - [EncryptionSetName ]: The name of the devcenter encryption set. - [EnvironmentDefinitionName ]: The name of the Environment Definition. - [EnvironmentTypeName ]: The name of the environment type. - [GalleryName ]: The name of the gallery. - [Id ]: Resource identity path - [ImageName ]: The name of the image. - [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. - [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. - [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. - [PoolName ]: Name of the pool. - [ProjectName ]: The name of the project. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ScheduleName ]: The name of the schedule that uniquely identifies it. - [SubscriptionId ]: The ID of the target subscription. - [TaskName ]: The name of the Task. - [VersionName ]: The version of the image. -.Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminplan -#> -function New-AzDevCenterAdminPlan { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('PlanName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the devcenter plan. - ${Name}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.Int32] - # If the SKU supports scale out/in then the capacity integer should be included. - # If scale out/in is not possible for the resource this may be omitted. - ${SkuCapacity}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # If the service has different generations of hardware, for the same SKU, then that can be captured here. - ${SkuFamily}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The name of the SKU. - # E.g. - # P3. - # It is typically a letter+number code - ${SkuName}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The SKU size. - # When the name field is the combination of tier and some other value, this would be the standalone code. - ${SkuSize}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] - # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - ${SkuTier}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - - $mapping = @{ - CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminPlan_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminPlan_CreateViaIdentityExpanded'; - } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } - 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) - $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/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminPlanMember.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminPlanMember.ps1 deleted file mode 100644 index cdb0403eb83c..000000000000 --- a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminPlanMember.ps1 +++ /dev/null @@ -1,240 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code -# is regenerated. -# ---------------------------------------------------------------------------------- - -<# -.Synopsis -Creates or updates a devcenter plan member resource -.Description -Creates or updates a devcenter plan member resource -.Example -$tags = @{"dev" ="test"} -New-AzDevCenterAdminPlanMember -PlanName ContosoPlan -MemberName d702f662-b3f2-4796-9e8c-13c22378ced3 -ResourceGroupName testRg -Tag $tags -MemberId d702f662-b3f2-4796-9e8c-13c22378ced3 -MemberType User -.Example -$tags = @{"dev" ="test"} -$planMember = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "MemberName" = "d702f662-b3f2-4796-9e8c-13c22378ced3"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminPlanMember -InputObject $planMember -Tag $tags -MemberId d702f662-b3f2-4796-9e8c-13c22378ced3 -MemberType User - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember -.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 - [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. - [CatalogName ]: The name of the Catalog. - [DevBoxDefinitionName ]: The name of the Dev Box definition. - [DevCenterName ]: The name of the devcenter. - [EncryptionSetName ]: The name of the devcenter encryption set. - [EnvironmentDefinitionName ]: The name of the Environment Definition. - [EnvironmentTypeName ]: The name of the environment type. - [GalleryName ]: The name of the gallery. - [Id ]: Resource identity path - [ImageName ]: The name of the image. - [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. - [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. - [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. - [PoolName ]: Name of the pool. - [ProjectName ]: The name of the project. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ScheduleName ]: The name of the schedule that uniquely identifies it. - [SubscriptionId ]: The ID of the target subscription. - [TaskName ]: The name of the Task. - [VersionName ]: The version of the image. -.Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminplanmember -#> -function New-AzDevCenterAdminPlanMember { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of a devcenter plan member. - ${MemberName}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the devcenter plan. - ${PlanName}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The unique id of the member. - ${MemberId}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType] - # The type of the member (user, group) - ${MemberType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] - [System.Collections.Hashtable] - # Resource tags. - ${PropertiesTag}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 - - $mapping = @{ - CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminPlanMember_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminPlanMember_CreateViaIdentityExpanded'; - } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } - 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) - $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/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminPool.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminPool.ps1 index ef26e238c15c..6b299ca5fe0c 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminPool.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminPool.ps1 @@ -28,7 +28,7 @@ New-AzDevCenterAdminPool -InputObject $pool -Location westus2 -DevBoxDefinitionN .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminpool #> function New-AzDevCenterAdminPool { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -104,18 +105,72 @@ param( # The geo-location where the resource lives ${Location}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus] + # Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + ${ActiveHourConfigurationAutoStartEnableStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # The default end time of the active hours + ${ActiveHourConfigurationDefaultEndTimeHour}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # The default start time of the active hours. + ${ActiveHourConfigurationDefaultStartTimeHour}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Name of a Dev Box definition in parent Project of this Pool + # The default IANA timezone id of the active hours. + ${ActiveHourConfigurationDefaultTimeZone}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus] + # Enables or disables whether the Dev Box should be kept awake during active hours. + ${ActiveHourConfigurationKeepAwakeEnableStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Name of a Dev Box definition in parent Project of this Pool. + # Will be ignored if devBoxDefinitionType is Value. ${DevBoxDefinitionName}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType] + # Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + ${DevBoxDefinitionType}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus] + # Indicates whether Dev Box Tunnel is enabled for a the pool. + ${DevBoxTunnelEnableStatus}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] # The display name of the pool. ${DisplayName}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Image ID, or Image version ID. + # When Image ID is provided, its latest version will be used. + ${ImageReferenceId}, + [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] @@ -144,6 +199,42 @@ param( # The also requires that single sign on be enabled on the tenant. ${SingleSignOnStatus}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # If the SKU supports scale out/in then the capacity integer should be included. + # If scale out/in is not possible for the resource this may be omitted. + ${SkuCapacity}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # If the service has different generations of hardware, for the same SKU, then that can be captured here. + ${SkuFamily}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The name of the SKU. + # E.g. + # P3. + # It is typically a letter+number code + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The SKU size. + # When the name field is the combination of tier and some other value, this would be the standalone code. + ${SkuSize}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] + # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + ${SkuTier}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.Int32] @@ -159,7 +250,20 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [System.Int32] + # The specified time in minutes to wait before stopping a Dev Box if no connection is made. + ${StopOnNoConnectGracePeriodMinute}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus] + # Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + ${StopOnNoConnectStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminProject.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminProject.ps1 index d69ed18008b6..6d596fbf444b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminProject.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminProject.ps1 @@ -28,14 +28,19 @@ New-AzDevCenterAdminProject -InputObject $project -Location eastus -DevCenterId .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject .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. +CUSTOMIZATIONSETTINGIDENTITY : The identities that can to be used in customization scenarios; e.g., to clone a repository. + [IdentityResourceId ]: Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity. + [IdentityType ]: Values can be systemAssignedIdentity or userAssignedIdentity + INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +49,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +66,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminproject #> function New-AzDevCenterAdminProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -98,6 +103,13 @@ param( # The geo-location where the resource lives ${Location}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode] + # The property indicates whether Azure AI services is enabled. + ${AzureAiServiceSettingAzureAiServicesMode}, + [Parameter()] [AllowEmptyCollection()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType])] @@ -106,12 +118,48 @@ param( # Indicates catalog item types that can be synced. ${CatalogSettingCatalogItemSyncType}, + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]] + # The identities that can to be used in customization scenarios; e.g., to clone a repository. + # To construct, see NOTES section for CUSTOMIZATIONSETTINGIDENTITY properties and create a hash table. + ${CustomizationSettingIdentity}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus] + # Indicates whether user customizations are enabled. + ${CustomizationSettingUserCustomizationsEnableStatus}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] # Description of the project. ${Description}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode] + # Indicates the delete mode for Dev Boxes within this project. + ${DevBoxAutoDeleteSettingDeleteMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. + # ISO8601 format PT[n]H[n]M[n]S. + ${DevBoxAutoDeleteSettingGracePeriod}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. + # ISO8601 format PT[n]H[n]M[n]S. + ${DevBoxAutoDeleteSettingInactiveThreshold}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] @@ -149,11 +197,31 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [System.Int32] + # When specified, limits the maximum number of concurrent sessions across all pools in the project. + ${ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode] + # The property indicates whether serverless GPU access is enabled on the project. + ${ServerlessGpuSessionSettingServerlessGpuSessionsMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode] + # Indicates whether workspace storage is enabled. + ${WorkspaceStorageSettingWorkspaceStorageMode}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminProjectCatalog.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminProjectCatalog.ps1 index 0bd44bf025f8..87a163eea8e2 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminProjectCatalog.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminProjectCatalog.ps1 @@ -33,7 +33,7 @@ New-AzDevCenterAdminProjectCatalog -InputObject $catalog -GitHubBranch main -Git .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -49,14 +50,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -66,7 +67,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminprojectcatalog #> function New-AzDevCenterAdminProjectCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -159,7 +160,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminProjectEnvironmentType.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminProjectEnvironmentType.ps1 index cd6e51fec15b..b2ac8ec81224 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminProjectEnvironmentType.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminProjectEnvironmentType.ps1 @@ -50,7 +50,7 @@ New-AzDevCenterAdminProjectEnvironmentType -InputObject $envType -CreatorRoleAss .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -58,6 +58,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -66,14 +67,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -83,7 +84,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminprojectenvironmenttype #> function New-AzDevCenterAdminProjectEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -121,7 +122,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles]))] [System.Collections.Hashtable] # A map of roles to assign to the environment creator. ${CreatorRoleAssignmentRole}, @@ -170,14 +171,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments]))] [System.Collections.Hashtable] # Role Assignments created on environment backing resources. # This is a mapping from a user object ID to an object of role definition IDs. diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminSchedule.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminSchedule.ps1 index 9c243111cea8..f648332d543b 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminSchedule.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/New-AzDevCenterAdminSchedule.ps1 @@ -28,7 +28,7 @@ New-AzDevCenterAdminSchedule -InputObject $schedule .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule .Notes COMPLEX PARAMETER PROPERTIES @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -61,7 +62,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminschedule #> function New-AzDevCenterAdminSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -112,7 +113,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/ProxyCmdletDefinitions.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/ProxyCmdletDefinitions.ps1 index a0702b461c28..ca96ecd45a6d 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/ProxyCmdletDefinitions.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/ProxyCmdletDefinitions.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Gets a devcenter encryption set. +Builds an image for the specified Image Definition. .Description -Gets a devcenter encryption set. +Builds an image for the specified Image Definition. .Example {{ Add code here }} .Example @@ -27,7 +27,7 @@ Gets a devcenter encryption set. .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet +System.Boolean .Notes COMPLEX PARAMETER PROPERTIES @@ -35,6 +35,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -43,57 +44,59 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminencryptionset +https://learn.microsoft.com/powershell/module/az.devcenter/build-azdevcenteradmindevcentercatalogimagedefinitionimage #> -function Get-AzDevCenterAdminEncryptionSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Build-AzDevCenterAdminDevCenterCatalogImageDefinitionImage { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Build', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Build', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Build', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the devcenter. ${DevCenterName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('EncryptionSetName')] + [Parameter(ParameterSetName='Build', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter encryption set. - ${Name}, + # The name of the Image Definition. + ${ImageDefinitionName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Build', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Build')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String[]] + [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='BuildViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter @@ -109,6 +112,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -129,6 +138,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Uri] @@ -158,11 +173,10 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenter.private\Get-AzDevCenterAdminEncryptionSet_Get'; - GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminEncryptionSet_GetViaIdentity'; - List = 'Az.DevCenter.private\Get-AzDevCenterAdminEncryptionSet_List'; + Build = 'Az.DevCenter.private\Build-AzDevCenterAdminDevCenterCatalogImageDefinitionImage_Build'; + BuildViaIdentity = 'Az.DevCenter.private\Build-AzDevCenterAdminDevCenterCatalogImageDefinitionImage_BuildViaIdentity'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Build') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -204,23 +218,99 @@ end { <# .Synopsis -Lists all of the available resource provider operations. +Gets Build details .Description -Lists all of the available resource provider operations. +Gets Build details .Example {{ Add code here }} .Example {{ Add code here }} +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperation +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminoperation +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmindevcentercatalogimagedefinitionbuilddetail #> -function Get-AzDevCenterAdminOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperation])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuildDetails])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The ID of the Image Definition Build. + ${BuildName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -279,7 +369,17 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - List = 'Az.DevCenter.private\Get-AzDevCenterAdminOperation_List'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuildDetail_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + 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) @@ -314,19 +414,18 @@ end { <# .Synopsis -Gets a schedule resource. +Gets a build for a specified image definition. .Description -Gets a schedule resource. +Gets a build for a specified image definition. .Example -Get-AzDevCenterAdminSchedule -PoolName DevPool -ProjectName DevProject -ResourceGroupName testRg +{{ Add code here }} .Example -$schedule = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "PoolName" = "DevPool"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -Get-AzDevCenterAdminSchedule -InputObject $schedule +{{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild .Notes COMPLEX PARAMETER PROPERTIES @@ -334,6 +433,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -342,39 +442,52 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminschedule +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmindevcentercatalogimagedefinitionbuild #> -function Get-AzDevCenterAdminSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +function Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinitionBuild])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The ID of the Image Definition Build. + ${BuildName}, + [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # Name of the pool. - ${PoolName}, + # The name of the Catalog. + ${CatalogName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the project. - ${ProjectName}, + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] @@ -457,12 +570,9 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenter.private\Get-AzDevCenterAdminSchedule_Get'; - GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminSchedule_GetViaIdentity'; - List = 'Az.DevCenter.private\Get-AzDevCenterAdminSchedule_List'; - } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('Name')) { - $PSBoundParameters['Name'] = "default" + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -506,19 +616,18 @@ end { <# .Synopsis -Creates or updates an attached NetworkConnection. +Gets Image Definition error details .Description -Creates or updates an attached NetworkConnection. +Gets Image Definition error details .Example -New-AzDevCenterAdminAttachedNetwork -ConnectionName network-uswest3 -DevCenterName Contoso -ResourceGroupName testRg -NetworkConnectionId /subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3 +{{ Add code here }} .Example -$attachedNetwork = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "AttachedNetworkConnectionName" = "network-uswest3"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminAttachedNetwork -InputObject $attachedNetwork -NetworkConnectionId /subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3 +{{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails .Notes COMPLEX PARAMETER PROPERTIES @@ -526,6 +635,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -534,66 +644,65 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminattachednetwork +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmindevcentercatalogimagedefinitionerrordetail #> -function New-AzDevCenterAdminAttachedNetwork { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IAttachedNetworkConnection])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogErrorDetails])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('AttachedNetworkConnectionName')] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the attached NetworkConnection. - ${ConnectionName}, + # The name of the Catalog. + ${CatalogName}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the devcenter. ${DevCenterName}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] + [System.String[]] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The resource ID of the NetworkConnection you want to attach. - ${NetworkConnectionId}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -603,12 +712,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -629,12 +732,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Uri] @@ -664,10 +761,10 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminAttachedNetwork_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminAttachedNetwork_CreateViaIdentityExpanded'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinitionErrorDetail_GetViaIdentity'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -709,24 +806,18 @@ end { <# .Synopsis -Creates or updates a catalog. +Gets an Image Definition from the catalog .Description -Creates or updates a catalog. -.Example -New-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg -AdoGitBranch main -AdoGitPath "/templates" -AdoGitSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -AdoGitUri "https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso" +Gets an Image Definition from the catalog .Example -New-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg -GitHubBranch main -GitHubPath "/templates" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -GitHubUri "https://github.com/Contoso/centralrepo-fake.git" -.Example -$catalog = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminCatalog -InputObject $catalog -AdoGitBranch main -AdoGitPath "/templates" -AdoGitSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -AdoGitUri "https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso" +{{ Add code here }} .Example -$catalog = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminCatalog -InputObject $catalog -GitHubBranch main -GitHubPath "/templates" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -GitHubUri "https://github.com/Contoso/centralrepo-fake.git" +{{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -734,6 +825,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -742,54 +834,63 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmincatalog +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradmindevcentercatalogimagedefinition #> -function New-AzDevCenterAdminCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzDevCenterAdminDevCenterCatalogImageDefinition { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IImageDefinition])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the devcenter. ${DevCenterName}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('CatalogName')] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the Catalog. - ${Name}, + # The name of the Image Definition. + ${ImageDefinitionName}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] + [System.String[]] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] # Identity Parameter @@ -797,66 +898,493 @@ param( ${InputObject}, [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Git branch. - ${AdoGitBranch}, + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + + $mapping = @{ + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinition_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinition_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminDevCenterCatalogImageDefinition_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + 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) + $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 + } +} +} + +<# +.Synopsis +Gets a devcenter encryption set. +.Description +Gets a devcenter encryption set. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminencryptionset +#> +function Get-AzDevCenterAdminEncryptionSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('EncryptionSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the devcenter encryption set. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + + $mapping = @{ + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminEncryptionSet_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminEncryptionSet_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminEncryptionSet_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + 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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The folder where the catalog items can be found inside the repository. - ${AdoGitPath}, + } catch { - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - ${AdoGitSecretIdentifier}, + throw + } +} +} - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Git URI. - ${AdoGitUri}, +<# +.Synopsis +Lists all of the available resource provider operations. +.Description +Lists all of the available resource provider operations. +.Example +{{ Add code here }} +.Example +{{ Add code here }} +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperation +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminoperation +#> +function Get-AzDevCenterAdminOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.IOperation])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Git branch. - ${GitHubBranch}, + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + + $mapping = @{ + List = 'Az.DevCenter.private\Get-AzDevCenterAdminOperation_List'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Gets a schedule resource. +.Description +Gets a schedule resource. +.Example +Get-AzDevCenterAdminSchedule -PoolName DevPool -ProjectName DevProject -ResourceGroupName testRg +.Example +$schedule = @{"ResourceGroupName" = "testRg"; "ProjectName" = "DevProject"; "PoolName" = "DevPool"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +Get-AzDevCenterAdminSchedule -InputObject $schedule + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteradminschedule +#> +function Get-AzDevCenterAdminSchedule { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The folder where the catalog items can be found inside the repository. - ${GitHubPath}, + # Name of the pool. + ${PoolName}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. - ${GitHubSecretIdentifier}, + # The name of the project. + ${ProjectName}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # Git URI. - ${GitHubUri}, + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType] - # Indicates the type of sync that is configured for the catalog. - ${SyncType}, + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -867,12 +1395,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -893,12 +1415,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] [System.Uri] @@ -928,10 +1444,14 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminCatalog_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminCatalog_CreateViaIdentityExpanded'; + Get = 'Az.DevCenter.private\Get-AzDevCenterAdminSchedule_Get'; + GetViaIdentity = 'Az.DevCenter.private\Get-AzDevCenterAdminSchedule_GetViaIdentity'; + List = 'Az.DevCenter.private\Get-AzDevCenterAdminSchedule_List'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('Name')) { + $PSBoundParameters['Name'] = "default" + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { @@ -973,19 +1493,19 @@ end { <# .Synopsis -Creates or updates a Dev Box definition. +Creates or updates an attached NetworkConnection. .Description -Creates or updates a Dev Box definition. +Creates or updates an attached NetworkConnection. .Example -New-AzDevCenterAdminDevBoxDefinition -Name "WebDevBox" -DevCenterName Contoso -ResourceGroupName testRg -Location "westus3" -HibernateSupport "Enabled" -ImageReferenceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0" -OSStorageType "ssd_1024gb" -SkuName "general_a_8c32gb_v1" +New-AzDevCenterAdminAttachedNetwork -ConnectionName network-uswest3 -DevCenterName Contoso -ResourceGroupName testRg -NetworkConnectionId /subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3 .Example -$devBoxDefinition = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "DevBoxDefinitionName" = "WebDevBox"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminDevBoxDefinition -InputObject $devBoxDefinition -Location "westus3" -HibernateSupport "Enabled" -ImageReferenceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0" -OSStorageType "ssd_1024gb" -SkuName "general_a_8c32gb_v1" +$attachedNetwork = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "AttachedNetworkConnectionName" = "network-uswest3"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminAttachedNetwork -InputObject $attachedNetwork -NetworkConnectionId /subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/NetworkConnections/network-uswest3 .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -993,6 +1513,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -1001,38 +1522,38 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmindevboxdefinition +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminattachednetwork #> -function New-AzDevCenterAdminDevBoxDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevBoxDefinition])] +function New-AzDevCenterAdminAttachedNetwork { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IAttachedNetworkConnection])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Alias('AttachedNetworkConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter. - ${DevCenterName}, + # The name of the attached NetworkConnection. + ${ConnectionName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('DevBoxDefinitionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the Dev Box definition. - ${Name}, + # The name of the devcenter. + ${DevCenterName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] @@ -1055,76 +1576,11 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport] - # Indicates whether Dev Boxes created with this definition are capable of hibernation. - # Not all images are capable of supporting hibernation. - # To find out more see https://aka.ms/devbox/hibernate - ${HibernateSupport}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Image ID, or Image version ID. - # When Image ID is provided, its latest version will be used. - ${ImageReferenceId}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The storage type used for the Operating System disk of Dev Boxes created using this definition. - ${OSStorageType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.Int32] - # If the SKU supports scale out/in then the capacity integer should be included. - # If scale out/in is not possible for the resource this may be omitted. - ${SkuCapacity}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # If the service has different generations of hardware, for the same SKU, then that can be captured here. - ${SkuFamily}, - [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The name of the SKU. - # E.g. - # P3. - # It is typically a letter+number code - ${SkuName}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The SKU size. - # When the name field is the combination of tier and some other value, this would be the standalone code. - ${SkuSize}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] - # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - ${SkuTier}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, + # The resource ID of the NetworkConnection you want to attach. + ${NetworkConnectionId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -1196,8 +1652,8 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminDevBoxDefinition_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminDevBoxDefinition_CreateViaIdentityExpanded'; + CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminAttachedNetwork_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminAttachedNetwork_CreateViaIdentityExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -1241,18 +1697,24 @@ end { <# .Synopsis -Creates or updates a devcenter encryption set resource +Creates or updates a catalog. .Description -Creates or updates a devcenter encryption set resource +Creates or updates a catalog. .Example -{{ Add code here }} +New-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg -AdoGitBranch main -AdoGitPath "/templates" -AdoGitSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -AdoGitUri "https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso" .Example -{{ Add code here }} +New-AzDevCenterAdminCatalog -DevCenterName Contoso -Name CentralCatalog -ResourceGroupName testRg -GitHubBranch main -GitHubPath "/templates" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -GitHubUri "https://github.com/Contoso/centralrepo-fake.git" +.Example +$catalog = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminCatalog -InputObject $catalog -AdoGitBranch main -AdoGitPath "/templates" -AdoGitSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -AdoGitUri "https://contoso@dev.azure.com/contoso/contosoOrg/_git/centralrepo-fakecontoso" +.Example +$catalog = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "CatalogName" = "CentralCatalog"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminCatalog -InputObject $catalog -GitHubBranch main -GitHubPath "/templates" -GitHubSecretIdentifier "https://contosokv.vault.azure.net/secrets/CentralRepoPat" -GitHubUri "https://github.com/Contoso/centralrepo-fake.git" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -1260,6 +1722,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -1268,24 +1731,24 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminencryptionset +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmincatalog #> -function New-AzDevCenterAdminEncryptionSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet])] +function New-AzDevCenterAdminCatalog { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -1295,10 +1758,10 @@ param( ${DevCenterName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('EncryptionSetName')] + [Alias('CatalogName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter encryption set. + # The name of the Catalog. ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -1322,46 +1785,64 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(Mandatory)] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The geo-location where the resource lives - ${Location}, + # Git branch. + ${AdoGitBranch}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus] - # Devbox disk encryption enable or disable status. - # Indicates if Devbox disks encryption using DevCenter CMK is enabled or not. - ${DevboxDisksEncryptionEnableStatus}, + [System.String] + # The folder where the catalog items can be found inside the repository. + ${AdoGitPath}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType] - # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - ${IdentityType}, + [System.String] + # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + ${AdoGitSecretIdentifier}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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. - ${IdentityUserAssignedIdentity}, + [System.String] + # Git URI. + ${AdoGitUri}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Key encryption key Url, versioned or non-versioned. - # Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek. - ${KeyEncryptionKeyUrl}, + # Git branch. + ${GitHubBranch}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The folder where the catalog items can be found inside the repository. + ${GitHubPath}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # A reference to the Key Vault secret containing a security token to authenticate to a Git repository. + ${GitHubSecretIdentifier}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Git URI. + ${GitHubUri}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogSyncType] + # Indicates the type of sync that is configured for the catalog. + ${SyncType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -1436,8 +1917,8 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminEncryptionSet_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminEncryptionSet_CreateViaIdentityExpanded'; + CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminCatalog_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminCatalog_CreateViaIdentityExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -1481,19 +1962,19 @@ end { <# .Synopsis -Creates or updates a gallery. +Creates or updates a Dev Box definition. .Description -Creates or updates a gallery. +Creates or updates a Dev Box definition. .Example -New-AzDevCenterAdminGallery -DevCenterName Contoso -Name StandardGallery -ResourceGroupName testRg -GalleryResourceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.Compute/galleries/StandardGallery" +New-AzDevCenterAdminDevBoxDefinition -Name "WebDevBox" -DevCenterName Contoso -ResourceGroupName testRg -Location "westus3" -HibernateSupport "Enabled" -ImageReferenceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0" -OSStorageType "ssd_1024gb" -SkuName "general_a_8c32gb_v1" .Example -$gallery = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "GalleryName" = "StandardGallery"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminGallery -InputObject $gallery -GalleryResourceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.Compute/galleries/StandardGallery" +$devBoxDefinition = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "DevBoxDefinitionName" = "WebDevBox"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminDevBoxDefinition -InputObject $devBoxDefinition -Location "westus3" -HibernateSupport "Enabled" -ImageReferenceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/testRg/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0" -OSStorageType "ssd_1024gb" -SkuName "general_a_8c32gb_v1" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -1501,6 +1982,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -1509,24 +1991,24 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmingallery +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmindevboxdefinition #> -function New-AzDevCenterAdminGallery { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IGallery])] +function New-AzDevCenterAdminDevBoxDefinition { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevBoxDefinition])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -1536,10 +2018,10 @@ param( ${DevCenterName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('GalleryName')] + [Alias('DevBoxDefinitionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the gallery. + # The name of the Dev Box definition. ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -1563,11 +2045,76 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.HibernateSupport] + # Indicates whether Dev Boxes created with this definition are capable of hibernation. + # Not all images are capable of supporting hibernation. + # To find out more see https://aka.ms/devbox/hibernate + ${HibernateSupport}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Image ID, or Image version ID. + # When Image ID is provided, its latest version will be used. + ${ImageReferenceId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The storage type used for the Operating System disk of Dev Boxes created using this definition. + ${OSStorageType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # If the SKU supports scale out/in then the capacity integer should be included. + # If scale out/in is not possible for the resource this may be omitted. + ${SkuCapacity}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # If the service has different generations of hardware, for the same SKU, then that can be captured here. + ${SkuFamily}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The name of the SKU. + # E.g. + # P3. + # It is typically a letter+number code + ${SkuName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The SKU size. + # When the name field is the combination of tier and some other value, this would be the standalone code. + ${SkuSize}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The resource ID of the backing Azure Compute Gallery. - ${GalleryResourceId}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] + # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + ${SkuTier}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -1639,8 +2186,8 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminGallery_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminGallery_CreateViaIdentityExpanded'; + CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminDevBoxDefinition_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminDevBoxDefinition_CreateViaIdentityExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -1684,25 +2231,18 @@ end { <# .Synopsis -Creates or updates a Network Connections resource +Creates or updates a devcenter encryption set resource .Description -Creates or updates a Network Connections resource -.Example -New-AzDevCenterAdminNetworkConnection -Name eastusNetwork -ResourceGroupName testRg -Location westus3 -DomainJoinType AzureADJoin -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" - -.Example -New-AzDevCenterAdminNetworkConnection -Name eastusNetwork -ResourceGroupName testRg -Location westus3 -DomainJoinType HybridAzureADJoin -DomainName mydomaincontroller.local -DomainPassword $password -DomainUsername testuser@mydomaincontroller.local -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" +Creates or updates a devcenter encryption set resource .Example -$networkConnection = @{"ResourceGroupName" = "testRg"; "NetworkConnectionName" = "eastusNetwork"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminNetworkConnection -InputObject $networkConnection -Location westus3 -DomainJoinType AzureADJoin -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" +{{ Add code here }} .Example -$networkConnection = @{"ResourceGroupName" = "testRg"; "NetworkConnectionName" = "eastusNetwork"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminNetworkConnection -InputObject $networkConnection -Location westus3 -DomainJoinType HybridAzureADJoin -DomainName mydomaincontroller.local -DomainPassword $password -DomainUsername testuser@mydomaincontroller.local -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" +{{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet .Notes COMPLEX PARAMETER PROPERTIES @@ -1710,6 +2250,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -1718,31 +2259,37 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminnetworkconnection +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminencryptionset #> -function New-AzDevCenterAdminNetworkConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.INetworkConnection])] +function New-AzDevCenterAdminEncryptionSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('NetworkConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # Name of the Network Connection that can be applied to a Pool. + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Alias('EncryptionSetName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the devcenter encryption set. ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -1773,52 +2320,39 @@ param( ${Location}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType] - # AAD Join type. - ${DomainJoinType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Active Directory domain name - ${DomainName}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The password for the account used to join domain - ${DomainPassword}, - - [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The username of an Active Directory account (user or service account) that has permissions to create computer objects in Active Directory. - # Required format: admin@contoso.com. - ${DomainUsername}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevboxDisksEncryptionEnableStatus] + # Devbox disk encryption enable or disable status. + # Indicates if Devbox disks encryption using DevCenter CMK is enabled or not. + ${DevboxDisksEncryptionEnableStatus}, [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # The name for resource group where NICs will be placed. - ${NetworkingResourceGroupName}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ManagedServiceIdentityType] + # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + ${IdentityType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String] - # Active Directory domain Organization Unit (OU) - ${OrganizationUnit}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.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. + ${IdentityUserAssignedIdentity}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The subnet to attach Virtual Machines to - ${SubnetId}, + # Key encryption key Url, versioned or non-versioned. + # Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek. + ${KeyEncryptionKeyUrl}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -1893,8 +2427,8 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminNetworkConnection_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminNetworkConnection_CreateViaIdentityExpanded'; + CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminEncryptionSet_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminEncryptionSet_CreateViaIdentityExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -1938,21 +2472,19 @@ end { <# .Synopsis -Creates or updates a devcenter plan member resource +Creates or updates a gallery. .Description -Creates or updates a devcenter plan member resource +Creates or updates a gallery. .Example -$tags = @{"dev" ="test"} -New-AzDevCenterAdminPlanMember -PlanName ContosoPlan -MemberName d702f662-b3f2-4796-9e8c-13c22378ced3 -ResourceGroupName testRg -Tag $tags -MemberId d702f662-b3f2-4796-9e8c-13c22378ced3 -MemberType User +New-AzDevCenterAdminGallery -DevCenterName Contoso -Name StandardGallery -ResourceGroupName testRg -GalleryResourceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.Compute/galleries/StandardGallery" .Example -$tags = @{"dev" ="test"} -$planMember = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "MemberName" = "d702f662-b3f2-4796-9e8c-13c22378ced3"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminPlanMember -InputObject $planMember -Tag $tags -MemberId d702f662-b3f2-4796-9e8c-13c22378ced3 -MemberType User +$gallery = @{"ResourceGroupName" = "testRg"; "DevCenterName" = "Contoso"; "GalleryName" = "StandardGallery"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminGallery -InputObject $gallery -GalleryResourceId "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.Compute/galleries/StandardGallery" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery .Notes COMPLEX PARAMETER PROPERTIES @@ -1960,6 +2492,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -1968,37 +2501,38 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminplanmember +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradmingallery #> -function New-AzDevCenterAdminPlanMember { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlanMember])] +function New-AzDevCenterAdminGallery { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IGallery])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of a devcenter plan member. - ${MemberName}, + # The name of the devcenter. + ${DevCenterName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Alias('GalleryName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter plan. - ${PlanName}, + # The name of the gallery. + ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] @@ -2024,29 +2558,8 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The unique id of the member. - ${MemberId}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PlanMemberType] - # The type of the member (user, group) - ${MemberType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] - [System.Collections.Hashtable] - # Resource tags. - ${PropertiesTag}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] - [System.Collections.Hashtable] - # Resource tags. - ${Tag}, + # The resource ID of the backing Azure Compute Gallery. + ${GalleryResourceId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -2118,8 +2631,8 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminPlanMember_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminPlanMember_CreateViaIdentityExpanded'; + CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminGallery_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminGallery_CreateViaIdentityExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -2163,19 +2676,25 @@ end { <# .Synopsis -Creates or updates a devcenter plan resource +Creates or updates a Network Connections resource .Description -Creates or updates a devcenter plan resource +Creates or updates a Network Connections resource +.Example +New-AzDevCenterAdminNetworkConnection -Name eastusNetwork -ResourceGroupName testRg -Location westus3 -DomainJoinType AzureADJoin -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" + +.Example +New-AzDevCenterAdminNetworkConnection -Name eastusNetwork -ResourceGroupName testRg -Location westus3 -DomainJoinType HybridAzureADJoin -DomainName mydomaincontroller.local -DomainPassword $password -DomainUsername testuser@mydomaincontroller.local -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" .Example -New-AzDevCenterAdminPlan -Name ContosoPlan -ResourceGroupName testRg -Location eastus -SkuName CCOG_Standard +$networkConnection = @{"ResourceGroupName" = "testRg"; "NetworkConnectionName" = "eastusNetwork"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminNetworkConnection -InputObject $networkConnection -Location westus3 -DomainJoinType AzureADJoin -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" .Example -$plan = @{"ResourceGroupName" = "testRg"; "PlanName" = "ContosoPlan"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} -New-AzDevCenterAdminPlan -InputObject $plan -Location eastus -SkuName CCOG_Standard +$networkConnection = @{"ResourceGroupName" = "testRg"; "NetworkConnectionName" = "eastusNetwork"; "SubscriptionId" = "0ac520ee-14c0-480f-b6c9-0a90c58ffff"} +New-AzDevCenterAdminNetworkConnection -InputObject $networkConnection -Location westus3 -DomainJoinType HybridAzureADJoin -DomainName mydomaincontroller.local -DomainPassword $password -DomainUsername testuser@mydomaincontroller.local -NetworkingResourceGroupName NetworkInterfaces -SubnetId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ExampleRG/providers/Microsoft.Network/virtualNetworks/ExampleVNet/subnets/default" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -2183,6 +2702,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -2191,31 +2711,31 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. [TaskName ]: The name of the Task. [VersionName ]: The version of the image. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminplan +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminnetworkconnection #> -function New-AzDevCenterAdminPlan { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterPlan])] +function New-AzDevCenterAdminNetworkConnection { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.INetworkConnection])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('PlanName')] + [Alias('NetworkConnectionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] [System.String] - # The name of the devcenter plan. + # Name of the Network Connection that can be applied to a Pool. ${Name}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -2246,44 +2766,52 @@ param( ${Location}, [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.Int32] - # If the SKU supports scale out/in then the capacity integer should be included. - # If scale out/in is not possible for the resource this may be omitted. - ${SkuCapacity}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DomainJoinType] + # AAD Join type. + ${DomainJoinType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # If the service has different generations of hardware, for the same SKU, then that can be captured here. - ${SkuFamily}, + # Active Directory domain name + ${DomainName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The name of the SKU. - # E.g. - # P3. - # It is typically a letter+number code - ${SkuName}, + # The password for the account used to join domain + ${DomainPassword}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # The SKU size. - # When the name field is the combination of tier and some other value, this would be the standalone code. - ${SkuSize}, + # The username of an Active Directory account (user or service account) that has permissions to create computer objects in Active Directory. + # Required format: admin@contoso.com. + ${DomainUsername}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] - # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - ${SkuTier}, + [System.String] + # The name for resource group where NICs will be placed. + ${NetworkingResourceGroupName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [System.String] + # Active Directory domain Organization Unit (OU) + ${OrganizationUnit}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The subnet to attach Virtual Machines to + ${SubnetId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -2358,8 +2886,8 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminPlan_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminPlan_CreateViaIdentityExpanded'; + CreateExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminNetworkConnection_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.DevCenter.private\New-AzDevCenterAdminNetworkConnection_CreateViaIdentityExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false @@ -2415,7 +2943,7 @@ New-AzDevCenterAdminPool -InputObject $pool -Location westus2 -DevBoxDefinitionN .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool .Notes COMPLEX PARAMETER PROPERTIES @@ -2423,6 +2951,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -2431,14 +2960,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -2448,7 +2977,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminpool #> function New-AzDevCenterAdminPool { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IPool])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IPool])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -2491,12 +3020,59 @@ param( # The geo-location where the resource lives ${Location}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AutoStartEnableStatus] + # Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + ${ActiveHourConfigurationAutoStartEnableStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # The default end time of the active hours + ${ActiveHourConfigurationDefaultEndTimeHour}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # The default start time of the active hours. + ${ActiveHourConfigurationDefaultStartTimeHour}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # The default IANA timezone id of the active hours. + ${ActiveHourConfigurationDefaultTimeZone}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.KeepAwakeEnableStatus] + # Enables or disables whether the Dev Box should be kept awake during active hours. + ${ActiveHourConfigurationKeepAwakeEnableStatus}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Name of a Dev Box definition in parent Project of this Pool + # Name of a Dev Box definition in parent Project of this Pool. + # Will be ignored if devBoxDefinitionType is Value. ${DevBoxDefinitionName}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.PoolDevBoxDefinitionType] + # Indicates if the pool is created from an existing Dev Box Definition or if one is provided directly. + ${DevBoxDefinitionType}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxTunnelEnableStatus] + # Indicates whether Dev Box Tunnel is enabled for a the pool. + ${DevBoxTunnelEnableStatus}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] @@ -2504,32 +3080,75 @@ param( ${DisplayName}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus] - # Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. - ${LocalAdministrator}, + [System.String] + # Image ID, or Image version ID. + # When Image ID is provided, its latest version will be used. + ${ImageReferenceId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.LocalAdminStatus] + # Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box. + ${LocalAdministrator}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String[]] + # The regions of the managed virtual network (required when managedNetworkType is Managed). + ${ManagedVirtualNetworkRegion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # Name of a Network Connection in parent Project of this Pool + ${NetworkConnectionName}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus] + # Indicates whether Dev Boxes in this pool are created with single sign on enabled. + # The also requires that single sign on be enabled on the tenant. + ${SingleSignOnStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.Int32] + # If the SKU supports scale out/in then the capacity integer should be included. + # If scale out/in is not possible for the resource this may be omitted. + ${SkuCapacity}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # If the service has different generations of hardware, for the same SKU, then that can be captured here. + ${SkuFamily}, [Parameter()] - [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [System.String[]] - # The regions of the managed virtual network (required when managedNetworkType is Managed). - ${ManagedVirtualNetworkRegion}, + [System.String] + # The name of the SKU. + # E.g. + # P3. + # It is typically a letter+number code + ${SkuName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] - # Name of a Network Connection in parent Project of this Pool - ${NetworkConnectionName}, + # The SKU size. + # When the name field is the combination of tier and some other value, this would be the standalone code. + ${SkuSize}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus])] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier])] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SingleSignOnStatus] - # Indicates whether Dev Boxes in this pool are created with single sign on enabled. - # The also requires that single sign on be enabled on the tenant. - ${SingleSignOnStatus}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.SkuTier] + # This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + ${SkuTier}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] @@ -2546,7 +3165,20 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [System.Int32] + # The specified time in minutes to wait before stopping a Dev Box if no connection is made. + ${StopOnNoConnectGracePeriodMinute}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnNoConnectEnableStatus] + # Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + ${StopOnNoConnectStatus}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -2693,7 +3325,7 @@ New-AzDevCenterAdminProjectCatalog -InputObject $catalog -GitHubBranch main -Git .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -2701,6 +3333,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -2709,14 +3342,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -2726,7 +3359,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminprojectcatalog #> function New-AzDevCenterAdminProjectCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalog])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -2819,7 +3452,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ICatalogUpdatePropertiesTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ICatalogUpdatePropertiesTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -2973,7 +3606,7 @@ New-AzDevCenterAdminProjectEnvironmentType -InputObject $envType -CreatorRoleAss .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -2981,6 +3614,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -2989,14 +3623,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -3006,7 +3640,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminprojectenvironmenttype #> function New-AzDevCenterAdminProjectEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentType])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentType])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -3044,7 +3678,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentRoles]))] [System.Collections.Hashtable] # A map of roles to assign to the environment creator. ${CreatorRoleAssignmentRole}, @@ -3093,14 +3727,14 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectEnvironmentTypeUpdatePropertiesUserRoleAssignments]))] [System.Collections.Hashtable] # Role Assignments created on environment backing resources. # This is a mapping from a user object ID to an object of role definition IDs. @@ -3221,14 +3855,19 @@ New-AzDevCenterAdminProject -InputObject $project -Location eastus -DevCenterId .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject .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. +CUSTOMIZATIONSETTINGIDENTITY : The identities that can to be used in customization scenarios; e.g., to clone a repository. + [IdentityResourceId ]: Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups//providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity. + [IdentityType ]: Values can be systemAssignedIdentity or userAssignedIdentity + INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -3237,14 +3876,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -3254,7 +3893,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminproject #> function New-AzDevCenterAdminProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IProject])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProject])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -3291,6 +3930,13 @@ param( # The geo-location where the resource lives ${Location}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.AzureAiServicesMode] + # The property indicates whether Azure AI services is enabled. + ${AzureAiServiceSettingAzureAiServicesMode}, + [Parameter()] [AllowEmptyCollection()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.CatalogItemType])] @@ -3299,12 +3945,48 @@ param( # Indicates catalog item types that can be synced. ${CatalogSettingCatalogItemSyncType}, + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IProjectCustomizationManagedIdentity[]] + # The identities that can to be used in customization scenarios; e.g., to clone a repository. + # To construct, see NOTES section for CUSTOMIZATIONSETTINGIDENTITY properties and create a hash table. + ${CustomizationSettingIdentity}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.UserCustomizationsEnableStatus] + # Indicates whether user customizations are enabled. + ${CustomizationSettingUserCustomizationsEnableStatus}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] # Description of the project. ${Description}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.DevBoxDeleteMode] + # Indicates the delete mode for Dev Boxes within this project. + ${DevBoxAutoDeleteSettingDeleteMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # ISO8601 duration required for the dev box to be marked for deletion prior to it being deleted. + # ISO8601 format PT[n]H[n]M[n]S. + ${DevBoxAutoDeleteSettingGracePeriod}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [System.String] + # ISO8601 duration required for the dev box to not be inactive prior to it being scheduled for deletion. + # ISO8601 format PT[n]H[n]M[n]S. + ${DevBoxAutoDeleteSettingInactiveThreshold}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] [System.String] @@ -3342,11 +4024,31 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api40.ITrackedResourceTags]))] + [System.Int32] + # When specified, limits the maximum number of concurrent sessions across all pools in the project. + ${ServerlessGpuSessionSettingMaxConcurrentSessionsPerProject}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.ServerlessGpuSessionsMode] + # The property indicates whether serverless GPU access is enabled on the project. + ${ServerlessGpuSessionSettingServerlessGpuSessionsMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api50.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.WorkspaceStorageMode] + # Indicates whether workspace storage is enabled. + ${WorkspaceStorageSettingWorkspaceStorageMode}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3474,7 +4176,7 @@ New-AzDevCenterAdminSchedule -InputObject $schedule .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule .Notes COMPLEX PARAMETER PROPERTIES @@ -3482,6 +4184,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -3490,14 +4193,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -3507,7 +4210,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteradminschedule #> function New-AzDevCenterAdminSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -3558,7 +4261,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -3719,6 +4422,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -3727,14 +4431,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -3922,6 +4626,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -3930,14 +4635,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -4105,6 +4810,214 @@ end { } } +<# +.Synopsis +Cancels the specified build for an image definition. +.Description +Cancels the specified build for an image definition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/stop-azdevcenteradmindevcentercatalogimagedefinitionbuild +#> +function Stop-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Cancel', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The ID of the Image Definition Build. + ${BuildName}, + + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Cancel')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CancelViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + + $mapping = @{ + Cancel = 'Az.DevCenter.private\Stop-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Cancel'; + CancelViaIdentity = 'Az.DevCenter.private\Stop-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild_CancelViaIdentity'; + } + if (('Cancel') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + 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) + $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 + } +} +} + <# .Synopsis Partially updates a devcenter encryption set. @@ -4118,7 +5031,7 @@ Partially updates a devcenter encryption set. .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet .Notes COMPLEX PARAMETER PROPERTIES @@ -4126,6 +5039,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -4134,14 +5048,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -4151,7 +5065,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminencryptionset #> function Update-AzDevCenterAdminEncryptionSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -4221,7 +5135,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -4354,7 +5268,7 @@ New-AzDevCenterAdminSchedule -InputObject $scheduleInput -State "Disabled" -Time .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule .Notes COMPLEX PARAMETER PROPERTIES @@ -4362,6 +5276,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -4370,14 +5285,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -4387,7 +5302,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminschedule #> function Update-AzDevCenterAdminSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -4432,7 +5347,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/Remove-AzDevCenterAdminEncryptionSet.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/Remove-AzDevCenterAdminEncryptionSet.ps1 index d6710dd3f34c..03b9ab69a439 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/Remove-AzDevCenterAdminEncryptionSet.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/Remove-AzDevCenterAdminEncryptionSet.ps1 @@ -35,6 +35,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -43,14 +44,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/Remove-AzDevCenterAdminSchedule.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/Remove-AzDevCenterAdminSchedule.ps1 index 849ae8ccf684..702cebe061e1 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/Remove-AzDevCenterAdminSchedule.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/Remove-AzDevCenterAdminSchedule.ps1 @@ -36,6 +36,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -44,14 +45,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/Stop-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/Stop-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild.ps1 new file mode 100644 index 000000000000..3d2a14bf4c84 --- /dev/null +++ b/generated/DevCenter/DevCenter.AutoRest/internal/Stop-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild.ps1 @@ -0,0 +1,223 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Cancels the specified build for an image definition. +.Description +Cancels the specified build for an image definition. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity +.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 + [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. + [CatalogName ]: The name of the Catalog. + [DevBoxDefinitionName ]: The name of the Dev Box definition. + [DevCenterName ]: The name of the devcenter. + [EncryptionSetName ]: The name of the devcenter encryption set. + [EnvironmentDefinitionName ]: The name of the Environment Definition. + [EnvironmentTypeName ]: The name of the environment type. + [GalleryName ]: The name of the gallery. + [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. + [ImageName ]: The name of the image. + [Location ]: The Azure region + [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. + [OperationId ]: The ID of an ongoing async operation + [PoolName ]: Name of the pool. + [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [ScheduleName ]: The name of the schedule that uniquely identifies it. + [SubscriptionId ]: The ID of the target subscription. + [TaskName ]: The name of the Task. + [VersionName ]: The version of the image. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/stop-azdevcenteradmindevcentercatalogimagedefinitionbuild +#> +function Stop-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Cancel', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The ID of the Image Definition Build. + ${BuildName}, + + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the devcenter. + ${DevCenterName}, + + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the Image Definition. + ${ImageDefinitionName}, + + [Parameter(ParameterSetName='Cancel', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Cancel')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CancelViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.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 + + $mapping = @{ + Cancel = 'Az.DevCenter.private\Stop-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild_Cancel'; + CancelViaIdentity = 'Az.DevCenter.private\Stop-AzDevCenterAdminDevCenterCatalogImageDefinitionBuild_CancelViaIdentity'; + } + if (('Cancel') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + 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) + $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/DevCenter/DevCenter.AutoRest/internal/Update-AzDevCenterAdminEncryptionSet.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/Update-AzDevCenterAdminEncryptionSet.ps1 index a7d9b17c7d52..40214f7a1e22 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/Update-AzDevCenterAdminEncryptionSet.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/Update-AzDevCenterAdminEncryptionSet.ps1 @@ -27,7 +27,7 @@ Partially updates a devcenter encryption set. .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet .Notes COMPLEX PARAMETER PROPERTIES @@ -35,6 +35,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -43,14 +44,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -60,7 +61,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminencryptionset #> function Update-AzDevCenterAdminEncryptionSet { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.IDevCenterEncryptionSet])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.IDevCenterEncryptionSet])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -130,7 +131,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenter.AutoRest/internal/Update-AzDevCenterAdminSchedule.ps1 b/generated/DevCenter/DevCenter.AutoRest/internal/Update-AzDevCenterAdminSchedule.ps1 index 20a2c6f96f66..0360b5b8e899 100644 --- a/generated/DevCenter/DevCenter.AutoRest/internal/Update-AzDevCenterAdminSchedule.ps1 +++ b/generated/DevCenter/DevCenter.AutoRest/internal/Update-AzDevCenterAdminSchedule.ps1 @@ -29,7 +29,7 @@ New-AzDevCenterAdminSchedule -InputObject $scheduleInput -State "Disabled" -Time .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.IDevCenterIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule .Notes COMPLEX PARAMETER PROPERTIES @@ -37,6 +37,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [AttachedNetworkConnectionName ]: The name of the attached NetworkConnection. + [BuildName ]: The ID of the Image Definition Build. [CatalogName ]: The name of the Catalog. [DevBoxDefinitionName ]: The name of the Dev Box definition. [DevCenterName ]: The name of the devcenter. @@ -45,14 +46,14 @@ INPUTOBJECT : Identity Parameter [EnvironmentTypeName ]: The name of the environment type. [GalleryName ]: The name of the gallery. [Id ]: Resource identity path + [ImageDefinitionName ]: The name of the Image Definition. [ImageName ]: The name of the image. [Location ]: The Azure region - [MemberName ]: The name of a devcenter plan member. [NetworkConnectionName ]: Name of the Network Connection that can be applied to a Pool. [OperationId ]: The ID of an ongoing async operation - [PlanName ]: The name of the devcenter plan. [PoolName ]: Name of the pool. [ProjectName ]: The name of the project. + [ProjectPolicyName ]: The name of the project policy. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [ScheduleName ]: The name of the schedule that uniquely identifies it. [SubscriptionId ]: The ID of the target subscription. @@ -62,7 +63,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteradminschedule #> function Update-AzDevCenterAdminSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ISchedule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ISchedule])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -107,7 +108,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20240501Preview.ITags]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api20250401Preview.ITags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, diff --git a/generated/DevCenter/DevCenterData.AutoRest/Az.DevCenterData.format.ps1xml b/generated/DevCenter/DevCenterData.AutoRest/Az.DevCenterData.format.ps1xml index b858b8480d60..5fe686985ee2 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/Az.DevCenterData.format.ps1xml +++ b/generated/DevCenter/DevCenterData.AutoRest/Az.DevCenterData.format.ps1xml @@ -11,6 +11,9 @@ + + + @@ -32,6 +35,9 @@ + + + @@ -44,6 +50,9 @@ + + + @@ -57,6 +66,9 @@ ActionName + + AddOnName + CatalogName @@ -78,6 +90,9 @@ EnvironmentTypeName + + ImageBuildLogId + OperationId @@ -90,6 +105,9 @@ ScheduleName + + SnapshotId + TaskName @@ -102,9 +120,95 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ActiveHoursConfiguration + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ActiveHoursConfiguration + + + + + + + + + + + + + + + + + + + + + + + + AutoStartEnableStatus + + + EndTimeHour + + + KeepAwakeEnableStatus + + + StartTimeHour + + + TimeZone + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Approval - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Approval + + + + + + + + + + + + + + + + + + + + + CreatedAt + + + CreatedBy + + + CreatedByType + + + ResourceUri + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError @@ -136,9 +240,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerError + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerError - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerError + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerError @@ -158,9 +262,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Catalog + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Catalog - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Catalog + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Catalog @@ -186,9 +290,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationGroup + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationGroup - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationGroup + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationGroup @@ -232,9 +336,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTask + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTask - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTask + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTask @@ -296,9 +400,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskDefinition + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskDefinition - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskDefinition + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskDefinition @@ -336,9 +440,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskDefinitionParameter + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskDefinitionParameter - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskDefinitionParameter + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskDefinitionParameter @@ -376,9 +480,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskListValidationOperationResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationOperationResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskListValidationOperationResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationOperationResult @@ -434,9 +538,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskListValidationResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskListValidationResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationResult @@ -456,9 +560,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskParameters + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskParameters - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskParameters + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskParameters @@ -478,9 +582,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBox + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBox - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBox + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBox @@ -493,6 +597,9 @@ + + + @@ -542,6 +649,9 @@ HibernateSupport + + LastConnectedTime + LocalAdministrator @@ -584,9 +694,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxAction + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAction - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxAction + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAction @@ -642,9 +752,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxActionDelayResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxActionDelayResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxActionDelayResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxActionDelayResult @@ -676,9 +786,207 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxNextAction + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAddOn + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAddOn + + + + + + + + + + + + + + + + + + + + + + + + ActionState + + + Kind + + + Name + + + OperationLocation + + + ProvisioningState + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAlignOperation + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAlignOperation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + CreatedByObjectId + + + EndTime + + + Kind + + + Message + + + OperationId + + + StartTime + + + Status + + + Target + + + Uri + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxCaptureSnapshotOperation + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxCaptureSnapshotOperation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + CreatedByObjectId + + + EndTime + + + Kind + + + Message + + + OperationId + + + StartTime + + + Status + + + Target + + + Uri + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxNextAction - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxNextAction + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxNextAction @@ -698,9 +1006,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation @@ -756,9 +1064,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxRepairOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxRepairOperation - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxRepairOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxRepairOperation @@ -832,9 +1140,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxRepairOperationResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxRepairOperationResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxRepairOperationResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxRepairOperationResult @@ -852,13 +1160,211 @@ - Code + Code + + + Message + + + RepairOutcome + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxRestartOperation + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxRestartOperation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + CreatedByObjectId + + + EndTime + + + Kind + + + Message + + + OperationId + + + StartTime + + + Status + + + Target + + + Uri + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxRestoreSnapshotOperation + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxRestoreSnapshotOperation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Code + + + CreatedByObjectId + + + EndTime + + + Kind + + + Message + + + OperationId + + + StartTime + + + Status + + + Target + + + Uri + + + SnapshotId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxSnapshot + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxSnapshot + + + + + + + + + + + + + + + + + + + + + CreatedTime - Message + ExpirationTime - RepairOutcome + SnapshotId + + + SnapshotType @@ -866,9 +1372,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxRestartOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxStartOperation - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxRestartOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxStartOperation @@ -942,9 +1448,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxStartOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxStopOperation - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxStartOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxStopOperation @@ -1018,20 +1524,17 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxStopOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxTunnel - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxStopOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxTunnel - - - - + - + @@ -1040,32 +1543,38 @@ - + - + - + - + + + + + + + + + + - Code - - - CreatedByObjectId + ActionState - EndTime + Code Kind @@ -1074,19 +1583,28 @@ Message - OperationId + Name - StartTime + OperationLocation - Status + ProvisioningState Target - Uri + CodeTunnelName + + + CodeTunnelUrl + + + HostingResourceName + + + Status @@ -1094,9 +1612,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Environment + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Environment - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Environment + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Environment @@ -1164,9 +1682,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentAction + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentAction - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentAction + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentAction @@ -1210,9 +1728,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentDefinition + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentDefinition - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentDefinition + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentDefinition @@ -1262,9 +1780,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentDefinitionParameter + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentDefinitionParameter - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentDefinitionParameter + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentDefinitionParameter @@ -1314,9 +1832,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentDeleteOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentDeleteOperation - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentDeleteOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentDeleteOperation @@ -1390,9 +1908,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentDeployOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentDeployOperation - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentDeployOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentDeployOperation @@ -1466,9 +1984,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentNextAction + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentNextAction - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentNextAction + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentNextAction @@ -1488,9 +2006,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperation - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperation @@ -1546,9 +2064,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOutput + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOutput - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOutput + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOutput @@ -1568,9 +2086,31 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentType + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentPatchProperties + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentPatchProperties + + + + + + + + + + + + ExpirationDate + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentType - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentType + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentType @@ -1614,9 +2154,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentTypeAbilities + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentTypeAbilities - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentTypeAbilities + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentTypeAbilities @@ -1642,31 +2182,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentUpdate - - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentUpdate - - - - - - - - - - - - ExpirationDate - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.HardwareProfile + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.HardwareProfile - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.HardwareProfile + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.HardwareProfile @@ -1698,9 +2216,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ImageReference - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ImageReference @@ -1744,9 +2262,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OperationStatus + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OperationStatus + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus @@ -1802,9 +2320,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OSDisk + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OSDisk - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OSDisk + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OSDisk @@ -1824,9 +2342,53 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedCatalog + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedApproval + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedApproval + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedCatalog + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedCatalog + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedCustomizationGroup - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedCatalog + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedCustomizationGroup @@ -1846,9 +2408,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedCustomizationGroup + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedCustomizationTaskDefinition - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedCustomizationGroup + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedCustomizationTaskDefinition @@ -1868,9 +2430,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedCustomizationTaskDefinition + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBox - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedCustomizationTaskDefinition + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBox @@ -1890,9 +2452,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedDevBox + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBoxAction - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedDevBox + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBoxAction @@ -1912,9 +2474,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedDevBoxAction + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBoxActionDelayResult - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedDevBoxAction + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBoxActionDelayResult @@ -1934,9 +2496,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedDevBoxActionDelayResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBoxAddOn - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedDevBoxActionDelayResult + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBoxAddOn @@ -1956,9 +2518,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedDevBoxOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBoxOperation - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedDevBoxOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBoxOperation @@ -1978,9 +2540,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironment + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBoxSnapshot - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironment + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBoxSnapshot @@ -2000,9 +2562,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironmentAction + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironment - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironmentAction + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironment @@ -2022,9 +2584,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironmentDefinition + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironmentAction - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironmentDefinition + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironmentAction @@ -2044,9 +2606,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironmentOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironmentDefinition - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironmentOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironmentDefinition @@ -2066,9 +2628,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironmentType + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironmentOperation - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironmentType + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironmentOperation @@ -2088,9 +2650,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedPool + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironmentType - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedPool + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironmentType @@ -2110,9 +2672,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedProject + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedPool - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedProject + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedPool @@ -2132,9 +2694,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedSchedule + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedProject - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedSchedule + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedProject @@ -2154,9 +2716,31 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Pool + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedSchedule - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Pool + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedSchedule + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Pool + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Pool @@ -2218,9 +2802,77 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Project + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PoolActiveHoursConfiguration + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PoolActiveHoursConfiguration + + + + + + + + + + + + + + + + + + + + + + + + AutoStartEnableStatus + + + DefaultEndTimeHour + + + DefaultStartTimeHour + + + DefaultTimeZone + + + KeepAwakeEnableStatus + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PoolAlignBody + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PoolAlignBody + + + + + + + + + + + + Target + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Project - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Project + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Project @@ -2264,9 +2916,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ProjectAbilities + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ProjectAbilities - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ProjectAbilities + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ProjectAbilities @@ -2292,9 +2944,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.RemoteConnection + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.RemoteConnection - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.RemoteConnection + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.RemoteConnection @@ -2326,9 +2978,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Schedule + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Schedule - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Schedule + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Schedule @@ -2384,9 +3036,37 @@ - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StopOnDisconnectConfiguration + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StopOnDisconnectConfiguration + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StopOnDisconnectConfiguration + + + + + + + + + + + + + + + GracePeriodMinute + + + Status + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StopOnNoConnectConfiguration - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StopOnDisconnectConfiguration + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StopOnNoConnectConfiguration @@ -2411,5 +3091,39 @@ + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.UserActiveHoursConfiguration + + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.UserActiveHoursConfiguration + + + + + + + + + + + + + + + + + + EndTimeHour + + + StartTimeHour + + + TimeZone + + + + + + \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/Az.DevCenterData.psd1 b/generated/DevCenter/DevCenterData.AutoRest/Az.DevCenterData.psd1 index 5377e5f8df5a..ad3460736900 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/Az.DevCenterData.psd1 +++ b/generated/DevCenter/DevCenterData.AutoRest/Az.DevCenterData.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.DevCenterdata.private.dll' FormatsToProcess = './Az.DevCenterdata.format.ps1xml' - FunctionsToExport = 'Deploy-AzDevCenterUserEnvironment', 'Get-AzDevCenterUserCatalog', 'Get-AzDevCenterUserDevBox', 'Get-AzDevCenterUserDevBoxAction', 'Get-AzDevCenterUserDevBoxCustomizationGroup', 'Get-AzDevCenterUserDevBoxCustomizationTaskDefinition', 'Get-AzDevCenterUserDevBoxCustomizationTaskLog', 'Get-AzDevCenterUserDevBoxOperation', 'Get-AzDevCenterUserDevBoxRemoteConnection', 'Get-AzDevCenterUserEnvironment', 'Get-AzDevCenterUserEnvironmentAction', 'Get-AzDevCenterUserEnvironmentDefinition', 'Get-AzDevCenterUserEnvironmentLog', 'Get-AzDevCenterUserEnvironmentOperation', 'Get-AzDevCenterUserEnvironmentOutput', 'Get-AzDevCenterUserEnvironmentType', 'Get-AzDevCenterUserPool', 'Get-AzDevCenterUserProject', 'Get-AzDevCenterUserSchedule', 'Invoke-AzDevCenterUserDelayDevBoxAction', 'Invoke-AzDevCenterUserDelayEnvironmentAction', 'New-AzDevCenterUserDevBox', 'New-AzDevCenterUserDevBoxCustomizationGroup', 'New-AzDevCenterUserEnvironment', 'Remove-AzDevCenterUserDevBox', 'Remove-AzDevCenterUserEnvironment', 'Repair-AzDevCenterUserDevBox', 'Restart-AzDevCenterUserDevBox', 'Skip-AzDevCenterUserDevBoxAction', 'Skip-AzDevCenterUserEnvironmentAction', 'Start-AzDevCenterUserDevBox', 'Stop-AzDevCenterUserDevBox', 'Test-AzDevCenterUserDevBoxCustomizationTaskAction', 'Update-AzDevCenterUserEnvironment', '*' + FunctionsToExport = 'Approve-AzDevCenterUserDevBox', 'Deploy-AzDevCenterUserEnvironment', 'Disable-AzDevCenterUserDevBoxAddOn', 'Enable-AzDevCenterUserDevBoxAddOn', 'Get-AzDevCenterUserCatalog', 'Get-AzDevCenterUserDevBox', 'Get-AzDevCenterUserDevBoxAction', 'Get-AzDevCenterUserDevBoxAddon', 'Get-AzDevCenterUserDevBoxCustomizationGroup', 'Get-AzDevCenterUserDevBoxCustomizationTaskDefinition', 'Get-AzDevCenterUserDevBoxCustomizationTaskLog', 'Get-AzDevCenterUserDevBoxImagingTaskLog', 'Get-AzDevCenterUserDevBoxOperation', 'Get-AzDevCenterUserDevBoxRemoteConnection', 'Get-AzDevCenterUserDevBoxSnapshot', 'Get-AzDevCenterUserDevCenterApproval', 'Get-AzDevCenterUserEnvironment', 'Get-AzDevCenterUserEnvironmentAction', 'Get-AzDevCenterUserEnvironmentDefinition', 'Get-AzDevCenterUserEnvironmentLog', 'Get-AzDevCenterUserEnvironmentOperation', 'Get-AzDevCenterUserEnvironmentOutput', 'Get-AzDevCenterUserEnvironmentType', 'Get-AzDevCenterUserEnvironmentTypeAbility', 'Get-AzDevCenterUserPool', 'Get-AzDevCenterUserProject', 'Get-AzDevCenterUserProjectAbility', 'Get-AzDevCenterUserSchedule', 'Invoke-AzDevCenterUserAlignPool', 'Invoke-AzDevCenterUserDelayDevBoxAction', 'Invoke-AzDevCenterUserDelayEnvironmentAction', 'New-AzDevCenterUserDevBox', 'New-AzDevCenterUserDevBoxAddOn', 'New-AzDevCenterUserDevBoxCustomizationGroup', 'New-AzDevCenterUserDevBoxSnapshot', 'New-AzDevCenterUserEnvironment', 'Remove-AzDevCenterUserDevBox', 'Remove-AzDevCenterUserDevBoxAddOn', 'Remove-AzDevCenterUserEnvironment', 'Repair-AzDevCenterUserDevBox', 'Restart-AzDevCenterUserDevBox', 'Restore-AzDevCenterUserDevBoxSnapshot', 'Set-AzDevCenterUserDevBoxActiveHour', 'Skip-AzDevCenterUserDevBoxAction', 'Skip-AzDevCenterUserEnvironmentAction', 'Start-AzDevCenterUserDevBox', 'Stop-AzDevCenterUserDevBox', 'Test-AzDevCenterUserDevBoxCustomizationTaskAction', 'Update-AzDevCenterUserEnvironment', '*' AliasesToExport = '*' PrivateData = @{ PSData = @{ diff --git a/generated/DevCenter/DevCenterData.AutoRest/Properties/AssemblyInfo.cs b/generated/DevCenter/DevCenterData.AutoRest/Properties/AssemblyInfo.cs index bb4b1464a30a..9bcfaa9a4338 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/Properties/AssemblyInfo.cs +++ b/generated/DevCenter/DevCenterData.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 - DevCenterdata")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("2.0.1")] -[assembly: System.Reflection.AssemblyVersionAttribute("2.0.1")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("2.0.2")] +[assembly: System.Reflection.AssemblyVersionAttribute("2.0.2")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Approve-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Approve-AzDevCenterUserDevBox.ps1 new file mode 100644 index 000000000000..a2f4375e46fb --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Approve-AzDevCenterUserDevBox.ps1 @@ -0,0 +1,254 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Approves the creation of a Dev Box. +.Description +Approves the creation of a Dev Box. +.Example +Approve-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox +.Example +Approve-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" -Name myDevBox +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +Approve-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +Approve-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/approve-azdevcenteruserdevbox +#> +function Approve-AzDevCenterUserDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Approve', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Approve', Mandatory)] + [Parameter(ParameterSetName='ApproveViaIdentity', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='ApproveViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ApproveByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='Approve', Mandatory)] + [Parameter(ParameterSetName='ApproveByDevCenter', Mandatory)] + [Alias('DevBoxName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${Name}, + + [Parameter(ParameterSetName='Approve', Mandatory)] + [Parameter(ParameterSetName='ApproveByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Approve', Mandatory)] + [Parameter(ParameterSetName='ApproveByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='ApproveViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ApproveViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 = @{ + Approve = 'Az.DevCenterdata.custom\Approve-AzDevCenterUserDevBox'; + ApproveViaIdentity = 'Az.DevCenterdata.custom\Approve-AzDevCenterUserDevBox'; + ApproveViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Approve-AzDevCenterUserDevBox'; + ApproveByDevCenter = 'Az.DevCenterdata.custom\Approve-AzDevCenterUserDevBox'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/exports/Deploy-AzDevCenterUserEnvironment.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Deploy-AzDevCenterUserEnvironment.ps1 index 6aced8e5925c..d58a5e99330e 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Deploy-AzDevCenterUserEnvironment.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Deploy-AzDevCenterUserEnvironment.ps1 @@ -40,7 +40,7 @@ Deploy-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .Notes COMPLEX PARAMETER PROPERTIES @@ -48,6 +48,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -56,17 +57,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/deploy-azdevcenteruserenvironment #> function Deploy-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -142,7 +145,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters]))] [System.Collections.Hashtable] # Parameters object for the environment. ${Parameter}, diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Disable-AzDevCenterUserDevBoxAddOn.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Disable-AzDevCenterUserDevBoxAddOn.ps1 new file mode 100644 index 000000000000..1c01a18d2b53 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Disable-AzDevCenterUserDevBoxAddOn.ps1 @@ -0,0 +1,288 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Disable a Dev Box addon. +.Description +Disable a Dev Box addon. +.Example +Disable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +Disable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Disable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Disable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/disable-azdevcenteruserdevboxaddon +#> +function Disable-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Disable', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Disable', Mandatory)] + [Parameter(ParameterSetName='DisableViaIdentity', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='DisableViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='DisableByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='Disable', Mandatory)] + [Parameter(ParameterSetName='DisableByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the dev box addon. + ${AddOnName}, + + [Parameter(ParameterSetName='Disable', Mandatory)] + [Parameter(ParameterSetName='DisableByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Disable', Mandatory)] + [Parameter(ParameterSetName='DisableByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Disable')] + [Parameter(ParameterSetName='DisableByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='DisableViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DisableViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 = @{ + Disable = 'Az.DevCenterdata.custom\Disable-AzDevCenterUserDevBoxAddOn'; + DisableViaIdentity = 'Az.DevCenterdata.custom\Disable-AzDevCenterUserDevBoxAddOn'; + DisableViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Disable-AzDevCenterUserDevBoxAddOn'; + DisableByDevCenter = 'Az.DevCenterdata.custom\Disable-AzDevCenterUserDevBoxAddOn'; + } + if (('Disable', 'DisableByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/exports/Enable-AzDevCenterUserDevBoxAddOn.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Enable-AzDevCenterUserDevBoxAddOn.ps1 new file mode 100644 index 000000000000..f7cffefdc971 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Enable-AzDevCenterUserDevBoxAddOn.ps1 @@ -0,0 +1,288 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Enable a Dev Box addon. +.Description +Enable a Dev Box addon. +.Example +Enable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +Enable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Enable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Enable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/enable-azdevcenteruserdevboxaddon +#> +function Enable-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Enable', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Enable', Mandatory)] + [Parameter(ParameterSetName='EnableViaIdentity', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='EnableViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='EnableByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='Enable', Mandatory)] + [Parameter(ParameterSetName='EnableByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the dev box addon. + ${AddOnName}, + + [Parameter(ParameterSetName='Enable', Mandatory)] + [Parameter(ParameterSetName='EnableByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Enable', Mandatory)] + [Parameter(ParameterSetName='EnableByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Enable')] + [Parameter(ParameterSetName='EnableByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='EnableViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='EnableViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 = @{ + Enable = 'Az.DevCenterdata.custom\Enable-AzDevCenterUserDevBoxAddOn'; + EnableViaIdentity = 'Az.DevCenterdata.custom\Enable-AzDevCenterUserDevBoxAddOn'; + EnableViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Enable-AzDevCenterUserDevBoxAddOn'; + EnableByDevCenter = 'Az.DevCenterdata.custom\Enable-AzDevCenterUserDevBoxAddOn'; + } + if (('Enable', 'EnableByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserCatalog.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserCatalog.ps1 index cfe4a01b7d2f..66455a47fca9 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserCatalog.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserCatalog.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserCatalog -DevCenterName Contoso -InputObject $catalogInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenterusercatalog #> function Get-AzDevCenterUserCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBox.ps1 index d71c259ee7b5..bf6f31e2f878 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBox.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBox.ps1 @@ -45,7 +45,7 @@ Get-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox .Notes COMPLEX PARAMETER PROPERTIES @@ -53,6 +53,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -61,17 +62,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevbox #> function Get-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxAction.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxAction.ps1 index 5c77936619a9..5db712510dbf 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxAction.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxAction.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserDevBoxAction -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxaction #> function Get-AzDevCenterUserDevBoxAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] @@ -89,7 +92,7 @@ param( [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of a Dev Box. + # Display name for the Dev Box. ${DevBoxName}, [Parameter(ParameterSetName='List', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxAddon.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxAddon.ps1 new file mode 100644 index 000000000000..ad53ade9253d --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxAddon.ps1 @@ -0,0 +1,287 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets a Dev Box addon by Dev Box addon id. +.Description +Gets a Dev Box addon by Dev Box addon id. +.Example +Get-AzDevCenterUserDevBoxAddon ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +Get-AzDevCenterUserDevBoxAddon ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" +.Example +Get-AzDevCenterUserDevBoxAddon ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -AddOnName "devboxtunnel-sys-default" +.Example +Get-AzDevCenterUserDevBoxAddon ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -AddOnName "devboxtunnel-sys-default" +.Example +$addonInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Get-AzDevCenterUserDevBoxAddon ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addonInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxaddon +#> +function Get-AzDevCenterUserDevBoxAddon { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='GetByDevCenter')] + [Parameter(ParameterSetName='ListByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the dev box addon. + ${AddOnName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAddon'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAddon'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAddon'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAddon'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAddon'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAddon'; + } + if (('List', 'Get', 'GetByDevCenter', 'ListByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxCustomizationGroup.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxCustomizationGroup.ps1 index 53dbea2e6ae6..eea978673b16 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxCustomizationGroup.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxCustomizationGroup.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -InputObject .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationgroup #> function Get-AzDevCenterUserDevBoxCustomizationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxCustomizationTaskDefinition.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxCustomizationTaskDefinition.ps1 index ad493b88ed1e..df965d048b5a 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxCustomizationTaskDefinition.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxCustomizationTaskDefinition.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -DevCenterName Contoso -Inp .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationtaskdefinition #> function Get-AzDevCenterUserDevBoxCustomizationTaskDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxCustomizationTaskLog.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxCustomizationTaskLog.ps1 index 40fb174992c5..7cb0114fd097 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxCustomizationTaskLog.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxCustomizationTaskLog.ps1 @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,10 +50,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link @@ -111,8 +114,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] # The AAD object id of the user. - # If value is 'me', the identity is taken from the - # authentication context. + # If value is 'me', the identity is taken from the authentication context. ${UserId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxImagingTaskLog.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxImagingTaskLog.ps1 new file mode 100644 index 000000000000..07cf82e2d2e0 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxImagingTaskLog.ps1 @@ -0,0 +1,249 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets the log for an imaging build task. +.Description +Gets the log for an imaging build task. +.Example +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -ImageBuildLogId "12345678-aaaa-bbbb-cccc-1234567890ab" +.Example +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -ImageBuildLogId "12345678-aaaa-bbbb-cccc-1234567890ab" +.Example +$logInput = @{ + ProjectName = "DevProject" + ImageBuildLogId = "12345678-aaaa-bbbb-cccc-1234567890ab" +} +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $logInput +.Example +$logInput = @{ + ProjectName = "DevProject" + ImageBuildLogId = "12345678-aaaa-bbbb-cccc-1234567890ab" +} +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $logInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +System.String +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboximagingtasklog +#> +function Get-AzDevCenterUserDevBoxImagingTaskLog { +[OutputType([System.String])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # An imaging build log id. + ${ImageBuildLogId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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.DevCenterdata.custom\Get-AzDevCenterUserDevBoxImagingTaskLog'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxImagingTaskLog'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxImagingTaskLog'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxImagingTaskLog'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxOperation.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxOperation.ps1 index 6f208d7a4a13..426845ff11ea 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxOperation.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxOperation.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserDevBoxOperation -DevCenterName Contoso -InputObject $devBoxIn .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxoperation #> function Get-AzDevCenterUserDevBoxOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxRemoteConnection.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxRemoteConnection.ps1 index 733679c0f78c..eacaf1a2bc11 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxRemoteConnection.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxRemoteConnection.ps1 @@ -33,7 +33,7 @@ Get-AzDevCenterUserDevBoxRemoteConnection -DevCenterName Contoso -InputObject $d .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxremoteconnection #> function Get-AzDevCenterUserDevBoxRemoteConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxSnapshot.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxSnapshot.ps1 new file mode 100644 index 000000000000..eeb4efeac19c --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevBoxSnapshot.ps1 @@ -0,0 +1,289 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets a snapshot by snapshot id. +.Description +Gets a snapshot by snapshot id. +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -SnapshotId "snapshot-1234" +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -SnapshotId "snapshot-1234" +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + SnapshotId = "snapshot-1234" +} +Get-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $snapshotInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxsnapshot +#> +function Get-AzDevCenterUserDevBoxSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='ListByDevCenter')] + [Parameter(ParameterSetName='GetByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The id of the snapshot. + # Should be treated as opaque string. + ${SnapshotId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxSnapshot'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxSnapshot'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxSnapshot'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxSnapshot'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxSnapshot'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxSnapshot'; + } + if (('List', 'Get', 'ListByDevCenter', 'GetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevCenterApproval.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevCenterApproval.ps1 new file mode 100644 index 000000000000..d653e52628df --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserDevCenterApproval.ps1 @@ -0,0 +1,204 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets a list of Dev Box creations that are pending approval. +.Description +Gets a list of Dev Box creations that are pending approval. +.Example +Get-AzDevCenterUserDevCenterApproval ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" +.Example +Get-AzDevCenterUserDevCenterApproval ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevcenterapproval +#> +function Get-AzDevCenterUserDevCenterApproval { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.String[]] + # Select the specified fields to be included in the response. + ${Select}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevCenterApproval'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevCenterApproval'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironment.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironment.ps1 index 4c309b421be2..e2d73c1a9a7a 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironment.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironment.ps1 @@ -41,7 +41,7 @@ Get-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .Notes COMPLEX PARAMETER PROPERTIES @@ -49,6 +49,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -57,17 +58,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironment #> function Get-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentAction.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentAction.ps1 index bb7356e44014..ea56bf9e4be8 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentAction.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentAction.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserEnvironmentAction -DevCenterName Contoso -InputObject $enviro .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentaction #> function Get-AzDevCenterUserEnvironmentAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentDefinition.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentDefinition.ps1 index f17782a74ad0..81205495b6b8 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentDefinition.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentDefinition.ps1 @@ -41,7 +41,7 @@ Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -InputObject $en .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -49,6 +49,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -57,17 +58,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentdefinition #> function Get-AzDevCenterUserEnvironmentDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List1', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentOperation.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentOperation.ps1 index 169ffb517d89..ee3cb9dff2c5 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentOperation.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentOperation.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserEnvironmentOperation -DevCenterName Contoso -InputObject $env .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentoperation #> function Get-AzDevCenterUserEnvironmentOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentOutput.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentOutput.ps1 index 162919359b42..54eb5614fb00 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentOutput.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentOutput.ps1 @@ -33,7 +33,7 @@ Get-AzDevCenterUserEnvironmentOutput -DevCenterName Contoso -InputObject $enviro .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentoutput #> function Get-AzDevCenterUserEnvironmentOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentType.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentType.ps1 index aea9fbe861ce..07696fee5178 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentType.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentType.ps1 @@ -27,7 +27,7 @@ Get-AzDevCenterUserEnvironmentType -DevCenterName Contoso -ProjectName DevProjec .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -35,6 +35,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -43,17 +44,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmenttype #> function Get-AzDevCenterUserEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentTypeAbility.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentTypeAbility.ps1 new file mode 100644 index 000000000000..e535ad90b1d0 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserEnvironmentTypeAbility.ps1 @@ -0,0 +1,262 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets the signed-in user's permitted abilities in an environment type. +.Description +Gets the signed-in user's permitted abilities in an environment type. +.Example +Get-AzDevCenterUserEnvironmentTypeAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -EnvironmentTypeName "DevTest" +.Example +Get-AzDevCenterUserEnvironmentTypeAbility ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -EnvironmentTypeName "DevTest" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +$envTypeInput = @{ + ProjectName = "DevProject" + EnvironmentTypeName = "DevTest" +} +Get-AzDevCenterUserEnvironmentTypeAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $envTypeInput +.Example +$envTypeInput = @{ + ProjectName = "DevProject" + EnvironmentTypeName = "DevTest" +} +Get-AzDevCenterUserEnvironmentTypeAbility ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $envTypeInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmenttypeability +#> +function Get-AzDevCenterUserEnvironmentTypeAbility { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the environment type + ${EnvironmentTypeName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='GetByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentTypeAbility'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentTypeAbility'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentTypeAbility'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentTypeAbility'; + } + if (('Get', 'GetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserPool.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserPool.ps1 index bc97a631f1e7..427eeeb08f0d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserPool.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserPool.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserPool -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserpool #> function Get-AzDevCenterUserPool { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserProject.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserProject.ps1 index 698598e03747..3d7a60c12380 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserProject.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserProject.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserProject -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserproject #> function Get-AzDevCenterUserProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserProjectAbility.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserProjectAbility.ps1 new file mode 100644 index 000000000000..7e0357829f04 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserProjectAbility.ps1 @@ -0,0 +1,251 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets the signed-in user's permitted abilities in a project. +.Description +Gets the signed-in user's permitted abilities in a project. +.Example +Get-AzDevCenterUserProjectAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" +.Example +Get-AzDevCenterUserProjectAbility ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +$projectInput = @{ + ProjectName = "DevProject" +} +Get-AzDevCenterUserProjectAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $projectInput +.Example +$projectInput = @{ + ProjectName = "DevProject" +} +Get-AzDevCenterUserProjectAbility ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $projectInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserprojectability +#> +function Get-AzDevCenterUserProjectAbility { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='GetByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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.DevCenterdata.custom\Get-AzDevCenterUserProjectAbility'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProjectAbility'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProjectAbility'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProjectAbility'; + } + if (('Get', 'GetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserSchedule.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserSchedule.ps1 index 2eaae70b3230..5454e8df23d2 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserSchedule.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Get-AzDevCenterUserSchedule.ps1 @@ -41,7 +41,7 @@ Get-AzDevCenterUserSchedule -DevCenterName Contoso -ProjectName DevProject -Pool .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule .Notes COMPLEX PARAMETER PROPERTIES @@ -49,6 +49,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -57,17 +58,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserschedule #> function Get-AzDevCenterUserSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List1', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Invoke-AzDevCenterUserAlignPool.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Invoke-AzDevCenterUserAlignPool.ps1 new file mode 100644 index 000000000000..d066c9aa05b6 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Invoke-AzDevCenterUserAlignPool.ps1 @@ -0,0 +1,305 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Aligns all Dev Boxes in the pool with the current configuration. +.Description +Aligns all Dev Boxes in the pool with the current configuration. +.Example +Invoke-AzDevCenterUserAlignPool ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -PoolName "DevPool01" ` + -Target "NetworkProperties" +.Example +Invoke-AzDevCenterUserAlignPool ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -PoolName "DevPool01" ` + -Target "NetworkProperties" +.Example +$poolInput = @{ + ProjectName = "DevProject" + PoolName = "DevPool01" +} +Invoke-AzDevCenterUserAlignPool ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $poolInput ` + -Target "NetworkProperties" +.Example +$body = @{ + Target = @("NetworkProperties") +} +Invoke-AzDevCenterUserAlignPool ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -PoolName "DevPool01" ` + -Body $body + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.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. + +BODY : Indicates which pool properties to align on. + Target : The targets to align on. + +INPUTOBJECT : Identity Parameter + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruseralignpool +#> +function Invoke-AzDevCenterUserAlignPool { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='AlignExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Parameter(ParameterSetName='AlignViaIdentityExpanded', Mandatory)] + [Parameter(ParameterSetName='AlignViaIdentity', Mandatory)] + [Parameter(ParameterSetName='Align', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='AlignViaIdentityExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='AlignExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='AlignViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='AlignByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Parameter(ParameterSetName='Align', Mandatory)] + [Parameter(ParameterSetName='AlignExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='AlignByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Pool name. + ${PoolName}, + + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Parameter(ParameterSetName='Align', Mandatory)] + [Parameter(ParameterSetName='AlignExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='AlignByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='AlignViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentityExpandedByDevCenter', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Parameter(ParameterSetName='AlignViaIdentityExpanded', Mandatory)] + [Parameter(ParameterSetName='AlignViaIdentityExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='AlignExpandedByDevCenter', Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[]] + # The targets to align on. + ${Target}, + + [Parameter(ParameterSetName='AlignViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='Align', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody] + # Indicates which pool properties to align on. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 = @{ + AlignExpanded = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + AlignViaIdentityExpanded = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + AlignViaIdentity = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + Align = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + AlignViaIdentityExpandedByDevCenter = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + AlignExpandedByDevCenter = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + AlignViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + AlignByDevCenter = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/exports/Invoke-AzDevCenterUserDelayDevBoxAction.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Invoke-AzDevCenterUserDelayDevBoxAction.ps1 index c5fdfdd8c7a2..0ab81243ddda 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Invoke-AzDevCenterUserDelayDevBoxAction.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Invoke-AzDevCenterUserDelayDevBoxAction.ps1 @@ -31,14 +31,14 @@ Invoke-AzDevCenterUserDelayDevBoxAction -DevCenterName Contoso -DevBoxName myDev .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult .Link https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruserdelaydevboxaction #> function Invoke-AzDevCenterUserDelayDevBoxAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction], [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction], [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult])] [CmdletBinding(DefaultParameterSetName='Delay1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delay1', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Invoke-AzDevCenterUserDelayEnvironmentAction.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Invoke-AzDevCenterUserDelayEnvironmentAction.ps1 index b7ff561fa59e..24de4d05afa7 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Invoke-AzDevCenterUserDelayEnvironmentAction.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Invoke-AzDevCenterUserDelayEnvironmentAction.ps1 @@ -27,12 +27,12 @@ Invoke-AzDevCenterUserDelayEnvironmentAction -DevCenterName Contoso -Environment .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction .Link https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruserdelayenvironmentaction #> function Invoke-AzDevCenterUserDelayEnvironmentAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction])] [CmdletBinding(DefaultParameterSetName='Delay', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delay', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserDevBox.ps1 index ce2fb341d94a..d7b199c48301 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserDevBox.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserDevBox.ps1 @@ -33,7 +33,7 @@ New-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput -Pool .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevbox #> function New-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -115,13 +118,6 @@ param( # The name of the Dev Box pool this machine belongs to. ${PoolName}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus] - # Indicates whether the owner of the Dev Box is a local administrator. - ${LocalAdministrator}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserDevBoxAddOn.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserDevBoxAddOn.ps1 new file mode 100644 index 000000000000..c2a8c6d907f3 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserDevBoxAddOn.ps1 @@ -0,0 +1,288 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a Dev Box addon. +.Description +Creates a Dev Box addon. +.Example +New-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +New-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "me" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +New-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "me" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +New-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevboxaddon +#> +function New-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the Dev Box addon. + ${AddOnName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of a Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateExpandedByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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.DevCenterdata.custom\New-AzDevCenterUserDevBoxAddOn'; + CreateViaIdentityExpanded = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxAddOn'; + CreateExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxAddOn'; + CreateViaIdentityExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxAddOn'; + } + if (('CreateExpanded', 'CreateExpandedByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserDevBoxCustomizationGroup.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserDevBoxCustomizationGroup.ps1 index 1cc9cecba755..183b1b162e0d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserDevBoxCustomizationGroup.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserDevBoxCustomizationGroup.ps1 @@ -44,7 +44,7 @@ New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -InputObject .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -52,6 +52,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -60,10 +61,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. @@ -78,7 +81,7 @@ TASK : Tasks to apply. Note by default tasks are excluded https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevboxcustomizationgroup #> function New-AzDevCenterUserDevBoxCustomizationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -123,8 +126,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] # The AAD object id of the user. - # If value is 'me', the identity is taken from the - # authentication context. + # If value is 'me', the identity is taken from the authentication context. ${UserId}, [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] @@ -138,7 +140,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[]] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[]] # Tasks to apply. # Note by default tasks are excluded from the response when listing customization groups. # To include them, use the `include=tasks` queryparameter. diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserDevBoxSnapshot.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserDevBoxSnapshot.ps1 new file mode 100644 index 000000000000..5346650201ee --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserDevBoxSnapshot.ps1 @@ -0,0 +1,277 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Captures a manual snapshot of the Dev Box.\nUpon completion, a snapshotId will be generated.\nTo retrieve all snapshots and their corresponding IDs, use the list snapshots endpoint. +.Description +Captures a manual snapshot of the Dev Box.\nUpon completion, a snapshotId will be generated.\nTo retrieve all snapshots and their corresponding IDs, use the list snapshots endpoint. +.Example +New-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" +.Example +New-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -UserId "me" ` + -DevBoxName "myDevBox" +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "me" + ProjectName = "DevProject" +} +New-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $snapshotInput +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" +} +New-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $snapshotInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevboxsnapshot +#> +function New-AzDevCenterUserDevBoxSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Capture', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Capture', Mandatory)] + [Parameter(ParameterSetName='CaptureViaIdentity', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='CaptureViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='CaptureByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='Capture', Mandatory)] + [Parameter(ParameterSetName='CaptureByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Capture', Mandatory)] + [Parameter(ParameterSetName='CaptureByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Capture')] + [Parameter(ParameterSetName='CaptureByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='CaptureViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CaptureViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 = @{ + Capture = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxSnapshot'; + CaptureViaIdentity = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxSnapshot'; + CaptureViaIdentityByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxSnapshot'; + CaptureByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxSnapshot'; + } + if (('Capture', 'CaptureByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserEnvironment.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserEnvironment.ps1 index 86bce863d998..ea6c9521d627 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserEnvironment.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/New-AzDevCenterUserEnvironment.ps1 @@ -47,7 +47,7 @@ New-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput -Ca .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .Notes COMPLEX PARAMETER PROPERTIES @@ -55,6 +55,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -63,17 +64,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserenvironment #> function New-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -149,7 +152,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters]))] [System.Collections.Hashtable] # Parameters object for the environment. ${Parameter}, diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/ProxyCmdletDefinitions.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/ProxyCmdletDefinitions.ps1 index 71809f327391..4b08e75adadb 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/ProxyCmdletDefinitions.ps1 @@ -16,31 +16,24 @@ <# .Synopsis -Creates or updates an environment. +Approves the creation of a Dev Box. .Description -Creates or updates an environment. +Approves the creation of a Dev Box. .Example -$functionAppParameters = @{"name" = "testfuncApp" } - -Deploy-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -Name "envtest" -ProjectName DevProject -CatalogName CentralCatalog -EnvironmentDefinitionName FunctionApp -EnvironmentType DevTest -Parameter $functionAppParameters +Approve-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox .Example -Deploy-AzDevCenterUserEnvironment -DevCenterName Contoso -Name "envtest" -ProjectName DevProject -CatalogName CentralCatalog -EnvironmentDefinitionName Sandbox -EnvironmentType DevTest +Approve-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" -Name myDevBox .Example -$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "envtest" } - - -Deploy-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput -CatalogName CentralCatalog -EnvironmentDefinitionName Sandbox -EnvironmentType DevTest - +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +Approve-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput .Example -$functionAppParameters = @{"name" = "testfuncApp" } -$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "envtest" } - -Deploy-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput -CatalogName CentralCatalog -EnvironmentDefinitionName FunctionApp -EnvironmentType DevTest -Parameter $functionAppParameters +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +Approve-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -48,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -56,97 +50,67 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/deploy-azdevcenteruserenvironment +https://learn.microsoft.com/powershell/module/az.devcenter/approve-azdevcenteruserdevbox #> -function Deploy-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Approve-AzDevCenterUserDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Approve', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] + [Parameter(ParameterSetName='Approve', Mandatory)] + [Parameter(ParameterSetName='ApproveViaIdentity', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] - [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ApproveViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ApproveByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] - [Alias('EnvironmentName')] + [Parameter(ParameterSetName='Approve', Mandatory)] + [Parameter(ParameterSetName='ApproveByDevCenter', Mandatory)] + [Alias('DevBoxName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of the environment. + # Display name for the Dev Box. ${Name}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Approve', Mandatory)] + [Parameter(ParameterSetName='ApproveByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute operations. + # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateExpandedByDevCenter')] + [Parameter(ParameterSetName='Approve', Mandatory)] + [Parameter(ParameterSetName='ApproveByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] # The AAD object id of the user. # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ApproveViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ApproveViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [System.String] - # Name of the catalog. - ${CatalogName}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [System.String] - # Name of the environment definition. - ${EnvironmentDefinitionName}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [System.String] - # Environment type. - ${EnvironmentType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [System.DateTime] - # The time the expiration date will be triggered (UTC), after which the environment and associated resources will be deleted. - ${ExpirationDate}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters]))] - [System.Collections.Hashtable] - # Parameters object for the environment. - ${Parameter}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -234,13 +198,10 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.DevCenterdata.custom\Deploy-AzDevCenterUserEnvironment'; - CreateViaIdentityExpanded = 'Az.DevCenterdata.custom\Deploy-AzDevCenterUserEnvironment'; - CreateExpandedByDevCenter = 'Az.DevCenterdata.custom\Deploy-AzDevCenterUserEnvironment'; - CreateViaIdentityExpandedByDevCenter = 'Az.DevCenterdata.custom\Deploy-AzDevCenterUserEnvironment'; - } - if (('CreateExpanded', 'CreateExpandedByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { - $PSBoundParameters['UserId'] = "me" + Approve = 'Az.DevCenterdata.custom\Approve-AzDevCenterUserDevBox'; + ApproveViaIdentity = 'Az.DevCenterdata.custom\Approve-AzDevCenterUserDevBox'; + ApproveViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Approve-AzDevCenterUserDevBox'; + ApproveByDevCenter = 'Az.DevCenterdata.custom\Approve-AzDevCenterUserDevBox'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -294,28 +255,31 @@ end { <# .Synopsis -Gets the specified catalog within the project. +Creates or updates an environment. .Description -Gets the specified catalog within the project. -.Example -Get-AzDevCenterUserCatalog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -.Example -Get-AzDevCenterUserCatalog -DevCenterName Contoso -ProjectName DevProject +Creates or updates an environment. .Example -Get-AzDevCenterUserCatalog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CatalogName CentralCatalog +$functionAppParameters = @{"name" = "testfuncApp" } + +Deploy-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -Name "envtest" -ProjectName DevProject -CatalogName CentralCatalog -EnvironmentDefinitionName FunctionApp -EnvironmentType DevTest -Parameter $functionAppParameters .Example -Get-AzDevCenterUserCatalog -DevCenterName Contoso -ProjectName DevProject -CatalogName CentralCatalog +Deploy-AzDevCenterUserEnvironment -DevCenterName Contoso -Name "envtest" -ProjectName DevProject -CatalogName CentralCatalog -EnvironmentDefinitionName Sandbox -EnvironmentType DevTest .Example -$catalogInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" =" DevProject" } -Get-AzDevCenterUserCatalog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $catalogInput +$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "envtest" } + + +Deploy-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput -CatalogName CentralCatalog -EnvironmentDefinitionName Sandbox -EnvironmentType DevTest + .Example -$catalogInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" = "DevProject" } -Get-AzDevCenterUserCatalog -DevCenterName Contoso -InputObject $catalogInput +$functionAppParameters = @{"name" = "testfuncApp" } +$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "envtest" } + +Deploy-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput -CatalogName CentralCatalog -EnvironmentDefinitionName FunctionApp -EnvironmentType DevTest -Parameter $functionAppParameters .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .Notes COMPLEX PARAMETER PROPERTIES @@ -323,6 +287,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -331,60 +296,99 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenterusercatalog +https://learn.microsoft.com/powershell/module/az.devcenter/deploy-azdevcenteruserenvironment #> -function Get-AzDevCenterUserCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Deploy-AzDevCenterUserEnvironment { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] - [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Alias('EnvironmentName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the project. + # The name of the environment. + ${Name}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. ${ProjectName}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateExpandedByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] [System.String] # Name of the catalog. ${CatalogName}, + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.String] + # Name of the environment definition. + ${EnvironmentDefinitionName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.String] + # Environment type. + ${EnvironmentType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.DateTime] + # The time the expiration date will be triggered (UTC), after which the environment and associated resources will be deleted. + ${ExpirationDate}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters]))] + [System.Collections.Hashtable] + # Parameters object for the environment. + ${Parameter}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -394,6 +398,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -414,6 +424,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -460,12 +476,13 @@ begin { } $mapping = @{ - List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserCatalog'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserCatalog'; - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserCatalog'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserCatalog'; - ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserCatalog'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserCatalog'; + CreateExpanded = 'Az.DevCenterdata.custom\Deploy-AzDevCenterUserEnvironment'; + CreateViaIdentityExpanded = 'Az.DevCenterdata.custom\Deploy-AzDevCenterUserEnvironment'; + CreateExpandedByDevCenter = 'Az.DevCenterdata.custom\Deploy-AzDevCenterUserEnvironment'; + CreateViaIdentityExpandedByDevCenter = 'Az.DevCenterdata.custom\Deploy-AzDevCenterUserEnvironment'; + } + if (('CreateExpanded', 'CreateExpandedByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -519,36 +536,48 @@ end { <# .Synopsis -Gets a Dev Box. +Disable a Dev Box addon. .Description -Gets a Dev Box. -.Example -Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -.Example -Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -.Example -Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" -.Example -Get-AzDevCenterUserDevBox -DevCenterName Contoso -.Example -Get-AzDevCenterUserDevBox -DevCenterName Contoso -UserId "me" -.Example -Get-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -.Example -Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox -.Example -Get-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } -Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } -Get-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput +Disable a Dev Box addon. +.Example +Disable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +Disable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Disable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Disable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -556,6 +585,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -564,77 +594,74 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevbox +https://learn.microsoft.com/powershell/module/az.devcenter/disable-azdevcenteruserdevboxaddon #> -function Get-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Disable-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Disable', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='List2', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] - [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Disable', Mandatory)] + [Parameter(ParameterSetName='DisableViaIdentity', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] - [Parameter(ParameterSetName='List2ByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='DisableViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='DisableByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='List2', Mandatory)] - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='List2ByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Disable', Mandatory)] + [Parameter(ParameterSetName='DisableByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the project. - ${ProjectName}, + # Name of the dev box addon. + ${AddOnName}, - [Parameter(ParameterSetName='List2', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] - [Parameter(ParameterSetName='List2ByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Disable', Mandatory)] + [Parameter(ParameterSetName='DisableByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The AAD object id of the user. - # If value is 'me', the identity is taken from the authentication context. - ${UserId}, + # Display name for the Dev Box. + ${DevBoxName}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='Disable', Mandatory)] + [Parameter(ParameterSetName='DisableByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Disable')] + [Parameter(ParameterSetName='DisableByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='DisableViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DisableViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Alias('DevBoxName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # Display name for the Dev Box. - ${Name}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -644,6 +671,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -664,6 +697,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -710,16 +749,13 @@ begin { } $mapping = @{ - List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; - List2 = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; - List1 = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; - List1ByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; - List2ByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; - ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; + Disable = 'Az.DevCenterdata.custom\Disable-AzDevCenterUserDevBoxAddOn'; + DisableViaIdentity = 'Az.DevCenterdata.custom\Disable-AzDevCenterUserDevBoxAddOn'; + DisableViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Disable-AzDevCenterUserDevBoxAddOn'; + DisableByDevCenter = 'Az.DevCenterdata.custom\Disable-AzDevCenterUserDevBoxAddOn'; + } + if (('Disable', 'DisableByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -773,28 +809,48 @@ end { <# .Synopsis -Gets an action. +Enable a Dev Box addon. .Description -Gets an action. -.Example -Get-AzDevCenterUserDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -.Example -Get-AzDevCenterUserDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -.Example -Get-AzDevCenterUserDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -Name "schedule-default" -.Example -Get-AzDevCenterUserDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -Name "schedule-default" -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "schedule-default"} -Get-AzDevCenterUserDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "schedule-default"} -Get-AzDevCenterUserDevBoxAction -DevCenterName Contoso -InputObject $devBoxInput +Enable a Dev Box addon. +.Example +Enable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +Enable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Enable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Enable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -802,6 +858,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -810,58 +867,59 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxaction +https://learn.microsoft.com/powershell/module/az.devcenter/enable-azdevcenteruserdevboxaddon #> -function Get-AzDevCenterUserDevBoxAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Enable-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Enable', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] - [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Enable', Mandatory)] + [Parameter(ParameterSetName='EnableViaIdentity', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='EnableViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='EnableByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Enable', Mandatory)] + [Parameter(ParameterSetName='EnableByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of a Dev Box. + # Name of the dev box addon. + ${AddOnName}, + + [Parameter(ParameterSetName='Enable', Mandatory)] + [Parameter(ParameterSetName='EnableByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. ${DevBoxName}, - [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Enable', Mandatory)] + [Parameter(ParameterSetName='EnableByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='List')] - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='GetByDevCenter')] - [Parameter(ParameterSetName='ListByDevCenter')] + [Parameter(ParameterSetName='Enable')] + [Parameter(ParameterSetName='EnableByDevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -869,22 +927,14 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='EnableViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='EnableViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Alias('ActionName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # The name of the action. - ${Name}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -894,6 +944,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -914,6 +970,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -960,14 +1022,12 @@ begin { } $mapping = @{ - List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAction'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAction'; - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAction'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAction'; - ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAction'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAction'; + Enable = 'Az.DevCenterdata.custom\Enable-AzDevCenterUserDevBoxAddOn'; + EnableViaIdentity = 'Az.DevCenterdata.custom\Enable-AzDevCenterUserDevBoxAddOn'; + EnableViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Enable-AzDevCenterUserDevBoxAddOn'; + EnableByDevCenter = 'Az.DevCenterdata.custom\Enable-AzDevCenterUserDevBoxAddOn'; } - if (('List', 'Get', 'GetByDevCenter', 'ListByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Enable', 'EnableByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -1022,28 +1082,28 @@ end { <# .Synopsis -Gets a customization group. +Gets the specified catalog within the project. .Description -Gets a customization group. +Gets the specified catalog within the project. .Example -Get-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -DevBoxName MyDevBox +Get-AzDevCenterUserCatalog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject .Example -Get-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -ProjectName DevProject -DevBoxName MyDevBox -Include tasks +Get-AzDevCenterUserCatalog -DevCenterName Contoso -ProjectName DevProject .Example -Get-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CustomizationGroupName Provisioning -DevBoxName MyDevBox +Get-AzDevCenterUserCatalog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CatalogName CentralCatalog .Example -Get-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -ProjectName DevProject -CustomizationGroupName Provisioning -DevBoxName MyDevBox +Get-AzDevCenterUserCatalog -DevCenterName Contoso -ProjectName DevProject -CatalogName CentralCatalog .Example -$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" ="DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "me" } -Get-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationGroupInput +$catalogInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" =" DevProject" } +Get-AzDevCenterUserCatalog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $catalogInput .Example -$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" = "DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0" } -Get-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -InputObject $customizationGroupInput +$catalogInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" = "DevProject" } +Get-AzDevCenterUserCatalog -DevCenterName Contoso -InputObject $catalogInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -1051,6 +1111,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -1059,17 +1120,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationgroup +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenterusercatalog #> -function Get-AzDevCenterUserDevBoxCustomizationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup])] +function Get-AzDevCenterUserCatalog { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] @@ -1089,15 +1152,6 @@ param( # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # Display name for the Dev Box. - ${DevBoxName}, - [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] @@ -1107,17 +1161,6 @@ param( # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='List')] - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='GetByDevCenter')] - [Parameter(ParameterSetName='ListByDevCenter')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] - [System.String] - # The AAD object id of the user. - # If value is 'me', the identity is taken from the authentication context. - ${UserId}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] @@ -1130,16 +1173,8 @@ param( [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the customization group. - ${CustomizationGroupName}, - - [Parameter(ParameterSetName='List')] - [Parameter(ParameterSetName='ListByDevCenter')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ListCustomizationGroupsIncludeProperty])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ListCustomizationGroupsIncludeProperty] - # Optional query parameter to specify what properties should be included in the response. - ${Include}, + # Name of the catalog. + ${CatalogName}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -1216,15 +1251,12 @@ begin { } $mapping = @{ - List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationGroup'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationGroup'; - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationGroup'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationGroup'; - ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationGroup'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationGroup'; - } - if (('List', 'Get', 'GetByDevCenter', 'ListByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { - $PSBoundParameters['UserId'] = "me" + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserCatalog'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserCatalog'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserCatalog'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserCatalog'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserCatalog'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserCatalog'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1278,28 +1310,36 @@ end { <# .Synopsis -Gets a customization task. +Gets a Dev Box. .Description -Gets a customization task. +Gets a Dev Box. .Example -Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" .Example -Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -DevCenterName Contoso -ProjectName DevProject +Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -UserId 786a823c-8037-48ab-89b8-8599901e67d0 .Example -Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -TaskName choco -CatalogName MyCatalog +Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" .Example -Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -DevCenterName Contoso -ProjectName DevProject -TaskName choco -CatalogName MyCatalog +Get-AzDevCenterUserDevBox -DevCenterName Contoso .Example -$customizationTaskInput = @{"TaskName" = "choco"; "ProjectName" ="DevProject"; "CatalogName" = "MyCatalog" } -Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationTaskInput +Get-AzDevCenterUserDevBox -DevCenterName Contoso -UserId "me" .Example -$customizationTaskInput = @{"TaskName" = "choco"; "ProjectName" = "DevProject"; "CatalogName" = "MyCatalog" } -Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -DevCenterName Contoso -InputObject $customizationTaskInput +Get-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 +.Example +Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox +.Example +Get-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } +Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +Get-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox .Notes COMPLEX PARAMETER PROPERTIES @@ -1307,6 +1347,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -1315,20 +1356,24 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationtaskdefinition +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevbox #> -function Get-AzDevCenterUserDevBoxCustomizationTaskDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition])] +function Get-AzDevCenterUserDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='List2', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -1337,6 +1382,8 @@ param( ${Endpoint}, [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] + [Parameter(ParameterSetName='List2ByDevCenter', Mandatory)] [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] [Alias('DevCenter')] @@ -1345,15 +1392,27 @@ param( # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='List2', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='List2ByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, + [Parameter(ParameterSetName='List2', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] + [Parameter(ParameterSetName='List2ByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] @@ -1364,17 +1423,11 @@ param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Alias('DevBoxName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the catalog. - ${CatalogName}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # Full name of the task: {catalogName}/{taskName}. - ${TaskName}, + # Display name for the Dev Box. + ${Name}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -1451,12 +1504,16 @@ begin { } $mapping = @{ - List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition'; - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition'; - ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition'; + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; + List2 = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; + List1 = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; + List1ByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; + List2ByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBox'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1510,24 +1567,28 @@ end { <# .Synopsis -Gets the log for a customization task. +Gets an action. .Description -Gets the log for a customization task. +Gets an action. .Example -Get-AzDevCenterUserDevBoxCustomizationTaskLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -DevBoxName MyDevBox -CustomizationGroupName Provisioning -CustomizationTaskId "91835dc0-ef5a-4f58-9e3a-099aea8481f4" +Get-AzDevCenterUserDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject .Example -Get-AzDevCenterUserDevBoxCustomizationTaskLog -DevCenterName Contoso -ProjectName DevProject -DevBoxName MyDevBox -CustomizationGroupName Provisioning -CustomizationTaskId "91835dc0-ef5a-4f58-9e3a-099aea8481f4" +Get-AzDevCenterUserDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject .Example -$customizationTaskLogInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" ="DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "me"; "CustomizationTaskId" = "91835dc0-ef5a-4f58-9e3a-099aea8481f4" } -Get-AzDevCenterUserDevBoxCustomizationTaskLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationTaskInput +Get-AzDevCenterUserDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -Name "schedule-default" .Example -$customizationTaskLogInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" = "DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "CustomizationTaskId" = "91835dc0-ef5a-4f58-9e3a-099aea8481f4" } -Get-AzDevCenterUserDevBoxCustomizationTaskLog -DevCenterName Contoso -InputObject $customizationTaskInput +Get-AzDevCenterUserDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -Name "schedule-default" +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "schedule-default"} +Get-AzDevCenterUserDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "schedule-default"} +Get-AzDevCenterUserDevBoxAction -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -System.String +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction .Notes COMPLEX PARAMETER PROPERTIES @@ -1535,6 +1596,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -1543,27 +1605,31 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationtasklog +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxaction #> -function Get-AzDevCenterUserDevBoxCustomizationTaskLog { -[OutputType([System.String])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +function Get-AzDevCenterUserDevBoxAction { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -1571,42 +1637,33 @@ param( # The DevCenter upon which to execute operations. ${DevCenterName}, + [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # A customization group name. - ${CustomizationGroupName}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # A customization task ID. - ${CustomizationTaskId}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # The name of a Dev Box. + # Display name for the Dev Box. ${DevBoxName}, + [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute operations. + # Name of the project. ${ProjectName}, + [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='GetByDevCenter')] + [Parameter(ParameterSetName='ListByDevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] # The AAD object id of the user. - # If value is 'me', the identity is taken from the - # authentication context. + # If value is 'me', the identity is taken from the authentication context. ${UserId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -1617,6 +1674,14 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Alias('ActionName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the action. + ${Name}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1692,12 +1757,14 @@ begin { } $mapping = @{ - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskLog'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskLog'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskLog'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskLog'; + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAction'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAction'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAction'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAction'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAction'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAction'; } - if (('Get', 'GetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('List', 'Get', 'GetByDevCenter', 'ListByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -1752,28 +1819,50 @@ end { <# .Synopsis -Gets an operation on a Dev Box. +Gets a Dev Box addon by Dev Box addon id. .Description -Gets an operation on a Dev Box. -.Example -Get-AzDevCenterUserDevBoxOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -.Example -Get-AzDevCenterUserDevBoxOperation -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -.Example -Get-AzDevCenterUserDevBoxOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" -.Example -Get-AzDevCenterUserDevBoxOperation -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} -Get-AzDevCenterUserDevBoxOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} -Get-AzDevCenterUserDevBoxOperation -DevCenterName Contoso -InputObject $devBoxInput +Gets a Dev Box addon by Dev Box addon id. +.Example +Get-AzDevCenterUserDevBoxAddon ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +Get-AzDevCenterUserDevBoxAddon ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" +.Example +Get-AzDevCenterUserDevBoxAddon ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -AddOnName "devboxtunnel-sys-default" +.Example +Get-AzDevCenterUserDevBoxAddon ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -AddOnName "devboxtunnel-sys-default" +.Example +$addonInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Get-AzDevCenterUserDevBoxAddon ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addonInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn .Notes COMPLEX PARAMETER PROPERTIES @@ -1781,6 +1870,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -1789,17 +1879,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxoperation +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxaddon #> -function Get-AzDevCenterUserDevBoxOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation])] +function Get-AzDevCenterUserDevBoxAddon { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] @@ -1859,8 +1951,8 @@ param( [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Unique identifier for the Dev Box operation. - ${OperationId}, + # Name of the dev box addon. + ${AddOnName}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -1937,12 +2029,12 @@ begin { } $mapping = @{ - List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxOperation'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxOperation'; - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxOperation'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxOperation'; - ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxOperation'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxOperation'; + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAddon'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAddon'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAddon'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAddon'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAddon'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxAddon'; } if (('List', 'Get', 'GetByDevCenter', 'ListByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" @@ -1999,24 +2091,28 @@ end { <# .Synopsis -Gets RDP Connection info. +Gets a customization group. .Description -Gets RDP Connection info. +Gets a customization group. .Example -Get-AzDevCenterUserDevBoxRemoteConnection -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject +Get-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -DevBoxName MyDevBox .Example -Get-AzDevCenterUserDevBoxRemoteConnection -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject +Get-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -ProjectName DevProject -DevBoxName MyDevBox -Include tasks .Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } -Get-AzDevCenterUserDevBoxRemoteConnection -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +Get-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CustomizationGroupName Provisioning -DevBoxName MyDevBox .Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } -Get-AzDevCenterUserDevBoxRemoteConnection -DevCenterName Contoso -InputObject $devBoxInput +Get-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -ProjectName DevProject -CustomizationGroupName Provisioning -DevBoxName MyDevBox +.Example +$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" ="DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "me" } +Get-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationGroupInput +.Example +$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" = "DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0" } +Get-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -InputObject $customizationGroupInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -2024,6 +2120,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -2032,27 +2129,31 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxremoteconnection +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationgroup #> -function Get-AzDevCenterUserDevBoxRemoteConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +function Get-AzDevCenterUserDevBoxCustomizationGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -2060,22 +2161,28 @@ param( # The DevCenter upon which to execute operations. ${DevCenterName}, + [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of a Dev Box. + # Display name for the Dev Box. ${DevBoxName}, + [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute operations. + # Name of the project. ${ProjectName}, + [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='GetByDevCenter')] + [Parameter(ParameterSetName='ListByDevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -2091,6 +2198,21 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the customization group. + ${CustomizationGroupName}, + + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='ListByDevCenter')] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ListCustomizationGroupsIncludeProperty])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ListCustomizationGroupsIncludeProperty] + # Optional query parameter to specify what properties should be included in the response. + ${Include}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2166,12 +2288,14 @@ begin { } $mapping = @{ - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxRemoteConnection'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxRemoteConnection'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxRemoteConnection'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxRemoteConnection'; + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationGroup'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationGroup'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationGroup'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationGroup'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationGroup'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationGroup'; } - if (('Get', 'GetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('List', 'Get', 'GetByDevCenter', 'ListByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -2226,32 +2350,28 @@ end { <# .Synopsis -Gets an environment. +Gets a customization task. .Description -Gets an environment. -.Example - -.Example -Get-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject +Gets a customization task. .Example -Get-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" +Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject .Example -Get-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -DevCenterName Contoso -ProjectName DevProject .Example -Get-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" -Name myEnv +Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -TaskName choco -CatalogName MyCatalog .Example -Get-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" -Name myEnv +Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -DevCenterName Contoso -ProjectName DevProject -TaskName choco -CatalogName MyCatalog .Example -$envInput = @{"UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } -Get-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput +$customizationTaskInput = @{"TaskName" = "choco"; "ProjectName" ="DevProject"; "CatalogName" = "MyCatalog" } +Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationTaskInput .Example -$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } -Get-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput +$customizationTaskInput = @{"TaskName" = "choco"; "ProjectName" = "DevProject"; "CatalogName" = "MyCatalog" } +Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -DevCenterName Contoso -InputObject $customizationTaskInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -2259,6 +2379,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -2267,21 +2388,22 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironment +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationtaskdefinition #> -function Get-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] +function Get-AzDevCenterUserDevBoxCustomizationTaskDefinition { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -2291,7 +2413,6 @@ param( [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] - [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -2300,26 +2421,14 @@ param( ${DevCenterName}, [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] - [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='List1', Mandatory)] - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # The AAD object id of the user. - # If value is 'me', the identity is taken from the authentication context. - ${UserId}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] @@ -2330,11 +2439,17 @@ param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Alias('EnvironmentName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Environment name. - ${Name}, + # Name of the catalog. + ${CatalogName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Full name of the task: {catalogName}/{taskName}. + ${TaskName}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -2411,14 +2526,12 @@ begin { } $mapping = @{ - List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; - List1 = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; - ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; - List1ByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2472,28 +2585,24 @@ end { <# .Synopsis -Retrieve a specific environment action. +Gets the log for a customization task. .Description -Retrieve a specific environment action. -.Example -Get-AzDevCenterUserEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -.Example -Get-AzDevCenterUserEnvironmentAction -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject +Gets the log for a customization task. .Example -Get-AzDevCenterUserEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -Name "myEnvironment-Delete" +Get-AzDevCenterUserDevBoxCustomizationTaskLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -DevBoxName MyDevBox -CustomizationGroupName Provisioning -CustomizationTaskId "91835dc0-ef5a-4f58-9e3a-099aea8481f4" .Example -Get-AzDevCenterUserEnvironmentAction -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject -Name "myEnvironment-Delete" +Get-AzDevCenterUserDevBoxCustomizationTaskLog -DevCenterName Contoso -ProjectName DevProject -DevBoxName MyDevBox -CustomizationGroupName Provisioning -CustomizationTaskId "91835dc0-ef5a-4f58-9e3a-099aea8481f4" .Example -$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "myEnvironment-Delete"} -Get-AzDevCenterUserEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $environmentInput +$customizationTaskLogInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" ="DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "me"; "CustomizationTaskId" = "91835dc0-ef5a-4f58-9e3a-099aea8481f4" } +Get-AzDevCenterUserDevBoxCustomizationTaskLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationTaskInput .Example -$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "myEnvironment-Delete"} -Get-AzDevCenterUserEnvironmentAction -DevCenterName Contoso -InputObject $environmentInput +$customizationTaskLogInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" = "DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "CustomizationTaskId" = "91835dc0-ef5a-4f58-9e3a-099aea8481f4" } +Get-AzDevCenterUserDevBoxCustomizationTaskLog -DevCenterName Contoso -InputObject $customizationTaskInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction +System.String .Notes COMPLEX PARAMETER PROPERTIES @@ -2501,6 +2610,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -2509,29 +2619,29 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentaction +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationtasklog #> -function Get-AzDevCenterUserEnvironmentAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Get-AzDevCenterUserDevBoxCustomizationTaskLog { +[OutputType([System.String])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -2539,28 +2649,36 @@ param( # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Environment name. - ${EnvironmentName}, + # A customization group name. + ${CustomizationGroupName}, - [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the project. + # A customization task ID. + ${CustomizationTaskId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of a Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. ${ProjectName}, - [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='GetByDevCenter')] - [Parameter(ParameterSetName='ListByDevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -2576,14 +2694,6 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Alias('ActionName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # Uniquely identifies the action. - ${Name}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2659,14 +2769,12 @@ begin { } $mapping = @{ - List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentAction'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentAction'; - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentAction'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentAction'; - ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentAction'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentAction'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskLog'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskLog'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskLog'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxCustomizationTaskLog'; } - if (('List', 'Get', 'GetByDevCenter', 'ListByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Get', 'GetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -2721,32 +2829,40 @@ end { <# .Synopsis -Get an environment definition from a catalog. +Gets the log for an imaging build task. .Description -Get an environment definition from a catalog. -.Example - -.Example -Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -ProjectName DevProject -.Example -Get-AzDevCenterUserEnvironmentDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CatalogName CentralCatalog -.Example -Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -ProjectName DevProject -CatalogName CentralCatalog +Gets the log for an imaging build task. .Example -Get-AzDevCenterUserEnvironmentDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CatalogName CentralCatalog -DefinitionName Sandbox +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -ImageBuildLogId "12345678-aaaa-bbbb-cccc-1234567890ab" .Example -Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -ProjectName DevProject -CatalogName CentralCatalog -DefinitionName Sandbox +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -ImageBuildLogId "12345678-aaaa-bbbb-cccc-1234567890ab" .Example -$envInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" = "DevProject"; "DefinitionName" = "Sandbox" } -Get-AzDevCenterUserEnvironmentDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput +$logInput = @{ + ProjectName = "DevProject" + ImageBuildLogId = "12345678-aaaa-bbbb-cccc-1234567890ab" +} +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $logInput .Example -$envInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" = "DevProject"; "DefinitionName" = "Sandbox" } -Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -InputObject $envInput +$logInput = @{ + ProjectName = "DevProject" + ImageBuildLogId = "12345678-aaaa-bbbb-cccc-1234567890ab" +} +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $logInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition +System.String .Notes COMPLEX PARAMETER PROPERTIES @@ -2754,6 +2870,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -2762,57 +2879,49 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentdefinition +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboximagingtasklog #> -function Get-AzDevCenterUserEnvironmentDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition])] -[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] +function Get-AzDevCenterUserDevBoxImagingTaskLog { +[OutputType([System.String])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='List1', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] - [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='List1', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] - [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the project. - ${ProjectName}, + # An imaging build log id. + ${ImageBuildLogId}, - [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the catalog. - ${CatalogName}, + # The DevCenter Project upon which to execute operations. + ${ProjectName}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] @@ -2822,13 +2931,6 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # Name of the environment definition. - ${DefinitionName}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2904,14 +3006,10 @@ begin { } $mapping = @{ - List1 = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; - List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; - ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; - List1ByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxImagingTaskLog'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxImagingTaskLog'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxImagingTaskLog'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxImagingTaskLog'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2965,25 +3063,61 @@ end { <# .Synopsis -Gets the logs for an operation on an environment. +Gets an operation on a Dev Box. .Description -Gets the logs for an operation on an environment. +Gets an operation on a Dev Box. .Example -Get-AzDevCenterUserEnvironmentLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" +Get-AzDevCenterUserDevBoxOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject .Example -Get-AzDevCenterUserEnvironmentLog -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" +Get-AzDevCenterUserDevBoxOperation -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject +.Example +Get-AzDevCenterUserDevBoxOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" +.Example +Get-AzDevCenterUserDevBoxOperation -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} +Get-AzDevCenterUserDevBoxOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} +Get-AzDevCenterUserDevBoxOperation -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -System.String +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentlog +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxoperation #> -function Get-AzDevCenterUserEnvironmentLog { -[OutputType([System.String])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +function Get-AzDevCenterUserDevBoxOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] @@ -2991,31 +3125,35 @@ param( ${Endpoint}, [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Alias('DevCenter')] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # The name of the environment. - ${EnvironmentName}, - - [Parameter(Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The id of the operation on an environment. - ${OperationId}, + # Display name for the Dev Box. + ${DevBoxName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute operations. + # Name of the project. ${ProjectName}, - [Parameter()] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='GetByDevCenter')] + [Parameter(ParameterSetName='ListByDevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -3023,6 +3161,21 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Unique identifier for the Dev Box operation. + ${OperationId}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3098,10 +3251,14 @@ begin { } $mapping = @{ - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentLog'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentLog'; + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxOperation'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxOperation'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxOperation'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxOperation'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxOperation'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxOperation'; } - if (('Get', 'GetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('List', 'Get', 'GetByDevCenter', 'ListByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -3156,28 +3313,24 @@ end { <# .Synopsis -Gets an environment action result. +Gets RDP Connection info. .Description -Gets an environment action result. -.Example -Get-AzDevCenterUserEnvironmentOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -.Example -Get-AzDevCenterUserEnvironmentOperation -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject +Gets RDP Connection info. .Example -Get-AzDevCenterUserEnvironmentOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" +Get-AzDevCenterUserDevBoxRemoteConnection -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject .Example -Get-AzDevCenterUserEnvironmentOperation -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" +Get-AzDevCenterUserDevBoxRemoteConnection -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject .Example -$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} -Get-AzDevCenterUserEnvironmentOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $environmentInput +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } +Get-AzDevCenterUserDevBoxRemoteConnection -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput .Example -$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} -Get-AzDevCenterUserEnvironmentOperation -DevCenterName Contoso -InputObject $environmentInput +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } +Get-AzDevCenterUserDevBoxRemoteConnection -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -3185,6 +3338,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -3193,29 +3347,29 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentoperation +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxremoteconnection #> -function Get-AzDevCenterUserEnvironmentOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Get-AzDevCenterUserDevBoxRemoteConnection { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -3223,28 +3377,22 @@ param( # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Environment name. - ${EnvironmentName}, + # The name of a Dev Box. + ${DevBoxName}, - [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the project. + # The DevCenter Project upon which to execute operations. ${ProjectName}, - [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='Get')] [Parameter(ParameterSetName='GetByDevCenter')] - [Parameter(ParameterSetName='ListByDevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -3260,13 +3408,6 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # Unique identifier for the environment operation. - ${OperationId}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3342,14 +3483,12 @@ begin { } $mapping = @{ - List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOperation'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOperation'; - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOperation'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOperation'; - ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOperation'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOperation'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxRemoteConnection'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxRemoteConnection'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxRemoteConnection'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxRemoteConnection'; } - if (('List', 'Get', 'GetByDevCenter', 'ListByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Get', 'GetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -3404,24 +3543,50 @@ end { <# .Synopsis -Gets Outputs from the environment. +Gets a snapshot by snapshot id. .Description -Gets Outputs from the environment. -.Example -Get-AzDevCenterUserEnvironmentOutput -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -.Example -Get-AzDevCenterUserEnvironmentOutput -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject -.Example -$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject";} -Get-AzDevCenterUserEnvironmentOutput -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $environmentInput -.Example -$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject";} -Get-AzDevCenterUserEnvironmentOutput -DevCenterName Contoso -InputObject $environmentInput +Gets a snapshot by snapshot id. +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -SnapshotId "snapshot-1234" +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -SnapshotId "snapshot-1234" +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + SnapshotId = "snapshot-1234" +} +Get-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $snapshotInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot .Notes COMPLEX PARAMETER PROPERTIES @@ -3429,6 +3594,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -3437,49 +3603,59 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentoutput +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxsnapshot #> -function Get-AzDevCenterUserEnvironmentOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +function Get-AzDevCenterUserDevBoxSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, + [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of the environment. - ${EnvironmentName}, + # Display name for the Dev Box. + ${DevBoxName}, + [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute operations. + # Name of the project. ${ProjectName}, + [Parameter(ParameterSetName='List')] [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='ListByDevCenter')] [Parameter(ParameterSetName='GetByDevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] @@ -3496,6 +3672,14 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The id of the snapshot. + # Should be treated as opaque string. + ${SnapshotId}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3571,12 +3755,14 @@ begin { } $mapping = @{ - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOutput'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOutput'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOutput'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOutput'; - } - if (('Get', 'GetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxSnapshot'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxSnapshot'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxSnapshot'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxSnapshot'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxSnapshot'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevBoxSnapshot'; + } + if (('List', 'Get', 'ListByDevCenter', 'GetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -3631,56 +3817,33 @@ end { <# .Synopsis -Get an environment type configured for a project. +Gets a list of Dev Box creations that are pending approval. .Description -Get an environment type configured for a project. +Gets a list of Dev Box creations that are pending approval. .Example -Get-AzDevCenterUserEnvironmentType -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +Get-AzDevCenterUserDevCenterApproval ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" .Example -Get-AzDevCenterUserEnvironmentType -DevCenterName Contoso -ProjectName DevProject +Get-AzDevCenterUserDevCenterApproval ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType -.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 - [ActionName ]: The name of the action. - [CatalogName ]: Name of the catalog. - [CustomizationGroupName ]: Name of the customization group. - [CustomizationTaskId ]: A customization task ID. - [DefinitionName ]: Name of the environment definition. - [DevBoxName ]: Display name for the Dev Box. - [EnvironmentName ]: Environment name. - [EnvironmentTypeName ]: Name of the environment type. - [Id ]: Resource identity path - [OperationId ]: Unique identifier for the Dev Box operation. - [PoolName ]: Pool name. - [ProjectName ]: Name of the project. - [ScheduleName ]: Display name for the Schedule. - [TaskName ]: Full name of the task: {catalogName}/{taskName}. - [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmenttype +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevcenterapproval #> -function Get-AzDevCenterUserEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType])] +function Get-AzDevCenterUserDevCenterApproval { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] - [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -3688,30 +3851,30 @@ param( # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Alias('EnvironmentTypeName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # Name of the environment type. - ${Name}, + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.String[]] + # Select the specified fields to be included in the response. + ${Select}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -3788,12 +3951,8 @@ begin { } $mapping = @{ - List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentType'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentType'; - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentType'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentType'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentType'; - ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentType'; + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevCenterApproval'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserDevCenterApproval'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -3847,28 +4006,32 @@ end { <# .Synopsis -Gets a pool. +Gets an environment. .Description -Gets a pool. +Gets an environment. .Example -Get-AzDevCenterUserPool -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject + .Example -Get-AzDevCenterUserPool -DevCenterName Contoso -ProjectName DevProject +Get-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject .Example -Get-AzDevCenterUserPool -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -PoolName DevPool +Get-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" .Example -Get-AzDevCenterUserPool -DevCenterName Contoso -ProjectName DevProject -PoolName DevPool +Get-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" .Example -$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool" } -Get-AzDevCenterUserPool -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +Get-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" -Name myEnv .Example -$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool" } -Get-AzDevCenterUserPool -DevCenterName Contoso -InputObject $devBoxInput +Get-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" -Name myEnv +.Example +$envInput = @{"UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } +Get-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput +.Example +$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } +Get-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .Notes COMPLEX PARAMETER PROPERTIES @@ -3876,6 +4039,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -3884,20 +4048,23 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserpool +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironment #> -function Get-AzDevCenterUserPool { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool])] +function Get-AzDevCenterUserEnvironment { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -3905,8 +4072,9 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -3915,14 +4083,26 @@ param( ${DevCenterName}, [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, + [Parameter(ParameterSetName='List1', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] @@ -3933,10 +4113,11 @@ param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Alias('EnvironmentName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Pool name. - ${PoolName}, + # Environment name. + ${Name}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -4013,12 +4194,14 @@ begin { } $mapping = @{ - List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserPool'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserPool'; - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserPool'; - ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserPool'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserPool'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserPool'; + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; + List1 = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; + List1ByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironment'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -4072,28 +4255,28 @@ end { <# .Synopsis -Gets a project. +Retrieve a specific environment action. .Description -Gets a project. +Retrieve a specific environment action. .Example -Get-AzDevCenterUserProject -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +Get-AzDevCenterUserEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject .Example -Get-AzDevCenterUserProject -DevCenterName Contoso -ProjectName DevProject +Get-AzDevCenterUserEnvironmentAction -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject .Example -Get-AzDevCenterUserProject -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +Get-AzDevCenterUserEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -Name "myEnvironment-Delete" .Example -Get-AzDevCenterUserProject -DevCenterName Contoso -ProjectName DevProject +Get-AzDevCenterUserEnvironmentAction -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject -Name "myEnvironment-Delete" .Example -$devBoxInput = @{"ProjectName" = "DevProject";} -Get-AzDevCenterUserProject -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "myEnvironment-Delete"} +Get-AzDevCenterUserEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $environmentInput .Example -$devBoxInput = @{"ProjectName" = "DevProject";} -Get-AzDevCenterUserProject -DevCenterName Contoso -InputObject $devBoxInput +$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "myEnvironment-Delete"} +Get-AzDevCenterUserEnvironmentAction -DevCenterName Contoso -InputObject $environmentInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction .Notes COMPLEX PARAMETER PROPERTIES @@ -4101,6 +4284,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -4109,17 +4293,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserproject +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentaction #> -function Get-AzDevCenterUserProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject])] +function Get-AzDevCenterUserEnvironmentAction { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List', Mandatory)] @@ -4131,29 +4317,59 @@ param( ${Endpoint}, [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] - [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, + [System.String] + # Environment name. + ${EnvironmentName}, + [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='GetByDevCenter')] + [Parameter(ParameterSetName='ListByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Alias('ActionName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Uniquely identifies the action. + ${Name}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4229,12 +4445,15 @@ begin { } $mapping = @{ - List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProject'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProject'; - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProject'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProject'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProject'; - ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProject'; + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentAction'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentAction'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentAction'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentAction'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentAction'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentAction'; + } + if (('List', 'Get', 'GetByDevCenter', 'ListByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -4288,32 +4507,32 @@ end { <# .Synopsis -Gets a schedule. +Get an environment definition from a catalog. .Description -Gets a schedule. +Get an environment definition from a catalog. .Example -Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -PoolName DevPool -ScheduleName default + .Example -Get-AzDevCenterUserSchedule -DevCenterName Contoso -ProjectName DevProject -PoolName DevPool -ScheduleName default +Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -ProjectName DevProject .Example -$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool"; "ScheduleName" = "default" } -Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +Get-AzDevCenterUserEnvironmentDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CatalogName CentralCatalog .Example -$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool"; "ScheduleName" = "default" } -Get-AzDevCenterUserSchedule -DevCenterName Contoso -InputObject $devBoxInput +Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -ProjectName DevProject -CatalogName CentralCatalog .Example -Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +Get-AzDevCenterUserEnvironmentDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CatalogName CentralCatalog -DefinitionName Sandbox .Example -Get-AzDevCenterUserSchedule -DevCenterName Contoso -ProjectName DevProject +Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -ProjectName DevProject -CatalogName CentralCatalog -DefinitionName Sandbox .Example -Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -PoolName DevPool +$envInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" = "DevProject"; "DefinitionName" = "Sandbox" } +Get-AzDevCenterUserEnvironmentDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput .Example -Get-AzDevCenterUserSchedule -DevCenterName Contoso -ProjectName DevProject -PoolName DevPool +$envInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" = "DevProject"; "DefinitionName" = "Sandbox" } +Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -InputObject $envInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -4321,6 +4540,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -4329,17 +4549,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserschedule +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentdefinition #> -function Get-AzDevCenterUserSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule])] +function Get-AzDevCenterUserEnvironmentDefinition { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='List1', Mandatory)] @@ -4351,10 +4573,10 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] @@ -4364,9 +4586,9 @@ param( [Parameter(ParameterSetName='List1', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] - [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. @@ -4374,12 +4596,12 @@ param( [Parameter(ParameterSetName='List', Mandatory)] [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Pool name. - ${PoolName}, + # Name of the catalog. + ${CatalogName}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] @@ -4393,8 +4615,8 @@ param( [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Display name for the Schedule. - ${ScheduleName}, + # Name of the environment definition. + ${DefinitionName}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -4471,14 +4693,14 @@ begin { } $mapping = @{ - List1 = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; - List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; - GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; - Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; - ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; - List1ByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; - GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; - GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; + List1 = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; + List1ByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentDefinition'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -4532,40 +4754,32 @@ end { <# .Synopsis -Delays the occurrence of an action. +Gets the logs for an operation on an environment. .Description -Delays the occurrence of an action. -.Example -Invoke-AzDevCenterUserDelayDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -UserId "me" -ProjectName DevProject -DelayTime "01:30" -.Example -Invoke-AzDevCenterUserDelayDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -DelayTime "02:00" +Gets the logs for an operation on an environment. .Example -Invoke-AzDevCenterUserDelayDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -Name "schedule-default" -DelayTime "00:30" +Get-AzDevCenterUserEnvironmentLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" .Example -Invoke-AzDevCenterUserDelayDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -UserId "me" -ProjectName DevProject -Name "schedule-default" -DelayTime "05:15" +Get-AzDevCenterUserEnvironmentLog -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult +System.String .Link -https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruserdelaydevboxaction +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentlog #> -function Invoke-AzDevCenterUserDelayDevBoxAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction], [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult])] -[CmdletBinding(DefaultParameterSetName='Delay1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzDevCenterUserEnvironmentLog { +[OutputType([System.String])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='Delay1', Mandatory)] - [Parameter(ParameterSetName='Delay', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='DelayByDevCenter', Mandatory)] - [Parameter(ParameterSetName='Delay1ByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] @@ -4575,13 +4789,19 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Display name for the Dev Box. - ${DevBoxName}, + # The name of the environment. + ${EnvironmentName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the project. + # The id of the operation on an environment. + ${OperationId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. ${ProjectName}, [Parameter()] @@ -4592,21 +4812,6 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='Delay', Mandatory)] - [Parameter(ParameterSetName='DelayByDevCenter', Mandatory)] - [Alias('ActionName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # The name of the action. - ${Name}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] - [System.TimeSpan] - # The delayed timespan from the scheduled action time. - # Format HH:MM. - ${DelayTime}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4682,12 +4887,10 @@ begin { } $mapping = @{ - Delay1 = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserDelayDevBoxAction'; - Delay = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserDelayDevBoxAction'; - DelayByDevCenter = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserDelayDevBoxAction'; - Delay1ByDevCenter = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserDelayDevBoxAction'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentLog'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentLog'; } - if (('Delay1', 'Delay', 'DelayByDevCenter', 'Delay1ByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Get', 'GetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -4742,58 +4945,98 @@ end { <# .Synopsis -Delays the occurrence of an action. +Gets an environment action result. .Description -Delays the occurrence of an action. +Gets an environment action result. .Example -Invoke-AzDevCenterUserDelayEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -Name "myEnvironment-Delete" -DelayTime "00:30" +Get-AzDevCenterUserEnvironmentOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject .Example -Invoke-AzDevCenterUserDelayEnvironmentAction -DevCenterName Contoso -EnvironmentName myEnvironment -UserId "me" -ProjectName DevProject -Name "myEnvironment-Delete" -DelayTime "05:15" +Get-AzDevCenterUserEnvironmentOperation -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject +.Example +Get-AzDevCenterUserEnvironmentOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" +.Example +Get-AzDevCenterUserEnvironmentOperation -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" +.Example +$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} +Get-AzDevCenterUserEnvironmentOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $environmentInput +.Example +$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} +Get-AzDevCenterUserEnvironmentOperation -DevCenterName Contoso -InputObject $environmentInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruserdelayenvironmentaction +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentoperation #> -function Invoke-AzDevCenterUserDelayEnvironmentAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction])] -[CmdletBinding(DefaultParameterSetName='Delay', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzDevCenterUserEnvironmentOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( - [Parameter(ParameterSetName='Delay', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='DelayByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Environment name. ${EnvironmentName}, - [Parameter(Mandatory)] - [Alias('ActionName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # Uniquely identifies the action. - ${Name}, - - [Parameter(Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, - [Parameter()] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='GetByDevCenter')] + [Parameter(ParameterSetName='ListByDevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -4801,22 +5044,3689 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] - [System.TimeSpan] - # The delayed timespan from the scheduled action time. - # Format HH:MM. - ${DelayTime}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Azure')] - [System.Management.Automation.PSObject] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Unique identifier for the environment operation. + ${OperationId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOperation'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOperation'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOperation'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOperation'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOperation'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOperation'; + } + if (('List', 'Get', 'GetByDevCenter', 'ListByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Outputs from the environment. +.Description +Gets Outputs from the environment. +.Example +Get-AzDevCenterUserEnvironmentOutput -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject +.Example +Get-AzDevCenterUserEnvironmentOutput -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject +.Example +$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject";} +Get-AzDevCenterUserEnvironmentOutput -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $environmentInput +.Example +$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject";} +Get-AzDevCenterUserEnvironmentOutput -DevCenterName Contoso -InputObject $environmentInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentoutput +#> +function Get-AzDevCenterUserEnvironmentOutput { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the environment. + ${EnvironmentName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='GetByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOutput'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOutput'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOutput'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentOutput'; + } + if (('Get', 'GetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 +Get an environment type configured for a project. +.Description +Get an environment type configured for a project. +.Example +Get-AzDevCenterUserEnvironmentType -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +.Example +Get-AzDevCenterUserEnvironmentType -DevCenterName Contoso -ProjectName DevProject + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmenttype +#> +function Get-AzDevCenterUserEnvironmentType { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Alias('EnvironmentTypeName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the environment type. + ${Name}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentType'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentType'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentType'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentType'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentType'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentType'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets the signed-in user's permitted abilities in an environment type. +.Description +Gets the signed-in user's permitted abilities in an environment type. +.Example +Get-AzDevCenterUserEnvironmentTypeAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -EnvironmentTypeName "DevTest" +.Example +Get-AzDevCenterUserEnvironmentTypeAbility ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -EnvironmentTypeName "DevTest" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +$envTypeInput = @{ + ProjectName = "DevProject" + EnvironmentTypeName = "DevTest" +} +Get-AzDevCenterUserEnvironmentTypeAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $envTypeInput +.Example +$envTypeInput = @{ + ProjectName = "DevProject" + EnvironmentTypeName = "DevTest" +} +Get-AzDevCenterUserEnvironmentTypeAbility ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $envTypeInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmenttypeability +#> +function Get-AzDevCenterUserEnvironmentTypeAbility { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the environment type + ${EnvironmentTypeName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='GetByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentTypeAbility'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentTypeAbility'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentTypeAbility'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserEnvironmentTypeAbility'; + } + if (('Get', 'GetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 a pool. +.Description +Gets a pool. +.Example +Get-AzDevCenterUserPool -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +.Example +Get-AzDevCenterUserPool -DevCenterName Contoso -ProjectName DevProject +.Example +Get-AzDevCenterUserPool -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -PoolName DevPool +.Example +Get-AzDevCenterUserPool -DevCenterName Contoso -ProjectName DevProject -PoolName DevPool +.Example +$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool" } +Get-AzDevCenterUserPool -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +.Example +$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool" } +Get-AzDevCenterUserPool -DevCenterName Contoso -InputObject $devBoxInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserpool +#> +function Get-AzDevCenterUserPool { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Pool name. + ${PoolName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserPool'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserPool'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserPool'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserPool'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserPool'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserPool'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 a project. +.Description +Gets a project. +.Example +Get-AzDevCenterUserProject -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +.Example +Get-AzDevCenterUserProject -DevCenterName Contoso -ProjectName DevProject +.Example +Get-AzDevCenterUserProject -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +.Example +Get-AzDevCenterUserProject -DevCenterName Contoso -ProjectName DevProject +.Example +$devBoxInput = @{"ProjectName" = "DevProject";} +Get-AzDevCenterUserProject -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +.Example +$devBoxInput = @{"ProjectName" = "DevProject";} +Get-AzDevCenterUserProject -DevCenterName Contoso -InputObject $devBoxInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserproject +#> +function Get-AzDevCenterUserProject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProject'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProject'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProject'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProject'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProject'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Gets the signed-in user's permitted abilities in a project. +.Description +Gets the signed-in user's permitted abilities in a project. +.Example +Get-AzDevCenterUserProjectAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" +.Example +Get-AzDevCenterUserProjectAbility ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +$projectInput = @{ + ProjectName = "DevProject" +} +Get-AzDevCenterUserProjectAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $projectInput +.Example +$projectInput = @{ + ProjectName = "DevProject" +} +Get-AzDevCenterUserProjectAbility ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $projectInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserprojectability +#> +function Get-AzDevCenterUserProjectAbility { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='GetByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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.DevCenterdata.custom\Get-AzDevCenterUserProjectAbility'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProjectAbility'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProjectAbility'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserProjectAbility'; + } + if (('Get', 'GetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 a schedule. +.Description +Gets a schedule. +.Example +Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -PoolName DevPool -ScheduleName default +.Example +Get-AzDevCenterUserSchedule -DevCenterName Contoso -ProjectName DevProject -PoolName DevPool -ScheduleName default +.Example +$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool"; "ScheduleName" = "default" } +Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +.Example +$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool"; "ScheduleName" = "default" } +Get-AzDevCenterUserSchedule -DevCenterName Contoso -InputObject $devBoxInput +.Example +Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +.Example +Get-AzDevCenterUserSchedule -DevCenterName Contoso -ProjectName DevProject +.Example +Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -PoolName DevPool +.Example +Get-AzDevCenterUserSchedule -DevCenterName Contoso -ProjectName DevProject -PoolName DevPool + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserschedule +#> +function Get-AzDevCenterUserSchedule { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='List1', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='List1', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='List1ByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='ListByDevCenter', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Pool name. + ${PoolName}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Schedule. + ${ScheduleName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 = @{ + List1 = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; + List = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; + GetViaIdentity = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; + Get = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; + ListByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; + List1ByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; + GetViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; + GetByDevCenter = 'Az.DevCenterdata.custom\Get-AzDevCenterUserSchedule'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 +Aligns all Dev Boxes in the pool with the current configuration. +.Description +Aligns all Dev Boxes in the pool with the current configuration. +.Example +Invoke-AzDevCenterUserAlignPool ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -PoolName "DevPool01" ` + -Target "NetworkProperties" +.Example +Invoke-AzDevCenterUserAlignPool ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -PoolName "DevPool01" ` + -Target "NetworkProperties" +.Example +$poolInput = @{ + ProjectName = "DevProject" + PoolName = "DevPool01" +} +Invoke-AzDevCenterUserAlignPool ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $poolInput ` + -Target "NetworkProperties" +.Example +$body = @{ + Target = @("NetworkProperties") +} +Invoke-AzDevCenterUserAlignPool ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -PoolName "DevPool01" ` + -Body $body + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.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. + +BODY : Indicates which pool properties to align on. + Target : The targets to align on. + +INPUTOBJECT : Identity Parameter + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruseralignpool +#> +function Invoke-AzDevCenterUserAlignPool { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='AlignExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Parameter(ParameterSetName='AlignViaIdentityExpanded', Mandatory)] + [Parameter(ParameterSetName='AlignViaIdentity', Mandatory)] + [Parameter(ParameterSetName='Align', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='AlignViaIdentityExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='AlignExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='AlignViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='AlignByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Parameter(ParameterSetName='Align', Mandatory)] + [Parameter(ParameterSetName='AlignExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='AlignByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Pool name. + ${PoolName}, + + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Parameter(ParameterSetName='Align', Mandatory)] + [Parameter(ParameterSetName='AlignExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='AlignByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='AlignViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentityExpandedByDevCenter', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Parameter(ParameterSetName='AlignViaIdentityExpanded', Mandatory)] + [Parameter(ParameterSetName='AlignViaIdentityExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='AlignExpandedByDevCenter', Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[]] + # The targets to align on. + ${Target}, + + [Parameter(ParameterSetName='AlignViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='Align', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody] + # Indicates which pool properties to align on. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 = @{ + AlignExpanded = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + AlignViaIdentityExpanded = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + AlignViaIdentity = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + Align = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + AlignViaIdentityExpandedByDevCenter = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + AlignExpandedByDevCenter = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + AlignViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + AlignByDevCenter = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserAlignPool'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 +Delays the occurrence of an action. +.Description +Delays the occurrence of an action. +.Example +Invoke-AzDevCenterUserDelayDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -UserId "me" -ProjectName DevProject -DelayTime "01:30" +.Example +Invoke-AzDevCenterUserDelayDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -DelayTime "02:00" +.Example +Invoke-AzDevCenterUserDelayDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -Name "schedule-default" -DelayTime "00:30" +.Example +Invoke-AzDevCenterUserDelayDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -UserId "me" -ProjectName DevProject -Name "schedule-default" -DelayTime "05:15" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruserdelaydevboxaction +#> +function Invoke-AzDevCenterUserDelayDevBoxAction { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction], [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult])] +[CmdletBinding(DefaultParameterSetName='Delay1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delay1', Mandatory)] + [Parameter(ParameterSetName='Delay', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='DelayByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Delay1ByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='Delay', Mandatory)] + [Parameter(ParameterSetName='DelayByDevCenter', Mandatory)] + [Alias('ActionName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the action. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.TimeSpan] + # The delayed timespan from the scheduled action time. + # Format HH:MM. + ${DelayTime}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 = @{ + Delay1 = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserDelayDevBoxAction'; + Delay = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserDelayDevBoxAction'; + DelayByDevCenter = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserDelayDevBoxAction'; + Delay1ByDevCenter = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserDelayDevBoxAction'; + } + if (('Delay1', 'Delay', 'DelayByDevCenter', 'Delay1ByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 +Delays the occurrence of an action. +.Description +Delays the occurrence of an action. +.Example +Invoke-AzDevCenterUserDelayEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -Name "myEnvironment-Delete" -DelayTime "00:30" +.Example +Invoke-AzDevCenterUserDelayEnvironmentAction -DevCenterName Contoso -EnvironmentName myEnvironment -UserId "me" -ProjectName DevProject -Name "myEnvironment-Delete" -DelayTime "05:15" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruserdelayenvironmentaction +#> +function Invoke-AzDevCenterUserDelayEnvironmentAction { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction])] +[CmdletBinding(DefaultParameterSetName='Delay', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delay', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='DelayByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Environment name. + ${EnvironmentName}, + + [Parameter(Mandatory)] + [Alias('ActionName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Uniquely identifies the action. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.TimeSpan] + # The delayed timespan from the scheduled action time. + # Format HH:MM. + ${DelayTime}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 = @{ + Delay = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserDelayEnvironmentAction'; + DelayByDevCenter = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserDelayEnvironmentAction'; + } + if (('Delay', 'DelayByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates or replaces a Dev Box. +.Description +Creates or replaces a Dev Box. +.Example +New-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox -PoolName DevPool +.Example +New-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox -PoolName DevPool +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } +New-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput -PoolName DevPool +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +New-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput -PoolName DevPool + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevbox +#> +function New-AzDevCenterUserDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Alias('DevBoxName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of a Dev Box. + ${Name}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute the operation. + ${ProjectName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateExpandedByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.String] + # The name of the Dev Box pool this machine belongs to. + ${PoolName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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.DevCenterdata.custom\New-AzDevCenterUserDevBox'; + CreateViaIdentityExpanded = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBox'; + CreateExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBox'; + CreateViaIdentityExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBox'; + } + if (('CreateExpanded', 'CreateExpandedByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates a Dev Box addon. +.Description +Creates a Dev Box addon. +.Example +New-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +New-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "me" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +New-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "me" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +New-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevboxaddon +#> +function New-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the Dev Box addon. + ${AddOnName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of a Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateExpandedByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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.DevCenterdata.custom\New-AzDevCenterUserDevBoxAddOn'; + CreateViaIdentityExpanded = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxAddOn'; + CreateExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxAddOn'; + CreateViaIdentityExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxAddOn'; + } + if (('CreateExpanded', 'CreateExpandedByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 +Applies customizations to the Dev Box. +.Description +Applies customizations to the Dev Box. +.Example +$task = @{ + Name = "catalogName/choco" + DisplayName = "choco" + Parameter = @{ + PackageName = "vscode" + PackageVersion = "1.0.0" + } + RunAs = "System" + TimeoutInSecond = 120 +} +$tasks = @($task) +New-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -DevBoxName myDevBox -CustomizationGroupName Provisioning -Task $tasks +.Example +New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -ProjectName DevProject -UserId "me" -DevBoxName myDevBox -CustomizationGroupName Provisioning -Task $tasks +.Example +$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } +New-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationGroupInput -Task $tasks +.Example +$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -InputObject $customizationGroupInput -Task $tasks + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + +TASK : Tasks to apply. Note by default tasks are excluded from the response when listing customization groups. To include them, use the `include=tasks` queryparameter. + Name : Name of the task. + [DisplayName ]: Display name to help differentiate multiple instances of the same task. + [Parameter ]: Parameters for the task. + [(Any) ]: This indicates any property can be added to this object. + [RunAs ]: What account to run the task as. + [TimeoutInSecond ]: Timeout, in seconds. Overrides any timeout provided on the task definition. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevboxcustomizationgroup +#> +function New-AzDevCenterUserDevBoxCustomizationGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # A customization group name. + ${CustomizationGroupName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of a Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateExpandedByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[]] + # Tasks to apply. + # Note by default tasks are excluded from the response when listing customization groups. + # To include them, use the `include=tasks` queryparameter. + # To construct, see NOTES section for TASK properties and create a hash table. + ${Task}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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.DevCenterdata.custom\New-AzDevCenterUserDevBoxCustomizationGroup'; + CreateViaIdentityExpanded = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxCustomizationGroup'; + CreateExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxCustomizationGroup'; + CreateViaIdentityExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxCustomizationGroup'; + } + if (('CreateExpanded', 'CreateExpandedByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 +Captures a manual snapshot of the Dev Box.\nUpon completion, a snapshotId will be generated.\nTo retrieve all snapshots and their corresponding IDs, use the list snapshots endpoint. +.Description +Captures a manual snapshot of the Dev Box.\nUpon completion, a snapshotId will be generated.\nTo retrieve all snapshots and their corresponding IDs, use the list snapshots endpoint. +.Example +New-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" +.Example +New-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -UserId "me" ` + -DevBoxName "myDevBox" +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "me" + ProjectName = "DevProject" +} +New-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $snapshotInput +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" +} +New-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $snapshotInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevboxsnapshot +#> +function New-AzDevCenterUserDevBoxSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Capture', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Capture', Mandatory)] + [Parameter(ParameterSetName='CaptureViaIdentity', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='CaptureViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='CaptureByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='Capture', Mandatory)] + [Parameter(ParameterSetName='CaptureByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Capture', Mandatory)] + [Parameter(ParameterSetName='CaptureByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Capture')] + [Parameter(ParameterSetName='CaptureByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='CaptureViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CaptureViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 = @{ + Capture = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxSnapshot'; + CaptureViaIdentity = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxSnapshot'; + CaptureViaIdentityByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxSnapshot'; + CaptureByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxSnapshot'; + } + if (('Capture', 'CaptureByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Creates or updates an environment. +.Description +Creates or updates an environment. +.Example +$functionAppParameters = @{"name" = "testfuncApp" } +$currentDate = Get-Date +$dateIn8Months = $currentDate.AddMonths(8) + +New-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -Name "envtest" -ProjectName DevProject -CatalogName CentralCatalog -EnvironmentDefinitionName FunctionApp -EnvironmentType DevTest -Parameter $functionAppParameters -ExpirationDate $dateIn8Months +.Example +$currentDate = Get-Date +$dateIn8Months = $currentDate.AddMonths(8) + +New-AzDevCenterUserEnvironment -DevCenterName Contoso -Name "envtest" -ProjectName DevProject -CatalogName CentralCatalog -EnvironmentDefinitionName Sandbox -EnvironmentType DevTest -ExpirationDate $dateIn8Months +.Example +$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "envtest" } +$currentDate = Get-Date +$dateIn8Months = $currentDate.AddMonths(8) + +New-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput -CatalogName CentralCatalog -EnvironmentDefinitionName Sandbox -EnvironmentType DevTest -ExpirationDate $dateIn8Months +.Example +$functionAppParameters = @{"name" = "testfuncApp" } +$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "envtest" } +$currentDate = Get-Date +$dateIn8Months = $currentDate.AddMonths(8) + +New-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput -CatalogName CentralCatalog -EnvironmentDefinitionName FunctionApp -EnvironmentType DevTest -Parameter $functionAppParameters -ExpirationDate $dateIn8Months + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserenvironment +#> +function New-AzDevCenterUserEnvironment { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Alias('EnvironmentName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the environment. + ${Name}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateExpandedByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.String] + # Name of the catalog. + ${CatalogName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.String] + # Name of the environment definition. + ${EnvironmentDefinitionName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.String] + # Environment type. + ${EnvironmentType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.DateTime] + # The time the expiration date will be triggered (UTC), after which the environment and associated resources will be deleted. + ${ExpirationDate}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters]))] + [System.Collections.Hashtable] + # Parameters object for the environment. + ${Parameter}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -4837,6 +8747,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -4883,10 +8799,12 @@ begin { } $mapping = @{ - Delay = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserDelayEnvironmentAction'; - DelayByDevCenter = 'Az.DevCenterdata.custom\Invoke-AzDevCenterUserDelayEnvironmentAction'; + CreateExpanded = 'Az.DevCenterdata.custom\New-AzDevCenterUserEnvironment'; + CreateViaIdentityExpanded = 'Az.DevCenterdata.custom\New-AzDevCenterUserEnvironment'; + CreateExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserEnvironment'; + CreateViaIdentityExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserEnvironment'; } - if (('Delay', 'DelayByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('CreateExpanded', 'CreateExpandedByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -4941,24 +8859,24 @@ end { <# .Synopsis -Creates or replaces a Dev Box. +Deletes a Dev Box. .Description -Creates or replaces a Dev Box. +Deletes a Dev Box. .Example -New-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox -PoolName DevPool +Remove-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox .Example -New-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox -PoolName DevPool +Remove-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox .Example $devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } -New-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput -PoolName DevPool +Remove-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput .Example $devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } -New-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput -PoolName DevPool +Remove-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -4966,6 +8884,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -4974,51 +8893,53 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevbox +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserdevbox #> -function New-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Remove-AzDevCenterUserDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - - [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] - [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory)] + + [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] [Alias('DevBoxName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # The name of a Dev Box. ${Name}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute the operation. + # The DevCenter Project upon which to execute operations. ${ProjectName}, - [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateExpandedByDevCenter')] + [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='DeleteByDevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -5026,27 +8947,14 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [System.String] - # The name of the Dev Box pool this machine belongs to. - ${PoolName}, - - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus] - # Indicates whether the owner of the Dev Box is a local administrator. - ${LocalAdministrator}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -5088,6 +8996,12 @@ param( # Run the command asynchronously ${NoWait}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -5134,12 +9048,12 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBox'; - CreateViaIdentityExpanded = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBox'; - CreateExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBox'; - CreateViaIdentityExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBox'; + Delete = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserDevBox'; + DeleteViaIdentity = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserDevBox'; + DeleteByDevCenter = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserDevBox'; + DeleteViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserDevBox'; } - if (('CreateExpanded', 'CreateExpandedByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Delete', 'DeleteByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -5194,35 +9108,48 @@ end { <# .Synopsis -Applies customizations to the Dev Box. +Deletes a Dev Box addon. .Description -Applies customizations to the Dev Box. -.Example -$task = @{ - Name = "catalogName/choco" - DisplayName = "choco" - Parameter = @{ - PackageName = "vscode" - PackageVersion = "1.0.0" - } - RunAs = "System" - TimeoutInSecond = 120 +Deletes a Dev Box addon. +.Example +Remove-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +Remove-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "me" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" } -$tasks = @($task) -New-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -DevBoxName myDevBox -CustomizationGroupName Provisioning -Task $tasks -.Example -New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -ProjectName DevProject -UserId "me" -DevBoxName myDevBox -CustomizationGroupName Provisioning -Task $tasks -.Example -$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } -New-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationGroupInput -Task $tasks -.Example -$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } -New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -InputObject $customizationGroupInput -Task $tasks +Remove-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "me" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Remove-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -5230,6 +9157,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -5238,91 +9166,74 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - -TASK : Tasks to apply. Note by default tasks are excluded from the response when listing customization groups. To include them, use the `include=tasks` queryparameter. - Name : Name of the task. - [DisplayName ]: Display name to help differentiate multiple instances of the same task. - [Parameter ]: Parameters for the task. - [(Any) ]: This indicates any property can be added to this object. - [RunAs ]: What account to run the task as. - [TimeoutInSecond ]: Timeout, in seconds. Overrides any timeout provided on the task definition. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevboxcustomizationgroup +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserdevboxaddon #> -function New-AzDevCenterUserDevBoxCustomizationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Remove-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] - [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # A customization group name. - ${CustomizationGroupName}, + # The name of the Dev Box addon. + ${AddOnName}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # The name of a Dev Box. ${DevBoxName}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # The DevCenter Project upon which to execute operations. ${ProjectName}, - [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateExpandedByDevCenter')] + [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='DeleteByDevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] # The AAD object id of the user. - # If value is 'me', the identity is taken from the - # authentication context. + # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[]] - # Tasks to apply. - # Note by default tasks are excluded from the response when listing customization groups. - # To include them, use the `include=tasks` queryparameter. - # To construct, see NOTES section for TASK properties and create a hash table. - ${Task}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -5332,6 +9243,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -5352,6 +9269,18 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -5398,12 +9327,12 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxCustomizationGroup'; - CreateViaIdentityExpanded = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxCustomizationGroup'; - CreateExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxCustomizationGroup'; - CreateViaIdentityExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserDevBoxCustomizationGroup'; + Delete = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserDevBoxAddOn'; + DeleteViaIdentity = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserDevBoxAddOn'; + DeleteByDevCenter = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserDevBoxAddOn'; + DeleteViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserDevBoxAddOn'; } - if (('CreateExpanded', 'CreateExpandedByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Delete', 'DeleteByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -5458,38 +9387,24 @@ end { <# .Synopsis -Creates or updates an environment. +Deletes an environment and all its associated resources .Description -Creates or updates an environment. +Deletes an environment and all its associated resources .Example -$functionAppParameters = @{"name" = "testfuncApp" } -$currentDate = Get-Date -$dateIn8Months = $currentDate.AddMonths(8) - -New-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -Name "envtest" -ProjectName DevProject -CatalogName CentralCatalog -EnvironmentDefinitionName FunctionApp -EnvironmentType DevTest -Parameter $functionAppParameters -ExpirationDate $dateIn8Months +Remove-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" -Name myEnv .Example -$currentDate = Get-Date -$dateIn8Months = $currentDate.AddMonths(8) - -New-AzDevCenterUserEnvironment -DevCenterName Contoso -Name "envtest" -ProjectName DevProject -CatalogName CentralCatalog -EnvironmentDefinitionName Sandbox -EnvironmentType DevTest -ExpirationDate $dateIn8Months +Remove-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" -Name myEnv .Example -$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "envtest" } -$currentDate = Get-Date -$dateIn8Months = $currentDate.AddMonths(8) - -New-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput -CatalogName CentralCatalog -EnvironmentDefinitionName Sandbox -EnvironmentType DevTest -ExpirationDate $dateIn8Months +$envInput = @{"UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } +Remove-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput .Example -$functionAppParameters = @{"name" = "testfuncApp" } -$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "envtest" } -$currentDate = Get-Date -$dateIn8Months = $currentDate.AddMonths(8) - -New-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput -CatalogName CentralCatalog -EnvironmentDefinitionName FunctionApp -EnvironmentType DevTest -Parameter $functionAppParameters -ExpirationDate $dateIn8Months +$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } +Remove-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -5497,6 +9412,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -5505,51 +9421,53 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserenvironment +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserenvironment #> -function New-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Remove-AzDevCenterUserEnvironment { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] - [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] [Alias('EnvironmentName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # The name of the environment. ${Name}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Parameter(ParameterSetName='CreateExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # The DevCenter Project upon which to execute operations. ${ProjectName}, - [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateExpandedByDevCenter')] + [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='DeleteByDevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -5557,44 +9475,20 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CreateViaIdentityExpandedByDevCenter', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [System.String] - # Name of the catalog. - ${CatalogName}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [System.String] - # Name of the environment definition. - ${EnvironmentDefinitionName}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [System.String] - # Environment type. - ${EnvironmentType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [System.DateTime] - # The time the expiration date will be triggered (UTC), after which the environment and associated resources will be deleted. - ${ExpirationDate}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters]))] - [System.Collections.Hashtable] - # Parameters object for the environment. - ${Parameter}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.Management.Automation.SwitchParameter] + # The query option to force environment deletion even if the environment definition does not exist. + # This is a best-effort delete, and anything custom that forces resource creation beyond the associated resource group may not be deleted. + ${Force}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -5637,6 +9531,12 @@ param( # Run the command asynchronously ${NoWait}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -5683,12 +9583,12 @@ begin { } $mapping = @{ - CreateExpanded = 'Az.DevCenterdata.custom\New-AzDevCenterUserEnvironment'; - CreateViaIdentityExpanded = 'Az.DevCenterdata.custom\New-AzDevCenterUserEnvironment'; - CreateExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserEnvironment'; - CreateViaIdentityExpandedByDevCenter = 'Az.DevCenterdata.custom\New-AzDevCenterUserEnvironment'; + Delete = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserEnvironment'; + DeleteViaIdentity = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserEnvironment'; + DeleteByDevCenter = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserEnvironment'; + DeleteViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserEnvironment'; } - if (('CreateExpanded', 'CreateExpandedByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Delete', 'DeleteByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -5743,24 +9643,26 @@ end { <# .Synopsis -Deletes a Dev Box. +Attempts automated repair steps to resolve common problems on a Dev Box. +The Dev Box may restart during this operation. .Description -Deletes a Dev Box. +Attempts automated repair steps to resolve common problems on a Dev Box. +The Dev Box may restart during this operation. .Example -Remove-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox +Repair-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -Name myDevBox -ProjectName DevProject .Example -Remove-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox +Repair-AzDevCenterUserDevBox -DevCenterName Contoso -Name myDevBox -ProjectName DevProject .Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } -Remove-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject";} +Repair-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput .Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } -Remove-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject";} +Repair-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -5768,6 +9670,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -5776,51 +9679,53 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserdevbox +https://learn.microsoft.com/powershell/module/az.devcenter/repair-azdevcenteruserdevbox #> -function Remove-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Repair-AzDevCenterUserDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Repair', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Delete', Mandatory)] - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory)] + [Parameter(ParameterSetName='Repair', Mandatory)] + [Parameter(ParameterSetName='RepairViaIdentity', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] - [Parameter(ParameterSetName='DeleteViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='RepairByDevCenter', Mandatory)] + [Parameter(ParameterSetName='RepairViaIdentityByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Repair', Mandatory)] + [Parameter(ParameterSetName='RepairByDevCenter', Mandatory)] [Alias('DevBoxName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of a Dev Box. + # Display name for the Dev Box. ${Name}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Repair', Mandatory)] + [Parameter(ParameterSetName='RepairByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute operations. + # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Delete')] - [Parameter(ParameterSetName='DeleteByDevCenter')] + [Parameter(ParameterSetName='Repair')] + [Parameter(ParameterSetName='RepairByDevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -5828,8 +9733,8 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='DeleteViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RepairViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RepairViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter @@ -5877,12 +9782,6 @@ param( # Run the command asynchronously ${NoWait}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -5929,12 +9828,12 @@ begin { } $mapping = @{ - Delete = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserDevBox'; - DeleteViaIdentity = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserDevBox'; - DeleteByDevCenter = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserDevBox'; - DeleteViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserDevBox'; + Repair = 'Az.DevCenterdata.custom\Repair-AzDevCenterUserDevBox'; + RepairViaIdentity = 'Az.DevCenterdata.custom\Repair-AzDevCenterUserDevBox'; + RepairByDevCenter = 'Az.DevCenterdata.custom\Repair-AzDevCenterUserDevBox'; + RepairViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Repair-AzDevCenterUserDevBox'; } - if (('Delete', 'DeleteByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Repair', 'RepairByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -5989,24 +9888,24 @@ end { <# .Synopsis -Deletes an environment and all its associated resources +Restarts a Dev Box. .Description -Deletes an environment and all its associated resources +Restarts a Dev Box. .Example -Remove-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" -Name myEnv +Restart-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox .Example -Remove-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" -Name myEnv +Restart-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox .Example -$envInput = @{"UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } -Remove-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } +Restart-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput .Example -$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } -Remove-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +Restart-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -6014,6 +9913,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -6022,51 +9922,53 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserenvironment +https://learn.microsoft.com/powershell/module/az.devcenter/restart-azdevcenteruserdevbox #> -function Remove-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Restart-AzDevCenterUserDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Restart', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Delete', Mandatory)] - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory)] + [Parameter(ParameterSetName='Restart', Mandatory)] + [Parameter(ParameterSetName='RestartViaIdentity', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] - [Parameter(ParameterSetName='DeleteViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='RestartByDevCenter', Mandatory)] + [Parameter(ParameterSetName='RestartViaIdentityByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] - [Alias('EnvironmentName')] + [Parameter(ParameterSetName='Restart', Mandatory)] + [Parameter(ParameterSetName='RestartByDevCenter', Mandatory)] + [Alias('DevBoxName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of the environment. + # Display name for the Dev Box. ${Name}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Restart', Mandatory)] + [Parameter(ParameterSetName='RestartByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute operations. + # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Delete')] - [Parameter(ParameterSetName='DeleteByDevCenter')] + [Parameter(ParameterSetName='Restart')] + [Parameter(ParameterSetName='RestartByDevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -6074,8 +9976,8 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='DeleteViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RestartViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RestartViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter @@ -6123,12 +10025,6 @@ param( # Run the command asynchronously ${NoWait}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -6175,12 +10071,12 @@ begin { } $mapping = @{ - Delete = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserEnvironment'; - DeleteViaIdentity = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserEnvironment'; - DeleteByDevCenter = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserEnvironment'; - DeleteViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserEnvironment'; + Restart = 'Az.DevCenterdata.custom\Restart-AzDevCenterUserDevBox'; + RestartViaIdentity = 'Az.DevCenterdata.custom\Restart-AzDevCenterUserDevBox'; + RestartByDevCenter = 'Az.DevCenterdata.custom\Restart-AzDevCenterUserDevBox'; + RestartViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Restart-AzDevCenterUserDevBox'; } - if (('Delete', 'DeleteByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Restart', 'RestartByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -6235,26 +10131,48 @@ end { <# .Synopsis -Attempts automated repair steps to resolve common problems on a Dev Box. -The Dev Box may restart during this operation. +Restores a Dev Box to a specified snapshot. .Description -Attempts automated repair steps to resolve common problems on a Dev Box. -The Dev Box may restart during this operation. -.Example -Repair-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -Name myDevBox -ProjectName DevProject -.Example -Repair-AzDevCenterUserDevBox -DevCenterName Contoso -Name myDevBox -ProjectName DevProject -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject";} -Repair-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject";} -Repair-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput +Restores a Dev Box to a specified snapshot. +.Example +Restore-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -SnapshotId "snapshot-1234" +.Example +Restore-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -SnapshotId "snapshot-1234" +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" +} +Restore-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $snapshotInput ` + -SnapshotId "snapshot-1234" +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "me" + ProjectName = "DevProject" +} +Restore-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $snapshotInput ` + -SnapshotId "snapshot-1234" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -6262,6 +10180,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -6270,51 +10189,52 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/repair-azdevcenteruserdevbox +https://learn.microsoft.com/powershell/module/az.devcenter/restore-azdevcenteruserdevboxsnapshot #> -function Repair-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] -[CmdletBinding(DefaultParameterSetName='Repair', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Restore-AzDevCenterUserDevBoxSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Restore', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Repair', Mandatory)] - [Parameter(ParameterSetName='RepairViaIdentity', Mandatory)] + [Parameter(ParameterSetName='Restore', Mandatory)] + [Parameter(ParameterSetName='RestoreViaIdentity', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='RepairByDevCenter', Mandatory)] - [Parameter(ParameterSetName='RepairViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='RestoreViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='RestoreByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='Repair', Mandatory)] - [Parameter(ParameterSetName='RepairByDevCenter', Mandatory)] - [Alias('DevBoxName')] + [Parameter(ParameterSetName='Restore', Mandatory)] + [Parameter(ParameterSetName='RestoreByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Display name for the Dev Box. - ${Name}, + ${DevBoxName}, - [Parameter(ParameterSetName='Repair', Mandatory)] - [Parameter(ParameterSetName='RepairByDevCenter', Mandatory)] + [Parameter(ParameterSetName='Restore', Mandatory)] + [Parameter(ParameterSetName='RestoreByDevCenter', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Repair')] - [Parameter(ParameterSetName='RepairByDevCenter')] + [Parameter(ParameterSetName='Restore')] + [Parameter(ParameterSetName='RestoreByDevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -6322,14 +10242,20 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='RepairViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='RepairViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RestoreViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RestoreViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.String] + # Required parameter that specifies the snapshot id to use for the restore operation. + ${SnapshotId}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -6417,12 +10343,12 @@ begin { } $mapping = @{ - Repair = 'Az.DevCenterdata.custom\Repair-AzDevCenterUserDevBox'; - RepairViaIdentity = 'Az.DevCenterdata.custom\Repair-AzDevCenterUserDevBox'; - RepairByDevCenter = 'Az.DevCenterdata.custom\Repair-AzDevCenterUserDevBox'; - RepairViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Repair-AzDevCenterUserDevBox'; + Restore = 'Az.DevCenterdata.custom\Restore-AzDevCenterUserDevBoxSnapshot'; + RestoreViaIdentity = 'Az.DevCenterdata.custom\Restore-AzDevCenterUserDevBoxSnapshot'; + RestoreViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Restore-AzDevCenterUserDevBoxSnapshot'; + RestoreByDevCenter = 'Az.DevCenterdata.custom\Restore-AzDevCenterUserDevBoxSnapshot'; } - if (('Repair', 'RepairByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Restore', 'RestoreByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -6477,84 +10403,100 @@ end { <# .Synopsis -Restarts a Dev Box. +Lets a user set their own active hours for their Dev Box, overriding the defaults set at the pool level. .Description -Restarts a Dev Box. -.Example -Restart-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox -.Example -Restart-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } -Restart-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } -Restart-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput +Lets a user set their own active hours for their Dev Box, overriding the defaults set at the pool level. +.Example +Set-AzDevCenterUserDevBoxActiveHour ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -StartTimeHour 9 ` + -EndTimeHour 17 ` + -TimeZone "America/Los_Angeles" +.Example +Set-AzDevCenterUserDevBoxActiveHour ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -StartTimeHour 8 ` + -EndTimeHour 16 ` + -TimeZone "America/New_York" +.Example +$activeHours = @{ + StartTimeHour = 10 + EndTimeHour = 18 + TimeZone = "America/Chicago" +} +Set-AzDevCenterUserDevBoxActiveHour ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -Body $activeHours +.Example +$activeHours = @{ + StartTimeHour = 7 + EndTimeHour = 15 + TimeZone = "America/Los_Angeles" +} +Set-AzDevCenterUserDevBoxActiveHour ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -Body $activeHours .Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox .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 - [ActionName ]: The name of the action. - [CatalogName ]: Name of the catalog. - [CustomizationGroupName ]: Name of the customization group. - [CustomizationTaskId ]: A customization task ID. - [DefinitionName ]: Name of the environment definition. - [DevBoxName ]: Display name for the Dev Box. - [EnvironmentName ]: Environment name. - [EnvironmentTypeName ]: Name of the environment type. - [Id ]: Resource identity path - [OperationId ]: Unique identifier for the Dev Box operation. - [PoolName ]: Pool name. - [ProjectName ]: Name of the project. - [ScheduleName ]: Display name for the Schedule. - [TaskName ]: Full name of the task: {catalogName}/{taskName}. - [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +BODY : Manual user set active hours configuration. + [EndTimeHour ]: The end time of the active hours. + [StartTimeHour ]: The start time of the active hours. + [TimeZone ]: The timezone of the active hours. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/restart-azdevcenteruserdevbox +https://learn.microsoft.com/powershell/module/az.devcenter/set-azdevcenteruserdevboxactivehour #> -function Restart-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] -[CmdletBinding(DefaultParameterSetName='Restart', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Set-AzDevCenterUserDevBoxActiveHour { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox])] +[CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Restart', Mandatory)] - [Parameter(ParameterSetName='RestartViaIdentity', Mandatory)] + [Parameter(ParameterSetName='SetExpanded', Mandatory)] + [Parameter(ParameterSetName='Set', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='RestartByDevCenter', Mandatory)] - [Parameter(ParameterSetName='RestartViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='SetExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='SetByDevCenter', Mandatory)] [Alias('DevCenter')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] [System.String] # The DevCenter upon which to execute operations. ${DevCenterName}, - [Parameter(ParameterSetName='Restart', Mandatory)] - [Parameter(ParameterSetName='RestartByDevCenter', Mandatory)] - [Alias('DevBoxName')] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Display name for the Dev Box. - ${Name}, + ${DevBoxName}, - [Parameter(ParameterSetName='Restart', Mandatory)] - [Parameter(ParameterSetName='RestartByDevCenter', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Restart')] - [Parameter(ParameterSetName='RestartByDevCenter')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -6562,13 +10504,34 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='RestartViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='RestartViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, + [Parameter(ParameterSetName='SetExpanded', Mandatory)] + [Parameter(ParameterSetName='SetExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.Int32] + # The end time of the active hours. + ${EndTimeHour}, + + [Parameter(ParameterSetName='SetExpanded', Mandatory)] + [Parameter(ParameterSetName='SetExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.Int32] + # The start time of the active hours. + ${StartTimeHour}, + + [Parameter(ParameterSetName='SetExpanded', Mandatory)] + [Parameter(ParameterSetName='SetExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.String] + # The timezone of the active hours. + ${TimeZone}, + + [Parameter(ParameterSetName='Set', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='SetByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration] + # Manual user set active hours configuration. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -6579,12 +10542,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -6605,12 +10562,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -6657,12 +10608,12 @@ begin { } $mapping = @{ - Restart = 'Az.DevCenterdata.custom\Restart-AzDevCenterUserDevBox'; - RestartViaIdentity = 'Az.DevCenterdata.custom\Restart-AzDevCenterUserDevBox'; - RestartByDevCenter = 'Az.DevCenterdata.custom\Restart-AzDevCenterUserDevBox'; - RestartViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Restart-AzDevCenterUserDevBox'; + SetExpanded = 'Az.DevCenterdata.custom\Set-AzDevCenterUserDevBoxActiveHour'; + Set = 'Az.DevCenterdata.custom\Set-AzDevCenterUserDevBoxActiveHour'; + SetExpandedByDevCenter = 'Az.DevCenterdata.custom\Set-AzDevCenterUserDevBoxActiveHour'; + SetByDevCenter = 'Az.DevCenterdata.custom\Set-AzDevCenterUserDevBoxActiveHour'; } - if (('Restart', 'RestartByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('SetExpanded', 'Set', 'SetExpandedByDevCenter', 'SetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -6742,6 +10693,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -6750,10 +10702,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link @@ -6983,6 +10937,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -6991,10 +10946,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link @@ -7216,7 +11173,7 @@ Start-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -7224,6 +11181,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -7232,17 +11190,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/start-azdevcenteruserdevbox #> function Start-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Start', Mandatory)] @@ -7456,7 +11416,7 @@ Stop-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -7464,6 +11424,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -7472,17 +11433,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/stop-azdevcenteruserdevbox #> function Stop-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Stop', Mandatory)] @@ -7754,6 +11717,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -7762,10 +11726,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. @@ -7816,7 +11782,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[]] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[]] # Tasks to apply. # To construct, see NOTES section for TASK properties and create a hash table. ${Task}, @@ -7996,7 +11962,7 @@ Update-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .Notes COMPLEX PARAMETER PROPERTIES @@ -8004,6 +11970,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -8012,17 +11979,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteruserenvironment #> function Update-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] [CmdletBinding(DefaultParameterSetName='PatchExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='PatchExpanded', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Remove-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Remove-AzDevCenterUserDevBox.ps1 index 0e9ace2d6b3c..401bc6491595 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Remove-AzDevCenterUserDevBox.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Remove-AzDevCenterUserDevBox.ps1 @@ -33,7 +33,7 @@ Remove-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserdevbox #> function Remove-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Remove-AzDevCenterUserDevBoxAddOn.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Remove-AzDevCenterUserDevBoxAddOn.ps1 new file mode 100644 index 000000000000..643afc9d762b --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Remove-AzDevCenterUserDevBoxAddOn.ps1 @@ -0,0 +1,294 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes a Dev Box addon. +.Description +Deletes a Dev Box addon. +.Example +Remove-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +Remove-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "me" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Remove-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "me" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Remove-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserdevboxaddon +#> +function Remove-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the Dev Box addon. + ${AddOnName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of a Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='DeleteByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DeleteViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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.DevCenterdata.custom\Remove-AzDevCenterUserDevBoxAddOn'; + DeleteViaIdentity = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserDevBoxAddOn'; + DeleteByDevCenter = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserDevBoxAddOn'; + DeleteViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Remove-AzDevCenterUserDevBoxAddOn'; + } + if (('Delete', 'DeleteByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/exports/Remove-AzDevCenterUserEnvironment.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Remove-AzDevCenterUserEnvironment.ps1 index a7334c034f68..d98a8f743247 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Remove-AzDevCenterUserEnvironment.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Remove-AzDevCenterUserEnvironment.ps1 @@ -33,7 +33,7 @@ Remove-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserenvironment #> function Remove-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] @@ -109,6 +112,13 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.Management.Automation.SwitchParameter] + # The query option to force environment deletion even if the environment definition does not exist. + # This is a best-effort delete, and anything custom that forces resource creation beyond the associated resource group may not be deleted. + ${Force}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Repair-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Repair-AzDevCenterUserDevBox.ps1 index b14c4d70d64c..a35cf48cd0c0 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Repair-AzDevCenterUserDevBox.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Repair-AzDevCenterUserDevBox.ps1 @@ -35,7 +35,7 @@ Repair-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -43,6 +43,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -51,17 +52,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/repair-azdevcenteruserdevbox #> function Repair-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Repair', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Repair', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Restart-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Restart-AzDevCenterUserDevBox.ps1 index 2ed50e5ee3eb..a33e90eb5fd5 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Restart-AzDevCenterUserDevBox.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Restart-AzDevCenterUserDevBox.ps1 @@ -33,7 +33,7 @@ Restart-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/restart-azdevcenteruserdevbox #> function Restart-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Restart', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Restart', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Restore-AzDevCenterUserDevBoxSnapshot.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Restore-AzDevCenterUserDevBoxSnapshot.ps1 new file mode 100644 index 000000000000..5f0bc7c790ae --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Restore-AzDevCenterUserDevBoxSnapshot.ps1 @@ -0,0 +1,287 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Restores a Dev Box to a specified snapshot. +.Description +Restores a Dev Box to a specified snapshot. +.Example +Restore-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -SnapshotId "snapshot-1234" +.Example +Restore-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -SnapshotId "snapshot-1234" +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" +} +Restore-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $snapshotInput ` + -SnapshotId "snapshot-1234" +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "me" + ProjectName = "DevProject" +} +Restore-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $snapshotInput ` + -SnapshotId "snapshot-1234" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/restore-azdevcenteruserdevboxsnapshot +#> +function Restore-AzDevCenterUserDevBoxSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Restore', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Restore', Mandatory)] + [Parameter(ParameterSetName='RestoreViaIdentity', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='RestoreViaIdentityByDevCenter', Mandatory)] + [Parameter(ParameterSetName='RestoreByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(ParameterSetName='Restore', Mandatory)] + [Parameter(ParameterSetName='RestoreByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Restore', Mandatory)] + [Parameter(ParameterSetName='RestoreByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Restore')] + [Parameter(ParameterSetName='RestoreByDevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='RestoreViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RestoreViaIdentityByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.String] + # Required parameter that specifies the snapshot id to use for the restore operation. + ${SnapshotId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 = @{ + Restore = 'Az.DevCenterdata.custom\Restore-AzDevCenterUserDevBoxSnapshot'; + RestoreViaIdentity = 'Az.DevCenterdata.custom\Restore-AzDevCenterUserDevBoxSnapshot'; + RestoreViaIdentityByDevCenter = 'Az.DevCenterdata.custom\Restore-AzDevCenterUserDevBoxSnapshot'; + RestoreByDevCenter = 'Az.DevCenterdata.custom\Restore-AzDevCenterUserDevBoxSnapshot'; + } + if (('Restore', 'RestoreByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/exports/Set-AzDevCenterUserDevBoxActiveHour.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Set-AzDevCenterUserDevBoxActiveHour.ps1 new file mode 100644 index 000000000000..4e1df3de5587 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Set-AzDevCenterUserDevBoxActiveHour.ps1 @@ -0,0 +1,280 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Lets a user set their own active hours for their Dev Box, overriding the defaults set at the pool level. +.Description +Lets a user set their own active hours for their Dev Box, overriding the defaults set at the pool level. +.Example +Set-AzDevCenterUserDevBoxActiveHour ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -StartTimeHour 9 ` + -EndTimeHour 17 ` + -TimeZone "America/Los_Angeles" +.Example +Set-AzDevCenterUserDevBoxActiveHour ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -StartTimeHour 8 ` + -EndTimeHour 16 ` + -TimeZone "America/New_York" +.Example +$activeHours = @{ + StartTimeHour = 10 + EndTimeHour = 18 + TimeZone = "America/Chicago" +} +Set-AzDevCenterUserDevBoxActiveHour ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -Body $activeHours +.Example +$activeHours = @{ + StartTimeHour = 7 + EndTimeHour = 15 + TimeZone = "America/Los_Angeles" +} +Set-AzDevCenterUserDevBoxActiveHour ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -Body $activeHours + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox +.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 : Manual user set active hours configuration. + [EndTimeHour ]: The end time of the active hours. + [StartTimeHour ]: The start time of the active hours. + [TimeZone ]: The timezone of the active hours. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/set-azdevcenteruserdevboxactivehour +#> +function Set-AzDevCenterUserDevBoxActiveHour { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox])] +[CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='SetExpanded', Mandatory)] + [Parameter(ParameterSetName='Set', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='SetExpandedByDevCenter', Mandatory)] + [Parameter(ParameterSetName='SetByDevCenter', Mandatory)] + [Alias('DevCenter')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter upon which to execute operations. + ${DevCenterName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='SetExpanded', Mandatory)] + [Parameter(ParameterSetName='SetExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.Int32] + # The end time of the active hours. + ${EndTimeHour}, + + [Parameter(ParameterSetName='SetExpanded', Mandatory)] + [Parameter(ParameterSetName='SetExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.Int32] + # The start time of the active hours. + ${StartTimeHour}, + + [Parameter(ParameterSetName='SetExpanded', Mandatory)] + [Parameter(ParameterSetName='SetExpandedByDevCenter', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.String] + # The timezone of the active hours. + ${TimeZone}, + + [Parameter(ParameterSetName='Set', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='SetByDevCenter', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration] + # Manual user set active hours configuration. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 = @{ + SetExpanded = 'Az.DevCenterdata.custom\Set-AzDevCenterUserDevBoxActiveHour'; + Set = 'Az.DevCenterdata.custom\Set-AzDevCenterUserDevBoxActiveHour'; + SetExpandedByDevCenter = 'Az.DevCenterdata.custom\Set-AzDevCenterUserDevBoxActiveHour'; + SetByDevCenter = 'Az.DevCenterdata.custom\Set-AzDevCenterUserDevBoxActiveHour'; + } + if (('SetExpanded', 'Set', 'SetExpandedByDevCenter', 'SetByDevCenter') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/exports/Skip-AzDevCenterUserDevBoxAction.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Skip-AzDevCenterUserDevBoxAction.ps1 index a5a375b1f905..0bc7ca8eeeb1 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Skip-AzDevCenterUserDevBoxAction.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Skip-AzDevCenterUserDevBoxAction.ps1 @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,10 +50,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Skip-AzDevCenterUserEnvironmentAction.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Skip-AzDevCenterUserEnvironmentAction.ps1 index 07fad86c723b..42a857880c1d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Skip-AzDevCenterUserEnvironmentAction.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Skip-AzDevCenterUserEnvironmentAction.ps1 @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,10 +50,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Start-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Start-AzDevCenterUserDevBox.ps1 index 2b80a2fd69a8..2bad8b84094c 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Start-AzDevCenterUserDevBox.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Start-AzDevCenterUserDevBox.ps1 @@ -33,7 +33,7 @@ Start-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/start-azdevcenteruserdevbox #> function Start-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Start', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Stop-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Stop-AzDevCenterUserDevBox.ps1 index a236d5dd4a05..2d5f3aefbeb6 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Stop-AzDevCenterUserDevBox.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Stop-AzDevCenterUserDevBox.ps1 @@ -33,7 +33,7 @@ Stop-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/stop-azdevcenteruserdevbox #> function Stop-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Stop', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Test-AzDevCenterUserDevBoxCustomizationTaskAction.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Test-AzDevCenterUserDevBoxCustomizationTaskAction.ps1 index 46ec7169c7cf..6fefd901091f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Test-AzDevCenterUserDevBoxCustomizationTaskAction.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Test-AzDevCenterUserDevBoxCustomizationTaskAction.ps1 @@ -85,6 +85,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -93,10 +94,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. @@ -147,7 +150,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[]] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[]] # Tasks to apply. # To construct, see NOTES section for TASK properties and create a hash table. ${Task}, diff --git a/generated/DevCenter/DevCenterData.AutoRest/exports/Update-AzDevCenterUserEnvironment.ps1 b/generated/DevCenter/DevCenterData.AutoRest/exports/Update-AzDevCenterUserEnvironment.ps1 index 09f1bcc3c167..39738e1535b3 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/exports/Update-AzDevCenterUserEnvironment.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/exports/Update-AzDevCenterUserEnvironment.ps1 @@ -47,7 +47,7 @@ Update-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .Notes COMPLEX PARAMETER PROPERTIES @@ -55,6 +55,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -63,17 +64,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteruserenvironment #> function Update-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] [CmdletBinding(DefaultParameterSetName='PatchExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='PatchExpanded', Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/generate-info.json b/generated/DevCenter/DevCenterData.AutoRest/generate-info.json index 99374784c49f..de8e2de22622 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generate-info.json +++ b/generated/DevCenter/DevCenterData.AutoRest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "464e8bbe-d4da-40e0-a4c5-9162a2319780" + "generate_Id": "86ff48c8-17e1-497f-9f54-fa5fd5732a74" } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/DevCenterdata.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/DevCenterdata.cs index 414877a50895..8f76657a74fa 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/DevCenterdata.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/DevCenterdata.cs @@ -14,15 +14,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata public partial class DevCenterdata { - /// Applies customizations to the Dev Box. + /// Aligns a Dev Box to the pools current pool configuration. /// The DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute operations. - /// The AAD object id of the user. If value is 'me', the identity is taken from the - /// authentication context. - /// The name of a Dev Box. - /// A customization group name. - /// Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the - /// owner of the Dev Box as local administrator + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// Indicates which pool properties to align 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). @@ -31,9 +28,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesCreateCustomizationGroup(string endpoint, string projectName, string userId, string devBoxName, string customizationGroupName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesAlignDevBox(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -45,8 +42,7 @@ public partial class DevCenterdata + global::System.Uri.EscapeDataString(userId) + "/devboxes/" + global::System.Uri.EscapeDataString(devBoxName) - + "/customizationGroups/" - + global::System.Uri.EscapeDataString(customizationGroupName) + + ":align" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -55,7 +51,7 @@ public partial class DevCenterdata // generate request object var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -64,15 +60,14 @@ public partial class DevCenterdata request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesCreateCustomizationGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesAlignDevBox_Call(request,onOk,onDefault,eventListener,sender); } } - /// Applies customizations to the Dev Box. + /// Aligns a Dev Box to the pools current pool configuration. /// /// The DevCenter-specific URI to operate on. - /// Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the - /// owner of the Dev Box as local administrator + /// Indicates which pool properties to align 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). @@ -81,25 +76,24 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesCreateCustomizationGroupViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesAlignDevBoxViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/customizationGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+):align$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:align'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; var userId = _match.Groups["userId"].Value; var devBoxName = _match.Groups["devBoxName"].Value; - var customizationGroupName = _match.Groups["customizationGroupName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" @@ -108,8 +102,7 @@ public partial class DevCenterdata + userId + "/devboxes/" + devBoxName - + "/customizationGroups/" - + customizationGroupName + + ":align" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -118,7 +111,7 @@ public partial class DevCenterdata // generate request object var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -127,11 +120,11 @@ public partial class DevCenterdata request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesCreateCustomizationGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesAlignDevBox_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -141,7 +134,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesCreateCustomizationGroup_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesAlignDevBox_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -152,6 +145,106 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -159,13 +252,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -181,22 +274,19 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute operations. - /// The AAD object id of the user. If value is 'me', the identity is taken from the - /// authentication context. - /// The name of a Dev Box. - /// A customization group name. - /// Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the - /// owner of the Dev Box as local administrator + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// Indicates which pool properties to align 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 DevBoxesCreateCustomizationGroup_Validate(string endpoint, string projectName, string userId, string devBoxName, string customizationGroupName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup body, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesAlignDevBox_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody body, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -213,23 +303,16 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(customizationGroupName),customizationGroupName); - await eventListener.AssertMinimumLength(nameof(customizationGroupName),customizationGroupName,3); - await eventListener.AssertMaximumLength(nameof(customizationGroupName),customizationGroupName,63); - await eventListener.AssertRegEx(nameof(customizationGroupName),customizationGroupName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Creates or replaces a Dev Box. + /// Aligns all Dev Boxes in the pool with the current configuration. /// The DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute the operation. - /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - /// The name of a Dev Box. - /// Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the - /// owner of the Dev Box as local administrator - /// a delegate that is called when the remote service returns 200 (OK). + /// Name of the project. + /// Pool name. + /// Indicates which pool properties to align on. /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -237,9 +320,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesCreateDevBox(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesAlignPool(string endpoint, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -247,10 +330,9 @@ public partial class DevCenterdata var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/users/" - + global::System.Uri.EscapeDataString(userId) - + "/devboxes/" - + global::System.Uri.EscapeDataString(devBoxName) + + "/pools/" + + global::System.Uri.EscapeDataString(poolName) + + ":align" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -259,7 +341,7 @@ public partial class DevCenterdata // generate request object var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -268,16 +350,14 @@ public partial class DevCenterdata request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesCreateDevBox_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesAlignPool_Call(request,onDefault,eventListener,sender); } } - /// Creates or replaces a Dev Box. + /// Aligns all Dev Boxes in the pool with the current configuration. /// /// The DevCenter-specific URI to operate on. - /// Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the - /// owner of the Dev Box as local administrator - /// a delegate that is called when the remote service returns 200 (OK). + /// Indicates which pool properties to align on. /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -285,32 +365,30 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesCreateDevBoxViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesAlignPoolViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/pools/(?[^/]+):align$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/pools/{poolName}:align'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; - var userId = _match.Groups["userId"].Value; - var devBoxName = _match.Groups["devBoxName"].Value; + var poolName = _match.Groups["poolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + projectName - + "/users/" - + userId - + "/devboxes/" - + devBoxName + + "/pools/" + + poolName + + ":align" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -319,7 +397,7 @@ public partial class DevCenterdata // generate request object var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -328,13 +406,12 @@ public partial class DevCenterdata request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesCreateDevBox_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesAlignPool_Call(request,onDefault,eventListener,sender); } } - /// 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. @@ -342,7 +419,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesCreateDevBox_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesAlignPool_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -356,6 +433,7 @@ public partial class DevCenterdata // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"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 ) @@ -438,10 +516,10 @@ public partial class DevCenterdata continue; } // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_originalUri)) + if (!string.IsNullOrWhiteSpace(_finalUri)) { // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get); // drop the old response _response?.Dispose(); @@ -456,16 +534,10 @@ public partial class DevCenterdata switch ( _response.StatusCode ) { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBox.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); - break; - } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -481,20 +553,18 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute the operation. - /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - /// The name of a Dev Box. - /// Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the - /// owner of the Dev Box as local administrator + /// Name of the project. + /// Pool name. + /// Indicates which pool properties to align 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 DevBoxesCreateDevBox_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox body, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesAlignPool_Validate(string endpoint, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody body, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -503,26 +573,20 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(userId),userId); - await eventListener.AssertMinimumLength(nameof(userId),userId,2); - await eventListener.AssertMaximumLength(nameof(userId),userId,36); - await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); - await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); - await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); - await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); - await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(poolName),poolName); + await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); + await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); + await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Delays the occurrence of an action. + /// Approves the creation of a Dev Box. /// The DevCenter-specific URI to operate on. /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The name of the action. - /// The time to delay the Dev Box action or actions until. /// 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). @@ -531,9 +595,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesDelayAction(string endpoint, string projectName, string userId, string devBoxName, string actionName, global::System.DateTime until, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesApproveDevBox(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -545,13 +609,9 @@ public partial class DevCenterdata + global::System.Uri.EscapeDataString(userId) + "/devboxes/" + global::System.Uri.EscapeDataString(devBoxName) - + "/actions/" - + global::System.Uri.EscapeDataString(actionName) - + ":delay" + + ":approve" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + "until=" + until.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -563,14 +623,13 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesDelayAction_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesApproveDevBox_Call(request,onOk,onDefault,eventListener,sender); } } - /// Delays the occurrence of an action. + /// Approves the creation of a Dev Box. /// /// The DevCenter-specific URI to operate on. - /// The time to delay the Dev Box action or actions until. /// 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). @@ -579,25 +638,24 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesDelayActionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.DateTime until, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesApproveDevBoxViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/actions/(?[^/]+):delay$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+):approve$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}:delay'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:approve'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; var userId = _match.Groups["userId"].Value; var devBoxName = _match.Groups["devBoxName"].Value; - var actionName = _match.Groups["actionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" @@ -606,13 +664,9 @@ public partial class DevCenterdata + userId + "/devboxes/" + devBoxName - + "/actions/" - + actionName - + ":delay" + + ":approve" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + "until=" + until.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -624,11 +678,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesDelayAction_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesApproveDevBox_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -638,7 +692,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesDelayAction_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesApproveDevBox_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -649,21 +703,121 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; } } } @@ -678,20 +832,18 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The name of the action. - /// The time to delay the Dev Box action or actions until. /// 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 DevBoxesDelayAction_Validate(string endpoint, string projectName, string userId, string devBoxName, string actionName, global::System.DateTime until, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesApproveDevBox_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -708,19 +860,3423 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(actionName),actionName); - await eventListener.AssertMinimumLength(nameof(actionName),actionName,3); - await eventListener.AssertMaximumLength(nameof(actionName),actionName,63); - await eventListener.AssertRegEx(nameof(actionName),actionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Delays all actions. + /// + /// Captures a manual snapshot of the Dev Box. + /// Upon completion, a snapshotId will be generated. + /// To retrieve all snapshots and their corresponding IDs, use the list snapshots endpoint. + /// + /// The DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesCaptureSnapshot(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + ":captureSnapshot" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesCaptureSnapshot_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Captures a manual snapshot of the Dev Box. + /// Upon completion, a snapshotId will be generated. + /// To retrieve all snapshots and their corresponding IDs, use the list snapshots endpoint. + /// + /// + /// The DevCenter-specific URI to operate 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesCaptureSnapshotViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+):captureSnapshot$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:captureSnapshot'"); + } + + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + ":captureSnapshot" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesCaptureSnapshot_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesCaptureSnapshot_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// 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 DevBoxesCaptureSnapshot_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Applies customizations to the Dev Box. + /// The DevCenter-specific URI to operate on. + /// The DevCenter Project upon which to execute operations. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// The name of a Dev Box. + /// A customization group name. + /// Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the + /// owner of the Dev Box as local administrator + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesCreateCustomizationGroup(string endpoint, string projectName, string userId, string devBoxName, string customizationGroupName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "/customizationGroups/" + + global::System.Uri.EscapeDataString(customizationGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesCreateCustomizationGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Applies customizations to the Dev Box. + /// + /// The DevCenter-specific URI to operate on. + /// Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the + /// owner of the Dev Box as local administrator + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesCreateCustomizationGroupViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/customizationGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}'"); + } + + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; + var customizationGroupName = _match.Groups["customizationGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "/customizationGroups/" + + customizationGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesCreateCustomizationGroup_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesCreateCustomizationGroup_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// The DevCenter Project upon which to execute operations. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// The name of a Dev Box. + /// A customization group name. + /// Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the + /// owner of the Dev Box as local administrator + /// 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 DevBoxesCreateCustomizationGroup_Validate(string endpoint, string projectName, string userId, string devBoxName, string customizationGroupName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup body, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(customizationGroupName),customizationGroupName); + await eventListener.AssertMinimumLength(nameof(customizationGroupName),customizationGroupName,3); + await eventListener.AssertMaximumLength(nameof(customizationGroupName),customizationGroupName,63); + await eventListener.AssertRegEx(nameof(customizationGroupName),customizationGroupName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Creates or replaces a Dev Box. + /// The DevCenter-specific URI to operate on. + /// The DevCenter Project upon which to execute operations. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// The name of a Dev Box. + /// Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the + /// owner of the Dev Box as local administrator + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesCreateDevBox(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesCreateDevBox_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Creates or replaces a Dev Box. + /// + /// The DevCenter-specific URI to operate on. + /// Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the + /// owner of the Dev Box as local administrator + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesCreateDevBoxViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}'"); + } + + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesCreateDevBox_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesCreateDevBox_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBox.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// The DevCenter Project upon which to execute operations. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// The name of a Dev Box. + /// Represents the body request of a Dev Box creation. Dev Box Pool name is required. Optionally set the + /// owner of the Dev Box as local administrator + /// 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 DevBoxesCreateDevBox_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox body, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Creates a Dev Box addon. + /// The DevCenter-specific URI to operate on. + /// The DevCenter Project upon which to execute operations. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// The name of a Dev Box. + /// The name of the Dev Box addon. + /// Represents the body request of a Dev Box addon creation. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesCreateOrReplaceDevBoxAddOn(string endpoint, string projectName, string userId, string devBoxName, string addOnName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "/addons/" + + global::System.Uri.EscapeDataString(addOnName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesCreateOrReplaceDevBoxAddOn_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Creates a Dev Box addon. + /// + /// The DevCenter-specific URI to operate on. + /// Represents the body request of a Dev Box addon creation. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesCreateOrReplaceDevBoxAddOnViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/addons/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}'"); + } + + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; + var addOnName = _match.Groups["addOnName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "/addons/" + + addOnName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesCreateOrReplaceDevBoxAddOn_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesCreateOrReplaceDevBoxAddOn_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAddOn.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// The DevCenter Project upon which to execute operations. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// The name of a Dev Box. + /// The name of the Dev Box addon. + /// Represents the body request of a Dev Box addon creation. + /// 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 DevBoxesCreateOrReplaceDevBoxAddOn_Validate(string endpoint, string projectName, string userId, string devBoxName, string addOnName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn body, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(addOnName),addOnName); + await eventListener.AssertMinimumLength(nameof(addOnName),addOnName,3); + await eventListener.AssertMaximumLength(nameof(addOnName),addOnName,63); + await eventListener.AssertRegEx(nameof(addOnName),addOnName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delays the occurrence of an action. + /// The DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// The name of the action. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesDelayAction(string endpoint, string projectName, string userId, string devBoxName, string actionName, global::System.DateTime until, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "/actions/" + + global::System.Uri.EscapeDataString(actionName) + + ":delay" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + "until=" + until.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesDelayAction_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Delays the occurrence of an action. + /// + /// The DevCenter-specific URI to operate on. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesDelayActionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.DateTime until, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/actions/(?[^/]+):delay$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}:delay'"); + } + + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; + var actionName = _match.Groups["actionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "/actions/" + + actionName + + ":delay" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + "until=" + until.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesDelayAction_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesDelayAction_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// The name of the action. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. + /// 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 DevBoxesDelayAction_Validate(string endpoint, string projectName, string userId, string devBoxName, string actionName, global::System.DateTime until, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(actionName),actionName); + await eventListener.AssertMinimumLength(nameof(actionName),actionName,3); + await eventListener.AssertMaximumLength(nameof(actionName),actionName,63); + await eventListener.AssertRegEx(nameof(actionName),actionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Delays all actions. + /// The DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesDelayActions(string endpoint, string projectName, string userId, string devBoxName, global::System.DateTime until, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "/actions:delay" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + "until=" + until.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesDelayActions_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Delays all actions. + /// + /// The DevCenter-specific URI to operate on. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesDelayActionsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.DateTime until, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/actions:delay$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions:delay'"); + } + + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "/actions:delay" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + "until=" + until.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesDelayActions_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesDelayActions_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBoxActionDelayResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// The time to delay the Dev Box action or actions until, in RFC3339 format. + /// 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 DevBoxesDelayActions_Validate(string endpoint, string projectName, string userId, string devBoxName, global::System.DateTime until, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Deletes a Dev Box. + /// The DevCenter-specific URI to operate on. + /// The DevCenter Project upon which to execute operations. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// The name of a Dev Box. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesDeleteDevBox(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesDeleteDevBox_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a Dev Box addon. + /// The DevCenter-specific URI to operate on. + /// The DevCenter Project upon which to execute operations. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// The name of a Dev Box. + /// The name of the Dev Box addon. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesDeleteDevBoxAddOn(string endpoint, string projectName, string userId, string devBoxName, string addOnName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "/addons/" + + global::System.Uri.EscapeDataString(addOnName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesDeleteDevBoxAddOn_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a Dev Box addon. + /// + /// The DevCenter-specific URI to operate on. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesDeleteDevBoxAddOnViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/addons/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}'"); + } + + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; + var addOnName = _match.Groups["addOnName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "/addons/" + + addOnName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesDeleteDevBoxAddOn_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// 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 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesDeleteDevBoxAddOn_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// The DevCenter Project upon which to execute operations. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// The name of a Dev Box. + /// The name of the Dev Box addon. + /// 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 DevBoxesDeleteDevBoxAddOn_Validate(string endpoint, string projectName, string userId, string devBoxName, string addOnName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(addOnName),addOnName); + await eventListener.AssertMinimumLength(nameof(addOnName),addOnName,3); + await eventListener.AssertMaximumLength(nameof(addOnName),addOnName,63); + await eventListener.AssertRegEx(nameof(addOnName),addOnName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Deletes a Dev Box. + /// + /// The DevCenter-specific URI to operate on. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesDeleteDevBoxViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}'"); + } + + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesDeleteDevBox_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// 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 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesDeleteDevBox_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// The DevCenter Project upon which to execute operations. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// The name of a Dev Box. + /// 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 DevBoxesDeleteDevBox_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Disable a Dev Box addon. + /// The DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// Name of the dev box addon. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesDisableDevBoxAddOn(string endpoint, string projectName, string userId, string devBoxName, string addOnName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "/addons/" + + global::System.Uri.EscapeDataString(addOnName) + + ":disable" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesDisableDevBoxAddOn_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Disable a Dev Box addon. + /// + /// The DevCenter-specific URI to operate 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesDisableDevBoxAddOnViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/addons/(?[^/]+):disable$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}:disable'"); + } + + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; + var addOnName = _match.Groups["addOnName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "/addons/" + + addOnName + + ":disable" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesDisableDevBoxAddOn_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesDisableDevBoxAddOn_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// Name of the dev box addon. + /// 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 DevBoxesDisableDevBoxAddOn_Validate(string endpoint, string projectName, string userId, string devBoxName, string addOnName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(addOnName),addOnName); + await eventListener.AssertMinimumLength(nameof(addOnName),addOnName,3); + await eventListener.AssertMaximumLength(nameof(addOnName),addOnName,63); + await eventListener.AssertRegEx(nameof(addOnName),addOnName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Enable a Dev Box addon. + /// The DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// Name of the dev box addon. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesEnableDevBoxAddOn(string endpoint, string projectName, string userId, string devBoxName, string addOnName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "/addons/" + + global::System.Uri.EscapeDataString(addOnName) + + ":enable" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesEnableDevBoxAddOn_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Enable a Dev Box addon. + /// + /// The DevCenter-specific URI to operate 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesEnableDevBoxAddOnViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/addons/(?[^/]+):enable$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}:enable'"); + } + + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; + var addOnName = _match.Groups["addOnName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "/addons/" + + addOnName + + ":enable" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesEnableDevBoxAddOn_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesEnableDevBoxAddOn_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// Name of the dev box addon. + /// 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 DevBoxesEnableDevBoxAddOn_Validate(string endpoint, string projectName, string userId, string devBoxName, string addOnName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(addOnName),addOnName); + await eventListener.AssertMinimumLength(nameof(addOnName),addOnName,3); + await eventListener.AssertMaximumLength(nameof(addOnName),addOnName,63); + await eventListener.AssertRegEx(nameof(addOnName),addOnName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Gets an action. + /// The DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// The name of the action. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesGetAction(string endpoint, string projectName, string userId, string devBoxName, string actionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "/actions/" + + global::System.Uri.EscapeDataString(actionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesGetAction_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets an action. + /// + /// The DevCenter-specific URI to operate 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesGetActionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/actions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}'"); + } + + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; + var actionName = _match.Groups["actionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "/actions/" + + actionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesGetAction_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesGetAction_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// The name of the action. + /// 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 DevBoxesGetAction_Validate(string endpoint, string projectName, string userId, string devBoxName, string actionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(actionName),actionName); + await eventListener.AssertMinimumLength(nameof(actionName),actionName,3); + await eventListener.AssertMaximumLength(nameof(actionName),actionName,63); + await eventListener.AssertRegEx(nameof(actionName),actionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Gets a customization group. + /// The DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// Name of the customization 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesGetCustomizationGroup(string endpoint, string projectName, string userId, string devBoxName, string customizationGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "/customizationGroups/" + + global::System.Uri.EscapeDataString(customizationGroupName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesGetCustomizationGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets a customization group. + /// + /// The DevCenter-specific URI to operate 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesGetCustomizationGroupViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/customizationGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}'"); + } + + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; + var customizationGroupName = _match.Groups["customizationGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "/customizationGroups/" + + customizationGroupName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesGetCustomizationGroup_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesGetCustomizationGroup_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// Name of the customization group. + /// 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 DevBoxesGetCustomizationGroup_Validate(string endpoint, string projectName, string userId, string devBoxName, string customizationGroupName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(customizationGroupName),customizationGroupName); + await eventListener.AssertMinimumLength(nameof(customizationGroupName),customizationGroupName,3); + await eventListener.AssertMaximumLength(nameof(customizationGroupName),customizationGroupName,63); + await eventListener.AssertRegEx(nameof(customizationGroupName),customizationGroupName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Gets a customization task. + /// The DevCenter-specific URI to operate on. + /// Name of the project. + /// Name of the catalog. + /// Full name of the task: {catalogName}/{taskName}. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesGetCustomizationTaskDefinitions(string endpoint, string projectName, string catalogName, string taskName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/catalogs/" + + global::System.Uri.EscapeDataString(catalogName) + + "/customizationTasks/" + + global::System.Uri.EscapeDataString(taskName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesGetCustomizationTaskDefinitions_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets a customization task. + /// + /// The DevCenter-specific URI to operate 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesGetCustomizationTaskDefinitionsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/catalogs/(?[^/]+)/customizationTasks/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/catalogs/{catalogName}/customizationTasks/{taskName}'"); + } + + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var catalogName = _match.Groups["catalogName"].Value; + var taskName = _match.Groups["taskName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/catalogs/" + + catalogName + + "/customizationTasks/" + + taskName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesGetCustomizationTaskDefinitions_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesGetCustomizationTaskDefinitions_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// Name of the project. + /// Name of the catalog. + /// Full name of the task: {catalogName}/{taskName}. + /// 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 DevBoxesGetCustomizationTaskDefinitions_Validate(string endpoint, string projectName, string catalogName, string taskName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(catalogName),catalogName); + await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); + await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); + await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(taskName),taskName); + } + } + + /// Gets the log for a customization task. + /// The DevCenter-specific URI to operate on. + /// The DevCenter Project upon which to execute operations. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// The name of a Dev Box. + /// A customization group name. + /// A customization task ID. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesGetCustomizationTaskLog(string endpoint, string projectName, string userId, string devBoxName, string customizationGroupName, string customizationTaskId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "/customizationGroups/" + + global::System.Uri.EscapeDataString(customizationGroupName) + + "/logs/" + + global::System.Uri.EscapeDataString(customizationTaskId) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesGetCustomizationTaskLog_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets the log for a customization task. + /// + /// The DevCenter-specific URI to operate 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesGetCustomizationTaskLogViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/customizationGroups/(?[^/]+)/logs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}/logs/{customizationTaskId}'"); + } + + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; + var customizationGroupName = _match.Groups["customizationGroupName"].Value; + var customizationTaskId = _match.Groups["customizationTaskId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "/customizationGroups/" + + customizationGroupName + + "/logs/" + + customizationTaskId + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesGetCustomizationTaskLog_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesGetCustomizationTaskLog_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => body.Result)); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// The DevCenter Project upon which to execute operations. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// The name of a Dev Box. + /// A customization group name. + /// A customization task ID. + /// 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 DevBoxesGetCustomizationTaskLog_Validate(string endpoint, string projectName, string userId, string devBoxName, string customizationGroupName, string customizationTaskId, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(customizationGroupName),customizationGroupName); + await eventListener.AssertMinimumLength(nameof(customizationGroupName),customizationGroupName,3); + await eventListener.AssertMaximumLength(nameof(customizationGroupName),customizationGroupName,63); + await eventListener.AssertRegEx(nameof(customizationGroupName),customizationGroupName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(customizationTaskId),customizationTaskId); + await eventListener.AssertMinimumLength(nameof(customizationTaskId),customizationTaskId,36); + await eventListener.AssertMaximumLength(nameof(customizationTaskId),customizationTaskId,36); + await eventListener.AssertRegEx(nameof(customizationTaskId),customizationTaskId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$"); + } + } + + /// Gets a Dev Box addon by Dev Box addon id. /// The DevCenter-specific URI to operate on. /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The time to delay the Dev Box action or actions until. + /// Name of the dev box addon. /// 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). @@ -729,9 +4285,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesDelayActions(string endpoint, string projectName, string userId, string devBoxName, global::System.DateTime until, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetDevBoxAddon(string endpoint, string projectName, string userId, string devBoxName, string addOnName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -743,30 +4299,28 @@ public partial class DevCenterdata + global::System.Uri.EscapeDataString(userId) + "/devboxes/" + global::System.Uri.EscapeDataString(devBoxName) - + "/actions:delay" + + "/addons/" + + global::System.Uri.EscapeDataString(addOnName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + "until=" + until.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesDelayActions_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesGetDevBoxAddon_Call(request,onOk,onDefault,eventListener,sender); } } - /// Delays all actions. + /// Gets a Dev Box addon by Dev Box addon id. /// /// The DevCenter-specific URI to operate on. - /// The time to delay the Dev Box action or actions until. /// 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). @@ -775,24 +4329,25 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesDelayActionsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.DateTime until, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetDevBoxAddonViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/actions:delay$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/addons/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions:delay'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; var userId = _match.Groups["userId"].Value; var devBoxName = _match.Groups["devBoxName"].Value; + var addOnName = _match.Groups["addOnName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" @@ -801,27 +4356,26 @@ public partial class DevCenterdata + userId + "/devboxes/" + devBoxName - + "/actions:delay" + + "/addons/" + + addOnName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + "until=" + until.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // generate request object var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesDelayActions_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesGetDevBoxAddon_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -831,7 +4385,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesDelayActions_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesGetDevBoxAddon_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -849,13 +4403,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedDevBoxActionDelayResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAddOn.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -871,19 +4425,19 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// The time to delay the Dev Box action or actions until. + /// Name of the dev box addon. /// 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 DevBoxesDelayActions_Validate(string endpoint, string projectName, string userId, string devBoxName, global::System.DateTime until, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesGetDevBoxAddon_Validate(string endpoint, string projectName, string userId, string devBoxName, string addOnName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -900,16 +4454,19 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(addOnName),addOnName); + await eventListener.AssertMinimumLength(nameof(addOnName),addOnName,3); + await eventListener.AssertMaximumLength(nameof(addOnName),addOnName,63); + await eventListener.AssertRegEx(nameof(addOnName),addOnName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Deletes a Dev Box. + /// Gets a Dev Box. /// The DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute operations. + /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - /// The name of a Dev Box. + /// Display name for the Dev Box. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -917,9 +4474,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesDeleteDevBox(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetDevBoxByUser(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -939,20 +4496,19 @@ public partial class DevCenterdata // generate request object var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesDeleteDevBox_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.DevBoxesGetDevBoxByUser_Call(request,onOk,onDefault,eventListener,sender); } } - /// Deletes a Dev Box. + /// Gets a Dev Box. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -960,9 +4516,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesDeleteDevBoxViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetDevBoxByUserViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -994,19 +4550,18 @@ public partial class DevCenterdata // generate request object var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesDeleteDevBox_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.DevBoxesGetDevBoxByUser_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -1014,7 +4569,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesDeleteDevBox_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesGetDevBoxByUser_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1025,106 +4580,6 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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? - if (!string.IsNullOrWhiteSpace(_finalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1132,19 +4587,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBox.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1160,18 +4609,18 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute operations. + /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - /// The name of a Dev Box. + /// Display name for the Dev Box. /// 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 DevBoxesDeleteDevBox_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesGetDevBoxByUser_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1191,12 +4640,10 @@ public partial class DevCenterdata } } - /// Gets an action. + /// Gets the log for an imaging build task. /// The DevCenter-specific URI to operate on. - /// Name of the project. - /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - /// Display name for the Dev Box. - /// The name of the action. + /// The DevCenter Project upon which to execute operations. + /// An imaging build log id. /// 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). @@ -1205,9 +4652,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetAction(string endpoint, string projectName, string userId, string devBoxName, string actionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetImagingTaskLog(string endpoint, string projectName, string imageBuildLogId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1215,12 +4662,8 @@ public partial class DevCenterdata var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/users/" - + global::System.Uri.EscapeDataString(userId) - + "/devboxes/" - + global::System.Uri.EscapeDataString(devBoxName) - + "/actions/" - + global::System.Uri.EscapeDataString(actionName) + + "/imageBuildLogs/" + + global::System.Uri.EscapeDataString(imageBuildLogId) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1234,11 +4677,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetAction_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesGetImagingTaskLog_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets an action. + /// Gets the log for an imaging build task. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -1249,35 +4692,29 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetActionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetImagingTaskLogViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/actions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/imageBuildLogs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/imageBuildLogs/{imageBuildLogId}'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; - var userId = _match.Groups["userId"].Value; - var devBoxName = _match.Groups["devBoxName"].Value; - var actionName = _match.Groups["actionName"].Value; + var imageBuildLogId = _match.Groups["imageBuildLogId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + projectName - + "/users/" - + userId - + "/devboxes/" - + devBoxName - + "/actions/" - + actionName + + "/imageBuildLogs/" + + imageBuildLogId + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1291,11 +4728,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetAction_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesGetImagingTaskLog_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -1305,7 +4742,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesGetAction_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesGetImagingTaskLog_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1323,13 +4760,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => body.Result)); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1345,19 +4782,17 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. - /// Name of the project. - /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - /// Display name for the Dev Box. - /// The name of the action. + /// The DevCenter Project upon which to execute operations. + /// An imaging build log id. /// 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 DevBoxesGetAction_Validate(string endpoint, string projectName, string userId, string devBoxName, string actionName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesGetImagingTaskLog_Validate(string endpoint, string projectName, string imageBuildLogId, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1366,27 +4801,17 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(userId),userId); - await eventListener.AssertMinimumLength(nameof(userId),userId,2); - await eventListener.AssertMaximumLength(nameof(userId),userId,36); - await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); - await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); - await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); - await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); - await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(actionName),actionName); - await eventListener.AssertMinimumLength(nameof(actionName),actionName,3); - await eventListener.AssertMaximumLength(nameof(actionName),actionName,63); - await eventListener.AssertRegEx(nameof(actionName),actionName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(imageBuildLogId),imageBuildLogId); + await eventListener.AssertRegEx(nameof(imageBuildLogId),imageBuildLogId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); } } - /// Gets a customization group. + /// Gets an operation on a Dev Box. /// The DevCenter-specific URI to operate on. /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// Name of the customization group. + /// Unique identifier for the Dev Box 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). @@ -1395,9 +4820,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetCustomizationGroup(string endpoint, string projectName, string userId, string devBoxName, string customizationGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetOperation(string endpoint, string projectName, string userId, string devBoxName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1409,8 +4834,8 @@ public partial class DevCenterdata + global::System.Uri.EscapeDataString(userId) + "/devboxes/" + global::System.Uri.EscapeDataString(devBoxName) - + "/customizationGroups/" - + global::System.Uri.EscapeDataString(customizationGroupName) + + "/operations/" + + global::System.Uri.EscapeDataString(operationId) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1424,11 +4849,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetCustomizationGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesGetOperation_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets a customization group. + /// Gets an operation on a Dev Box. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -1439,25 +4864,25 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetCustomizationGroupViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetOperationViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/customizationGroups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/operations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/operations/{operationId}'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; var userId = _match.Groups["userId"].Value; var devBoxName = _match.Groups["devBoxName"].Value; - var customizationGroupName = _match.Groups["customizationGroupName"].Value; + var operationId = _match.Groups["operationId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" @@ -1466,8 +4891,8 @@ public partial class DevCenterdata + userId + "/devboxes/" + devBoxName - + "/customizationGroups/" - + customizationGroupName + + "/operations/" + + operationId + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1481,11 +4906,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetCustomizationGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesGetOperation_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -1495,7 +4920,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesGetCustomizationGroup_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesGetOperation_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1513,13 +4938,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1535,19 +4960,19 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// Name of the customization group. + /// Unique identifier for the Dev Box operation. /// 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 DevBoxesGetCustomizationGroup_Validate(string endpoint, string projectName, string userId, string devBoxName, string customizationGroupName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesGetOperation_Validate(string endpoint, string projectName, string userId, string devBoxName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1564,18 +4989,15 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(customizationGroupName),customizationGroupName); - await eventListener.AssertMinimumLength(nameof(customizationGroupName),customizationGroupName,3); - await eventListener.AssertMaximumLength(nameof(customizationGroupName),customizationGroupName,63); - await eventListener.AssertRegEx(nameof(customizationGroupName),customizationGroupName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(operationId),operationId); + await eventListener.AssertRegEx(nameof(operationId),operationId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); } } - /// Gets a customization task. + /// Gets a pool. /// The DevCenter-specific URI to operate on. /// Name of the project. - /// Name of the catalog. - /// Full name of the task: {catalogName}/{taskName}. + /// Pool name. /// 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). @@ -1584,20 +5006,18 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetCustomizationTaskDefinitions(string endpoint, string projectName, string catalogName, string taskName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetPool(string endpoint, string projectName, string poolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/projects/" - + global::System.Uri.EscapeDataString(projectName) - + "/catalogs/" - + global::System.Uri.EscapeDataString(catalogName) - + "/customizationTasks/" - + global::System.Uri.EscapeDataString(taskName) + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/pools/" + + global::System.Uri.EscapeDataString(poolName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1611,11 +5031,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetCustomizationTaskDefinitions_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesGetPool_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets a customization task. + /// Gets a pool. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -1626,32 +5046,29 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetCustomizationTaskDefinitionsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetPoolViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/catalogs/(?[^/]+)/customizationTasks/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/pools/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/catalogs/{catalogName}/customizationTasks/{taskName}'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/pools/{poolName}'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; - var catalogName = _match.Groups["catalogName"].Value; - var taskName = _match.Groups["taskName"].Value; + var poolName = _match.Groups["poolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + projectName - + "/catalogs/" - + catalogName - + "/customizationTasks/" - + taskName + + "/pools/" + + poolName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1665,13 +5082,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetCustomizationTaskDefinitions_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesGetPool_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// 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 @@ -1681,7 +5096,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesGetCustomizationTaskDefinitions_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesGetPool_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1699,13 +5114,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Pool.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1721,18 +5136,17 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. /// Name of the project. - /// Name of the catalog. - /// Full name of the task: {catalogName}/{taskName}. + /// Pool name. /// 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 DevBoxesGetCustomizationTaskDefinitions_Validate(string endpoint, string projectName, string catalogName, string taskName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesGetPool_Validate(string endpoint, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1741,22 +5155,18 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(catalogName),catalogName); - await eventListener.AssertMinimumLength(nameof(catalogName),catalogName,3); - await eventListener.AssertMaximumLength(nameof(catalogName),catalogName,63); - await eventListener.AssertRegEx(nameof(catalogName),catalogName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(taskName),taskName); + await eventListener.AssertNotNull(nameof(poolName),poolName); + await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); + await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); + await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Gets the log for a customization task. + /// Gets RDP Connection info. /// The DevCenter-specific URI to operate on. /// The DevCenter Project upon which to execute operations. - /// The AAD object id of the user. If value is 'me', the identity is taken from the - /// authentication context. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// The name of a Dev Box. - /// A customization group name. - /// A customization task ID. /// 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). @@ -1765,9 +5175,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetCustomizationTaskLog(string endpoint, string projectName, string userId, string devBoxName, string customizationGroupName, string customizationTaskId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetRemoteConnection(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1779,10 +5189,7 @@ public partial class DevCenterdata + global::System.Uri.EscapeDataString(userId) + "/devboxes/" + global::System.Uri.EscapeDataString(devBoxName) - + "/customizationGroups/" - + global::System.Uri.EscapeDataString(customizationGroupName) - + "/logs/" - + global::System.Uri.EscapeDataString(customizationTaskId) + + "/remoteConnection" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1796,11 +5203,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetCustomizationTaskLog_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesGetRemoteConnection_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets the log for a customization task. + /// Gets RDP Connection info. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -1811,26 +5218,24 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetCustomizationTaskLogViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetRemoteConnectionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/customizationGroups/(?[^/]+)/logs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/remoteConnection$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}/logs/{customizationTaskId}'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/remoteConnection'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; var userId = _match.Groups["userId"].Value; var devBoxName = _match.Groups["devBoxName"].Value; - var customizationGroupName = _match.Groups["customizationGroupName"].Value; - var customizationTaskId = _match.Groups["customizationTaskId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" @@ -1839,10 +5244,7 @@ public partial class DevCenterdata + userId + "/devboxes/" + devBoxName - + "/customizationGroups/" - + customizationGroupName - + "/logs/" - + customizationTaskId + + "/remoteConnection" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1856,11 +5258,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetCustomizationTaskLog_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesGetRemoteConnection_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -1870,7 +5272,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesGetCustomizationTaskLog_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesGetRemoteConnection_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1888,13 +5290,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => body.Result)); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.RemoteConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1910,21 +5312,18 @@ public partial class DevCenterdata } /// - /// Validation method for method. Call this like the actual call, but you will + /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// /// The DevCenter-specific URI to operate on. /// The DevCenter Project upon which to execute operations. - /// The AAD object id of the user. If value is 'me', the identity is taken from the - /// authentication context. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// The name of a Dev Box. - /// A customization group name. - /// A customization task ID. /// 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 DevBoxesGetCustomizationTaskLog_Validate(string endpoint, string projectName, string userId, string devBoxName, string customizationGroupName, string customizationTaskId, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesGetRemoteConnection_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1941,22 +5340,14 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(customizationGroupName),customizationGroupName); - await eventListener.AssertMinimumLength(nameof(customizationGroupName),customizationGroupName,3); - await eventListener.AssertMaximumLength(nameof(customizationGroupName),customizationGroupName,63); - await eventListener.AssertRegEx(nameof(customizationGroupName),customizationGroupName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(customizationTaskId),customizationTaskId); - await eventListener.AssertMinimumLength(nameof(customizationTaskId),customizationTaskId,36); - await eventListener.AssertMaximumLength(nameof(customizationTaskId),customizationTaskId,36); - await eventListener.AssertRegEx(nameof(customizationTaskId),customizationTaskId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$"); } } - /// Gets a Dev Box. + /// Gets a schedule. /// The DevCenter-specific URI to operate on. /// Name of the project. - /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - /// Display name for the Dev Box. + /// Pool name. + /// Display name for the Schedule. /// 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). @@ -1965,9 +5356,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetDevBoxByUser(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetScheduleByPool(string endpoint, string projectName, string poolName, string scheduleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1975,10 +5366,10 @@ public partial class DevCenterdata var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/users/" - + global::System.Uri.EscapeDataString(userId) - + "/devboxes/" - + global::System.Uri.EscapeDataString(devBoxName) + + "/pools/" + + global::System.Uri.EscapeDataString(poolName) + + "/schedules/" + + global::System.Uri.EscapeDataString(scheduleName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1992,11 +5383,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetDevBoxByUser_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesGetScheduleByPool_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets a Dev Box. + /// Gets a schedule. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -2007,32 +5398,32 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetDevBoxByUserViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetScheduleByPoolViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/pools/(?[^/]+)/schedules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; - var userId = _match.Groups["userId"].Value; - var devBoxName = _match.Groups["devBoxName"].Value; + var poolName = _match.Groups["poolName"].Value; + var scheduleName = _match.Groups["scheduleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + projectName - + "/users/" - + userId - + "/devboxes/" - + devBoxName + + "/pools/" + + poolName + + "/schedules/" + + scheduleName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2046,11 +5437,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetDevBoxByUser_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesGetScheduleByPool_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -2060,7 +5451,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesGetDevBoxByUser_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesGetScheduleByPool_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2078,13 +5469,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBox.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Schedule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2100,18 +5491,18 @@ public partial class DevCenterdata } /// - /// Validation method for method. Call this like the actual call, but you will get + /// Validation method for method. Call this like the actual call, but you will get /// validation events back. /// /// The DevCenter-specific URI to operate on. /// Name of the project. - /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - /// Display name for the Dev Box. + /// Pool name. + /// Display name for the Schedule. /// 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 DevBoxesGetDevBoxByUser_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesGetScheduleByPool_Validate(string endpoint, string projectName, string poolName, string scheduleName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2120,23 +5511,23 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(userId),userId); - await eventListener.AssertMinimumLength(nameof(userId),userId,2); - await eventListener.AssertMaximumLength(nameof(userId),userId,36); - await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); - await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); - await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); - await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); - await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(poolName),poolName); + await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); + await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); + await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(scheduleName),scheduleName); + await eventListener.AssertMinimumLength(nameof(scheduleName),scheduleName,3); + await eventListener.AssertMaximumLength(nameof(scheduleName),scheduleName,63); + await eventListener.AssertRegEx(nameof(scheduleName),scheduleName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Gets an operation on a Dev Box. + /// Gets a snapshot by snapshot id. /// The DevCenter-specific URI to operate on. /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// Unique identifier for the Dev Box operation. + /// The id of the snapshot. Should be treated as opaque string. /// 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). @@ -2145,9 +5536,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetOperation(string endpoint, string projectName, string userId, string devBoxName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetSnapshot(string endpoint, string projectName, string userId, string devBoxName, string snapshotId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2159,8 +5550,8 @@ public partial class DevCenterdata + global::System.Uri.EscapeDataString(userId) + "/devboxes/" + global::System.Uri.EscapeDataString(devBoxName) - + "/operations/" - + global::System.Uri.EscapeDataString(operationId) + + "/snapshots/" + + global::System.Uri.EscapeDataString(snapshotId) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2174,11 +5565,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetOperation_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesGetSnapshot_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets an operation on a Dev Box. + /// Gets a snapshot by snapshot id. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -2189,25 +5580,25 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetOperationViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesGetSnapshotViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/operations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/snapshots/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/operations/{operationId}'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/snapshots/{snapshotId}'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; var userId = _match.Groups["userId"].Value; var devBoxName = _match.Groups["devBoxName"].Value; - var operationId = _match.Groups["operationId"].Value; + var snapshotId = _match.Groups["snapshotId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" @@ -2216,8 +5607,8 @@ public partial class DevCenterdata + userId + "/devboxes/" + devBoxName - + "/operations/" - + operationId + + "/snapshots/" + + snapshotId + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2231,11 +5622,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetOperation_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesGetSnapshot_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -2245,7 +5636,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesGetOperation_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesGetSnapshot_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2263,13 +5654,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxOperation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxSnapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2285,19 +5676,19 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. - /// Unique identifier for the Dev Box operation. + /// The id of the snapshot. Should be treated as opaque string. /// 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 DevBoxesGetOperation_Validate(string endpoint, string projectName, string userId, string devBoxName, string operationId, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesGetSnapshot_Validate(string endpoint, string projectName, string userId, string devBoxName, string snapshotId, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2314,15 +5705,15 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(operationId),operationId); - await eventListener.AssertRegEx(nameof(operationId),operationId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(snapshotId),snapshotId); } } - /// Gets a pool. + /// Lists actions on a Dev Box. /// The DevCenter-specific URI to operate on. /// Name of the project. - /// Pool name. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. /// 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). @@ -2331,9 +5722,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetPool(string endpoint, string projectName, string poolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListActions(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2341,8 +5732,11 @@ public partial class DevCenterdata var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/pools/" - + global::System.Uri.EscapeDataString(poolName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "/actions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2356,11 +5750,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetPool_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListActions_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets a pool. + /// Lists actions on a Dev Box. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -2371,29 +5765,33 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetPoolViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListActionsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/pools/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/actions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/pools/{poolName}'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; - var poolName = _match.Groups["poolName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + projectName - + "/pools/" - + poolName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "/actions" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2407,11 +5805,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetPool_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListActions_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -2421,7 +5819,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesGetPool_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesListActions_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2439,13 +5837,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Pool.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBoxAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2461,17 +5859,18 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. /// Name of the project. - /// Pool name. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. /// 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 DevBoxesGetPool_Validate(string endpoint, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesListActions_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2480,18 +5879,56 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(poolName),poolName); - await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); - await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); - await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Lists Dev Boxes that the caller has access to in the DevCenter. + /// The DevCenter-specific URI to operate 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesListAllDevBoxes(string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/devboxes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesListAllDevBoxes_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets RDP Connection info. + /// Lists Dev Boxes in the Dev Center for a particular user. /// The DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute operations. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - /// The name of a Dev Box. /// 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). @@ -2500,21 +5937,17 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetRemoteConnection(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListAllDevBoxesByUser(string endpoint, string userId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/projects/" - + global::System.Uri.EscapeDataString(projectName) - + "/users/" + "/users/" + global::System.Uri.EscapeDataString(userId) - + "/devboxes/" - + global::System.Uri.EscapeDataString(devBoxName) - + "/remoteConnection" + + "/devboxes" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2528,11 +5961,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetRemoteConnection_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListAllDevBoxesByUser_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets RDP Connection info. + /// Lists Dev Boxes in the Dev Center for a particular user. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -2543,33 +5976,27 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetRemoteConnectionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListAllDevBoxesByUserViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/remoteConnection$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/users/(?[^/]+)/devboxes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/remoteConnection'"); + throw new global::System.Exception("Invalid identity for URI '/users/{userId}/devboxes'"); } // replace URI parameters with values from identity - var projectName = _match.Groups["projectName"].Value; var userId = _match.Groups["userId"].Value; - var devBoxName = _match.Groups["devBoxName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/projects/" - + projectName - + "/users/" + "/users/" + userId - + "/devboxes/" - + devBoxName - + "/remoteConnection" + + "/devboxes" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2583,11 +6010,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetRemoteConnection_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListAllDevBoxesByUser_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -2597,7 +6024,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesGetRemoteConnection_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesListAllDevBoxesByUser_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2615,13 +6042,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.RemoteConnection.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBox.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2637,82 +6064,28 @@ public partial class DevCenterdata } /// - /// Validation method for method. Call this like the actual call, but you will + /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// /// The DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute operations. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - /// The name of a Dev Box. /// 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 DevBoxesGetRemoteConnection_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesListAllDevBoxesByUser_Validate(string endpoint, string userId, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(endpoint),endpoint); - await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); - await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); - await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); await eventListener.AssertNotNull(nameof(userId),userId); await eventListener.AssertMinimumLength(nameof(userId),userId,2); await eventListener.AssertMaximumLength(nameof(userId),userId,36); await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); - await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); - await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); - await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); - await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - } - } - - /// Gets a schedule. - /// The DevCenter-specific URI to operate on. - /// Name of the project. - /// Pool name. - /// Display name for the Schedule. - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesGetScheduleByPool(string endpoint, string projectName, string poolName, string scheduleName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) - { - var apiVersion = @"2024-05-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/projects/" - + global::System.Uri.EscapeDataString(projectName) - + "/pools/" - + global::System.Uri.EscapeDataString(poolName) - + "/schedules/" - + global::System.Uri.EscapeDataString(scheduleName) - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.DevBoxesGetScheduleByPool_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets a schedule. + /// Lists Dev Boxes that the caller has access to in the DevCenter. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -2723,32 +6096,24 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesGetScheduleByPoolViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListAllDevBoxesViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/pools/(?[^/]+)/schedules/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/devboxes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}'"); + throw new global::System.Exception("Invalid identity for URI '/devboxes'"); } // replace URI parameters with values from identity - var projectName = _match.Groups["projectName"].Value; - var poolName = _match.Groups["poolName"].Value; - var scheduleName = _match.Groups["scheduleName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/projects/" - + projectName - + "/pools/" - + poolName - + "/schedules/" - + scheduleName + "/devboxes" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2762,11 +6127,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesGetScheduleByPool_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListAllDevBoxes_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -2776,7 +6141,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesGetScheduleByPool_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesListAllDevBoxes_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2794,13 +6159,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Schedule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBox.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2816,42 +6181,31 @@ public partial class DevCenterdata } /// - /// Validation method for method. Call this like the actual call, but you will get + /// Validation method for method. Call this like the actual call, but you will get /// validation events back. /// /// The DevCenter-specific URI to operate on. - /// Name of the project. - /// Pool name. - /// Display name for the Schedule. /// 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 DevBoxesGetScheduleByPool_Validate(string endpoint, string projectName, string poolName, string scheduleName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesListAllDevBoxes_Validate(string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(endpoint),endpoint); - await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); - await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); - await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(poolName),poolName); - await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); - await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); - await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(scheduleName),scheduleName); - await eventListener.AssertMinimumLength(nameof(scheduleName),scheduleName,3); - await eventListener.AssertMaximumLength(nameof(scheduleName),scheduleName,63); - await eventListener.AssertRegEx(nameof(scheduleName),scheduleName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Lists actions on a Dev Box. + /// + /// Lists customization groups on the Dev Box. Listed customization groups exclude + /// task information unless specified via the include parameter. + /// /// The DevCenter-specific URI to operate on. /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. + /// Optional query parameter to specify what properties should be included in the response. /// 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). @@ -2860,9 +6214,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListActions(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListCustomizationGroups(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ListCustomizationGroupsIncludeProperty? include, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2874,9 +6228,11 @@ public partial class DevCenterdata + global::System.Uri.EscapeDataString(userId) + "/devboxes/" + global::System.Uri.EscapeDataString(devBoxName) - + "/actions" + + "/customizationGroups" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(include) ? global::System.String.Empty : "include=" + global::System.Uri.EscapeDataString(include)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -2888,13 +6244,17 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListActions_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListCustomizationGroups_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists actions on a Dev Box. + /// + /// Lists customization groups on the Dev Box. Listed customization groups exclude + /// task information unless specified via the include parameter. + /// /// /// The DevCenter-specific URI to operate on. + /// Optional query parameter to specify what properties should be included in the response. /// 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). @@ -2903,18 +6263,18 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListActionsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListCustomizationGroupsViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ListCustomizationGroupsIncludeProperty? include, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/actions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/customizationGroups$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups'"); } // replace URI parameters with values from identity @@ -2929,9 +6289,11 @@ public partial class DevCenterdata + userId + "/devboxes/" + devBoxName - + "/actions" + + "/customizationGroups" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(include) ? global::System.String.Empty : "include=" + global::System.Uri.EscapeDataString(include)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -2943,11 +6305,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListActions_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListCustomizationGroups_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -2957,7 +6319,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesListActions_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesListCustomizationGroups_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2975,13 +6337,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedDevBoxAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedCustomizationGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2997,18 +6359,19 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. + /// Optional query parameter to specify what properties should be included in the response. /// 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 DevBoxesListActions_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesListCustomizationGroups_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ListCustomizationGroupsIncludeProperty? include, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3025,48 +6388,14 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(include),include); + await eventListener.AssertEnum(nameof(include),include,@"tasks"); } } - /// Lists Dev Boxes that the caller has access to in the DevCenter. - /// The DevCenter-specific URI to operate 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesListAllDevBoxes(string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) - { - var apiVersion = @"2024-05-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/devboxes" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // generate request object - var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.DevBoxesListAllDevBoxes_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// Lists Dev Boxes in the Dev Center for a particular user. + /// Lists all customization tasks available to the project. /// The DevCenter-specific URI to operate on. - /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// The DevCenter Project upon which to execute operations. /// 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). @@ -3075,17 +6404,17 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListAllDevBoxesByUser(string endpoint, string userId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListCustomizationTaskDefinitionsByProject(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/users/" - + global::System.Uri.EscapeDataString(userId) - + "/devboxes" + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/customizationTasks" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3099,11 +6428,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListAllDevBoxesByUser_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListCustomizationTaskDefinitionsByProject_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists Dev Boxes in the Dev Center for a particular user. + /// Lists all customization tasks available to the project. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -3114,27 +6443,27 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListAllDevBoxesByUserViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListCustomizationTaskDefinitionsByProjectViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/users/(?[^/]+)/devboxes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/customizationTasks$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/users/{userId}/devboxes'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/customizationTasks'"); } // replace URI parameters with values from identity - var userId = _match.Groups["userId"].Value; + var projectName = _match.Groups["projectName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/users/" - + userId - + "/devboxes" + "/projects/" + + projectName + + "/customizationTasks" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3148,11 +6477,13 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListAllDevBoxesByUser_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListCustomizationTaskDefinitionsByProject_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -3162,7 +6493,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesListAllDevBoxesByUser_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesListCustomizationTaskDefinitionsByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3180,13 +6511,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedDevBox.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedCustomizationTaskDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3201,29 +6532,74 @@ public partial class DevCenterdata } } - /// - /// 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 DevCenter-specific URI to operate on. + /// The DevCenter Project upon which to execute operations. + /// 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 DevBoxesListCustomizationTaskDefinitionsByProject_Validate(string endpoint, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + + /// Lists addons for this Dev Box. /// The DevCenter-specific URI to operate on. + /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesListAllDevBoxesByUser_Validate(string endpoint, string userId, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task DevBoxesListDevBoxAddons(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(endpoint),endpoint); - await eventListener.AssertNotNull(nameof(userId),userId); - await eventListener.AssertMinimumLength(nameof(userId),userId,2); - await eventListener.AssertMaximumLength(nameof(userId),userId,36); - await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "/addons" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesListDevBoxAddons_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists Dev Boxes that the caller has access to in the DevCenter. + /// Lists addons for this Dev Box. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -3234,24 +6610,33 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListAllDevBoxesViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListDevBoxAddonsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/devboxes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/addons$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/devboxes'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons'"); } // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/devboxes" + "/projects/" + + projectName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "/addons" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3265,11 +6650,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListAllDevBoxes_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListDevBoxAddons_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -3279,7 +6664,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesListAllDevBoxes_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesListDevBoxAddons_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3297,13 +6682,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedDevBox.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBoxAddOn.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3319,31 +6704,41 @@ public partial class DevCenterdata } /// - /// Validation method for method. Call this like the actual call, but you will get + /// Validation method for method. Call this like the actual call, but you will get /// validation events back. /// /// The DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. /// 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 DevBoxesListAllDevBoxes_Validate(string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesListDevBoxAddons_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// - /// Lists customization groups on the Dev Box. Listed customization groups exclude - /// task information unless specified via the include parameter. - /// + /// Lists Dev Boxes in the project for a particular user. /// The DevCenter-specific URI to operate on. - /// Name of the project. + /// The DevCenter Project upon which to execute operations. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - /// Display name for the Dev Box. - /// Optional query parameter to specify what properties should be included in the response. /// 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). @@ -3352,9 +6747,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListCustomizationGroups(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ListCustomizationGroupsIncludeProperty? include, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListDevBoxesByUser(string endpoint, string projectName, string userId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3364,13 +6759,9 @@ public partial class DevCenterdata + global::System.Uri.EscapeDataString(projectName) + "/users/" + global::System.Uri.EscapeDataString(userId) - + "/devboxes/" - + global::System.Uri.EscapeDataString(devBoxName) - + "/customizationGroups" + + "/devboxes" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(include) ? global::System.String.Empty : "include=" + global::System.Uri.EscapeDataString(include)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -3382,17 +6773,13 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListCustomizationGroups_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListDevBoxesByUser_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// Lists customization groups on the Dev Box. Listed customization groups exclude - /// task information unless specified via the include parameter. - /// + /// Lists Dev Boxes in the project for a particular user. /// /// The DevCenter-specific URI to operate on. - /// Optional query parameter to specify what properties should be included in the response. /// 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). @@ -3401,37 +6788,32 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListCustomizationGroupsViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ListCustomizationGroupsIncludeProperty? include, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListDevBoxesByUserViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/customizationGroups$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; var userId = _match.Groups["userId"].Value; - var devBoxName = _match.Groups["devBoxName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + projectName + "/users/" + userId - + "/devboxes/" - + devBoxName - + "/customizationGroups" + + "/devboxes" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - + "&" - + (string.IsNullOrEmpty(include) ? global::System.String.Empty : "include=" + global::System.Uri.EscapeDataString(include)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -3443,11 +6825,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListCustomizationGroups_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListDevBoxesByUser_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -3457,7 +6839,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesListCustomizationGroups_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesListDevBoxesByUser_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3475,13 +6857,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedCustomizationGroup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBox.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3497,19 +6879,17 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. - /// Name of the project. + /// The DevCenter Project upon which to execute operations. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - /// Display name for the Dev Box. - /// Optional query parameter to specify what properties should be included in the response. /// 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 DevBoxesListCustomizationGroups_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ListCustomizationGroupsIncludeProperty? include, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesListDevBoxesByUser_Validate(string endpoint, string projectName, string userId, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3522,18 +6902,14 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(userId),userId,2); await eventListener.AssertMaximumLength(nameof(userId),userId,36); await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); - await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); - await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); - await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); - await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(include),include); - await eventListener.AssertEnum(nameof(include),include,@"tasks"); } } - /// Lists all customization tasks available to the project. + /// Lists operations on the Dev Box which have occurred within the past 90 days. /// The DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute operations. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. /// 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). @@ -3542,9 +6918,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListCustomizationTaskDefinitionsByProject(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListOperations(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3552,7 +6928,11 @@ public partial class DevCenterdata var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/customizationTasks" + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3566,11 +6946,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListCustomizationTaskDefinitionsByProject_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListOperations_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists all customization tasks available to the project. + /// Lists operations on the Dev Box which have occurred within the past 90 days. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -3581,27 +6961,33 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListCustomizationTaskDefinitionsByProjectViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListOperationsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/customizationTasks$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/customizationTasks'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/operations'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + projectName - + "/customizationTasks" + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3615,13 +7001,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListCustomizationTaskDefinitionsByProject_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListOperations_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// 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 @@ -3631,7 +7015,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesListCustomizationTaskDefinitionsByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesListOperations_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3649,13 +7033,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedCustomizationTaskDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBoxOperation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3671,16 +7055,18 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute operations. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. /// 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 DevBoxesListCustomizationTaskDefinitionsByProject_Validate(string endpoint, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesListOperations_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3689,13 +7075,20 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Lists Dev Boxes in the project for a particular user. + /// Lists available pools. /// The DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute operations. - /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Name of the project. /// 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). @@ -3704,9 +7097,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListDevBoxesByUser(string endpoint, string projectName, string userId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListPools(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3714,9 +7107,7 @@ public partial class DevCenterdata var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/users/" - + global::System.Uri.EscapeDataString(userId) - + "/devboxes" + + "/pools" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3730,11 +7121,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListDevBoxesByUser_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListPools_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists Dev Boxes in the project for a particular user. + /// Lists available pools. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -3745,30 +7136,27 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListDevBoxesByUserViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListPoolsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/pools$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/pools'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; - var userId = _match.Groups["userId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + projectName - + "/users/" - + userId - + "/devboxes" + + "/pools" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3782,11 +7170,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListDevBoxesByUser_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListPools_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -3796,7 +7184,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesListDevBoxesByUser_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesListPools_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3814,13 +7202,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedDevBox.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedPool.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3836,17 +7224,16 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute operations. - /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Name of the project. /// 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 DevBoxesListDevBoxesByUser_Validate(string endpoint, string projectName, string userId, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesListPools_Validate(string endpoint, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3855,18 +7242,15 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(userId),userId); - await eventListener.AssertMinimumLength(nameof(userId),userId,2); - await eventListener.AssertMaximumLength(nameof(userId),userId,36); - await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); } } - /// Lists operations on the Dev Box which have occurred within the past 90 days. + /// + /// Lists all schedules within a pool that are configured by your project administrator. + /// /// The DevCenter-specific URI to operate on. - /// Name of the project. - /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - /// Display name for the Dev Box. + /// The DevCenter Project upon which to execute operations. + /// The name of a pool of Dev Boxes. /// 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). @@ -3875,9 +7259,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListOperations(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListSchedulesByPool(string endpoint, string projectName, string poolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3885,11 +7269,9 @@ public partial class DevCenterdata var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/users/" - + global::System.Uri.EscapeDataString(userId) - + "/devboxes/" - + global::System.Uri.EscapeDataString(devBoxName) - + "/operations" + + "/pools/" + + global::System.Uri.EscapeDataString(poolName) + + "/schedules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3903,11 +7285,13 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListOperations_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListSchedulesByPool_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists operations on the Dev Box which have occurred within the past 90 days. + /// + /// Lists all schedules within a pool that are configured by your project administrator. + /// /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -3918,33 +7302,30 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListOperationsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListSchedulesByPoolViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/pools/(?[^/]+)/schedules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/operations'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/pools/{poolName}/schedules'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; - var userId = _match.Groups["userId"].Value; - var devBoxName = _match.Groups["devBoxName"].Value; + var poolName = _match.Groups["poolName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + projectName - + "/users/" - + userId - + "/devboxes/" - + devBoxName - + "/operations" + + "/pools/" + + poolName + + "/schedules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3958,11 +7339,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListOperations_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListSchedulesByPool_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -3972,7 +7353,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesListOperations_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesListSchedulesByPool_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3990,13 +7371,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedDevBoxOperation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedSchedule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4012,18 +7393,17 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. - /// Name of the project. - /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - /// Display name for the Dev Box. + /// The DevCenter Project upon which to execute operations. + /// The name of a pool of Dev Boxes. /// 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 DevBoxesListOperations_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesListSchedulesByPool_Validate(string endpoint, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -4032,20 +7412,18 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(userId),userId); - await eventListener.AssertMinimumLength(nameof(userId),userId,2); - await eventListener.AssertMaximumLength(nameof(userId),userId,36); - await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); - await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); - await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); - await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); - await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(poolName),poolName); + await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); + await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); + await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// Lists available pools. + /// + /// Lists all schedules within a project that are configured by your project administrator. + /// /// The DevCenter-specific URI to operate on. - /// Name of the project. + /// The DevCenter Project upon which to execute operations. /// 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). @@ -4054,9 +7432,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListPools(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListSchedulesByProject(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4064,7 +7442,7 @@ public partial class DevCenterdata var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/pools" + + "/schedules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4078,11 +7456,13 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListPools_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListSchedulesByProject_Call(request,onOk,onDefault,eventListener,sender); } } - /// Lists available pools. + /// + /// Lists all schedules within a project that are configured by your project administrator. + /// /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -4093,18 +7473,18 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListPoolsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListSchedulesByProjectViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/pools$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/schedules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/pools'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/schedules'"); } // replace URI parameters with values from identity @@ -4113,7 +7493,7 @@ public partial class DevCenterdata var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + projectName - + "/pools" + + "/schedules" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4127,11 +7507,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListPools_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListSchedulesByProject_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -4141,7 +7521,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesListPools_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesListSchedulesByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4159,13 +7539,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedPool.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedSchedule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4181,16 +7561,16 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. - /// Name of the project. + /// The DevCenter Project upon which to execute operations. /// 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 DevBoxesListPools_Validate(string endpoint, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesListSchedulesByProject_Validate(string endpoint, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -4202,12 +7582,11 @@ public partial class DevCenterdata } } - /// - /// Lists all schedules within a pool that are configured by your project administrator. - /// + /// Lists snapshots for this Dev Box. /// The DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute operations. - /// The name of a pool of Dev Boxes. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. /// 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). @@ -4216,9 +7595,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListSchedulesByPool(string endpoint, string projectName, string poolName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListSnapshots(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4226,9 +7605,11 @@ public partial class DevCenterdata var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/pools/" - + global::System.Uri.EscapeDataString(poolName) - + "/schedules" + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + "/snapshots" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4242,13 +7623,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListSchedulesByPool_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListSnapshots_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// Lists all schedules within a pool that are configured by your project administrator. - /// + /// Lists snapshots for this Dev Box. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -4259,30 +7638,33 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListSchedulesByPoolViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesListSnapshotsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/pools/(?[^/]+)/schedules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+)/snapshots$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/pools/{poolName}/schedules'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/snapshots'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; - var poolName = _match.Groups["poolName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + projectName - + "/pools/" - + poolName - + "/schedules" + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + "/snapshots" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4296,11 +7678,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListSchedulesByPool_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesListSnapshots_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -4310,7 +7692,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesListSchedulesByPool_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesListSnapshots_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4328,13 +7710,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedSchedule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedDevBoxSnapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4350,17 +7732,18 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute operations. - /// The name of a pool of Dev Boxes. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. /// 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 DevBoxesListSchedulesByPool_Validate(string endpoint, string projectName, string poolName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesListSnapshots_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -4369,18 +7752,24 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); - await eventListener.AssertNotNull(nameof(poolName),poolName); - await eventListener.AssertMinimumLength(nameof(poolName),poolName,3); - await eventListener.AssertMaximumLength(nameof(poolName),poolName,63); - await eventListener.AssertRegEx(nameof(poolName),poolName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } /// - /// Lists all schedules within a project that are configured by your project administrator. + /// Attempts automated repair steps to resolve common problems on a Dev Box. The Dev Box may restart during this operation. /// /// The DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute operations. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. /// 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). @@ -4389,9 +7778,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListSchedulesByProject(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesRepairDevBox(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4399,7 +7788,11 @@ public partial class DevCenterdata var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/schedules" + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + ":repair" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4408,17 +7801,17 @@ public partial class DevCenterdata // generate request object var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesListSchedulesByProject_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesRepairDevBox_Call(request,onOk,onDefault,eventListener,sender); } } /// - /// Lists all schedules within a project that are configured by your project administrator. + /// Attempts automated repair steps to resolve common problems on a Dev Box. The Dev Box may restart during this operation. /// /// /// The DevCenter-specific URI to operate on. @@ -4430,27 +7823,33 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesListSchedulesByProjectViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesRepairDevBoxViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/schedules$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+):repair$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/schedules'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:repair'"); } // replace URI parameters with values from identity var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/projects/" + projectName - + "/schedules" + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + ":repair" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4459,36 +7858,136 @@ public partial class DevCenterdata // generate request object var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.DevBoxesListSchedulesByProject_Call(request,onOk,onDefault,eventListener,sender); - } - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesRepairDevBox_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesRepairDevBox_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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( Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get); + + // drop the old response + _response?.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesListSchedulesByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4496,13 +7995,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedSchedule.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4518,16 +8017,18 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. - /// The DevCenter Project upon which to execute operations. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. /// 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 DevBoxesListSchedulesByProject_Validate(string endpoint, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesRepairDevBox_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -4536,12 +8037,18 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); } } - /// - /// Attempts automated repair steps to resolve common problems on a Dev Box. The Dev Box may restart during this operation. - /// + /// Restarts a Dev Box. /// The DevCenter-specific URI to operate on. /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. @@ -4554,9 +8061,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesRepairDevBox(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesRestartDevBox(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4568,7 +8075,7 @@ public partial class DevCenterdata + global::System.Uri.EscapeDataString(userId) + "/devboxes/" + global::System.Uri.EscapeDataString(devBoxName) - + ":repair" + + ":restart" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4582,13 +8089,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesRepairDevBox_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesRestartDevBox_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// Attempts automated repair steps to resolve common problems on a Dev Box. The Dev Box may restart during this operation. - /// + /// Restarts a Dev Box. /// /// The DevCenter-specific URI to operate on. /// a delegate that is called when the remote service returns 200 (OK). @@ -4599,18 +8104,18 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesRepairDevBoxViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesRestartDevBoxViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+):repair$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+):restart$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:repair'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:restart'"); } // replace URI parameters with values from identity @@ -4625,7 +8130,7 @@ public partial class DevCenterdata + userId + "/devboxes/" + devBoxName - + ":repair" + + ":restart" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4639,11 +8144,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesRepairDevBox_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesRestartDevBox_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -4653,7 +8158,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesRepairDevBox_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesRestartDevBox_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4771,13 +8276,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4793,7 +8298,7 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. @@ -4804,7 +8309,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesRepairDevBox_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesRestartDevBox_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -4824,11 +8329,12 @@ public partial class DevCenterdata } } - /// Restarts a Dev Box. + /// Restores a Dev Box to a specified snapshot. /// The DevCenter-specific URI to operate on. /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. + /// Required parameter that specifies the snapshot id to use for the restore 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). @@ -4837,9 +8343,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesRestartDevBox(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesRestoreSnapshot(string endpoint, string projectName, string userId, string devBoxName, string snapshotId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4851,9 +8357,11 @@ public partial class DevCenterdata + global::System.Uri.EscapeDataString(userId) + "/devboxes/" + global::System.Uri.EscapeDataString(devBoxName) - + ":restart" + + ":restoreSnapshot" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + "snapshotId=" + global::System.Uri.EscapeDataString(snapshotId) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -4865,13 +8373,14 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesRestartDevBox_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesRestoreSnapshot_Call(request,onOk,onDefault,eventListener,sender); } } - /// Restarts a Dev Box. + /// Restores a Dev Box to a specified snapshot. /// /// The DevCenter-specific URI to operate on. + /// Required parameter that specifies the snapshot id to use for the restore 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). @@ -4880,18 +8389,18 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesRestartDevBoxViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesRestoreSnapshotViaIdentity(global::System.String viaIdentity, string endpoint, string snapshotId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+):restart$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+):restoreSnapshot$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:restart'"); + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:restoreSnapshot'"); } // replace URI parameters with values from identity @@ -4906,9 +8415,11 @@ public partial class DevCenterdata + userId + "/devboxes/" + devBoxName - + ":restart" + + ":restoreSnapshot" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + "snapshotId=" + global::System.Uri.EscapeDataString(snapshotId) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -4920,11 +8431,11 @@ public partial class DevCenterdata await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.DevBoxesRestartDevBox_Call(request,onOk,onDefault,eventListener,sender); + await this.DevBoxesRestoreSnapshot_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -4934,7 +8445,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesRestartDevBox_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesRestoreSnapshot_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5000,51 +8511,248 @@ public partial class DevCenterdata break; } - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// Required parameter that specifies the snapshot id to use for the restore operation. + /// 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 DevBoxesRestoreSnapshot_Validate(string endpoint, string projectName, string userId, string devBoxName, string snapshotId, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(userId),userId); + await eventListener.AssertMinimumLength(nameof(userId),userId,2); + await eventListener.AssertMaximumLength(nameof(userId),userId,36); + await eventListener.AssertRegEx(nameof(userId),userId,@"^[a-zA-Z0-9]{8}-([a-zA-Z0-9]{4}-){3}[a-zA-Z0-9]{12}$|^me$"); + await eventListener.AssertNotNull(nameof(devBoxName),devBoxName); + await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); + await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); + await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(snapshotId),snapshotId); + } + } + + /// + /// Lets a user set their own active hours for their Dev Box, overriding the defaults set at the pool level. + /// + /// The DevCenter-specific URI to operate on. + /// Name of the project. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// Display name for the Dev Box. + /// Manual user set active hours configuration. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesSetActiveHours(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/users/" + + global::System.Uri.EscapeDataString(userId) + + "/devboxes/" + + global::System.Uri.EscapeDataString(devBoxName) + + ":setActiveHours" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesSetActiveHours_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Lets a user set their own active hours for their Dev Box, overriding the defaults set at the pool level. + /// + /// + /// The DevCenter-specific URI to operate on. + /// Manual user set active hours configuration. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesSetActiveHoursViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/users/(?[^/]+)/devboxes/(?[^/]+):setActiveHours$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:setActiveHours'"); + } - 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException(_response); - } - } + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + var userId = _match.Groups["userId"].Value; + var devBoxName = _match.Groups["devBoxName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/users/" + + userId + + "/devboxes/" + + devBoxName + + ":setActiveHours" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // 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? - if (!string.IsNullOrWhiteSpace(_finalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // drop the old response - _response?.Dispose(); + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevBoxesSetActiveHours_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevBoxesSetActiveHours_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5052,13 +8760,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBox.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5074,18 +8782,19 @@ public partial class DevCenterdata } /// - /// 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 DevCenter-specific URI to operate on. /// Name of the project. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Display name for the Dev Box. + /// Manual user set active hours configuration. /// 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 DevBoxesRestartDevBox_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesSetActiveHours_Validate(string endpoint, string projectName, string userId, string devBoxName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration body, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -5102,6 +8811,8 @@ public partial class DevCenterdata await eventListener.AssertMinimumLength(nameof(devBoxName),devBoxName,3); await eventListener.AssertMaximumLength(nameof(devBoxName),devBoxName,63); await eventListener.AssertRegEx(nameof(devBoxName),devBoxName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } @@ -5119,9 +8830,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesSkipAction(string endpoint, string projectName, string userId, string devBoxName, string actionName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesSkipAction(string endpoint, string projectName, string userId, string devBoxName, string actionName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5164,9 +8875,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesSkipActionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesSkipActionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5221,7 +8932,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesSkipAction_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesSkipAction_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5245,7 +8956,7 @@ public partial class DevCenterdata default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5310,9 +9021,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesStartDevBox(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesStartDevBox(string endpoint, string projectName, string userId, string devBoxName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5353,9 +9064,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesStartDevBoxViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesStartDevBoxViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5407,7 +9118,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesStartDevBox_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesStartDevBox_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5525,13 +9236,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5592,9 +9303,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesStopDevBox(string endpoint, string projectName, string userId, string devBoxName, bool? hibernate, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesStopDevBox(string endpoint, string projectName, string userId, string devBoxName, bool? hibernate, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5638,9 +9349,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesStopDevBoxViaIdentity(global::System.String viaIdentity, string endpoint, bool? hibernate, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesStopDevBoxViaIdentity(global::System.String viaIdentity, string endpoint, bool? hibernate, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5694,7 +9405,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesStopDevBox_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesStopDevBox_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5812,13 +9523,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5877,9 +9588,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesValidateCustomizationTasksAction(string endpoint, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskList body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesValidateCustomizationTasksAction(string endpoint, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskList body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5920,9 +9631,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task DevBoxesValidateCustomizationTasksActionViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskList body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task DevBoxesValidateCustomizationTasksActionViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskList body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5973,7 +9684,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesValidateCustomizationTasksAction_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task DevBoxesValidateCustomizationTasksAction_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6091,7 +9802,7 @@ public partial class DevCenterdata default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6117,7 +9828,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task DevBoxesValidateCustomizationTasksAction_Validate(string endpoint, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskList body, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task DevBoxesValidateCustomizationTasksAction_Validate(string endpoint, string projectName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskList body, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -6131,6 +9842,193 @@ public partial class DevCenterdata } } + /// Gets a list of Dev Box creations that are pending approval. + /// The DevCenter-specific URI to operate on. + /// Name of the project. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Select the specified fields to be included in the response. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenterListApprovals(string endpoint, string projectName, int? top, int? skip, int? maxpagesize, string[] select, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/approvals" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == top ? global::System.String.Empty : "top=" + global::System.Uri.EscapeDataString(top.ToString())) + + "&" + + (null == skip ? global::System.String.Empty : "skip=" + global::System.Uri.EscapeDataString(skip.ToString())) + + "&" + + (null == maxpagesize ? global::System.String.Empty : "maxpagesize=" + global::System.Uri.EscapeDataString(maxpagesize.ToString())) + + "&" + + (null != select && select.Length > 0 ? "select=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(select, (current, each) => current + "," + ( null == each ? global::System.String.Empty : each.ToString()) )) : global::System.String.Empty) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevCenterListApprovals_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets a list of Dev Box creations that are pending approval. + /// + /// The DevCenter-specific URI to operate on. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Select the specified fields to be included in the response. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenterListApprovalsViaIdentity(global::System.String viaIdentity, string endpoint, int? top, int? skip, int? maxpagesize, string[] select, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/projects/(?[^/]+)/approvals$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/projects/{projectName}/approvals'"); + } + + // replace URI parameters with values from identity + var projectName = _match.Groups["projectName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/projects/" + + projectName + + "/approvals" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == top ? global::System.String.Empty : "top=" + global::System.Uri.EscapeDataString(top.ToString())) + + "&" + + (null == skip ? global::System.String.Empty : "skip=" + global::System.Uri.EscapeDataString(skip.ToString())) + + "&" + + (null == maxpagesize ? global::System.String.Empty : "maxpagesize=" + global::System.Uri.EscapeDataString(maxpagesize.ToString())) + + "&" + + (null != select && select.Length > 0 ? "select=" + global::System.Uri.EscapeDataString(global::System.Linq.Enumerable.Aggregate(select, (current, each) => current + "," + ( null == each ? global::System.String.Empty : each.ToString()) )) : global::System.String.Empty) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"{endpoint}{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DevCenterListApprovals_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 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenterListApprovals_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedApproval.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 DevCenter-specific URI to operate on. + /// Name of the project. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// Select the specified fields to be included in the response. + /// 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 DevCenterListApprovals_Validate(string endpoint, string projectName, int? top, int? skip, int? maxpagesize, string[] select, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(endpoint),endpoint); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); + await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); + } + } + /// Get an environment type configured for a project. /// The DevCenter-specific URI to operate on. /// Name of the project. @@ -6143,9 +10041,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesGet(string endpoint, string projectName, string environmentTypeName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentTypesGet(string endpoint, string projectName, string environmentTypeName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6176,8 +10074,7 @@ public partial class DevCenterdata /// The DevCenter-specific URI to operate on. /// The DevCenter Project upon which to execute operations. /// The name of the environment type - /// The AAD object id of the user. If value is 'me', the identity is taken from the - /// authentication context. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// The maximum number of resources to return from the operation. Example: 'top=10'. /// 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 @@ -6187,9 +10084,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesGetAbilities(string endpoint, string projectName, string environmentTypeName, string userId, int? top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentTypesGetAbilities(string endpoint, string projectName, string environmentTypeName, string userId, int? top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6233,9 +10130,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesGetAbilitiesViaIdentity(global::System.String viaIdentity, string endpoint, int? top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentTypesGetAbilitiesViaIdentity(global::System.String viaIdentity, string endpoint, int? top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6289,7 +10186,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentTypesGetAbilities_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentTypesGetAbilities_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6307,13 +10204,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentTypeAbilities.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentTypeAbilities.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6335,8 +10232,7 @@ public partial class DevCenterdata /// The DevCenter-specific URI to operate on. /// The DevCenter Project upon which to execute operations. /// The name of the environment type - /// The AAD object id of the user. If value is 'me', the identity is taken from the - /// authentication context. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// The maximum number of resources to return from the operation. Example: 'top=10'. /// an instance that will receive events. /// @@ -6350,7 +10246,7 @@ public partial class DevCenterdata await eventListener.AssertNotNull(nameof(projectName),projectName); await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); - await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$"); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); await eventListener.AssertNotNull(nameof(environmentTypeName),environmentTypeName); await eventListener.AssertMinimumLength(nameof(environmentTypeName),environmentTypeName,3); await eventListener.AssertMaximumLength(nameof(environmentTypeName),environmentTypeName,63); @@ -6373,9 +10269,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesGetViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentTypesGetViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6423,7 +10319,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentTypesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentTypesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6441,13 +10337,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6500,9 +10396,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesList(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentTypesList(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6539,9 +10435,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentTypesListViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentTypesListViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6587,7 +10483,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentTypesList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentTypesList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6605,13 +10501,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironmentType.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6662,9 +10558,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsCreateOrReplaceEnvironment(string endpoint, string projectName, string userId, string environmentName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsCreateOrReplaceEnvironment(string endpoint, string projectName, string userId, string environmentName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6709,9 +10605,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsCreateOrReplaceEnvironmentViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsCreateOrReplaceEnvironmentViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6768,7 +10664,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsCreateOrReplaceEnvironment_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsCreateOrReplaceEnvironment_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6885,13 +10781,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Environment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Environment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6919,7 +10815,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsCreateOrReplaceEnvironment_Validate(string endpoint, string projectName, string userId, string environmentName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment body, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task EnvironmentsCreateOrReplaceEnvironment_Validate(string endpoint, string projectName, string userId, string environmentName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment body, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -6947,7 +10843,7 @@ public partial class DevCenterdata /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Environment name. /// Uniquely identifies the action. - /// The time to delay the Environment action until. + /// The time to delay the Environment action until, in RFC3339 format. /// 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). @@ -6956,9 +10852,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsDelayAction(string endpoint, string projectName, string userId, string environmentName, string actionName, global::System.DateTime until, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsDelayAction(string endpoint, string projectName, string userId, string environmentName, string actionName, global::System.DateTime until, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6995,7 +10891,7 @@ public partial class DevCenterdata /// Delays the occurrence of an action. /// /// The DevCenter-specific URI to operate on. - /// The time to delay the Environment action until. + /// The time to delay the Environment action until, in RFC3339 format. /// 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). @@ -7004,9 +10900,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsDelayActionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.DateTime until, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsDelayActionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.DateTime until, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7063,7 +10959,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsDelayAction_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsDelayAction_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7081,13 +10977,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7111,7 +11007,7 @@ public partial class DevCenterdata /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// Environment name. /// Uniquely identifies the action. - /// The time to delay the Environment action until. + /// The time to delay the Environment action until, in RFC3339 format. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. @@ -7145,6 +11041,9 @@ public partial class DevCenterdata /// The DevCenter Project upon which to execute operations. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// The name of the environment. + /// The query option to force environment deletion even if the environment definition does not exist. + /// This is a best-effort delete, and anything custom that forces resource creation beyond the associated resource group may + /// not be deleted. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled @@ -7154,9 +11053,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsDeleteEnvironment(string endpoint, string projectName, string userId, string environmentName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsDeleteEnvironment(string endpoint, string projectName, string userId, string environmentName, bool? force, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7170,6 +11069,8 @@ public partial class DevCenterdata + global::System.Uri.EscapeDataString(environmentName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == force ? global::System.String.Empty : "force=" + global::System.Uri.EscapeDataString(force.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -7188,6 +11089,9 @@ public partial class DevCenterdata /// Deletes an environment and all its associated resources /// /// The DevCenter-specific URI to operate on. + /// The query option to force environment deletion even if the environment definition does not exist. + /// This is a best-effort delete, and anything custom that forces resource creation beyond the associated resource group may + /// not be deleted. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled @@ -7197,9 +11101,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsDeleteEnvironmentViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsDeleteEnvironmentViaIdentity(global::System.String viaIdentity, string endpoint, bool? force, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7225,6 +11129,8 @@ public partial class DevCenterdata + environmentName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (null == force ? global::System.String.Empty : "force=" + global::System.Uri.EscapeDataString(force.ToString())) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -7251,7 +11157,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsDeleteEnvironment_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsDeleteEnvironment_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7369,7 +11275,7 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } case global::System.Net.HttpStatusCode.NoContent: @@ -7381,7 +11287,7 @@ public partial class DevCenterdata default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7404,11 +11310,14 @@ public partial class DevCenterdata /// The DevCenter Project upon which to execute operations. /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// The name of the environment. + /// The query option to force environment deletion even if the environment definition does not exist. + /// This is a best-effort delete, and anything custom that forces resource creation beyond the associated resource group may + /// not be deleted. /// 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 EnvironmentsDeleteEnvironment_Validate(string endpoint, string projectName, string userId, string environmentName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task EnvironmentsDeleteEnvironment_Validate(string endpoint, string projectName, string userId, string environmentName, bool? force, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -7442,9 +11351,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsGetAction(string endpoint, string projectName, string userId, string environmentName, string actionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsGetAction(string endpoint, string projectName, string userId, string environmentName, string actionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7486,9 +11395,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsGetActionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsGetActionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7542,7 +11451,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsGetAction_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsGetAction_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7560,13 +11469,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7630,9 +11539,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsGetCatalog(string endpoint, string projectName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsGetCatalog(string endpoint, string projectName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7670,9 +11579,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsGetCatalogViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsGetCatalogViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7720,7 +11629,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsGetCatalog_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsGetCatalog_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7738,13 +11647,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Catalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7799,9 +11708,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsGetEnvironmentByUser(string endpoint, string projectName, string userId, string environmentName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsGetEnvironmentByUser(string endpoint, string projectName, string userId, string environmentName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7841,9 +11750,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsGetEnvironmentByUserViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsGetEnvironmentByUserViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7894,7 +11803,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsGetEnvironmentByUser_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsGetEnvironmentByUser_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7912,13 +11821,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Environment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Environment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -7978,9 +11887,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsGetEnvironmentDefinition(string endpoint, string projectName, string catalogName, string definitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsGetEnvironmentDefinition(string endpoint, string projectName, string catalogName, string definitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8020,9 +11929,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsGetEnvironmentDefinitionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsGetEnvironmentDefinitionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8075,7 +11984,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsGetEnvironmentDefinition_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsGetEnvironmentDefinition_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8093,13 +12002,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8160,9 +12069,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsGetLogsByOperation(string endpoint, string projectName, string userId, string environmentName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsGetLogsByOperation(string endpoint, string projectName, string userId, string environmentName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8205,9 +12114,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsGetLogsByOperationViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsGetLogsByOperationViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8262,7 +12171,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsGetLogsByOperation_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsGetLogsByOperation_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8286,7 +12195,7 @@ public partial class DevCenterdata default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8352,9 +12261,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsGetOperation(string endpoint, string projectName, string userId, string environmentName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsGetOperation(string endpoint, string projectName, string userId, string environmentName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8396,9 +12305,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsGetOperationViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsGetOperationViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8452,7 +12361,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsGetOperation_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsGetOperation_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8470,13 +12379,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8539,9 +12448,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsGetOutputs(string endpoint, string projectName, string userId, string environmentName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsGetOutputs(string endpoint, string projectName, string userId, string environmentName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8582,9 +12491,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsGetOutputsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsGetOutputsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8636,7 +12545,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsGetOutputs_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsGetOutputs_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8654,13 +12563,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOutputs1.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOutputs1.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8720,9 +12629,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsListActions(string endpoint, string projectName, string userId, string environmentName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsListActions(string endpoint, string projectName, string userId, string environmentName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8763,9 +12672,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsListActionsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsListActionsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8817,7 +12726,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsListActions_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsListActions_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8835,13 +12744,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironmentAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironmentAction.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -8899,9 +12808,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsListCatalogsByProject(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsListCatalogsByProject(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8938,9 +12847,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsListCatalogsByProjectViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsListCatalogsByProjectViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8986,7 +12895,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsListCatalogsByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsListCatalogsByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9004,13 +12913,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedCatalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedCatalog.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9059,9 +12968,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentDefinitionsByCatalog(string endpoint, string projectName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentDefinitionsByCatalog(string endpoint, string projectName, string catalogName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9100,9 +13009,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentDefinitionsByCatalogViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentDefinitionsByCatalogViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9153,7 +13062,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentDefinitionsByCatalog_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentDefinitionsByCatalog_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9171,13 +13080,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironmentDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironmentDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9230,9 +13139,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentDefinitionsByProject(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentDefinitionsByProject(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9269,9 +13178,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentDefinitionsByProjectViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentDefinitionsByProjectViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9319,7 +13228,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentDefinitionsByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentDefinitionsByProject_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9337,13 +13246,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironmentDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironmentDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9391,9 +13300,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsListEnvironments(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsListEnvironments(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9431,9 +13340,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentsByUser(string endpoint, string projectName, string userId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentsByUser(string endpoint, string projectName, string userId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9472,9 +13381,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentsByUserViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentsByUserViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9523,7 +13432,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentsByUser_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentsByUser_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9541,13 +13450,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9600,9 +13509,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsListEnvironmentsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9648,7 +13557,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsListEnvironments_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsListEnvironments_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9666,13 +13575,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9722,9 +13631,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsListOperations(string endpoint, string projectName, string userId, string environmentName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsListOperations(string endpoint, string projectName, string userId, string environmentName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9765,9 +13674,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsListOperationsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsListOperationsViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9819,7 +13728,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsListOperations_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsListOperations_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -9837,13 +13746,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedEnvironmentOperation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedEnvironmentOperation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -9904,9 +13813,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsPatchEnvironment(string endpoint, string projectName, string userId, string environmentName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsPatchEnvironment(string endpoint, string projectName, string userId, string environmentName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9951,9 +13860,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsPatchEnvironmentViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsPatchEnvironmentViaIdentity(global::System.String viaIdentity, string endpoint, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10008,7 +13917,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsPatchEnvironment_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsPatchEnvironment_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10026,13 +13935,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Environment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Environment.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10060,7 +13969,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsPatchEnvironment_Validate(string endpoint, string projectName, string userId, string environmentName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate body, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task EnvironmentsPatchEnvironment_Validate(string endpoint, string projectName, string userId, string environmentName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties body, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -10096,9 +14005,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsSkipAction(string endpoint, string projectName, string userId, string environmentName, string actionName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsSkipAction(string endpoint, string projectName, string userId, string environmentName, string actionName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10141,9 +14050,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EnvironmentsSkipActionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EnvironmentsSkipActionViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10198,7 +14107,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EnvironmentsSkipAction_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EnvironmentsSkipAction_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10222,7 +14131,7 @@ public partial class DevCenterdata default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10286,9 +14195,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationStatusesGet(string endpoint, string projectName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationStatusesGet(string endpoint, string projectName, string operationId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10326,9 +14235,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task OperationStatusesGetViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationStatusesGetViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10376,7 +14285,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationStatusesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationStatusesGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10394,13 +14303,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10451,9 +14360,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsGet(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsGet(string endpoint, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10481,8 +14390,7 @@ public partial class DevCenterdata /// Gets the signed-in user's permitted abilities in a project. /// The DevCenter-specific URI to operate on. /// The DevCenter Project upon which to execute operations. - /// The AAD object id of the user. If value is 'me', the identity is taken from the - /// authentication context. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// 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). @@ -10491,9 +14399,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsGetAbilities(string endpoint, string projectName, string userId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsGetAbilities(string endpoint, string projectName, string userId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10532,9 +14440,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsGetAbilitiesViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsGetAbilitiesViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10583,7 +14491,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectsGetAbilities_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsGetAbilities_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10601,13 +14509,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ProjectAbilities.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ProjectAbilities.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10628,8 +14536,7 @@ public partial class DevCenterdata /// /// The DevCenter-specific URI to operate on. /// The DevCenter Project upon which to execute operations. - /// The AAD object id of the user. If value is 'me', the identity is taken from the - /// authentication context. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. @@ -10642,7 +14549,7 @@ public partial class DevCenterdata await eventListener.AssertNotNull(nameof(projectName),projectName); await eventListener.AssertMinimumLength(nameof(projectName),projectName,3); await eventListener.AssertMaximumLength(nameof(projectName),projectName,63); - await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-]{2,62}$"); + await eventListener.AssertRegEx(nameof(projectName),projectName,@"^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,62}$"); await eventListener.AssertNotNull(nameof(userId),userId); await eventListener.AssertMinimumLength(nameof(userId),userId,2); await eventListener.AssertMaximumLength(nameof(userId),userId,36); @@ -10661,9 +14568,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsGetViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsGetViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10708,7 +14615,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsGet_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10726,13 +14633,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -10779,9 +14686,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsList(string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsList(string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10816,9 +14723,9 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsListViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsListViaIdentity(global::System.String viaIdentity, string endpoint, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { - var apiVersion = @"2024-05-01-preview"; + var apiVersion = @"2025-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10861,7 +14768,7 @@ public partial class DevCenterdata /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectsList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsList_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, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -10879,13 +14786,13 @@ public partial class DevCenterdata case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PagedProject.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PagedProject.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Catalog.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Catalog.PowerShell.cs deleted file mode 100644 index b12ab7d300ab..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Catalog.PowerShell.cs +++ /dev/null @@ -1,152 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// A catalog. - [System.ComponentModel.TypeConverter(typeof(CatalogTypeConverter))] - public partial class Catalog - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Catalog(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalogInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalogInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalogInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalogInternal)this).Name, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Catalog(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalogInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalogInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalogInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalogInternal)this).Name, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Catalog(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Catalog(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// A catalog. - [System.ComponentModel.TypeConverter(typeof(CatalogTypeConverter))] - public partial interface ICatalog - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Catalog.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Catalog.TypeConverter.cs deleted file mode 100644 index 6837bee9695e..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Catalog.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class CatalogTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return Catalog.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return Catalog.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return Catalog.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Catalog.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Catalog.cs deleted file mode 100644 index 3506522284e5..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Catalog.cs +++ /dev/null @@ -1,71 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// A catalog. - public partial class Catalog : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalogInternal - { - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalogInternal.Name { get => this._name; set { {_name = value;} } } - - /// Backing field for property. - private string _name; - - /// Name of the catalog. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// Backing field for property. - private string _uri; - - /// The unique URI of the catalog. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Uri { get => this._uri; set => this._uri = value; } - - /// Creates an new instance. - public Catalog() - { - - } - } - /// A catalog. - public partial interface ICatalog : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable - { - /// Name of the catalog. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"Name of the catalog.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// The unique URI of the catalog. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The unique URI of the catalog.", - SerializedName = @"uri", - PossibleTypes = new [] { typeof(string) })] - string Uri { get; set; } - - } - /// A catalog. - internal partial interface ICatalogInternal - - { - /// Name of the catalog. - string Name { get; set; } - /// The unique URI of the catalog. - string Uri { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Catalog.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Catalog.json.cs deleted file mode 100644 index a6d6e176a692..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Catalog.json.cs +++ /dev/null @@ -1,113 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// A catalog. - public partial class Catalog - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. - internal Catalog(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new Catalog(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._uri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._uri.ToString()) : null, "uri" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.PowerShell.cs deleted file mode 100644 index 817984510419..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.PowerShell.cs +++ /dev/null @@ -1,218 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// A customization task to run on a Dev Box. - [System.ComponentModel.TypeConverter(typeof(CustomizationTaskTypeConverter))] - public partial class CustomizationTask - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal CustomizationTask(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskParametersTypeConverter.ConvertFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("TimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("RunAs")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).RunAs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount?) content.GetValueForProperty("RunAs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).RunAs, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount.CreateFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("LogUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).LogUri = (string) content.GetValueForProperty("LogUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).LogUri, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus.CreateFrom); - } - if (content.Contains("StartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("EndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal CustomizationTask(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskParametersTypeConverter.ConvertFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("TimeoutInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("RunAs")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).RunAs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount?) content.GetValueForProperty("RunAs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).RunAs, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount.CreateFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("LogUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).LogUri = (string) content.GetValueForProperty("LogUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).LogUri, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus.CreateFrom); - } - if (content.Contains("StartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("EndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CustomizationTask(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CustomizationTask(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// A customization task to run on a Dev Box. - [System.ComponentModel.TypeConverter(typeof(CustomizationTaskTypeConverter))] - public partial interface ICustomizationTask - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.TypeConverter.cs deleted file mode 100644 index b4b20e357f9f..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class CustomizationTaskTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return CustomizationTask.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return CustomizationTask.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return CustomizationTask.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.cs deleted file mode 100644 index ab99112a11ae..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.cs +++ /dev/null @@ -1,219 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// A customization task to run on a Dev Box. - public partial class CustomizationTask : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal - { - - /// Backing field for property. - private string _displayName; - - /// Display name to help differentiate multiple instances of the same task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string DisplayName { get => this._displayName; set => this._displayName = value; } - - /// Backing field for property. - private global::System.DateTime? _endTime; - - /// End time of the task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public global::System.DateTime? EndTime { get => this._endTime; } - - /// Backing field for property. - private string _id; - - /// ID of the task instance. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Id { get => this._id; } - - /// Backing field for property. - private string _logUri; - - /// The unique URI for retrieving the task logs. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string LogUri { get => this._logUri; } - - /// Internal Acessors for EndTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal.EndTime { get => this._endTime; set { {_endTime = value;} } } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal.Id { get => this._id; set { {_id = value;} } } - - /// Internal Acessors for LogUri - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal.LogUri { get => this._logUri; set { {_logUri = value;} } } - - /// Internal Acessors for StartTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal.StartTime { get => this._startTime; set { {_startTime = value;} } } - - /// Internal Acessors for Status - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal.Status { get => this._status; set { {_status = value;} } } - - /// Backing field for property. - private string _name; - - /// Name of the task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Name { get => this._name; set => this._name = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters _parameter; - - /// Parameters for the task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskParameters()); set => this._parameter = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount? _runAs; - - /// What account to run the task as. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount? RunAs { get => this._runAs; set => this._runAs = value; } - - /// Backing field for property. - private global::System.DateTime? _startTime; - - /// Start time of the task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public global::System.DateTime? StartTime { get => this._startTime; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus? _status; - - /// Status of the task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus? Status { get => this._status; } - - /// Backing field for property. - private int? _timeoutInSecond; - - /// Timeout, in seconds. Overrides any timeout provided on the task definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public int? TimeoutInSecond { get => this._timeoutInSecond; set => this._timeoutInSecond = value; } - - /// Creates an new instance. - public CustomizationTask() - { - - } - } - /// A customization task to run on a Dev Box. - public partial interface ICustomizationTask : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable - { - /// Display name to help differentiate multiple instances of the same task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Display name to help differentiate multiple instances of the same task.", - SerializedName = @"displayName", - PossibleTypes = new [] { typeof(string) })] - string DisplayName { get; set; } - /// End time of the task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"End time of the task.", - SerializedName = @"endTime", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? EndTime { get; } - /// ID of the task instance. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"ID of the task instance.", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string Id { get; } - /// The unique URI for retrieving the task logs. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The unique URI for retrieving the task logs.", - SerializedName = @"logUri", - PossibleTypes = new [] { typeof(string) })] - string LogUri { get; } - /// Name of the task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Name of the task.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; set; } - /// Parameters for the task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Parameters for the task.", - SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters Parameter { get; set; } - /// What account to run the task as. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"What account to run the task as.", - SerializedName = @"runAs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount? RunAs { get; set; } - /// Start time of the task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Start time of the task.", - SerializedName = @"startTime", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? StartTime { get; } - /// Status of the task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Status of the task.", - SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus? Status { get; } - /// Timeout, in seconds. Overrides any timeout provided on the task definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Timeout, in seconds. Overrides any timeout provided on the task definition.", - SerializedName = @"timeoutInSeconds", - PossibleTypes = new [] { typeof(int) })] - int? TimeoutInSecond { get; set; } - - } - /// A customization task to run on a Dev Box. - internal partial interface ICustomizationTaskInternal - - { - /// Display name to help differentiate multiple instances of the same task. - string DisplayName { get; set; } - /// End time of the task. - global::System.DateTime? EndTime { get; set; } - /// ID of the task instance. - string Id { get; set; } - /// The unique URI for retrieving the task logs. - string LogUri { get; set; } - /// Name of the task. - string Name { get; set; } - /// Parameters for the task. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters Parameter { get; set; } - /// What account to run the task as. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount? RunAs { get; set; } - /// Start time of the task. - global::System.DateTime? StartTime { get; set; } - /// Status of the task. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus? Status { get; set; } - /// Timeout, in seconds. Overrides any timeout provided on the task definition. - int? TimeoutInSecond { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.json.cs deleted file mode 100644 index dbd80b87e442..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTask.json.cs +++ /dev/null @@ -1,141 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// A customization task to run on a Dev Box. - public partial class CustomizationTask - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. - internal CustomizationTask(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskParameters.FromJson(__jsonParameters) : Parameter;} - {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} - {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (int?)__jsonTimeoutInSeconds : TimeoutInSecond;} - {_runAs = If( json?.PropertyT("runAs"), out var __jsonRunAs) ? (string)__jsonRunAs : (string)RunAs;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_logUri = If( json?.PropertyT("logUri"), out var __jsonLogUri) ? (string)__jsonLogUri : (string)LogUri;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} - {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new CustomizationTask(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); - AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); - AddIf( null != this._timeoutInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNumber((int)this._timeoutInSecond) : null, "timeoutInSeconds" ,container.Add ); - AddIf( null != (((object)this._runAs)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._runAs.ToString()) : null, "runAs" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._logUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._logUri.ToString()) : null, "logUri" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationOperationResult.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationOperationResult.PowerShell.cs deleted file mode 100644 index 0b241d84fc2d..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationOperationResult.PowerShell.cs +++ /dev/null @@ -1,285 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// The operation result of validating a list of customization tasks. - [System.ComponentModel.TypeConverter(typeof(CustomizationTaskListValidationOperationResultTypeConverter))] - public partial class CustomizationTaskListValidationOperationResult - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal CustomizationTaskListValidationOperationResult(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); - } - if (content.Contains("Result")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Result = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResult) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Result, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskListValidationResultTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); - } - if (content.Contains("ResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResourceId, global::System.Convert.ToString); - } - if (content.Contains("StartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("EndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("PercentComplete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).PercentComplete = (double?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).PercentComplete, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("OperationLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).OperationLocation, global::System.Convert.ToString); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); - } - if (content.Contains("Innererror")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); - } - if (content.Contains("ResultValidationResult")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultValidationResult = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus) content.GetValueForProperty("ResultValidationResult",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultValidationResult, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus.CreateFrom); - } - if (content.Contains("ResultError")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultError = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError[]) content.GetValueForProperty("ResultError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultError, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskListValidationErrorTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal CustomizationTaskListValidationOperationResult(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); - } - if (content.Contains("Result")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Result = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResult) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Result, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskListValidationResultTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); - } - if (content.Contains("ResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResourceId, global::System.Convert.ToString); - } - if (content.Contains("StartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("EndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("PercentComplete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).PercentComplete = (double?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).PercentComplete, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("OperationLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).OperationLocation, global::System.Convert.ToString); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); - } - if (content.Contains("Innererror")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); - } - if (content.Contains("ResultValidationResult")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultValidationResult = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus) content.GetValueForProperty("ResultValidationResult",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultValidationResult, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus.CreateFrom); - } - if (content.Contains("ResultError")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultError = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError[]) content.GetValueForProperty("ResultError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultError, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskListValidationErrorTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CustomizationTaskListValidationOperationResult(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CustomizationTaskListValidationOperationResult(content); - } - - /// - /// Creates a new instance of , deserializing the content from - /// a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The operation result of validating a list of customization tasks. - [System.ComponentModel.TypeConverter(typeof(CustomizationTaskListValidationOperationResultTypeConverter))] - public partial interface ICustomizationTaskListValidationOperationResult - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBox.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBox.PowerShell.cs deleted file mode 100644 index 65811a3b0dc6..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBox.PowerShell.cs +++ /dev/null @@ -1,408 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// A Dev Box. - [System.ComponentModel.TypeConverter(typeof(DevBoxTypeConverter))] - public partial class DevBox - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new DevBox(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new DevBox(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal DevBox(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); - } - if (content.Contains("HardwareProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile) content.GetValueForProperty("HardwareProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.HardwareProfileTypeConverter.ConvertFrom); - } - if (content.Contains("StorageProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StorageProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ImageReference")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); - } - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("ProjectName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ProjectName = (string) content.GetValueForProperty("ProjectName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ProjectName, global::System.Convert.ToString); - } - if (content.Contains("PoolName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).PoolName = (string) content.GetValueForProperty("PoolName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).PoolName, global::System.Convert.ToString); - } - if (content.Contains("HibernateSupport")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState.CreateFrom); - } - if (content.Contains("ActionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ActionState = (string) content.GetValueForProperty("ActionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ActionState, global::System.Convert.ToString); - } - if (content.Contains("PowerState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState?) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState.CreateFrom); - } - if (content.Contains("UniqueId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).UniqueId = (string) content.GetValueForProperty("UniqueId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).UniqueId, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("OSType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType.CreateFrom); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("CreatedTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).CreatedTime = (global::System.DateTime?) content.GetValueForProperty("CreatedTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).CreatedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LocalAdministrator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus.CreateFrom); - } - if (content.Contains("OperationLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).OperationLocation, global::System.Convert.ToString); - } - if (content.Contains("HardwareProfileSkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfileSkuName = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName?) content.GetValueForProperty("HardwareProfileSkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfileSkuName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName.CreateFrom); - } - if (content.Contains("HardwareProfileMemoryGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfileMemoryGb = (int?) content.GetValueForProperty("HardwareProfileMemoryGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfileMemoryGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StorageProfileOSDisk")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).StorageProfileOSDisk = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk) content.GetValueForProperty("StorageProfileOSDisk",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).StorageProfileOSDisk, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OSDiskTypeConverter.ConvertFrom); - } - if (content.Contains("ImageReferenceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceName = (string) content.GetValueForProperty("ImageReferenceName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceName, global::System.Convert.ToString); - } - if (content.Contains("ImageReferenceVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceVersion = (string) content.GetValueForProperty("ImageReferenceVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceVersion, global::System.Convert.ToString); - } - if (content.Contains("ImageReferenceOperatingSystem")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceOperatingSystem = (string) content.GetValueForProperty("ImageReferenceOperatingSystem",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceOperatingSystem, global::System.Convert.ToString); - } - if (content.Contains("ImageReferencePublishedDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferencePublishedDate = (global::System.DateTime?) content.GetValueForProperty("ImageReferencePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferencePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); - } - if (content.Contains("Innererror")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); - } - if (content.Contains("HardwareProfileVCpUs")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfileVCpUs = (int?) content.GetValueForProperty("HardwareProfileVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfileVCpUs, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ImageReferenceOSBuildNumber")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceOSBuildNumber = (string) content.GetValueForProperty("ImageReferenceOSBuildNumber",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceOSBuildNumber, global::System.Convert.ToString); - } - if (content.Contains("OSDiskSizeGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal DevBox(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); - } - if (content.Contains("HardwareProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile) content.GetValueForProperty("HardwareProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.HardwareProfileTypeConverter.ConvertFrom); - } - if (content.Contains("StorageProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StorageProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ImageReference")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); - } - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("ProjectName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ProjectName = (string) content.GetValueForProperty("ProjectName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ProjectName, global::System.Convert.ToString); - } - if (content.Contains("PoolName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).PoolName = (string) content.GetValueForProperty("PoolName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).PoolName, global::System.Convert.ToString); - } - if (content.Contains("HibernateSupport")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState.CreateFrom); - } - if (content.Contains("ActionState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ActionState = (string) content.GetValueForProperty("ActionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ActionState, global::System.Convert.ToString); - } - if (content.Contains("PowerState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState?) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState.CreateFrom); - } - if (content.Contains("UniqueId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).UniqueId = (string) content.GetValueForProperty("UniqueId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).UniqueId, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("OSType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType.CreateFrom); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("CreatedTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).CreatedTime = (global::System.DateTime?) content.GetValueForProperty("CreatedTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).CreatedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LocalAdministrator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus.CreateFrom); - } - if (content.Contains("OperationLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).OperationLocation, global::System.Convert.ToString); - } - if (content.Contains("HardwareProfileSkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfileSkuName = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName?) content.GetValueForProperty("HardwareProfileSkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfileSkuName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName.CreateFrom); - } - if (content.Contains("HardwareProfileMemoryGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfileMemoryGb = (int?) content.GetValueForProperty("HardwareProfileMemoryGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfileMemoryGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StorageProfileOSDisk")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).StorageProfileOSDisk = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk) content.GetValueForProperty("StorageProfileOSDisk",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).StorageProfileOSDisk, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OSDiskTypeConverter.ConvertFrom); - } - if (content.Contains("ImageReferenceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceName = (string) content.GetValueForProperty("ImageReferenceName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceName, global::System.Convert.ToString); - } - if (content.Contains("ImageReferenceVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceVersion = (string) content.GetValueForProperty("ImageReferenceVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceVersion, global::System.Convert.ToString); - } - if (content.Contains("ImageReferenceOperatingSystem")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceOperatingSystem = (string) content.GetValueForProperty("ImageReferenceOperatingSystem",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceOperatingSystem, global::System.Convert.ToString); - } - if (content.Contains("ImageReferencePublishedDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferencePublishedDate = (global::System.DateTime?) content.GetValueForProperty("ImageReferencePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferencePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); - } - if (content.Contains("Innererror")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); - } - if (content.Contains("HardwareProfileVCpUs")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfileVCpUs = (int?) content.GetValueForProperty("HardwareProfileVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).HardwareProfileVCpUs, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ImageReferenceOSBuildNumber")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceOSBuildNumber = (string) content.GetValueForProperty("ImageReferenceOSBuildNumber",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).ImageReferenceOSBuildNumber, global::System.Convert.ToString); - } - if (content.Contains("OSDiskSizeGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// A Dev Box. - [System.ComponentModel.TypeConverter(typeof(DevBoxTypeConverter))] - public partial interface IDevBox - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBox.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBox.cs deleted file mode 100644 index df0548961513..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBox.cs +++ /dev/null @@ -1,646 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// A Dev Box. - public partial class DevBox : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializable - { - - /// Backing field for property. - private string _actionState; - - /// - /// The current action state of the Dev Box. This is state is based on previous - /// action performed by user. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string ActionState { get => this._actionState; } - - /// One of a server-defined set of error codes. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ?? null; } - - /// Backing field for property. - private global::System.DateTime? _createdTime; - - /// Creation time of this Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public global::System.DateTime? CreatedTime { get => this._createdTime; } - - /// An array of details about specific errors that led to this reported error. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError _error; - - /// Provisioning or action error details. Populated only for error states. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile _hardwareProfile; - - /// Information about the Dev Box's hardware resources. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile HardwareProfile { get => (this._hardwareProfile = this._hardwareProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.HardwareProfile()); } - - /// The amount of memory available for the Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public int? HardwareProfileMemoryGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).MemoryGb; } - - /// The name of the SKU. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? HardwareProfileSkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).SkuName; } - - /// The number of vCPUs available for the Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public int? HardwareProfileVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).VCpUs; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? _hibernateSupport; - - /// Indicates whether hibernate is enabled/disabled or unknown. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? HibernateSupport { get => this._hibernateSupport; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference _imageReference; - - /// Information about the image used for this Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ImageReference()); } - - /// The name of the image used. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string ImageReferenceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).Name; } - - /// The operating system build number of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string ImageReferenceOSBuildNumber { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).OSBuildNumber; } - - /// The operating system of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string ImageReferenceOperatingSystem { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).OperatingSystem; } - - /// The datetime that the backing image version was published. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public global::System.DateTime? ImageReferencePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).PublishedDate; } - - /// The version of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string ImageReferenceVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).Version; } - - /// - /// An object containing more specific information than the current object about the error. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? _localAdministrator; - - /// Indicates whether the owner of the Dev Box is a local administrator. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? LocalAdministrator { get => this._localAdministrator; set => this._localAdministrator = value; } - - /// Backing field for property. - private string _location; - - /// - /// Azure region where this Dev Box is located. This will be the same region as the - /// Virtual Network it is attached to. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Location { get => this._location; } - - /// A human-readable representation of the error. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ?? null; } - - /// Internal Acessors for ActionState - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.ActionState { get => this._actionState; set { {_actionState = value;} } } - - /// Internal Acessors for CreatedTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.CreatedTime { get => this._createdTime; set { {_createdTime = value;} } } - - /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); set { {_error = value;} } } - - /// Internal Acessors for HardwareProfile - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.HardwareProfile { get => (this._hardwareProfile = this._hardwareProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.HardwareProfile()); set { {_hardwareProfile = value;} } } - - /// Internal Acessors for HardwareProfileMemoryGb - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.HardwareProfileMemoryGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).MemoryGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).MemoryGb = value; } - - /// Internal Acessors for HardwareProfileSkuName - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.HardwareProfileSkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).SkuName = value; } - - /// Internal Acessors for HardwareProfileVCpUs - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.HardwareProfileVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).VCpUs; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).VCpUs = value; } - - /// Internal Acessors for HibernateSupport - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.HibernateSupport { get => this._hibernateSupport; set { {_hibernateSupport = value;} } } - - /// Internal Acessors for ImageReference - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ImageReference()); set { {_imageReference = value;} } } - - /// Internal Acessors for ImageReferenceName - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.ImageReferenceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).Name = value; } - - /// Internal Acessors for ImageReferenceOSBuildNumber - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.ImageReferenceOSBuildNumber { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).OSBuildNumber; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).OSBuildNumber = value; } - - /// Internal Acessors for ImageReferenceOperatingSystem - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.ImageReferenceOperatingSystem { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).OperatingSystem; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).OperatingSystem = value; } - - /// Internal Acessors for ImageReferencePublishedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.ImageReferencePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).PublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).PublishedDate = value; } - - /// Internal Acessors for ImageReferenceVersion - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.ImageReferenceVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).Version = value; } - - /// Internal Acessors for Location - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.Location { get => this._location; set { {_location = value;} } } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.Name { get => this._name; set { {_name = value;} } } - - /// Internal Acessors for OSDiskSizeGb - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)StorageProfile).OSDiskSizeGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)StorageProfile).OSDiskSizeGb = value; } - - /// Internal Acessors for OSType - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.OSType { get => this._oSType; set { {_oSType = value;} } } - - /// Internal Acessors for PowerState - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.PowerState { get => this._powerState; set { {_powerState = value;} } } - - /// Internal Acessors for ProjectName - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.ProjectName { get => this._projectName; set { {_projectName = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Internal Acessors for StorageProfile - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StorageProfile()); set { {_storageProfile = value;} } } - - /// Internal Acessors for StorageProfileOSDisk - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.StorageProfileOSDisk { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)StorageProfile).OSDisk; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)StorageProfile).OSDisk = value; } - - /// Internal Acessors for UniqueId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.UniqueId { get => this._uniqueId; set { {_uniqueId = value;} } } - - /// Internal Acessors for Uri - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.Uri { get => this._uri; set { {_uri = value;} } } - - /// Internal Acessors for User - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal.User { get => this._user; set { {_user = value;} } } - - /// Backing field for property. - private string _name; - - /// Display name for the Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// The size of the OS Disk in gigabytes. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public int? OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)StorageProfile).OSDiskSizeGb; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? _oSType; - - /// The operating system type of this Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? OSType { get => this._oSType; } - - /// Backing field for property. - private string _operationLocation; - - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string OperationLocation { get => this._operationLocation; set => this._operationLocation = value; } - - /// Backing field for property. - private string _poolName; - - /// The name of the Dev Box pool this machine belongs to. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string PoolName { get => this._poolName; set => this._poolName = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState? _powerState; - - /// The current power state of the Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState? PowerState { get => this._powerState; } - - /// Backing field for property. - private string _projectName; - - /// Name of the project this Dev Box belongs to. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string ProjectName { get => this._projectName; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState? _provisioningState; - - /// The current provisioning state of the Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState? ProvisioningState { get => this._provisioningState; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile _storageProfile; - - /// Storage settings for this Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StorageProfile()); } - - /// The target of the error. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } - - /// Backing field for property. - private string _uniqueId; - - /// - /// A unique identifier for the Dev Box. This is a GUID-formatted string (e.g. - /// 00000000-0000-0000-0000-000000000000). - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string UniqueId { get => this._uniqueId; } - - /// Backing field for property. - private string _uri; - - /// The unique URI of the dev box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Uri { get => this._uri; } - - /// Backing field for property. - private string _user; - - /// The AAD object id of the user this Dev Box is assigned to. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string User { get => this._user; } - - /// Creates an new instance. - public DevBox() - { - - } - - /// - void Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("Operation-Location", out var __operationLocationHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxInternal)this).OperationLocation = System.Linq.Enumerable.FirstOrDefault(__operationLocationHeader0) is string __headerOperationLocationHeader0 ? __headerOperationLocationHeader0 : (string)null; - } - } - } - /// A Dev Box. - public partial interface IDevBox : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable - { - /// - /// The current action state of the Dev Box. This is state is based on previous - /// action performed by user. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The current action state of the Dev Box. This is state is based on previous - action performed by user.", - SerializedName = @"actionState", - PossibleTypes = new [] { typeof(string) })] - string ActionState { get; } - /// One of a server-defined set of error codes. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"One of a server-defined set of error codes.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string Code { get; set; } - /// Creation time of this Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Creation time of this Dev Box.", - SerializedName = @"createdTime", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? CreatedTime { get; } - /// An array of details about specific errors that led to this reported error. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"An array of details about specific errors that led to this reported error.", - SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } - /// The amount of memory available for the Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The amount of memory available for the Dev Box.", - SerializedName = @"memoryGB", - PossibleTypes = new [] { typeof(int) })] - int? HardwareProfileMemoryGb { get; } - /// The name of the SKU. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The name of the SKU.", - SerializedName = @"skuName", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? HardwareProfileSkuName { get; } - /// The number of vCPUs available for the Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The number of vCPUs available for the Dev Box.", - SerializedName = @"vCPUs", - PossibleTypes = new [] { typeof(int) })] - int? HardwareProfileVCpUs { get; } - /// Indicates whether hibernate is enabled/disabled or unknown. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Indicates whether hibernate is enabled/disabled or unknown.", - SerializedName = @"hibernateSupport", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? HibernateSupport { get; } - /// The name of the image used. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The name of the image used.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string ImageReferenceName { get; } - /// The operating system build number of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The operating system build number of the image.", - SerializedName = @"osBuildNumber", - PossibleTypes = new [] { typeof(string) })] - string ImageReferenceOSBuildNumber { get; } - /// The operating system of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The operating system of the image.", - SerializedName = @"operatingSystem", - PossibleTypes = new [] { typeof(string) })] - string ImageReferenceOperatingSystem { get; } - /// The datetime that the backing image version was published. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The datetime that the backing image version was published.", - SerializedName = @"publishedDate", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? ImageReferencePublishedDate { get; } - /// The version of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The version of the image.", - SerializedName = @"version", - PossibleTypes = new [] { typeof(string) })] - string ImageReferenceVersion { get; } - /// - /// An object containing more specific information than the current object about the error. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"An object containing more specific information than the current object about the error.", - SerializedName = @"innererror", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } - /// Indicates whether the owner of the Dev Box is a local administrator. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether the owner of the Dev Box is a local administrator.", - SerializedName = @"localAdministrator", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? LocalAdministrator { get; set; } - /// - /// Azure region where this Dev Box is located. This will be the same region as the - /// Virtual Network it is attached to. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Azure region where this Dev Box is located. This will be the same region as the - Virtual Network it is attached to.", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - string Location { get; } - /// A human-readable representation of the error. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A human-readable representation of the error.", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string Message { get; set; } - /// Display name for the Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"Display name for the Dev Box.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// The size of the OS Disk in gigabytes. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The size of the OS Disk in gigabytes.", - SerializedName = @"diskSizeGB", - PossibleTypes = new [] { typeof(int) })] - int? OSDiskSizeGb { get; } - /// The operating system type of this Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The operating system type of this Dev Box.", - SerializedName = @"osType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? OSType { get; } - - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Operation-Location", - PossibleTypes = new [] { typeof(string) })] - string OperationLocation { get; set; } - /// The name of the Dev Box pool this machine belongs to. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Dev Box pool this machine belongs to.", - SerializedName = @"poolName", - PossibleTypes = new [] { typeof(string) })] - string PoolName { get; set; } - /// The current power state of the Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The current power state of the Dev Box.", - SerializedName = @"powerState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState? PowerState { get; } - /// Name of the project this Dev Box belongs to. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Name of the project this Dev Box belongs to.", - SerializedName = @"projectName", - PossibleTypes = new [] { typeof(string) })] - string ProjectName { get; } - /// The current provisioning state of the Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The current provisioning state of the Dev Box.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState? ProvisioningState { get; } - /// The target of the error. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The target of the error.", - SerializedName = @"target", - PossibleTypes = new [] { typeof(string) })] - string Target { get; set; } - /// - /// A unique identifier for the Dev Box. This is a GUID-formatted string (e.g. - /// 00000000-0000-0000-0000-000000000000). - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A unique identifier for the Dev Box. This is a GUID-formatted string (e.g. - 00000000-0000-0000-0000-000000000000).", - SerializedName = @"uniqueId", - PossibleTypes = new [] { typeof(string) })] - string UniqueId { get; } - /// The unique URI of the dev box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"The unique URI of the dev box.", - SerializedName = @"uri", - PossibleTypes = new [] { typeof(string) })] - string Uri { get; } - /// The AAD object id of the user this Dev Box is assigned to. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The AAD object id of the user this Dev Box is assigned to.", - SerializedName = @"user", - PossibleTypes = new [] { typeof(string) })] - string User { get; } - - } - /// A Dev Box. - internal partial interface IDevBoxInternal - - { - /// - /// The current action state of the Dev Box. This is state is based on previous - /// action performed by user. - /// - string ActionState { get; set; } - /// One of a server-defined set of error codes. - string Code { get; set; } - /// Creation time of this Dev Box. - global::System.DateTime? CreatedTime { get; set; } - /// An array of details about specific errors that led to this reported error. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } - /// Provisioning or action error details. Populated only for error states. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get; set; } - /// Information about the Dev Box's hardware resources. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile HardwareProfile { get; set; } - /// The amount of memory available for the Dev Box. - int? HardwareProfileMemoryGb { get; set; } - /// The name of the SKU. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? HardwareProfileSkuName { get; set; } - /// The number of vCPUs available for the Dev Box. - int? HardwareProfileVCpUs { get; set; } - /// Indicates whether hibernate is enabled/disabled or unknown. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? HibernateSupport { get; set; } - /// Information about the image used for this Dev Box. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference ImageReference { get; set; } - /// The name of the image used. - string ImageReferenceName { get; set; } - /// The operating system build number of the image. - string ImageReferenceOSBuildNumber { get; set; } - /// The operating system of the image. - string ImageReferenceOperatingSystem { get; set; } - /// The datetime that the backing image version was published. - global::System.DateTime? ImageReferencePublishedDate { get; set; } - /// The version of the image. - string ImageReferenceVersion { get; set; } - /// - /// An object containing more specific information than the current object about the error. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } - /// Indicates whether the owner of the Dev Box is a local administrator. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? LocalAdministrator { get; set; } - /// - /// Azure region where this Dev Box is located. This will be the same region as the - /// Virtual Network it is attached to. - /// - string Location { get; set; } - /// A human-readable representation of the error. - string Message { get; set; } - /// Display name for the Dev Box. - string Name { get; set; } - /// The size of the OS Disk in gigabytes. - int? OSDiskSizeGb { get; set; } - /// The operating system type of this Dev Box. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? OSType { get; set; } - - string OperationLocation { get; set; } - /// The name of the Dev Box pool this machine belongs to. - string PoolName { get; set; } - /// The current power state of the Dev Box. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState? PowerState { get; set; } - /// Name of the project this Dev Box belongs to. - string ProjectName { get; set; } - /// The current provisioning state of the Dev Box. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState? ProvisioningState { get; set; } - /// Storage settings for this Dev Box. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile StorageProfile { get; set; } - /// Settings for the operating system disk. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk StorageProfileOSDisk { get; set; } - /// The target of the error. - string Target { get; set; } - /// - /// A unique identifier for the Dev Box. This is a GUID-formatted string (e.g. - /// 00000000-0000-0000-0000-000000000000). - /// - string UniqueId { get; set; } - /// The unique URI of the dev box. - string Uri { get; set; } - /// The AAD object id of the user this Dev Box is assigned to. - string User { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Environment.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Environment.PowerShell.cs deleted file mode 100644 index f731e036dd82..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Environment.PowerShell.cs +++ /dev/null @@ -1,272 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// Properties of an environment. - [System.ComponentModel.TypeConverter(typeof(EnvironmentTypeConverter))] - public partial class Environment - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Environment(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Environment(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Environment(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); - } - if (content.Contains("ExpirationDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentParametersTypeConverter.ConvertFrom); - } - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentProvisioningState.CreateFrom); - } - if (content.Contains("ResourceGroupId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).ResourceGroupId = (string) content.GetValueForProperty("ResourceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).ResourceGroupId, global::System.Convert.ToString); - } - if (content.Contains("CatalogName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).CatalogName = (string) content.GetValueForProperty("CatalogName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).CatalogName, global::System.Convert.ToString); - } - if (content.Contains("DefinitionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).DefinitionName = (string) content.GetValueForProperty("DefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).DefinitionName, global::System.Convert.ToString); - } - if (content.Contains("OperationLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).OperationLocation, global::System.Convert.ToString); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); - } - if (content.Contains("Innererror")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Environment(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); - } - if (content.Contains("ExpirationDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentParametersTypeConverter.ConvertFrom); - } - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentProvisioningState.CreateFrom); - } - if (content.Contains("ResourceGroupId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).ResourceGroupId = (string) content.GetValueForProperty("ResourceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).ResourceGroupId, global::System.Convert.ToString); - } - if (content.Contains("CatalogName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).CatalogName = (string) content.GetValueForProperty("CatalogName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).CatalogName, global::System.Convert.ToString); - } - if (content.Contains("DefinitionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).DefinitionName = (string) content.GetValueForProperty("DefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).DefinitionName, global::System.Convert.ToString); - } - if (content.Contains("OperationLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).OperationLocation, global::System.Convert.ToString); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); - } - if (content.Contains("Innererror")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Properties of an environment. - [System.ComponentModel.TypeConverter(typeof(EnvironmentTypeConverter))] - public partial interface IEnvironment - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.PowerShell.cs deleted file mode 100644 index cd2bff4d25bf..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.PowerShell.cs +++ /dev/null @@ -1,202 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// An environment definition. - [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionTypeConverter))] - public partial class EnvironmentDefinition - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EnvironmentDefinition(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EnvironmentDefinition(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EnvironmentDefinition(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("CatalogName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).CatalogName = (string) content.GetValueForProperty("CatalogName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).CatalogName, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentDefinitionParameterTypeConverter.ConvertFrom)); - } - if (content.Contains("ParametersSchema")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).ParametersSchema = (string) content.GetValueForProperty("ParametersSchema",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).ParametersSchema, global::System.Convert.ToString); - } - if (content.Contains("TemplatePath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).TemplatePath = (string) content.GetValueForProperty("TemplatePath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).TemplatePath, 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 EnvironmentDefinition(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("CatalogName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).CatalogName = (string) content.GetValueForProperty("CatalogName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).CatalogName, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentDefinitionParameterTypeConverter.ConvertFrom)); - } - if (content.Contains("ParametersSchema")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).ParametersSchema = (string) content.GetValueForProperty("ParametersSchema",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).ParametersSchema, global::System.Convert.ToString); - } - if (content.Contains("TemplatePath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).TemplatePath = (string) content.GetValueForProperty("TemplatePath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal)this).TemplatePath, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// An environment definition. - [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionTypeConverter))] - public partial interface IEnvironmentDefinition - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.TypeConverter.cs deleted file mode 100644 index 5b37ab20d4a3..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class EnvironmentDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return EnvironmentDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return EnvironmentDefinition.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return EnvironmentDefinition.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.cs deleted file mode 100644 index 7abfc972100c..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.cs +++ /dev/null @@ -1,173 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// An environment definition. - public partial class EnvironmentDefinition : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal - { - - /// Backing field for property. - private string _catalogName; - - /// Name of the catalog. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string CatalogName { get => this._catalogName; set => this._catalogName = value; } - - /// Backing field for property. - private string _description; - - /// A short description of the environment definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Description { get => this._description; set => this._description = value; } - - /// Backing field for property. - private string _id; - - /// The ID of the environment definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Id { get => this._id; set => this._id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionInternal.Name { get => this._name; set { {_name = value;} } } - - /// Backing field for property. - private string _name; - - /// Name of the environment definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter[] _parameter; - - /// Input parameters passed to an environment. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter[] Parameter { get => this._parameter; set => this._parameter = value; } - - /// Backing field for property. - private string _parametersSchema; - - /// JSON schema defining the parameters object passed to an environment. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string ParametersSchema { get => this._parametersSchema; set => this._parametersSchema = value; } - - /// Backing field for property. - private string _templatePath; - - /// Path to the Environment Definition entrypoint file. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string TemplatePath { get => this._templatePath; set => this._templatePath = value; } - - /// Backing field for property. - private string _uri; - - /// The unique URI of the environment definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Uri { get => this._uri; set => this._uri = value; } - - /// Creates an new instance. - public EnvironmentDefinition() - { - - } - } - /// An environment definition. - public partial interface IEnvironmentDefinition : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable - { - /// Name of the catalog. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Name of the catalog.", - SerializedName = @"catalogName", - PossibleTypes = new [] { typeof(string) })] - string CatalogName { get; set; } - /// A short description of the environment definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A short description of the environment definition.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// The ID of the environment definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the environment definition.", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string Id { get; set; } - /// Name of the environment definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"Name of the environment definition.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// Input parameters passed to an environment. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Input parameters passed to an environment.", - SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter[] Parameter { get; set; } - /// JSON schema defining the parameters object passed to an environment. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"JSON schema defining the parameters object passed to an environment.", - SerializedName = @"parametersSchema", - PossibleTypes = new [] { typeof(string) })] - string ParametersSchema { get; set; } - /// Path to the Environment Definition entrypoint file. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Path to the Environment Definition entrypoint file.", - SerializedName = @"templatePath", - PossibleTypes = new [] { typeof(string) })] - string TemplatePath { get; set; } - /// The unique URI of the environment definition. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The unique URI of the environment definition.", - SerializedName = @"uri", - PossibleTypes = new [] { typeof(string) })] - string Uri { get; set; } - - } - /// An environment definition. - internal partial interface IEnvironmentDefinitionInternal - - { - /// Name of the catalog. - string CatalogName { get; set; } - /// A short description of the environment definition. - string Description { get; set; } - /// The ID of the environment definition. - string Id { get; set; } - /// Name of the environment definition. - string Name { get; set; } - /// Input parameters passed to an environment. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter[] Parameter { get; set; } - /// JSON schema defining the parameters object passed to an environment. - string ParametersSchema { get; set; } - /// Path to the Environment Definition entrypoint file. - string TemplatePath { get; set; } - /// The unique URI of the environment definition. - string Uri { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.json.cs deleted file mode 100644 index d34acbf1962a..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinition.json.cs +++ /dev/null @@ -1,133 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// An environment definition. - public partial class EnvironmentDefinition - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. - internal EnvironmentDefinition(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_catalogName = If( json?.PropertyT("catalogName"), out var __jsonCatalogName) ? (string)__jsonCatalogName : (string)CatalogName;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? If( __jsonParameters as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentDefinitionParameter.FromJson(__u) )) ))() : null : Parameter;} - {_parametersSchema = If( json?.PropertyT("parametersSchema"), out var __jsonParametersSchema) ? (string)__jsonParametersSchema : (string)ParametersSchema;} - {_templatePath = If( json?.PropertyT("templatePath"), out var __jsonTemplatePath) ? (string)__jsonTemplatePath : (string)TemplatePath;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentDefinition(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._uri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._uri.ToString()) : null, "uri" ,container.Add ); - AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - } - AddIf( null != (((object)this._catalogName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._catalogName.ToString()) : null, "catalogName" ,container.Add ); - AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); - if (null != this._parameter) - { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.XNodeArray(); - foreach( var __x in this._parameter ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("parameters",__w); - } - AddIf( null != (((object)this._parametersSchema)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._parametersSchema.ToString()) : null, "parametersSchema" ,container.Add ); - AddIf( null != (((object)this._templatePath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._templatePath.ToString()) : null, "templatePath" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.PowerShell.cs deleted file mode 100644 index 547c987028b1..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.PowerShell.cs +++ /dev/null @@ -1,202 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// Properties of an Environment Definition parameter - [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionParameterTypeConverter))] - public partial class EnvironmentDefinitionParameter - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EnvironmentDefinitionParameter(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EnvironmentDefinitionParameter(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EnvironmentDefinitionParameter(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("Default")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Default = (string) content.GetValueForProperty("Default",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Default, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType.CreateFrom); - } - if (content.Contains("ReadOnly")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly = (bool?) content.GetValueForProperty("ReadOnly",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Required")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Required = (bool) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Allowed")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Allowed = (string[]) content.GetValueForProperty("Allowed",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Allowed, __y => TypeConverterExtensions.SelectToArray(__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 EnvironmentDefinitionParameter(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("Default")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Default = (string) content.GetValueForProperty("Default",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Default, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType.CreateFrom); - } - if (content.Contains("ReadOnly")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly = (bool?) content.GetValueForProperty("ReadOnly",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Required")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Required = (bool) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Allowed")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Allowed = (string[]) content.GetValueForProperty("Allowed",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal)this).Allowed, __y => TypeConverterExtensions.SelectToArray(__y, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Properties of an Environment Definition parameter - [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionParameterTypeConverter))] - public partial interface IEnvironmentDefinitionParameter - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.TypeConverter.cs deleted file mode 100644 index ce66f7c2d672..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.TypeConverter.cs +++ /dev/null @@ -1,148 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class EnvironmentDefinitionParameterTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return EnvironmentDefinitionParameter.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return EnvironmentDefinitionParameter.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return EnvironmentDefinitionParameter.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.cs deleted file mode 100644 index 52405edd93f8..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.cs +++ /dev/null @@ -1,190 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// Properties of an Environment Definition parameter - public partial class EnvironmentDefinitionParameter : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameterInternal - { - - /// Backing field for property. - private string[] _allowed; - - /// An array of allowed values. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string[] Allowed { get => this._allowed; set => this._allowed = value; } - - /// Backing field for property. - private string _default; - - /// Default value of the parameter. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Default { get => this._default; set => this._default = value; } - - /// Backing field for property. - private string _description; - - /// Description of the parameter. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Description { get => this._description; set => this._description = value; } - - /// Backing field for property. - private string _id; - - /// Unique ID of the parameter. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Id { get => this._id; set => this._id = value; } - - /// Backing field for property. - private string _name; - - /// Display name of the parameter. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Name { get => this._name; set => this._name = value; } - - /// Backing field for property. - private bool? _readOnly; - - /// - /// Whether or not this parameter is read-only. If true, default should have a - /// value. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public bool? ReadOnly { get => this._readOnly; set => this._readOnly = value; } - - /// Backing field for property. - private bool _required; - - /// Whether or not this parameter is required. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public bool Required { get => this._required; set => this._required = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType _type; - - /// - /// A string of one of the basic JSON types (number, integer, array, object, - /// boolean, string). - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType Type { get => this._type; set => this._type = value; } - - /// Creates an new instance. - public EnvironmentDefinitionParameter() - { - - } - } - /// Properties of an Environment Definition parameter - public partial interface IEnvironmentDefinitionParameter : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable - { - /// An array of allowed values. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"An array of allowed values.", - SerializedName = @"allowed", - PossibleTypes = new [] { typeof(string) })] - string[] Allowed { get; set; } - /// Default value of the parameter. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Default value of the parameter.", - SerializedName = @"default", - PossibleTypes = new [] { typeof(string) })] - string Default { get; set; } - /// Description of the parameter. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Description of the parameter.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// Unique ID of the parameter. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Unique ID of the parameter.", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string Id { get; set; } - /// Display name of the parameter. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Display name of the parameter.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; set; } - /// - /// Whether or not this parameter is read-only. If true, default should have a - /// value. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Whether or not this parameter is read-only. If true, default should have a - value.", - SerializedName = @"readOnly", - PossibleTypes = new [] { typeof(bool) })] - bool? ReadOnly { get; set; } - /// Whether or not this parameter is required. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Whether or not this parameter is required.", - SerializedName = @"required", - PossibleTypes = new [] { typeof(bool) })] - bool Required { get; set; } - /// - /// A string of one of the basic JSON types (number, integer, array, object, - /// boolean, string). - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"A string of one of the basic JSON types (number, integer, array, object, - boolean, string).", - SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType Type { get; set; } - - } - /// Properties of an Environment Definition parameter - internal partial interface IEnvironmentDefinitionParameterInternal - - { - /// An array of allowed values. - string[] Allowed { get; set; } - /// Default value of the parameter. - string Default { get; set; } - /// Description of the parameter. - string Description { get; set; } - /// Unique ID of the parameter. - string Id { get; set; } - /// Display name of the parameter. - string Name { get; set; } - /// - /// Whether or not this parameter is read-only. If true, default should have a - /// value. - /// - bool? ReadOnly { get; set; } - /// Whether or not this parameter is required. - bool Required { get; set; } - /// - /// A string of one of the basic JSON types (number, integer, array, object, - /// boolean, string). - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType Type { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.json.cs deleted file mode 100644 index 63f58dea3daa..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDefinitionParameter.json.cs +++ /dev/null @@ -1,130 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// Properties of an Environment Definition parameter - public partial class EnvironmentDefinitionParameter - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. - internal EnvironmentDefinitionParameter(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_default = If( json?.PropertyT("default"), out var __jsonDefault) ? (string)__jsonDefault : (string)Default;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_readOnly = If( json?.PropertyT("readOnly"), out var __jsonReadOnly) ? (bool?)__jsonReadOnly : ReadOnly;} - {_required = If( json?.PropertyT("required"), out var __jsonRequired) ? (bool)__jsonRequired : Required;} - {_allowed = If( json?.PropertyT("allowed"), out var __jsonAllowed) ? If( __jsonAllowed as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Allowed;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinitionParameter FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentDefinitionParameter(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); - AddIf( null != (((object)this._default)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._default.ToString()) : null, "default" ,container.Add ); - AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); - AddIf( null != this._readOnly ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonBoolean((bool)this._readOnly) : null, "readOnly" ,container.Add ); - AddIf( (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonBoolean(this._required), "required" ,container.Add ); - if (null != this._allowed) - { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.XNodeArray(); - foreach( var __x in this._allowed ) - { - AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); - } - container.Add("allowed",__w); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.PowerShell.cs deleted file mode 100644 index 315051de257a..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.PowerShell.cs +++ /dev/null @@ -1,178 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// Properties of an environment type. - [System.ComponentModel.TypeConverter(typeof(EnvironmentTypeTypeConverter))] - public partial class EnvironmentType - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EnvironmentType(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EnvironmentType(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EnvironmentType(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("DeploymentTargetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).DeploymentTargetId, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus.CreateFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).DisplayName, 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 EnvironmentType(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("DeploymentTargetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).DeploymentTargetId, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus.CreateFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal)this).DisplayName, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Properties of an environment type. - [System.ComponentModel.TypeConverter(typeof(EnvironmentTypeTypeConverter))] - public partial interface IEnvironmentType - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.TypeConverter.cs deleted file mode 100644 index 9d70548588b1..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class EnvironmentTypeTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return EnvironmentType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return EnvironmentType.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return EnvironmentType.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.cs deleted file mode 100644 index 5dfcf15bc34f..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.cs +++ /dev/null @@ -1,136 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// Properties of an environment type. - public partial class EnvironmentType : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal - { - - /// Backing field for property. - private string _deploymentTargetId; - - /// - /// Id of a subscription or management group that the environment type will be - /// mapped to. The environment's resources will be deployed into this subscription - /// or management group. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string DeploymentTargetId { get => this._deploymentTargetId; set => this._deploymentTargetId = value; } - - /// Backing field for property. - private string _displayName; - - /// Display name of the environment type. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string DisplayName { get => this._displayName; set => this._displayName = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeInternal.Name { get => this._name; set { {_name = value;} } } - - /// Backing field for property. - private string _name; - - /// Name of the environment type. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus _status; - - /// Indicates whether this environment type is enabled for use in this project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus Status { get => this._status; set => this._status = value; } - - /// Backing field for property. - private string _uri; - - /// The unique URI of the environment type. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Uri { get => this._uri; set => this._uri = value; } - - /// Creates an new instance. - public EnvironmentType() - { - - } - } - /// Properties of an environment type. - public partial interface IEnvironmentType : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable - { - /// - /// Id of a subscription or management group that the environment type will be - /// mapped to. The environment's resources will be deployed into this subscription - /// or management group. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Id of a subscription or management group that the environment type will be - mapped to. The environment's resources will be deployed into this subscription - or management group.", - SerializedName = @"deploymentTargetId", - PossibleTypes = new [] { typeof(string) })] - string DeploymentTargetId { get; set; } - /// Display name of the environment type. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Display name of the environment type.", - SerializedName = @"displayName", - PossibleTypes = new [] { typeof(string) })] - string DisplayName { get; set; } - /// Name of the environment type. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"Name of the environment type.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// Indicates whether this environment type is enabled for use in this project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Indicates whether this environment type is enabled for use in this project.", - SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus Status { get; set; } - /// The unique URI of the environment type. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The unique URI of the environment type.", - SerializedName = @"uri", - PossibleTypes = new [] { typeof(string) })] - string Uri { get; set; } - - } - /// Properties of an environment type. - internal partial interface IEnvironmentTypeInternal - - { - /// - /// Id of a subscription or management group that the environment type will be - /// mapped to. The environment's resources will be deployed into this subscription - /// or management group. - /// - string DeploymentTargetId { get; set; } - /// Display name of the environment type. - string DisplayName { get; set; } - /// Name of the environment type. - string Name { get; set; } - /// Indicates whether this environment type is enabled for use in this project. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus Status { get; set; } - /// The unique URI of the environment type. - string Uri { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.json.cs deleted file mode 100644 index 47308c0c0c42..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentType.json.cs +++ /dev/null @@ -1,119 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// Properties of an environment type. - public partial class EnvironmentType - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. - internal EnvironmentType(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_deploymentTargetId = If( json?.PropertyT("deploymentTargetId"), out var __jsonDeploymentTargetId) ? (string)__jsonDeploymentTargetId : (string)DeploymentTargetId;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentType(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._uri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._uri.ToString()) : null, "uri" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - } - AddIf( null != (((object)this._deploymentTargetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._deploymentTargetId.ToString()) : null, "deploymentTargetId" ,container.Add ); - AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); - AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdate.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdate.PowerShell.cs deleted file mode 100644 index 8aae54ca4041..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdate.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// Properties of an environment. - [System.ComponentModel.TypeConverter(typeof(EnvironmentUpdateTypeConverter))] - public partial class EnvironmentUpdate - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EnvironmentUpdate(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EnvironmentUpdate(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EnvironmentUpdate(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ExpirationDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentUpdateParametersTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal EnvironmentUpdate(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ExpirationDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Parameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentUpdateParametersTypeConverter.ConvertFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Properties of an environment. - [System.ComponentModel.TypeConverter(typeof(EnvironmentUpdateTypeConverter))] - public partial interface IEnvironmentUpdate - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdate.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdate.TypeConverter.cs deleted file mode 100644 index 99b5f59203a0..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdate.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class EnvironmentUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return EnvironmentUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return EnvironmentUpdate.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return EnvironmentUpdate.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdate.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdate.cs deleted file mode 100644 index 8ab303fc8d68..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdate.cs +++ /dev/null @@ -1,78 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// Properties of an environment. - public partial class EnvironmentUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateInternal - { - - /// Backing field for property. - private global::System.DateTime? _expirationDate; - - /// - /// The time the expiration date will be triggered (UTC), after which the - /// environment and associated resources will be deleted. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public global::System.DateTime? ExpirationDate { get => this._expirationDate; set => this._expirationDate = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters _parameter; - - /// Parameters object for the environment. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentUpdateParameters()); set => this._parameter = value; } - - /// Creates an new instance. - public EnvironmentUpdate() - { - - } - } - /// Properties of an environment. - public partial interface IEnvironmentUpdate : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable - { - /// - /// The time the expiration date will be triggered (UTC), after which the - /// environment and associated resources will be deleted. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The time the expiration date will be triggered (UTC), after which the - environment and associated resources will be deleted.", - SerializedName = @"expirationDate", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? ExpirationDate { get; set; } - /// Parameters object for the environment. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Parameters object for the environment.", - SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters Parameter { get; set; } - - } - /// Properties of an environment. - internal partial interface IEnvironmentUpdateInternal - - { - /// - /// The time the expiration date will be triggered (UTC), after which the - /// environment and associated resources will be deleted. - /// - global::System.DateTime? ExpirationDate { get; set; } - /// Parameters object for the environment. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters Parameter { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdate.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdate.json.cs deleted file mode 100644 index 7815e7e98413..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdate.json.cs +++ /dev/null @@ -1,110 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// Properties of an environment. - public partial class EnvironmentUpdate - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. - internal EnvironmentUpdate(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_expirationDate = If( json?.PropertyT("expirationDate"), out var __jsonExpirationDate) ? global::System.DateTime.TryParse((string)__jsonExpirationDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExpirationDateValue) ? __jsonExpirationDateValue : ExpirationDate : ExpirationDate;} - {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentUpdateParameters.FromJson(__jsonParameters) : Parameter;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentUpdate(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != this._expirationDate ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._expirationDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "expirationDate" ,container.Add ); - AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdateParameters.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdateParameters.PowerShell.cs deleted file mode 100644 index e87ca701ae1f..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdateParameters.PowerShell.cs +++ /dev/null @@ -1,142 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// Parameters object for the environment. - [System.ComponentModel.TypeConverter(typeof(EnvironmentUpdateParametersTypeConverter))] - public partial class EnvironmentUpdateParameters - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EnvironmentUpdateParameters(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EnvironmentUpdateParameters(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EnvironmentUpdateParameters(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 EnvironmentUpdateParameters(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Parameters object for the environment. - [System.ComponentModel.TypeConverter(typeof(EnvironmentUpdateParametersTypeConverter))] - public partial interface IEnvironmentUpdateParameters - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdateParameters.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdateParameters.TypeConverter.cs deleted file mode 100644 index a1572e8f0b83..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdateParameters.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class EnvironmentUpdateParametersTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return EnvironmentUpdateParameters.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return EnvironmentUpdateParameters.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return EnvironmentUpdateParameters.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdateParameters.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdateParameters.cs deleted file mode 100644 index 8adce1167346..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdateParameters.cs +++ /dev/null @@ -1,35 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// Parameters object for the environment. - public partial class EnvironmentUpdateParameters : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParametersInternal - { - - /// Creates an new instance. - public EnvironmentUpdateParameters() - { - - } - } - /// Parameters object for the environment. - public partial interface IEnvironmentUpdateParameters : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray - { - - } - /// Parameters object for the environment. - internal partial interface IEnvironmentUpdateParametersInternal - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdateParameters.dictionary.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdateParameters.dictionary.cs deleted file mode 100644 index 3ecd960ccb85..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdateParameters.dictionary.cs +++ /dev/null @@ -1,75 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - public partial class EnvironmentUpdateParameters : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray - { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - - int Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - - public global::System.Object this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } - - /// - /// - public void Add(global::System.String key, global::System.Object value) => __additionalProperties.Add( key, value); - - public void Clear() => __additionalProperties.Clear(); - - /// - public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); - - /// - public void CopyFrom(global::System.Collections.IDictionary source) - { - if (null != source) - { - foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) - { - if ((null != property.Key && null != property.Value)) - { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); - } - } - } - } - - /// - public void CopyFrom(global::System.Management.Automation.PSObject source) - { - if (null != source) - { - foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 global::System.Object value) => __additionalProperties.TryGetValue( key, out value); - - /// - - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentUpdateParameters source) => source.__additionalProperties; - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdateParameters.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdateParameters.json.cs deleted file mode 100644 index ab884b8659d0..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentUpdateParameters.json.cs +++ /dev/null @@ -1,109 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// Parameters object for the environment. - public partial class EnvironmentUpdateParameters - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. - /// - internal EnvironmentUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray)this).AdditionalProperties, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.DeserializeDictionary(()=>new global::System.Collections.Generic.Dictionary()),exclusions ); - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentUpdateParameters(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray)this).AdditionalProperties, container); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.PowerShell.cs deleted file mode 100644 index b6965badae30..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.PowerShell.cs +++ /dev/null @@ -1,178 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// Specifies information about the image used. - [System.ComponentModel.TypeConverter(typeof(ImageReferenceTypeConverter))] - public partial class ImageReference - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ImageReference(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ImageReference(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ImageReference(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Version")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).Version, global::System.Convert.ToString); - } - if (content.Contains("OperatingSystem")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).OperatingSystem = (string) content.GetValueForProperty("OperatingSystem",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).OperatingSystem, global::System.Convert.ToString); - } - if (content.Contains("OSBuildNumber")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).OSBuildNumber = (string) content.GetValueForProperty("OSBuildNumber",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).OSBuildNumber, global::System.Convert.ToString); - } - if (content.Contains("PublishedDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ImageReference(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Version")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).Version, global::System.Convert.ToString); - } - if (content.Contains("OperatingSystem")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).OperatingSystem = (string) content.GetValueForProperty("OperatingSystem",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).OperatingSystem, global::System.Convert.ToString); - } - if (content.Contains("OSBuildNumber")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).OSBuildNumber = (string) content.GetValueForProperty("OSBuildNumber",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).OSBuildNumber, global::System.Convert.ToString); - } - if (content.Contains("PublishedDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Specifies information about the image used. - [System.ComponentModel.TypeConverter(typeof(ImageReferenceTypeConverter))] - public partial interface IImageReference - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.TypeConverter.cs deleted file mode 100644 index e1eb2f2b4fb5..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ImageReferenceTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ImageReference.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ImageReference.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ImageReference.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.cs deleted file mode 100644 index 1c97db9337aa..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.cs +++ /dev/null @@ -1,134 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// Specifies information about the image used. - public partial class ImageReference : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal - { - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal.Name { get => this._name; set { {_name = value;} } } - - /// Internal Acessors for OSBuildNumber - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal.OSBuildNumber { get => this._oSBuildNumber; set { {_oSBuildNumber = value;} } } - - /// Internal Acessors for OperatingSystem - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal.OperatingSystem { get => this._operatingSystem; set { {_operatingSystem = value;} } } - - /// Internal Acessors for PublishedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal.PublishedDate { get => this._publishedDate; set { {_publishedDate = value;} } } - - /// Internal Acessors for Version - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal.Version { get => this._version; set { {_version = value;} } } - - /// Backing field for property. - private string _name; - - /// The name of the image used. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// Backing field for property. - private string _oSBuildNumber; - - /// The operating system build number of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string OSBuildNumber { get => this._oSBuildNumber; } - - /// Backing field for property. - private string _operatingSystem; - - /// The operating system of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string OperatingSystem { get => this._operatingSystem; } - - /// Backing field for property. - private global::System.DateTime? _publishedDate; - - /// The datetime that the backing image version was published. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public global::System.DateTime? PublishedDate { get => this._publishedDate; } - - /// Backing field for property. - private string _version; - - /// The version of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Version { get => this._version; } - - /// Creates an new instance. - public ImageReference() - { - - } - } - /// Specifies information about the image used. - public partial interface IImageReference : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable - { - /// The name of the image used. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The name of the image used.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// The operating system build number of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The operating system build number of the image.", - SerializedName = @"osBuildNumber", - PossibleTypes = new [] { typeof(string) })] - string OSBuildNumber { get; } - /// The operating system of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The operating system of the image.", - SerializedName = @"operatingSystem", - PossibleTypes = new [] { typeof(string) })] - string OperatingSystem { get; } - /// The datetime that the backing image version was published. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The datetime that the backing image version was published.", - SerializedName = @"publishedDate", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? PublishedDate { get; } - /// The version of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The version of the image.", - SerializedName = @"version", - PossibleTypes = new [] { typeof(string) })] - string Version { get; } - - } - /// Specifies information about the image used. - internal partial interface IImageReferenceInternal - - { - /// The name of the image used. - string Name { get; set; } - /// The operating system build number of the image. - string OSBuildNumber { get; set; } - /// The operating system of the image. - string OperatingSystem { get; set; } - /// The datetime that the backing image version was published. - global::System.DateTime? PublishedDate { get; set; } - /// The version of the image. - string Version { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.json.cs deleted file mode 100644 index 0de143fb2319..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ImageReference.json.cs +++ /dev/null @@ -1,131 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// Specifies information about the image used. - public partial class ImageReference - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new ImageReference(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. - internal ImageReference(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version;} - {_operatingSystem = If( json?.PropertyT("operatingSystem"), out var __jsonOperatingSystem) ? (string)__jsonOperatingSystem : (string)OperatingSystem;} - {_oSBuildNumber = If( json?.PropertyT("osBuildNumber"), out var __jsonOSBuildNumber) ? (string)__jsonOSBuildNumber : (string)OSBuildNumber;} - {_publishedDate = If( json?.PropertyT("publishedDate"), out var __jsonPublishedDate) ? global::System.DateTime.TryParse((string)__jsonPublishedDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonPublishedDateValue) ? __jsonPublishedDateValue : PublishedDate : PublishedDate;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._operatingSystem)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._operatingSystem.ToString()) : null, "operatingSystem" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._oSBuildNumber)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._oSBuildNumber.ToString()) : null, "osBuildNumber" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != this._publishedDate ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._publishedDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "publishedDate" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.PowerShell.cs deleted file mode 100644 index 2b84d6d788ee..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.PowerShell.cs +++ /dev/null @@ -1,258 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// The current status of an async operation. - [System.ComponentModel.TypeConverter(typeof(OperationStatusTypeConverter))] - public partial class OperationStatus - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new OperationStatus(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new OperationStatus(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal OperationStatus(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); - } - if (content.Contains("ResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).ResourceId, global::System.Convert.ToString); - } - if (content.Contains("StartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("EndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("PercentComplete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).PercentComplete = (double?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).PercentComplete, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("OperationLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).OperationLocation, global::System.Convert.ToString); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); - } - if (content.Contains("Innererror")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal OperationStatus(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); - } - if (content.Contains("ResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).ResourceId, global::System.Convert.ToString); - } - if (content.Contains("StartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("EndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("PercentComplete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).PercentComplete = (double?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).PercentComplete, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("OperationLocation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).OperationLocation, global::System.Convert.ToString); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); - } - if (content.Contains("Innererror")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The current status of an async operation. - [System.ComponentModel.TypeConverter(typeof(OperationStatusTypeConverter))] - public partial interface IOperationStatus - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.TypeConverter.cs deleted file mode 100644 index 118049ecc57b..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class OperationStatusTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return OperationStatus.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return OperationStatus.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return OperationStatus.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.cs deleted file mode 100644 index aa9dd15d4fbe..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.cs +++ /dev/null @@ -1,290 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// The current status of an async operation. - public partial class OperationStatus : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializable - { - - /// One of a server-defined set of error codes. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ?? null; } - - /// An array of details about specific errors that led to this reported error. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } - - /// Backing field for property. - private global::System.DateTime? _endTime; - - /// The end time of the operation. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public global::System.DateTime? EndTime { get => this._endTime; set => this._endTime = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError _error; - - /// Operation Error message. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); set => this._error = value; } - - /// Backing field for property. - private string _id; - - /// Fully qualified ID for the operation status. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Id { get => this._id; } - - /// - /// An object containing more specific information than the current object about the error. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } - - /// A human-readable representation of the error. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ?? null; } - - /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); set { {_error = value;} } } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal.Id { get => this._id; set { {_id = value;} } } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal.Name { get => this._name; set { {_name = value;} } } - - /// Backing field for property. - private string _name; - - /// The operation id name. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// Backing field for property. - private string _operationLocation; - - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string OperationLocation { get => this._operationLocation; set => this._operationLocation = value; } - - /// Backing field for property. - private double? _percentComplete; - - /// Percent of the operation that is complete. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public double? PercentComplete { get => this._percentComplete; set => this._percentComplete = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny _property; - - /// Custom operation properties, populated only for a successful operation. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Any()); set => this._property = value; } - - /// Backing field for property. - private string _resourceId; - - /// The id of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string ResourceId { get => this._resourceId; set => this._resourceId = value; } - - /// Backing field for property. - private global::System.DateTime? _startTime; - - /// The start time of the operation. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public global::System.DateTime? StartTime { get => this._startTime; set => this._startTime = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState _status; - - /// Provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => this._status; set => this._status = value; } - - /// The target of the error. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } - - /// - void Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("Operation-Location", out var __operationLocationHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatusInternal)this).OperationLocation = System.Linq.Enumerable.FirstOrDefault(__operationLocationHeader0) is string __headerOperationLocationHeader0 ? __headerOperationLocationHeader0 : (string)null; - } - } - - /// Creates an new instance. - public OperationStatus() - { - - } - } - /// The current status of an async operation. - public partial interface IOperationStatus : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable - { - /// One of a server-defined set of error codes. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"One of a server-defined set of error codes.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string Code { get; set; } - /// An array of details about specific errors that led to this reported error. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"An array of details about specific errors that led to this reported error.", - SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } - /// The end time of the operation. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The end time of the operation.", - SerializedName = @"endTime", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? EndTime { get; set; } - /// Fully qualified ID for the operation status. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"Fully qualified ID for the operation status.", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string Id { get; } - /// - /// An object containing more specific information than the current object about the error. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"An object containing more specific information than the current object about the error.", - SerializedName = @"innererror", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } - /// A human-readable representation of the error. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A human-readable representation of the error.", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string Message { get; set; } - /// The operation id name. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"The operation id name.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Operation-Location", - PossibleTypes = new [] { typeof(string) })] - string OperationLocation { get; set; } - /// Percent of the operation that is complete. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Percent of the operation that is complete.", - SerializedName = @"percentComplete", - PossibleTypes = new [] { typeof(double) })] - double? PercentComplete { get; set; } - /// Custom operation properties, populated only for a successful operation. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Custom operation properties, populated only for a successful operation.", - SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny Property { get; set; } - /// The id of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The id of the resource.", - SerializedName = @"resourceId", - PossibleTypes = new [] { typeof(string) })] - string ResourceId { get; set; } - /// The start time of the operation. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The start time of the operation.", - SerializedName = @"startTime", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? StartTime { get; set; } - /// Provisioning state of the resource. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Provisioning state of the resource.", - SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get; set; } - /// The target of the error. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The target of the error.", - SerializedName = @"target", - PossibleTypes = new [] { typeof(string) })] - string Target { get; set; } - - } - /// The current status of an async operation. - internal partial interface IOperationStatusInternal - - { - /// One of a server-defined set of error codes. - string Code { get; set; } - /// An array of details about specific errors that led to this reported error. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } - /// The end time of the operation. - global::System.DateTime? EndTime { get; set; } - /// Operation Error message. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get; set; } - /// Fully qualified ID for the operation status. - string Id { get; set; } - /// - /// An object containing more specific information than the current object about the error. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } - /// A human-readable representation of the error. - string Message { get; set; } - /// The operation id name. - string Name { get; set; } - - string OperationLocation { get; set; } - /// Percent of the operation that is complete. - double? PercentComplete { get; set; } - /// Custom operation properties, populated only for a successful operation. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny Property { get; set; } - /// The id of the resource. - string ResourceId { get; set; } - /// The start time of the operation. - global::System.DateTime? StartTime { get; set; } - /// Provisioning state of the resource. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get; set; } - /// The target of the error. - string Target { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.json.cs deleted file mode 100644 index 95159dee65a2..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OperationStatus.json.cs +++ /dev/null @@ -1,130 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// The current status of an async operation. - public partial class OperationStatus - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new OperationStatus(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. - internal OperationStatus(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)ResourceId;} - {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} - {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} - {_percentComplete = If( json?.PropertyT("percentComplete"), out var __jsonPercentComplete) ? (double?)__jsonPercentComplete : PercentComplete;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Any.FromJson(__jsonProperties) : Property;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - } - AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); - AddIf( null != (((object)this._resourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._resourceId.ToString()) : null, "resourceId" ,container.Add ); - AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); - AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); - AddIf( null != this._percentComplete ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNumber((double)this._percentComplete) : null, "percentComplete" ,container.Add ); - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Pool.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Pool.PowerShell.cs deleted file mode 100644 index 26feba25490b..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Pool.PowerShell.cs +++ /dev/null @@ -1,328 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// A pool of Dev Boxes. - [System.ComponentModel.TypeConverter(typeof(PoolTypeConverter))] - public partial class Pool - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Pool(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Pool(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Pool(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("HardwareProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile) content.GetValueForProperty("HardwareProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.HardwareProfileTypeConverter.ConvertFrom); - } - if (content.Contains("StorageProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StorageProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ImageReference")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); - } - if (content.Contains("StopOnDisconnect")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("OSType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType.CreateFrom); - } - if (content.Contains("HibernateSupport")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport.CreateFrom); - } - if (content.Contains("LocalAdministrator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus.CreateFrom); - } - if (content.Contains("HealthStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HealthStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus) content.GetValueForProperty("HealthStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HealthStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus.CreateFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("HardwareProfileSkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfileSkuName = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName?) content.GetValueForProperty("HardwareProfileSkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfileSkuName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName.CreateFrom); - } - if (content.Contains("HardwareProfileMemoryGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfileMemoryGb = (int?) content.GetValueForProperty("HardwareProfileMemoryGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfileMemoryGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StorageProfileOSDisk")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StorageProfileOSDisk = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk) content.GetValueForProperty("StorageProfileOSDisk",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StorageProfileOSDisk, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OSDiskTypeConverter.ConvertFrom); - } - if (content.Contains("ImageReferenceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceName = (string) content.GetValueForProperty("ImageReferenceName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceName, global::System.Convert.ToString); - } - if (content.Contains("ImageReferenceVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceVersion = (string) content.GetValueForProperty("ImageReferenceVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceVersion, global::System.Convert.ToString); - } - if (content.Contains("ImageReferenceOperatingSystem")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceOperatingSystem = (string) content.GetValueForProperty("ImageReferenceOperatingSystem",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceOperatingSystem, global::System.Convert.ToString); - } - if (content.Contains("ImageReferencePublishedDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferencePublishedDate = (global::System.DateTime?) content.GetValueForProperty("ImageReferencePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferencePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("HardwareProfileVCpUs")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfileVCpUs = (int?) content.GetValueForProperty("HardwareProfileVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfileVCpUs, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ImageReferenceOSBuildNumber")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceOSBuildNumber = (string) content.GetValueForProperty("ImageReferenceOSBuildNumber",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceOSBuildNumber, global::System.Convert.ToString); - } - if (content.Contains("StopOnDisconnectStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus.CreateFrom); - } - if (content.Contains("StopOnDisconnectGracePeriodMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OSDiskSizeGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Pool(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("HardwareProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile) content.GetValueForProperty("HardwareProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.HardwareProfileTypeConverter.ConvertFrom); - } - if (content.Contains("StorageProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StorageProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ImageReference")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ImageReferenceTypeConverter.ConvertFrom); - } - if (content.Contains("StopOnDisconnect")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("OSType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType.CreateFrom); - } - if (content.Contains("HibernateSupport")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport.CreateFrom); - } - if (content.Contains("LocalAdministrator")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus.CreateFrom); - } - if (content.Contains("HealthStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HealthStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus) content.GetValueForProperty("HealthStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HealthStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus.CreateFrom); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).DisplayName, global::System.Convert.ToString); - } - if (content.Contains("HardwareProfileSkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfileSkuName = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName?) content.GetValueForProperty("HardwareProfileSkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfileSkuName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName.CreateFrom); - } - if (content.Contains("HardwareProfileMemoryGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfileMemoryGb = (int?) content.GetValueForProperty("HardwareProfileMemoryGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfileMemoryGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StorageProfileOSDisk")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StorageProfileOSDisk = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk) content.GetValueForProperty("StorageProfileOSDisk",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StorageProfileOSDisk, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OSDiskTypeConverter.ConvertFrom); - } - if (content.Contains("ImageReferenceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceName = (string) content.GetValueForProperty("ImageReferenceName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceName, global::System.Convert.ToString); - } - if (content.Contains("ImageReferenceVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceVersion = (string) content.GetValueForProperty("ImageReferenceVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceVersion, global::System.Convert.ToString); - } - if (content.Contains("ImageReferenceOperatingSystem")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceOperatingSystem = (string) content.GetValueForProperty("ImageReferenceOperatingSystem",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceOperatingSystem, global::System.Convert.ToString); - } - if (content.Contains("ImageReferencePublishedDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferencePublishedDate = (global::System.DateTime?) content.GetValueForProperty("ImageReferencePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferencePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("HardwareProfileVCpUs")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfileVCpUs = (int?) content.GetValueForProperty("HardwareProfileVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).HardwareProfileVCpUs, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ImageReferenceOSBuildNumber")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceOSBuildNumber = (string) content.GetValueForProperty("ImageReferenceOSBuildNumber",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).ImageReferenceOSBuildNumber, global::System.Convert.ToString); - } - if (content.Contains("StopOnDisconnectStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus.CreateFrom); - } - if (content.Contains("StopOnDisconnectGracePeriodMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OSDiskSizeGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// A pool of Dev Boxes. - [System.ComponentModel.TypeConverter(typeof(PoolTypeConverter))] - public partial interface IPool - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Pool.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Pool.TypeConverter.cs deleted file mode 100644 index c674297d6878..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Pool.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class PoolTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return Pool.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return Pool.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return Pool.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Pool.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Pool.cs deleted file mode 100644 index 0b26f7c0e20f..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Pool.cs +++ /dev/null @@ -1,447 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// A pool of Dev Boxes. - public partial class Pool : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal - { - - /// Backing field for property. - private string _displayName; - - /// Display name of the pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string DisplayName { get => this._displayName; set => this._displayName = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile _hardwareProfile; - - /// Hardware settings for the Dev Boxes created in this pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile HardwareProfile { get => (this._hardwareProfile = this._hardwareProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.HardwareProfile()); set => this._hardwareProfile = value; } - - /// The amount of memory available for the Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public int? HardwareProfileMemoryGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).MemoryGb; } - - /// The name of the SKU. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? HardwareProfileSkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).SkuName; } - - /// The number of vCPUs available for the Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public int? HardwareProfileVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).VCpUs; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus _healthStatus; - - /// - /// Overall health status of the Pool. Indicates whether or not the Pool is - /// available to create Dev Boxes. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus HealthStatus { get => this._healthStatus; set => this._healthStatus = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? _hibernateSupport; - - /// Indicates whether hibernate is enabled/disabled or unknown. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? HibernateSupport { get => this._hibernateSupport; set => this._hibernateSupport = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference _imageReference; - - /// Image settings for Dev Boxes create in this pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ImageReference()); set => this._imageReference = value; } - - /// The name of the image used. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string ImageReferenceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).Name; } - - /// The operating system build number of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string ImageReferenceOSBuildNumber { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).OSBuildNumber; } - - /// The operating system of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string ImageReferenceOperatingSystem { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).OperatingSystem; } - - /// The datetime that the backing image version was published. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public global::System.DateTime? ImageReferencePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).PublishedDate; } - - /// The version of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string ImageReferenceVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).Version; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? _localAdministrator; - - /// - /// Indicates whether owners of Dev Boxes in this pool are local administrators on - /// the Dev Boxes. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? LocalAdministrator { get => this._localAdministrator; set => this._localAdministrator = value; } - - /// Backing field for property. - private string _location; - - /// Azure region where Dev Boxes in the pool are located. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Location { get => this._location; set => this._location = value; } - - /// Internal Acessors for HardwareProfile - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal.HardwareProfile { get => (this._hardwareProfile = this._hardwareProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.HardwareProfile()); set { {_hardwareProfile = value;} } } - - /// Internal Acessors for HardwareProfileMemoryGb - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal.HardwareProfileMemoryGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).MemoryGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).MemoryGb = value; } - - /// Internal Acessors for HardwareProfileSkuName - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal.HardwareProfileSkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).SkuName = value; } - - /// Internal Acessors for HardwareProfileVCpUs - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal.HardwareProfileVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).VCpUs; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)HardwareProfile).VCpUs = value; } - - /// Internal Acessors for ImageReference - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal.ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ImageReference()); set { {_imageReference = value;} } } - - /// Internal Acessors for ImageReferenceName - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal.ImageReferenceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).Name = value; } - - /// Internal Acessors for ImageReferenceOSBuildNumber - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal.ImageReferenceOSBuildNumber { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).OSBuildNumber; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).OSBuildNumber = value; } - - /// Internal Acessors for ImageReferenceOperatingSystem - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal.ImageReferenceOperatingSystem { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).OperatingSystem; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).OperatingSystem = value; } - - /// Internal Acessors for ImageReferencePublishedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal.ImageReferencePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).PublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).PublishedDate = value; } - - /// Internal Acessors for ImageReferenceVersion - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal.ImageReferenceVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReferenceInternal)ImageReference).Version = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal.Name { get => this._name; set { {_name = value;} } } - - /// Internal Acessors for OSDiskSizeGb - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal.OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)StorageProfile).OSDiskSizeGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)StorageProfile).OSDiskSizeGb = value; } - - /// Internal Acessors for StopOnDisconnect - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal.StopOnDisconnect { get => (this._stopOnDisconnect = this._stopOnDisconnect ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StopOnDisconnectConfiguration()); set { {_stopOnDisconnect = value;} } } - - /// Internal Acessors for StorageProfile - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal.StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StorageProfile()); set { {_storageProfile = value;} } } - - /// Internal Acessors for StorageProfileOSDisk - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPoolInternal.StorageProfileOSDisk { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)StorageProfile).OSDisk; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)StorageProfile).OSDisk = value; } - - /// Backing field for property. - private string _name; - - /// Pool name. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// The size of the OS Disk in gigabytes. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public int? OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)StorageProfile).OSDiskSizeGb; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? _oSType; - - /// The operating system type of Dev Boxes in this pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? OSType { get => this._oSType; set => this._oSType = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfiguration _stopOnDisconnect; - - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfiguration StopOnDisconnect { get => (this._stopOnDisconnect = this._stopOnDisconnect ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StopOnDisconnectConfiguration()); set => this._stopOnDisconnect = value; } - - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect - /// is detected. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public int? StopOnDisconnectGracePeriodMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).GracePeriodMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).GracePeriodMinute = value ?? default(int); } - - /// - /// Indicates whether the feature to stop the devbox on disconnect once the grace - /// period has lapsed is enabled. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus)""); } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile _storageProfile; - - /// Storage settings for Dev Box created in this pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StorageProfile()); set => this._storageProfile = value; } - - /// Backing field for property. - private string _uri; - - /// The unique URI of the pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Uri { get => this._uri; set => this._uri = value; } - - /// Creates an new instance. - public Pool() - { - - } - } - /// A pool of Dev Boxes. - public partial interface IPool : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable - { - /// Display name of the pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Display name of the pool.", - SerializedName = @"displayName", - PossibleTypes = new [] { typeof(string) })] - string DisplayName { get; set; } - /// The amount of memory available for the Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The amount of memory available for the Dev Box.", - SerializedName = @"memoryGB", - PossibleTypes = new [] { typeof(int) })] - int? HardwareProfileMemoryGb { get; } - /// The name of the SKU. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The name of the SKU.", - SerializedName = @"skuName", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? HardwareProfileSkuName { get; } - /// The number of vCPUs available for the Dev Box. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The number of vCPUs available for the Dev Box.", - SerializedName = @"vCPUs", - PossibleTypes = new [] { typeof(int) })] - int? HardwareProfileVCpUs { get; } - /// - /// Overall health status of the Pool. Indicates whether or not the Pool is - /// available to create Dev Boxes. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Overall health status of the Pool. Indicates whether or not the Pool is - available to create Dev Boxes.", - SerializedName = @"healthStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus HealthStatus { get; set; } - /// Indicates whether hibernate is enabled/disabled or unknown. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether hibernate is enabled/disabled or unknown.", - SerializedName = @"hibernateSupport", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? HibernateSupport { get; set; } - /// The name of the image used. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The name of the image used.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string ImageReferenceName { get; } - /// The operating system build number of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The operating system build number of the image.", - SerializedName = @"osBuildNumber", - PossibleTypes = new [] { typeof(string) })] - string ImageReferenceOSBuildNumber { get; } - /// The operating system of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The operating system of the image.", - SerializedName = @"operatingSystem", - PossibleTypes = new [] { typeof(string) })] - string ImageReferenceOperatingSystem { get; } - /// The datetime that the backing image version was published. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The datetime that the backing image version was published.", - SerializedName = @"publishedDate", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? ImageReferencePublishedDate { get; } - /// The version of the image. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The version of the image.", - SerializedName = @"version", - PossibleTypes = new [] { typeof(string) })] - string ImageReferenceVersion { get; } - /// - /// Indicates whether owners of Dev Boxes in this pool are local administrators on - /// the Dev Boxes. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether owners of Dev Boxes in this pool are local administrators on - the Dev Boxes.", - SerializedName = @"localAdministrator", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? LocalAdministrator { get; set; } - /// Azure region where Dev Boxes in the pool are located. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Azure region where Dev Boxes in the pool are located.", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - string Location { get; set; } - /// Pool name. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"Pool name.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// The size of the OS Disk in gigabytes. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The size of the OS Disk in gigabytes.", - SerializedName = @"diskSizeGB", - PossibleTypes = new [] { typeof(int) })] - int? OSDiskSizeGb { get; } - /// The operating system type of Dev Boxes in this pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The operating system type of Dev Boxes in this pool.", - SerializedName = @"osType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? OSType { get; set; } - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect - /// is detected. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The specified time in minutes to wait before stopping a Dev Box once disconnect - is detected.", - SerializedName = @"gracePeriodMinutes", - PossibleTypes = new [] { typeof(int) })] - int? StopOnDisconnectGracePeriodMinute { get; set; } - /// - /// Indicates whether the feature to stop the devbox on disconnect once the grace - /// period has lapsed is enabled. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether the feature to stop the devbox on disconnect once the grace - period has lapsed is enabled.", - SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } - /// The unique URI of the pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The unique URI of the pool.", - SerializedName = @"uri", - PossibleTypes = new [] { typeof(string) })] - string Uri { get; set; } - - } - /// A pool of Dev Boxes. - internal partial interface IPoolInternal - - { - /// Display name of the pool. - string DisplayName { get; set; } - /// Hardware settings for the Dev Boxes created in this pool. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile HardwareProfile { get; set; } - /// The amount of memory available for the Dev Box. - int? HardwareProfileMemoryGb { get; set; } - /// The name of the SKU. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? HardwareProfileSkuName { get; set; } - /// The number of vCPUs available for the Dev Box. - int? HardwareProfileVCpUs { get; set; } - /// - /// Overall health status of the Pool. Indicates whether or not the Pool is - /// available to create Dev Boxes. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus HealthStatus { get; set; } - /// Indicates whether hibernate is enabled/disabled or unknown. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? HibernateSupport { get; set; } - /// Image settings for Dev Boxes create in this pool. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IImageReference ImageReference { get; set; } - /// The name of the image used. - string ImageReferenceName { get; set; } - /// The operating system build number of the image. - string ImageReferenceOSBuildNumber { get; set; } - /// The operating system of the image. - string ImageReferenceOperatingSystem { get; set; } - /// The datetime that the backing image version was published. - global::System.DateTime? ImageReferencePublishedDate { get; set; } - /// The version of the image. - string ImageReferenceVersion { get; set; } - /// - /// Indicates whether owners of Dev Boxes in this pool are local administrators on - /// the Dev Boxes. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? LocalAdministrator { get; set; } - /// Azure region where Dev Boxes in the pool are located. - string Location { get; set; } - /// Pool name. - string Name { get; set; } - /// The size of the OS Disk in gigabytes. - int? OSDiskSizeGb { get; set; } - /// The operating system type of Dev Boxes in this pool. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? OSType { get; set; } - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfiguration StopOnDisconnect { get; set; } - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect - /// is detected. - /// - int? StopOnDisconnectGracePeriodMinute { get; set; } - /// - /// Indicates whether the feature to stop the devbox on disconnect once the grace - /// period has lapsed is enabled. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } - /// Storage settings for Dev Box created in this pool. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile StorageProfile { get; set; } - /// Settings for the operating system disk. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk StorageProfileOSDisk { get; set; } - /// The unique URI of the pool. - string Uri { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Pool.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Pool.json.cs deleted file mode 100644 index 5dc55005071a..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Pool.json.cs +++ /dev/null @@ -1,133 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// A pool of Dev Boxes. - public partial class Pool - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new Pool(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. - internal Pool(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_hardwareProfile = If( json?.PropertyT("hardwareProfile"), out var __jsonHardwareProfile) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.HardwareProfile.FromJson(__jsonHardwareProfile) : HardwareProfile;} - {_storageProfile = If( json?.PropertyT("storageProfile"), out var __jsonStorageProfile) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StorageProfile.FromJson(__jsonStorageProfile) : StorageProfile;} - {_imageReference = If( json?.PropertyT("imageReference"), out var __jsonImageReference) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ImageReference.FromJson(__jsonImageReference) : ImageReference;} - {_stopOnDisconnect = If( json?.PropertyT("stopOnDisconnect"), out var __jsonStopOnDisconnect) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StopOnDisconnectConfiguration.FromJson(__jsonStopOnDisconnect) : StopOnDisconnect;} - {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} - {_oSType = If( json?.PropertyT("osType"), out var __jsonOSType) ? (string)__jsonOSType : (string)OSType;} - {_hibernateSupport = If( json?.PropertyT("hibernateSupport"), out var __jsonHibernateSupport) ? (string)__jsonHibernateSupport : (string)HibernateSupport;} - {_localAdministrator = If( json?.PropertyT("localAdministrator"), out var __jsonLocalAdministrator) ? (string)__jsonLocalAdministrator : (string)LocalAdministrator;} - {_healthStatus = If( json?.PropertyT("healthStatus"), out var __jsonHealthStatus) ? (string)__jsonHealthStatus : (string)HealthStatus;} - {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != this._hardwareProfile ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._hardwareProfile.ToJson(null,serializationMode) : null, "hardwareProfile" ,container.Add ); - AddIf( null != this._storageProfile ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._storageProfile.ToJson(null,serializationMode) : null, "storageProfile" ,container.Add ); - AddIf( null != this._imageReference ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._imageReference.ToJson(null,serializationMode) : null, "imageReference" ,container.Add ); - AddIf( null != this._stopOnDisconnect ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._stopOnDisconnect.ToJson(null,serializationMode) : null, "stopOnDisconnect" ,container.Add ); - AddIf( null != (((object)this._uri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._uri.ToString()) : null, "uri" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - } - AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); - AddIf( null != (((object)this._oSType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._oSType.ToString()) : null, "osType" ,container.Add ); - AddIf( null != (((object)this._hibernateSupport)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._hibernateSupport.ToString()) : null, "hibernateSupport" ,container.Add ); - AddIf( null != (((object)this._localAdministrator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._localAdministrator.ToString()) : null, "localAdministrator" ,container.Add ); - AddIf( null != (((object)this._healthStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._healthStatus.ToString()) : null, "healthStatus" ,container.Add ); - AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Project.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Project.PowerShell.cs deleted file mode 100644 index aadb4ade567f..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Project.PowerShell.cs +++ /dev/null @@ -1,176 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// Project details. - [System.ComponentModel.TypeConverter(typeof(ProjectTypeConverter))] - public partial class Project - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Project(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Project(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Project(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("MaxDevBoxesPerUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).DisplayName, 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 Project(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("MaxDevBoxesPerUser")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal)this).DisplayName, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Project details. - [System.ComponentModel.TypeConverter(typeof(ProjectTypeConverter))] - public partial interface IProject - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Project.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Project.TypeConverter.cs deleted file mode 100644 index f8eca83dff8d..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Project.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ProjectTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return Project.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return Project.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return Project.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Project.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Project.cs deleted file mode 100644 index dc856283c149..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Project.cs +++ /dev/null @@ -1,132 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// Project details. - public partial class Project : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal - { - - /// Backing field for property. - private string _description; - - /// Description of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Description { get => this._description; set => this._description = value; } - - /// Backing field for property. - private string _displayName; - - /// Display name of the pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string DisplayName { get => this._displayName; set => this._displayName = value; } - - /// Backing field for property. - private int? _maxDevBoxesPerUser; - - /// - /// When specified, indicates the maximum number of Dev Boxes a single user can - /// create across all pools in the project. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public int? MaxDevBoxesPerUser { get => this._maxDevBoxesPerUser; set => this._maxDevBoxesPerUser = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectInternal.Name { get => this._name; set { {_name = value;} } } - - /// Backing field for property. - private string _name; - - /// Name of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// Backing field for property. - private string _uri; - - /// The unique URI of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Uri { get => this._uri; set => this._uri = value; } - - /// Creates an new instance. - public Project() - { - - } - } - /// Project details. - public partial interface IProject : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable - { - /// Description of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Description of the project.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// Display name of the pool. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Display name of the pool.", - SerializedName = @"displayName", - PossibleTypes = new [] { typeof(string) })] - string DisplayName { get; set; } - /// - /// When specified, indicates the maximum number of Dev Boxes a single user can - /// create across all pools in the project. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"When specified, indicates the maximum number of Dev Boxes a single user can - create across all pools in the project.", - SerializedName = @"maxDevBoxesPerUser", - PossibleTypes = new [] { typeof(int) })] - int? MaxDevBoxesPerUser { get; set; } - /// Name of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"Name of the project.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// The unique URI of the project. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The unique URI of the project.", - SerializedName = @"uri", - PossibleTypes = new [] { typeof(string) })] - string Uri { get; set; } - - } - /// Project details. - internal partial interface IProjectInternal - - { - /// Description of the project. - string Description { get; set; } - /// Display name of the pool. - string DisplayName { get; set; } - /// - /// When specified, indicates the maximum number of Dev Boxes a single user can - /// create across all pools in the project. - /// - int? MaxDevBoxesPerUser { get; set; } - /// Name of the project. - string Name { get; set; } - /// The unique URI of the project. - string Uri { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Project.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Project.json.cs deleted file mode 100644 index f3d25e2042c2..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Project.json.cs +++ /dev/null @@ -1,119 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// Project details. - public partial class Project - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new Project(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. - internal Project(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_maxDevBoxesPerUser = If( json?.PropertyT("maxDevBoxesPerUser"), out var __jsonMaxDevBoxesPerUser) ? (int?)__jsonMaxDevBoxesPerUser : MaxDevBoxesPerUser;} - {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._uri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._uri.ToString()) : null, "uri" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - } - AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); - AddIf( null != this._maxDevBoxesPerUser ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNumber((int)this._maxDevBoxesPerUser) : null, "maxDevBoxesPerUser" ,container.Add ); - AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Schedule.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Schedule.PowerShell.cs deleted file mode 100644 index 98bed552b34c..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Schedule.PowerShell.cs +++ /dev/null @@ -1,200 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// A Schedule to execute action. - [System.ComponentModel.TypeConverter(typeof(ScheduleTypeConverter))] - public partial class Schedule - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Schedule(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Schedule(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Schedule(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("SourceUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).SourceUri, global::System.Convert.ToString); - } - if (content.Contains("SourceType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).SourceType = (string) content.GetValueForProperty("SourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).SourceType, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Frequency")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Frequency = (string) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Frequency, global::System.Convert.ToString); - } - if (content.Contains("Time")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Time, global::System.Convert.ToString); - } - if (content.Contains("TimeZone")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).TimeZone, 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 Schedule(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Uri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Uri, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("SourceUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).SourceUri, global::System.Convert.ToString); - } - if (content.Contains("SourceType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).SourceType = (string) content.GetValueForProperty("SourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).SourceType, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Frequency")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Frequency = (string) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Frequency, global::System.Convert.ToString); - } - if (content.Contains("Time")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).Time, global::System.Convert.ToString); - } - if (content.Contains("TimeZone")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal)this).TimeZone, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// A Schedule to execute action. - [System.ComponentModel.TypeConverter(typeof(ScheduleTypeConverter))] - public partial interface ISchedule - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Schedule.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Schedule.TypeConverter.cs deleted file mode 100644 index 224261b332ea..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Schedule.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ScheduleTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return Schedule.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return Schedule.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return Schedule.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Schedule.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Schedule.cs deleted file mode 100644 index ec22b879a681..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Schedule.cs +++ /dev/null @@ -1,182 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// A Schedule to execute action. - public partial class Schedule : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal - { - - /// Backing field for property. - private string _frequency= @"Daily"; - - /// The frequency of this scheduled task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Frequency { get => this._frequency; } - - /// Internal Acessors for Frequency - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal.Frequency { get => this._frequency; set { {_frequency = value;} } } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal.Name { get => this._name; set { {_name = value;} } } - - /// Internal Acessors for SourceType - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal.SourceType { get => this._sourceType; set { {_sourceType = value;} } } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IScheduleInternal.Type { get => this._type; set { {_type = value;} } } - - /// Backing field for property. - private string _name; - - /// Display name for the Schedule. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// Backing field for property. - private string _sourceType= @"Pool"; - - /// The type of the resource that this schedule belongs to. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string SourceType { get => this._sourceType; } - - /// Backing field for property. - private string _sourceUri; - - /// The URI of the resource that this schedule belongs to. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string SourceUri { get => this._sourceUri; set => this._sourceUri = value; } - - /// Backing field for property. - private string _time; - - /// The target time to trigger the action. The format is HH:MM. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Time { get => this._time; set => this._time = value; } - - /// Backing field for property. - private string _timeZone; - - /// The IANA timezone id at which the schedule should execute. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string TimeZone { get => this._timeZone; set => this._timeZone = value; } - - /// Backing field for property. - private string _type= @"StopDevBox"; - - /// Supported type this scheduled task represents. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Type { get => this._type; } - - /// Backing field for property. - private string _uri; - - /// The unique URI of the schedule. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public string Uri { get => this._uri; set => this._uri = value; } - - /// Creates an new instance. - public Schedule() - { - - } - } - /// A Schedule to execute action. - public partial interface ISchedule : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable - { - /// The frequency of this scheduled task. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"The frequency of this scheduled task.", - SerializedName = @"frequency", - PossibleTypes = new [] { typeof(string) })] - string Frequency { get; } - /// Display name for the Schedule. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"Display name for the Schedule.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// The type of the resource that this schedule belongs to. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"The type of the resource that this schedule belongs to.", - SerializedName = @"sourceType", - PossibleTypes = new [] { typeof(string) })] - string SourceType { get; } - /// The URI of the resource that this schedule belongs to. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The URI of the resource that this schedule belongs to.", - SerializedName = @"sourceUri", - PossibleTypes = new [] { typeof(string) })] - string SourceUri { get; set; } - /// The target time to trigger the action. The format is HH:MM. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The target time to trigger the action. The format is HH:MM.", - SerializedName = @"time", - PossibleTypes = new [] { typeof(string) })] - string Time { get; set; } - /// The IANA timezone id at which the schedule should execute. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The IANA timezone id at which the schedule should execute.", - SerializedName = @"timeZone", - PossibleTypes = new [] { typeof(string) })] - string TimeZone { get; set; } - /// Supported type this scheduled task represents. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"Supported type this scheduled task represents.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string Type { get; } - /// The unique URI of the schedule. - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The unique URI of the schedule.", - SerializedName = @"uri", - PossibleTypes = new [] { typeof(string) })] - string Uri { get; set; } - - } - /// A Schedule to execute action. - internal partial interface IScheduleInternal - - { - /// The frequency of this scheduled task. - string Frequency { get; set; } - /// Display name for the Schedule. - string Name { get; set; } - /// The type of the resource that this schedule belongs to. - string SourceType { get; set; } - /// The URI of the resource that this schedule belongs to. - string SourceUri { get; set; } - /// The target time to trigger the action. The format is HH:MM. - string Time { get; set; } - /// The IANA timezone id at which the schedule should execute. - string TimeZone { get; set; } - /// Supported type this scheduled task represents. - string Type { get; set; } - /// The unique URI of the schedule. - string Uri { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Schedule.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Schedule.json.cs deleted file mode 100644 index c17d4a45e796..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Schedule.json.cs +++ /dev/null @@ -1,125 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// A Schedule to execute action. - public partial class Schedule - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new Schedule(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. - internal Schedule(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_sourceUri = If( json?.PropertyT("sourceUri"), out var __jsonSourceUri) ? (string)__jsonSourceUri : (string)SourceUri;} - {_sourceType = If( json?.PropertyT("sourceType"), out var __jsonSourceType) ? (string)__jsonSourceType : (string)SourceType;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_frequency = If( json?.PropertyT("frequency"), out var __jsonFrequency) ? (string)__jsonFrequency : (string)Frequency;} - {_time = If( json?.PropertyT("time"), out var __jsonTime) ? (string)__jsonTime : (string)Time;} - {_timeZone = If( json?.PropertyT("timeZone"), out var __jsonTimeZone) ? (string)__jsonTimeZone : (string)TimeZone;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._uri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._uri.ToString()) : null, "uri" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - } - AddIf( null != (((object)this._sourceUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._sourceUri.ToString()) : null, "sourceUri" ,container.Add ); - AddIf( null != (((object)this._sourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._sourceType.ToString()) : null, "sourceType" ,container.Add ); - AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); - AddIf( null != (((object)this._frequency)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._frequency.ToString()) : null, "frequency" ,container.Add ); - AddIf( null != (((object)this._time)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._time.ToString()) : null, "time" ,container.Add ); - AddIf( null != (((object)this._timeZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._timeZone.ToString()) : null, "timeZone" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.PowerShell.cs deleted file mode 100644 index cdd9c14be50e..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - [System.ComponentModel.TypeConverter(typeof(StopOnDisconnectConfigurationTypeConverter))] - public partial class StopOnDisconnectConfiguration - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new StopOnDisconnectConfiguration(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new StopOnDisconnectConfiguration(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal StopOnDisconnectConfiguration(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus.CreateFrom); - } - if (content.Contains("GracePeriodMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute = (int?) content.GetValueForProperty("GracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal StopOnDisconnectConfiguration(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus.CreateFrom); - } - if (content.Contains("GracePeriodMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute = (int?) content.GetValueForProperty("GracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - [System.ComponentModel.TypeConverter(typeof(StopOnDisconnectConfigurationTypeConverter))] - public partial interface IStopOnDisconnectConfiguration - - { - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.TypeConverter.cs deleted file mode 100644 index db0725d327a5..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class StopOnDisconnectConfigurationTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfiguration ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfiguration).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return StopOnDisconnectConfiguration.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return StopOnDisconnectConfiguration.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return StopOnDisconnectConfiguration.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.cs deleted file mode 100644 index 4e3008b26e5d..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.cs +++ /dev/null @@ -1,88 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - public partial class StopOnDisconnectConfiguration : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfiguration, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfigurationInternal - { - - /// Backing field for property. - private int? _gracePeriodMinute; - - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect - /// is detected. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public int? GracePeriodMinute { get => this._gracePeriodMinute; set => this._gracePeriodMinute = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus _status; - - /// - /// Indicates whether the feature to stop the devbox on disconnect once the grace - /// period has lapsed is enabled. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus Status { get => this._status; set => this._status = value; } - - /// Creates an new instance. - public StopOnDisconnectConfiguration() - { - - } - } - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - public partial interface IStopOnDisconnectConfiguration : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable - { - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect - /// is detected. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The specified time in minutes to wait before stopping a Dev Box once disconnect - is detected.", - SerializedName = @"gracePeriodMinutes", - PossibleTypes = new [] { typeof(int) })] - int? GracePeriodMinute { get; set; } - /// - /// Indicates whether the feature to stop the devbox on disconnect once the grace - /// period has lapsed is enabled. - /// - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Indicates whether the feature to stop the devbox on disconnect once the grace - period has lapsed is enabled.", - SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus Status { get; set; } - - } - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - internal partial interface IStopOnDisconnectConfigurationInternal - - { - /// - /// The specified time in minutes to wait before stopping a Dev Box once disconnect - /// is detected. - /// - int? GracePeriodMinute { get; set; } - /// - /// Indicates whether the feature to stop the devbox on disconnect once the grace - /// period has lapsed is enabled. - /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus Status { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.json.cs deleted file mode 100644 index b85ac9b09504..000000000000 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StopOnDisconnectConfiguration.json.cs +++ /dev/null @@ -1,110 +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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; - - /// Stop on disconnect configuration settings for Dev Boxes created in this pool. - public partial class StopOnDisconnectConfiguration - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfiguration. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfiguration. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStopOnDisconnectConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new StopOnDisconnectConfiguration(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. - internal StopOnDisconnectConfiguration(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_gracePeriodMinute = If( json?.PropertyT("gracePeriodMinutes"), out var __jsonGracePeriodMinutes) ? (int?)__jsonGracePeriodMinutes : GracePeriodMinute;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); - AddIf( null != this._gracePeriodMinute ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNumber((int)this._gracePeriodMinute) : null, "gracePeriodMinutes" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.PowerShell.cs new file mode 100644 index 000000000000..5c823d428f55 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// The active hours configuration for a Dev Box. + [System.ComponentModel.TypeConverter(typeof(ActiveHoursConfigurationTypeConverter))] + public partial class ActiveHoursConfiguration + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ActiveHoursConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("KeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).KeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus) content.GetValueForProperty("KeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).KeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("AutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).AutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus) content.GetValueForProperty("AutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).AutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("StartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).StartTimeHour = (int?) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).EndTimeHour = (int?) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ActiveHoursConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("KeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).KeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus) content.GetValueForProperty("KeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).KeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("AutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).AutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus) content.GetValueForProperty("AutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).AutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("StartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).StartTimeHour = (int?) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).EndTimeHour = (int?) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ActiveHoursConfiguration(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ActiveHoursConfiguration(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The active hours configuration for a Dev Box. + [System.ComponentModel.TypeConverter(typeof(ActiveHoursConfigurationTypeConverter))] + public partial interface IActiveHoursConfiguration + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.TypeConverter.cs new file mode 100644 index 000000000000..7bf85ef71301 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ActiveHoursConfigurationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfiguration ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfiguration).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ActiveHoursConfiguration.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ActiveHoursConfiguration.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ActiveHoursConfiguration.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.cs new file mode 100644 index 000000000000..ccde55790404 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// The active hours configuration for a Dev Box. + public partial class ActiveHoursConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus _autoStartEnableStatus; + + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus AutoStartEnableStatus { get => this._autoStartEnableStatus; set => this._autoStartEnableStatus = value; } + + /// Backing field for property. + private int? _endTimeHour; + + /// The end time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public int? EndTimeHour { get => this._endTimeHour; set => this._endTimeHour = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus _keepAwakeEnableStatus; + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus KeepAwakeEnableStatus { get => this._keepAwakeEnableStatus; set => this._keepAwakeEnableStatus = value; } + + /// Backing field for property. + private int? _startTimeHour; + + /// The start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public int? StartTimeHour { get => this._startTimeHour; set => this._startTimeHour = value; } + + /// Backing field for property. + private string _timeZone; + + /// The timezone of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string TimeZone { get => this._timeZone; set => this._timeZone = value; } + + /// Creates an new instance. + public ActiveHoursConfiguration() + { + + } + } + /// The active hours configuration for a Dev Box. + public partial interface IActiveHoursConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be automatically started at commencement of active hours.", + SerializedName = @"autoStartEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus AutoStartEnableStatus { get; set; } + /// The end time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The end time of the active hours.", + SerializedName = @"endTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? EndTimeHour { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be kept awake during active hours.", + SerializedName = @"keepAwakeEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus KeepAwakeEnableStatus { get; set; } + /// The start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start time of the active hours.", + SerializedName = @"startTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? StartTimeHour { get; set; } + /// The timezone of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timezone of the active hours.", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + + } + /// The active hours configuration for a Dev Box. + internal partial interface IActiveHoursConfigurationInternal + + { + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus AutoStartEnableStatus { get; set; } + /// The end time of the active hours. + int? EndTimeHour { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus KeepAwakeEnableStatus { get; set; } + /// The start time of the active hours. + int? StartTimeHour { get; set; } + /// The timezone of the active hours. + string TimeZone { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.json.cs new file mode 100644 index 000000000000..e524bcf487b0 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ActiveHoursConfiguration.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// The active hours configuration for a Dev Box. + public partial class ActiveHoursConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal ActiveHoursConfiguration(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_keepAwakeEnableStatus = If( json?.PropertyT("keepAwakeEnableStatus"), out var __jsonKeepAwakeEnableStatus) ? (string)__jsonKeepAwakeEnableStatus : (string)KeepAwakeEnableStatus;} + {_autoStartEnableStatus = If( json?.PropertyT("autoStartEnableStatus"), out var __jsonAutoStartEnableStatus) ? (string)__jsonAutoStartEnableStatus : (string)AutoStartEnableStatus;} + {_timeZone = If( json?.PropertyT("timeZone"), out var __jsonTimeZone) ? (string)__jsonTimeZone : (string)TimeZone;} + {_startTimeHour = If( json?.PropertyT("startTimeHour"), out var __jsonStartTimeHour) ? (int?)__jsonStartTimeHour : StartTimeHour;} + {_endTimeHour = If( json?.PropertyT("endTimeHour"), out var __jsonEndTimeHour) ? (int?)__jsonEndTimeHour : EndTimeHour;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new ActiveHoursConfiguration(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._keepAwakeEnableStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._keepAwakeEnableStatus.ToString()) : null, "keepAwakeEnableStatus" ,container.Add ); + AddIf( null != (((object)this._autoStartEnableStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._autoStartEnableStatus.ToString()) : null, "autoStartEnableStatus" ,container.Add ); + AddIf( null != (((object)this._timeZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._timeZone.ToString()) : null, "timeZone" ,container.Add ); + AddIf( null != this._startTimeHour ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNumber((int)this._startTimeHour) : null, "startTimeHour" ,container.Add ); + AddIf( null != this._endTimeHour ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNumber((int)this._endTimeHour) : null, "endTimeHour" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Approval.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Approval.PowerShell.cs new file mode 100644 index 000000000000..e9f365b3c1e4 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Approval.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// A pending approval. + [System.ComponentModel.TypeConverter(typeof(ApprovalTypeConverter))] + public partial class Approval + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Approval(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).CreatedByType, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ResourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).ResourceUri = (string) content.GetValueForProperty("ResourceUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).ResourceUri, 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 Approval(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).CreatedByType, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ResourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).ResourceUri = (string) content.GetValueForProperty("ResourceUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal)this).ResourceUri, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Approval(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Approval(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A pending approval. + [System.ComponentModel.TypeConverter(typeof(ApprovalTypeConverter))] + public partial interface IApproval + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Approval.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Approval.TypeConverter.cs new file mode 100644 index 000000000000..d5cab19c64df --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Approval.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ApprovalTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Approval.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Approval.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Approval.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Approval.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Approval.cs new file mode 100644 index 000000000000..20eebc61f7a2 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Approval.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// A pending approval. + public partial class Approval : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal + { + + /// Backing field for property. + private global::System.DateTime? _createdAt; + + /// The timestamp the resource was created at. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public global::System.DateTime? CreatedAt { get => this._createdAt; } + + /// Backing field for property. + private string _createdBy; + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string CreatedBy { get => this._createdBy; } + + /// Backing field for property. + private string _createdByType; + + /// The identity type that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string CreatedByType { get => this._createdByType; } + + /// Internal Acessors for CreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal.CreatedAt { get => this._createdAt; set { {_createdAt = value;} } } + + /// Internal Acessors for CreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal.CreatedBy { get => this._createdBy; set { {_createdBy = value;} } } + + /// Internal Acessors for CreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal.CreatedByType { get => this._createdByType; set { {_createdByType = value;} } } + + /// Internal Acessors for ResourceUri + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApprovalInternal.ResourceUri { get => this._resourceUri; set { {_resourceUri = value;} } } + + /// Backing field for property. + private string _resourceUri; + + /// The resource that is pending approval. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string ResourceUri { get => this._resourceUri; } + + /// Creates an new instance. + public Approval() + { + + } + } + /// A pending approval. + public partial interface IApproval : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// The timestamp the resource was created at. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The timestamp the resource was created at.", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedAt { get; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string CreatedBy { get; } + /// The identity type that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The identity type that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(string) })] + string CreatedByType { get; } + /// The resource that is pending approval. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The resource that is pending approval.", + SerializedName = @"resourceUri", + PossibleTypes = new [] { typeof(string) })] + string ResourceUri { get; } + + } + /// A pending approval. + internal partial interface IApprovalInternal + + { + /// The timestamp the resource was created at. + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + string CreatedBy { get; set; } + /// The identity type that created the resource. + string CreatedByType { get; set; } + /// The resource that is pending approval. + string ResourceUri { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Approval.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Approval.json.cs new file mode 100644 index 000000000000..4227e4b62a1b --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Approval.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// A pending approval. + public partial class Approval + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal Approval(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy;} + {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} + {_resourceUri = If( json?.PropertyT("resourceUri"), out var __jsonResourceUri) ? (string)__jsonResourceUri : (string)ResourceUri;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new Approval(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._resourceUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._resourceUri.ToString()) : null, "resourceUri" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsError.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsError.PowerShell.cs similarity index 79% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsError.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsError.PowerShell.cs index ffd081777cd2..73b832051936 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsError.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsError.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class AzureCoreFoundationsError partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,29 +70,29 @@ internal AzureCoreFoundationsError(global::System.Collections.IDictionary conten // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } 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. @@ -107,51 +107,51 @@ internal AzureCoreFoundationsError(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureCoreFoundationsError(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureCoreFoundationsError(content); } @@ -161,7 +161,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsError.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsError.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsError.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsError.TypeConverter.cs index c10a5da6177d..0ad852677d5e 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsError.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsError.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsError.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsError.cs similarity index 88% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsError.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsError.cs index b80ca62c0cd6..24569106d4da 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsError.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsError.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// The error object. public partial class AzureCoreFoundationsError : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal { /// Backing field for property. @@ -21,20 +21,20 @@ public partial class AzureCoreFoundationsError : public string Code { get => this._code; set => this._code = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] _detail; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] _detail; /// An array of details about specific errors that led to this reported error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => this._detail; set => this._detail = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => this._detail; set => this._detail = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError _innererror; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError _innererror; /// /// An object containing more specific information than the current object about the error. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => (this._innererror = this._innererror ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerError()); set => this._innererror = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => (this._innererror = this._innererror ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerError()); set => this._innererror = value; } /// Backing field for property. private string _message; @@ -74,8 +74,8 @@ public partial interface IAzureCoreFoundationsError : ReadOnly = false, Description = @"An array of details about specific errors that led to this reported error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } /// /// An object containing more specific information than the current object about the error. /// @@ -84,8 +84,8 @@ public partial interface IAzureCoreFoundationsError : ReadOnly = false, Description = @"An object containing more specific information than the current object about the error.", SerializedName = @"innererror", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, @@ -111,11 +111,11 @@ internal partial interface IAzureCoreFoundationsErrorInternal /// One of a server-defined set of error codes. string Code { get; set; } /// An array of details about specific errors that led to this reported error. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } /// /// An object containing more specific information than the current object about the error. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } /// A human-readable representation of the error. string Message { get; set; } /// The target of the error. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsError.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsError.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsError.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsError.json.cs index ceb76bdad7ad..0c444f095613 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsError.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsError.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -68,19 +68,19 @@ internal AzureCoreFoundationsError(Microsoft.Azure.PowerShell.Cmdlets.DevCenterd {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError.FromJson(__u) )) ))() : null : Detail;} - {_innererror = If( json?.PropertyT("innererror"), out var __jsonInnererror) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerError.FromJson(__jsonInnererror) : Innererror;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError.FromJson(__u) )) ))() : null : Detail;} + {_innererror = If( json?.PropertyT("innererror"), out var __jsonInnererror) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerError.FromJson(__jsonInnererror) : Innererror;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new AzureCoreFoundationsError(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsErrorResponse.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsErrorResponse.PowerShell.cs similarity index 79% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsErrorResponse.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsErrorResponse.PowerShell.cs index 3acb177c796b..abd3436d3d1d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsErrorResponse.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsErrorResponse.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class AzureCoreFoundationsErrorResponse partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,33 +70,33 @@ internal AzureCoreFoundationsErrorResponse(global::System.Collections.IDictionar // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } 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. @@ -111,55 +111,55 @@ internal AzureCoreFoundationsErrorResponse(global::System.Management.Automation. // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureCoreFoundationsErrorResponse(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureCoreFoundationsErrorResponse(content); } @@ -171,7 +171,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsErrorResponse.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsErrorResponse.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsErrorResponse.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsErrorResponse.TypeConverter.cs index dea71d476915..7c3b413d9d4d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsErrorResponse.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsErrorResponse.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsErrorResponse.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsErrorResponse.cs similarity index 80% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsErrorResponse.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsErrorResponse.cs index e97a8c419cef..f67546ea4790 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsErrorResponse.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsErrorResponse.cs @@ -3,47 +3,47 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// A response containing error details. public partial class AzureCoreFoundationsErrorResponse : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal { /// One of a server-defined set of error codes. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ; } /// An array of details about specific errors that led to this reported error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError _error; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError _error; /// The error object. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); set => this._error = value; } /// /// An object containing more specific information than the current object about the error. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); set { {_error = value;} } } /// The target of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } /// Creates an new instance. public AzureCoreFoundationsErrorResponse() @@ -69,8 +69,8 @@ public partial interface IAzureCoreFoundationsErrorResponse : ReadOnly = false, Description = @"An array of details about specific errors that led to this reported error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } /// /// An object containing more specific information than the current object about the error. /// @@ -79,8 +79,8 @@ public partial interface IAzureCoreFoundationsErrorResponse : ReadOnly = false, Description = @"An object containing more specific information than the current object about the error.", SerializedName = @"innererror", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, @@ -106,13 +106,13 @@ internal partial interface IAzureCoreFoundationsErrorResponseInternal /// One of a server-defined set of error codes. string Code { get; set; } /// An array of details about specific errors that led to this reported error. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } /// The error object. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get; set; } /// /// An object containing more specific information than the current object about the error. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } /// A human-readable representation of the error. string Message { get; set; } /// The target of the error. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsErrorResponse.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsErrorResponse.json.cs similarity index 96% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsErrorResponse.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsErrorResponse.json.cs index ff00f59d9ffd..a3975f3a7ebd 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsErrorResponse.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsErrorResponse.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,18 +65,18 @@ internal AzureCoreFoundationsErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.De { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new AzureCoreFoundationsErrorResponse(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsInnerError.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsInnerError.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsInnerError.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsInnerError.PowerShell.cs index dfa08ad482f0..332704039677 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsInnerError.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsInnerError.PowerShell.cs @@ -3,12 +3,12 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; /// - /// An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + /// An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors. /// [System.ComponentModel.TypeConverter(typeof(AzureCoreFoundationsInnerErrorTypeConverter))] public partial class AzureCoreFoundationsInnerError @@ -57,7 +57,7 @@ public partial class AzureCoreFoundationsInnerError partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -72,17 +72,17 @@ internal AzureCoreFoundationsInnerError(global::System.Collections.IDictionary c // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } 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. @@ -97,39 +97,39 @@ internal AzureCoreFoundationsInnerError(global::System.Management.Automation.PSO // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerErrorInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerErrorInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureCoreFoundationsInnerError(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureCoreFoundationsInnerError(content); } @@ -139,14 +139,14 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + /// An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors. [System.ComponentModel.TypeConverter(typeof(AzureCoreFoundationsInnerErrorTypeConverter))] public partial interface IAzureCoreFoundationsInnerError diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsInnerError.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsInnerError.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsInnerError.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsInnerError.TypeConverter.cs index a58de17785d4..5fe9b2dcf7ea 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsInnerError.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsInnerError.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsInnerError.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsInnerError.cs similarity index 81% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsInnerError.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsInnerError.cs index f873d7ff53a3..8c0b42c53200 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsInnerError.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsInnerError.cs @@ -3,16 +3,16 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// - /// An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + /// An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors. /// public partial class AzureCoreFoundationsInnerError : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerErrorInternal { /// Backing field for property. @@ -23,11 +23,11 @@ public partial class AzureCoreFoundationsInnerError : public string Code { get => this._code; set => this._code = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError _innererror; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError _innererror; /// Inner error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => (this._innererror = this._innererror ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerError()); set => this._innererror = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => (this._innererror = this._innererror ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerError()); set => this._innererror = value; } /// Creates an new instance. public AzureCoreFoundationsInnerError() @@ -35,7 +35,7 @@ public AzureCoreFoundationsInnerError() } } - /// An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + /// An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors. public partial interface IAzureCoreFoundationsInnerError : Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable { @@ -53,18 +53,18 @@ public partial interface IAzureCoreFoundationsInnerError : ReadOnly = false, Description = @"Inner error.", SerializedName = @"innererror", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } } - /// An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + /// An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors. internal partial interface IAzureCoreFoundationsInnerErrorInternal { /// One of a server-defined set of error codes. string Code { get; set; } /// Inner error. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsInnerError.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsInnerError.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsInnerError.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsInnerError.json.cs index 61b66f7a8d73..55819d132b8a 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/AzureCoreFoundationsInnerError.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/AzureCoreFoundationsInnerError.json.cs @@ -3,12 +3,12 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// - /// An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + /// An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors. /// public partial class AzureCoreFoundationsInnerError { @@ -68,18 +68,18 @@ internal AzureCoreFoundationsInnerError(Microsoft.Azure.PowerShell.Cmdlets.DevCe return; } {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_innererror = If( json?.PropertyT("innererror"), out var __jsonInnererror) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerError.FromJson(__jsonInnererror) : Innererror;} + {_innererror = If( json?.PropertyT("innererror"), out var __jsonInnererror) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerError.FromJson(__jsonInnererror) : Innererror;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new AzureCoreFoundationsInnerError(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Catalog.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Catalog.PowerShell.cs new file mode 100644 index 000000000000..0cc212502222 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Catalog.PowerShell.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// A catalog. + [System.ComponentModel.TypeConverter(typeof(CatalogTypeConverter))] + public partial class Catalog + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Catalog(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalogInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalogInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalogInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalogInternal)this).Name, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Catalog(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalogInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalogInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalogInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalogInternal)this).Name, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Catalog(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Catalog(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A catalog. + [System.ComponentModel.TypeConverter(typeof(CatalogTypeConverter))] + public partial interface ICatalog + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Catalog.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Catalog.TypeConverter.cs new file mode 100644 index 000000000000..74ba974aadad --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Catalog.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CatalogTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Catalog.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Catalog.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Catalog.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Catalog.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Catalog.cs new file mode 100644 index 000000000000..e7ff0110187a --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Catalog.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// A catalog. + public partial class Catalog : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalogInternal + { + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalogInternal.Name { get => this._name; set { {_name = value;} } } + + /// Backing field for property. + private string _name; + + /// Name of the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private string _uri; + + /// The unique URI of the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Uri { get => this._uri; set => this._uri = value; } + + /// Creates an new instance. + public Catalog() + { + + } + } + /// A catalog. + public partial interface ICatalog : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// Name of the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Name of the catalog.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The unique URI of the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The unique URI of the catalog.", + SerializedName = @"uri", + PossibleTypes = new [] { typeof(string) })] + string Uri { get; set; } + + } + /// A catalog. + internal partial interface ICatalogInternal + + { + /// Name of the catalog. + string Name { get; set; } + /// The unique URI of the catalog. + string Uri { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Catalog.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Catalog.json.cs new file mode 100644 index 000000000000..538545c6ca7f --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Catalog.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// A catalog. + public partial class Catalog + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal Catalog(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new Catalog(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._uri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._uri.ToString()) : null, "uri" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationGroup.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationGroup.PowerShell.cs similarity index 82% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationGroup.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationGroup.PowerShell.cs index 0a3940993bec..f8a866026d45 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationGroup.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationGroup.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CustomizationGroup partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,33 +70,33 @@ internal CustomizationGroup(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Task")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Task = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[]) content.GetValueForProperty("Task",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Task, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Task = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[]) content.GetValueForProperty("Task",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Task, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskTypeConverter.ConvertFrom)); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationGroupStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationGroupStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationGroupStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationGroupStatus.CreateFrom); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } 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. @@ -111,55 +111,55 @@ internal CustomizationGroup(global::System.Management.Automation.PSObject conten // actually deserialize if (content.Contains("Task")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Task = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[]) content.GetValueForProperty("Task",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Task, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Task = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[]) content.GetValueForProperty("Task",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Task, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskTypeConverter.ConvertFrom)); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationGroupStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationGroupStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationGroupStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationGroupStatus.CreateFrom); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CustomizationGroup(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CustomizationGroup(content); } @@ -169,7 +169,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationGroup.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationGroup.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationGroup.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationGroup.TypeConverter.cs index a894fdbe56e6..645e46bcc84a 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationGroup.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationGroup.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationGroup.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationGroup.cs similarity index 85% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationGroup.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationGroup.cs index 3b7eb2585a74..ef40171a60a6 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationGroup.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationGroup.cs @@ -3,37 +3,37 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Represents a list of tasks to apply to a Dev Box. public partial class CustomizationGroup : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal { /// Backing field for property. private global::System.DateTime? _endTime; - /// End time of the customization group. + /// End time of the customization group, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public global::System.DateTime? EndTime { get => this._endTime; } /// Internal Acessors for EndTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal.EndTime { get => this._endTime; set { {_endTime = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal.EndTime { get => this._endTime; set { {_endTime = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for StartTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal.StartTime { get => this._startTime; set { {_startTime = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal.StartTime { get => this._startTime; set { {_startTime = value;} } } /// Internal Acessors for Status - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationGroupStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal.Status { get => this._status; set { {_status = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationGroupStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal.Status { get => this._status; set { {_status = value;} } } /// Internal Acessors for Uri - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroupInternal.Uri { get => this._uri; set { {_uri = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroupInternal.Uri { get => this._uri; set { {_uri = value;} } } /// Backing field for property. private string _name; @@ -45,7 +45,7 @@ public partial class CustomizationGroup : /// Backing field for property. private global::System.DateTime? _startTime; - /// Start time of the customization group. + /// Start time of the customization group, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public global::System.DateTime? StartTime { get => this._startTime; } @@ -57,7 +57,7 @@ public partial class CustomizationGroup : public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationGroupStatus? Status { get => this._status; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[] _task; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[] _task; /// /// Tasks to apply. Note by default tasks are excluded from the response when @@ -65,7 +65,7 @@ public partial class CustomizationGroup : /// parameter. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[] Task { get => this._task; set => this._task = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[] Task { get => this._task; set => this._task = value; } /// Backing field for property. private string _uri; @@ -84,11 +84,11 @@ public CustomizationGroup() public partial interface ICustomizationGroup : Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable { - /// End time of the customization group. + /// End time of the customization group, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = true, - Description = @"End time of the customization group.", + Description = @"End time of the customization group, in RFC3339 format.", SerializedName = @"endTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? EndTime { get; } @@ -100,11 +100,11 @@ public partial interface ICustomizationGroup : SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string Name { get; } - /// Start time of the customization group. + /// Start time of the customization group, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = true, - Description = @"Start time of the customization group.", + Description = @"Start time of the customization group, in RFC3339 format.", SerializedName = @"startTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? StartTime { get; } @@ -128,8 +128,8 @@ public partial interface ICustomizationGroup : listing customization groups. To include them, use the `include=tasks` query parameter.", SerializedName = @"tasks", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[] Task { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[] Task { get; set; } /// The unique URI of the customization group. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, @@ -144,11 +144,11 @@ public partial interface ICustomizationGroup : internal partial interface ICustomizationGroupInternal { - /// End time of the customization group. + /// End time of the customization group, in RFC3339 format. global::System.DateTime? EndTime { get; set; } /// Name of the customization group. string Name { get; set; } - /// Start time of the customization group. + /// Start time of the customization group, in RFC3339 format. global::System.DateTime? StartTime { get; set; } /// Status of the customization group. Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationGroupStatus? Status { get; set; } @@ -157,7 +157,7 @@ internal partial interface ICustomizationGroupInternal /// listing customization groups. To include them, use the `include=tasks` query /// parameter. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[] Task { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[] Task { get; set; } /// The unique URI of the customization group. string Uri { get; set; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationGroup.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationGroup.json.cs similarity index 96% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationGroup.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationGroup.json.cs index 976d40f5b65f..3e8e58c195bb 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationGroup.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationGroup.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,7 +65,7 @@ internal CustomizationGroup(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Run { return; } - {_task = If( json?.PropertyT("tasks"), out var __jsonTasks) ? If( __jsonTasks as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTask.FromJson(__u) )) ))() : null : Task;} + {_task = If( json?.PropertyT("tasks"), out var __jsonTasks) ? If( __jsonTasks as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTask.FromJson(__u) )) ))() : null : Task;} {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} @@ -75,13 +75,13 @@ internal CustomizationGroup(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Run } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new CustomizationGroup(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.PowerShell.cs new file mode 100644 index 000000000000..6e58dfd400a1 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// A customization task to run on a Dev Box. + [System.ComponentModel.TypeConverter(typeof(CustomizationTaskTypeConverter))] + public partial class CustomizationTask + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CustomizationTask(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskParametersTypeConverter.ConvertFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RunAs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).RunAs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount?) content.GetValueForProperty("RunAs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).RunAs, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount.CreateFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("LogUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).LogUri = (string) content.GetValueForProperty("LogUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).LogUri, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus.CreateFrom); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CustomizationTask(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskParametersTypeConverter.ConvertFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("TimeoutInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).TimeoutInSecond = (int?) content.GetValueForProperty("TimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).TimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RunAs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).RunAs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount?) content.GetValueForProperty("RunAs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).RunAs, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount.CreateFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("LogUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).LogUri = (string) content.GetValueForProperty("LogUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).LogUri, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus.CreateFrom); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomizationTask(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomizationTask(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A customization task to run on a Dev Box. + [System.ComponentModel.TypeConverter(typeof(CustomizationTaskTypeConverter))] + public partial interface ICustomizationTask + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.TypeConverter.cs new file mode 100644 index 000000000000..cd7727bc75fa --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CustomizationTaskTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CustomizationTask.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CustomizationTask.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CustomizationTask.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.cs new file mode 100644 index 000000000000..4c675a8cbaa1 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// A customization task to run on a Dev Box. + public partial class CustomizationTask : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal + { + + /// Backing field for property. + private string _displayName; + + /// Display name to help differentiate multiple instances of the same task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// End time of the task, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; } + + /// Backing field for property. + private string _id; + + /// ID of the task instance. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Backing field for property. + private string _logUri; + + /// The unique URI for retrieving the task logs. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string LogUri { get => this._logUri; } + + /// Internal Acessors for EndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal.EndTime { get => this._endTime; set { {_endTime = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for LogUri + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal.LogUri { get => this._logUri; set { {_logUri = value;} } } + + /// Internal Acessors for StartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal.StartTime { get => this._startTime; set { {_startTime = value;} } } + + /// Internal Acessors for Status + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal.Status { get => this._status; set { {_status = value;} } } + + /// Backing field for property. + private string _name; + + /// Name of the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters _parameter; + + /// Parameters for the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskParameters()); set => this._parameter = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount? _runAs; + + /// What account to run the task as. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount? RunAs { get => this._runAs; set => this._runAs = value; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// Start time of the task, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus? _status; + + /// Status of the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus? Status { get => this._status; } + + /// Backing field for property. + private int? _timeoutInSecond; + + /// Timeout, in seconds. Overrides any timeout provided on the task definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public int? TimeoutInSecond { get => this._timeoutInSecond; set => this._timeoutInSecond = value; } + + /// Creates an new instance. + public CustomizationTask() + { + + } + } + /// A customization task to run on a Dev Box. + public partial interface ICustomizationTask : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// Display name to help differentiate multiple instances of the same task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display name to help differentiate multiple instances of the same task.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// End time of the task, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"End time of the task, in RFC3339 format.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; } + /// ID of the task instance. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"ID of the task instance.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// The unique URI for retrieving the task logs. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The unique URI for retrieving the task logs.", + SerializedName = @"logUri", + PossibleTypes = new [] { typeof(string) })] + string LogUri { get; } + /// Name of the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the task.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// Parameters for the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Parameters for the task.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters Parameter { get; set; } + /// What account to run the task as. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"What account to run the task as.", + SerializedName = @"runAs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount? RunAs { get; set; } + /// Start time of the task, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Start time of the task, in RFC3339 format.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; } + /// Status of the task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Status of the task.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus? Status { get; } + /// Timeout, in seconds. Overrides any timeout provided on the task definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Timeout, in seconds. Overrides any timeout provided on the task definition.", + SerializedName = @"timeoutInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? TimeoutInSecond { get; set; } + + } + /// A customization task to run on a Dev Box. + internal partial interface ICustomizationTaskInternal + + { + /// Display name to help differentiate multiple instances of the same task. + string DisplayName { get; set; } + /// End time of the task, in RFC3339 format. + global::System.DateTime? EndTime { get; set; } + /// ID of the task instance. + string Id { get; set; } + /// The unique URI for retrieving the task logs. + string LogUri { get; set; } + /// Name of the task. + string Name { get; set; } + /// Parameters for the task. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters Parameter { get; set; } + /// What account to run the task as. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount? RunAs { get; set; } + /// Start time of the task, in RFC3339 format. + global::System.DateTime? StartTime { get; set; } + /// Status of the task. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus? Status { get; set; } + /// Timeout, in seconds. Overrides any timeout provided on the task definition. + int? TimeoutInSecond { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.json.cs new file mode 100644 index 000000000000..3b0c5a824687 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTask.json.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// A customization task to run on a Dev Box. + public partial class CustomizationTask + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal CustomizationTask(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskParameters.FromJson(__jsonParameters) : Parameter;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_timeoutInSecond = If( json?.PropertyT("timeoutInSeconds"), out var __jsonTimeoutInSeconds) ? (int?)__jsonTimeoutInSeconds : TimeoutInSecond;} + {_runAs = If( json?.PropertyT("runAs"), out var __jsonRunAs) ? (string)__jsonRunAs : (string)RunAs;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_logUri = If( json?.PropertyT("logUri"), out var __jsonLogUri) ? (string)__jsonLogUri : (string)LogUri;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new CustomizationTask(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != this._parameter ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._parameter.ToJson(null,serializationMode) : null, "parameters" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != this._timeoutInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNumber((int)this._timeoutInSecond) : null, "timeoutInSeconds" ,container.Add ); + AddIf( null != (((object)this._runAs)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._runAs.ToString()) : null, "runAs" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._logUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._logUri.ToString()) : null, "logUri" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinition.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinition.PowerShell.cs similarity index 83% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinition.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinition.PowerShell.cs index ebd3e7c36297..e073a28b4486 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinition.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CustomizationTaskDefinition partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,29 +70,29 @@ internal CustomizationTaskDefinition(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("CatalogName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).CatalogName = (string) content.GetValueForProperty("CatalogName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).CatalogName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).CatalogName = (string) content.GetValueForProperty("CatalogName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).CatalogName, global::System.Convert.ToString); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskDefinitionParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskDefinitionParametersTypeConverter.ConvertFrom); } 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. @@ -107,51 +107,51 @@ internal CustomizationTaskDefinition(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("CatalogName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).CatalogName = (string) content.GetValueForProperty("CatalogName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).CatalogName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).CatalogName = (string) content.GetValueForProperty("CatalogName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).CatalogName, global::System.Convert.ToString); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("Parameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskDefinitionParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskDefinitionParametersTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CustomizationTaskDefinition(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CustomizationTaskDefinition(content); } @@ -161,7 +161,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinition.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinition.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinition.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinition.TypeConverter.cs index 3deadec3c3a2..820be959d397 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinition.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinition.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinition.cs similarity index 90% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinition.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinition.cs index 1bafc5aee51c..1832c0176ee9 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinition.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Represents a task to be used in customizing a Dev Box. public partial class CustomizationTaskDefinition : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal { /// Backing field for property. @@ -28,13 +28,13 @@ public partial class CustomizationTaskDefinition : public string Description { get => this._description; set => this._description = value; } /// Internal Acessors for CatalogName - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal.CatalogName { get => this._catalogName; set { {_catalogName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal.CatalogName { get => this._catalogName; set { {_catalogName = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Uri - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionInternal.Uri { get => this._uri; set { {_uri = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionInternal.Uri { get => this._uri; set { {_uri = value;} } } /// Backing field for property. private string _name; @@ -44,11 +44,11 @@ public partial class CustomizationTaskDefinition : public string Name { get => this._name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters _parameter; /// Parameters for the task. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskDefinitionParameters()); set => this._parameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskDefinitionParameters()); set => this._parameter = value; } /// Backing field for property. private string _uri; @@ -97,8 +97,8 @@ public partial interface ICustomizationTaskDefinition : ReadOnly = false, Description = @"Parameters for the task.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters Parameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters Parameter { get; set; } /// The unique URI of the customization task. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, @@ -120,7 +120,7 @@ internal partial interface ICustomizationTaskDefinitionInternal /// Full name of the task: {catalogName}/{taskName}. string Name { get; set; } /// Parameters for the task. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters Parameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters Parameter { get; set; } /// The unique URI of the customization task. string Uri { get; set; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinition.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinition.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinition.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinition.json.cs index bf2facffc8e3..1348d6815b07 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinition.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -69,18 +69,18 @@ internal CustomizationTaskDefinition(Microsoft.Azure.PowerShell.Cmdlets.DevCente {_catalogName = If( json?.PropertyT("catalogName"), out var __jsonCatalogName) ? (string)__jsonCatalogName : (string)CatalogName;} {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskDefinitionParameters.FromJson(__jsonParameters) : Parameter;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskDefinitionParameters.FromJson(__jsonParameters) : Parameter;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new CustomizationTaskDefinition(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameter.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameter.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameter.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameter.PowerShell.cs index 38cac09c2087..150ae8f6531e 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameter.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameter.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CustomizationTaskDefinitionParameter partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,29 +70,29 @@ internal CustomizationTaskDefinitionParameter(global::System.Collections.IDictio // actually deserialize if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskDefinitionParameterType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskDefinitionParameterType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskDefinitionParameterType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskDefinitionParameterType.CreateFrom); } if (content.Contains("Required")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Default")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Default = (string) content.GetValueForProperty("Default",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Default, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Default = (string) content.GetValueForProperty("Default",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Default, global::System.Convert.ToString); } if (content.Contains("Allowed")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Allowed = (string[]) content.GetValueForProperty("Allowed",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Allowed, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Allowed = (string[]) content.GetValueForProperty("Allowed",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Allowed, __y => TypeConverterExtensions.SelectToArray(__y, 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. @@ -107,51 +107,51 @@ internal CustomizationTaskDefinitionParameter(global::System.Management.Automati // actually deserialize if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskDefinitionParameterType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskDefinitionParameterType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskDefinitionParameterType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskDefinitionParameterType.CreateFrom); } if (content.Contains("Required")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Required = (bool?) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Default")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Default = (string) content.GetValueForProperty("Default",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Default, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Default = (string) content.GetValueForProperty("Default",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Default, global::System.Convert.ToString); } if (content.Contains("Allowed")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Allowed = (string[]) content.GetValueForProperty("Allowed",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal)this).Allowed, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Allowed = (string[]) content.GetValueForProperty("Allowed",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal)this).Allowed, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameter DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameter DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CustomizationTaskDefinitionParameter(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CustomizationTaskDefinitionParameter(content); } @@ -163,7 +163,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameter.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameter.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameter.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameter.TypeConverter.cs index 23e417d57678..97a8df810a9e 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameter.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameter.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameter ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameter ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameter).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameter).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameter.cs similarity index 96% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameter.cs index 3bbd9737e6a4..23aaaa661f1f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameter.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Parameters for a customization task. public partial class CustomizationTaskDefinitionParameter : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameter, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameter, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal { /// Backing field for property. @@ -35,7 +35,7 @@ public partial class CustomizationTaskDefinitionParameter : public string Description { get => this._description; set => this._description = value; } /// Internal Acessors for Required - bool? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameterInternal.Required { get => this._required; set { {_required = value;} } } + bool? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameterInternal.Required { get => this._required; set { {_required = value;} } } /// Backing field for property. private bool? _required; diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameter.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameter.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameter.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameter.json.cs index 93335844e770..83e69d7310d6 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameter.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameter.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -74,13 +74,13 @@ internal CustomizationTaskDefinitionParameter(Microsoft.Azure.PowerShell.Cmdlets } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameter. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameter. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameter. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameter. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameter FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameter FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new CustomizationTaskDefinitionParameter(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameters.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameters.PowerShell.cs similarity index 92% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameters.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameters.PowerShell.cs index 53c900f94c56..713cf0e0ab7d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameters.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CustomizationTaskDefinitionParameters partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -74,7 +74,7 @@ internal CustomizationTaskDefinitionParameters(global::System.Collections.IDicti } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -93,29 +93,29 @@ internal CustomizationTaskDefinitionParameters(global::System.Management.Automat } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CustomizationTaskDefinitionParameters(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CustomizationTaskDefinitionParameters(content); } @@ -128,7 +128,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameters.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameters.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameters.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameters.TypeConverter.cs index 60f65d78422c..40c612a62500 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameters.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameters.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameters.cs similarity index 86% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameters.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameters.cs index 8061c438ea39..31372744938b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameters.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameters.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Parameters for the task. public partial class CustomizationTaskDefinitionParameters : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParametersInternal { /// Creates an new instance. @@ -22,7 +22,7 @@ public CustomizationTaskDefinitionParameters() /// Parameters for the task. public partial interface ICustomizationTaskDefinitionParameters : Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray { } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameters.dictionary.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameters.dictionary.cs similarity index 82% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameters.dictionary.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameters.dictionary.cs index ace14d813a87..5a1179a177d3 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameters.dictionary.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameters.dictionary.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; public partial class CustomizationTaskDefinitionParameters : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - int Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + int Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameter this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameter this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } /// /// - public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameter value) => __additionalProperties.Add( key, value); + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameter value) => __additionalProperties.Add( key, value); public void Clear() => __additionalProperties.Clear(); @@ -40,7 +40,7 @@ public void CopyFrom(global::System.Collections.IDictionary source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -55,7 +55,7 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -66,10 +66,10 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// /// - public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameter value) => __additionalProperties.TryGetValue( key, out value); + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameter value) => __additionalProperties.TryGetValue( key, out value); /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskDefinitionParameters source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskDefinitionParameters source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameters.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameters.json.cs similarity index 94% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameters.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameters.json.cs index 314796d16319..2ecd375355a1 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskDefinitionParameters.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskDefinitionParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -66,18 +66,18 @@ internal CustomizationTaskDefinitionParameters(Microsoft.Azure.PowerShell.Cmdlet { return; } - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskDefinitionParameter.FromJson(j) ,exclusions ); + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskDefinitionParameter.FromJson(j) ,exclusions ); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinitionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinitionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new CustomizationTaskDefinitionParameters(json) : null; } @@ -102,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode To { return container; } - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray)this).AdditionalProperties, container); + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray)this).AdditionalProperties, container); AfterToJson(ref container); return container; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskList.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskList.PowerShell.cs similarity index 86% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskList.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskList.PowerShell.cs index c58bfd37ee64..873dd4f6ae42 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskList.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CustomizationTaskList partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,13 +70,13 @@ internal CustomizationTaskList(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Task")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListInternal)this).Task = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[]) content.GetValueForProperty("Task",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListInternal)this).Task, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListInternal)this).Task = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[]) content.GetValueForProperty("Task",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListInternal)this).Task, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskTypeConverter.ConvertFrom)); } 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. @@ -91,35 +91,35 @@ internal CustomizationTaskList(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Task")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListInternal)this).Task = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[]) content.GetValueForProperty("Task",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListInternal)this).Task, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListInternal)this).Task = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[]) content.GetValueForProperty("Task",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListInternal)this).Task, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CustomizationTaskList(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CustomizationTaskList(content); } @@ -129,7 +129,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskList.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskList.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskList.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskList.TypeConverter.cs index 3e26b1db9d0f..7b848d6765a8 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskList.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskList.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskList.cs similarity index 83% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskList.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskList.cs index a86070621325..0766ef16cb99 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskList.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskList.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Represents a list of tasks to apply to a Dev Box public partial class CustomizationTaskList : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskList, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskList, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[] _task; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[] _task; /// Tasks to apply. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[] Task { get => this._task; set => this._task = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[] Task { get => this._task; set => this._task = value; } /// Creates an new instance. public CustomizationTaskList() @@ -36,8 +36,8 @@ public partial interface ICustomizationTaskList : ReadOnly = false, Description = @"Tasks to apply.", SerializedName = @"tasks", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[] Task { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[] Task { get; set; } } /// Represents a list of tasks to apply to a Dev Box @@ -45,7 +45,7 @@ internal partial interface ICustomizationTaskListInternal { /// Tasks to apply. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[] Task { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[] Task { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskList.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskList.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskList.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskList.json.cs index 24fff62aecaa..74dfa848d91d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskList.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,18 +65,18 @@ internal CustomizationTaskList(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata. { return; } - {_task = If( json?.PropertyT("tasks"), out var __jsonTasks) ? If( __jsonTasks as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTask.FromJson(__u) )) ))() : null : Task;} + {_task = If( json?.PropertyT("tasks"), out var __jsonTasks) ? If( __jsonTasks as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTask.FromJson(__u) )) ))() : null : Task;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskList FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskList FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new CustomizationTaskList(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationError.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationError.PowerShell.cs similarity index 79% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationError.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationError.PowerShell.cs index d3d22fa4e5a0..080028975641 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationError.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationError.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CustomizationTaskListValidationError partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,57 +70,57 @@ internal CustomizationTaskListValidationError(global::System.Collections.IDictio // actually deserialize if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).Target = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).Target, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).Target = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).Target, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskTypeConverter.ConvertFrom); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("TargetName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetName, global::System.Convert.ToString); } if (content.Contains("TargetParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters) content.GetValueForProperty("TargetParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters) content.GetValueForProperty("TargetParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskParametersTypeConverter.ConvertFrom); } if (content.Contains("TargetDisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetDisplayName = (string) content.GetValueForProperty("TargetDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetDisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetDisplayName = (string) content.GetValueForProperty("TargetDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetDisplayName, global::System.Convert.ToString); } if (content.Contains("TargetTimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetTimeoutInSecond = (int?) content.GetValueForProperty("TargetTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetTimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetTimeoutInSecond = (int?) content.GetValueForProperty("TargetTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetTimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("TargetRunAs")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetRunAs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount?) content.GetValueForProperty("TargetRunAs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetRunAs, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetRunAs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount?) content.GetValueForProperty("TargetRunAs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetRunAs, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount.CreateFrom); } if (content.Contains("TargetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetId, global::System.Convert.ToString); } if (content.Contains("TargetLogUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetLogUri = (string) content.GetValueForProperty("TargetLogUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetLogUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetLogUri = (string) content.GetValueForProperty("TargetLogUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetLogUri, global::System.Convert.ToString); } if (content.Contains("TargetStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus?) content.GetValueForProperty("TargetStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus?) content.GetValueForProperty("TargetStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus.CreateFrom); } if (content.Contains("TargetStartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStartTime = (global::System.DateTime?) content.GetValueForProperty("TargetStartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStartTime = (global::System.DateTime?) content.GetValueForProperty("TargetStartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("TargetEndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetEndTime = (global::System.DateTime?) content.GetValueForProperty("TargetEndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetEndTime = (global::System.DateTime?) content.GetValueForProperty("TargetEndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } 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. @@ -135,79 +135,79 @@ internal CustomizationTaskListValidationError(global::System.Management.Automati // actually deserialize if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).Target = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).Target, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).Target = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).Target, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskTypeConverter.ConvertFrom); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("TargetName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetName, global::System.Convert.ToString); } if (content.Contains("TargetParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters) content.GetValueForProperty("TargetParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters) content.GetValueForProperty("TargetParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskParametersTypeConverter.ConvertFrom); } if (content.Contains("TargetDisplayName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetDisplayName = (string) content.GetValueForProperty("TargetDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetDisplayName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetDisplayName = (string) content.GetValueForProperty("TargetDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetDisplayName, global::System.Convert.ToString); } if (content.Contains("TargetTimeoutInSecond")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetTimeoutInSecond = (int?) content.GetValueForProperty("TargetTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetTimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetTimeoutInSecond = (int?) content.GetValueForProperty("TargetTimeoutInSecond",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetTimeoutInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("TargetRunAs")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetRunAs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount?) content.GetValueForProperty("TargetRunAs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetRunAs, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetRunAs = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount?) content.GetValueForProperty("TargetRunAs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetRunAs, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount.CreateFrom); } if (content.Contains("TargetId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetId = (string) content.GetValueForProperty("TargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetId, global::System.Convert.ToString); } if (content.Contains("TargetLogUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetLogUri = (string) content.GetValueForProperty("TargetLogUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetLogUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetLogUri = (string) content.GetValueForProperty("TargetLogUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetLogUri, global::System.Convert.ToString); } if (content.Contains("TargetStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus?) content.GetValueForProperty("TargetStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus?) content.GetValueForProperty("TargetStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus.CreateFrom); } if (content.Contains("TargetStartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStartTime = (global::System.DateTime?) content.GetValueForProperty("TargetStartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStartTime = (global::System.DateTime?) content.GetValueForProperty("TargetStartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("TargetEndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetEndTime = (global::System.DateTime?) content.GetValueForProperty("TargetEndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal)this).TargetEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetEndTime = (global::System.DateTime?) content.GetValueForProperty("TargetEndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal)this).TargetEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CustomizationTaskListValidationError(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CustomizationTaskListValidationError(content); } @@ -219,7 +219,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationError.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationError.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationError.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationError.TypeConverter.cs index 9c54a8ac573e..abe866f23cc2 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationError.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationError.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationError.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationError.cs similarity index 78% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationError.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationError.cs index c3818103c8d4..3b8d2b7712e8 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationError.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationError.cs @@ -3,87 +3,87 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// All of the validation errors for a customization task. public partial class CustomizationTaskListValidationError : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] _detail; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] _detail; /// List of validation errors for the task. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => this._detail; set => this._detail = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => this._detail; set => this._detail = value; } /// Internal Acessors for Target - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal.Target { get => (this._target = this._target ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTask()); set { {_target = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal.Target { get => (this._target = this._target ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTask()); set { {_target = value;} } } /// Internal Acessors for TargetEndTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal.TargetEndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).EndTime = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal.TargetEndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).EndTime = value; } /// Internal Acessors for TargetId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal.TargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).Id = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal.TargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).Id = value; } /// Internal Acessors for TargetLogUri - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal.TargetLogUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).LogUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).LogUri = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal.TargetLogUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).LogUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).LogUri = value; } /// Internal Acessors for TargetStartTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal.TargetStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).StartTime = value; } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal.TargetStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).StartTime = value; } /// Internal Acessors for TargetStatus - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationErrorInternal.TargetStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).Status = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationErrorInternal.TargetStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).Status = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask _target; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask _target; /// The customization task that the error is about. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask Target { get => (this._target = this._target ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTask()); set => this._target = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask Target { get => (this._target = this._target ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTask()); set => this._target = value; } /// Display name to help differentiate multiple instances of the same task. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string TargetDisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).DisplayName = value ?? null; } + public string TargetDisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).DisplayName = value ?? null; } - /// End time of the task. + /// End time of the task, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public global::System.DateTime? TargetEndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).EndTime; } + public global::System.DateTime? TargetEndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).EndTime; } /// ID of the task instance. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string TargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).Id; } + public string TargetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).Id; } /// The unique URI for retrieving the task logs. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string TargetLogUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).LogUri; } + public string TargetLogUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).LogUri; } /// Name of the task. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string TargetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).Name = value ; } + public string TargetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).Name = value ; } /// Parameters for the task. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters TargetParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).Parameter = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters TargetParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).Parameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).Parameter = value ?? null /* model class */; } /// What account to run the task as. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount? TargetRunAs { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).RunAs; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).RunAs = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount? TargetRunAs { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).RunAs; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).RunAs = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount)""); } - /// Start time of the task. + /// Start time of the task, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public global::System.DateTime? TargetStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).StartTime; } + public global::System.DateTime? TargetStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).StartTime; } /// Status of the task. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus? TargetStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).Status; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus? TargetStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).Status; } /// Timeout, in seconds. Overrides any timeout provided on the task definition. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public int? TargetTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskInternal)Target).TimeoutInSecond = value ?? default(int); } + public int? TargetTimeoutInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).TimeoutInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskInternal)Target).TimeoutInSecond = value ?? default(int); } /// Creates an new instance. public CustomizationTaskListValidationError() @@ -101,8 +101,8 @@ public partial interface ICustomizationTaskListValidationError : ReadOnly = false, Description = @"List of validation errors for the task.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } /// Display name to help differentiate multiple instances of the same task. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, @@ -111,11 +111,11 @@ public partial interface ICustomizationTaskListValidationError : SerializedName = @"displayName", PossibleTypes = new [] { typeof(string) })] string TargetDisplayName { get; set; } - /// End time of the task. + /// End time of the task, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = true, - Description = @"End time of the task.", + Description = @"End time of the task, in RFC3339 format.", SerializedName = @"endTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? TargetEndTime { get; } @@ -149,8 +149,8 @@ public partial interface ICustomizationTaskListValidationError : ReadOnly = false, Description = @"Parameters for the task.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters TargetParameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters TargetParameter { get; set; } /// What account to run the task as. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, @@ -159,11 +159,11 @@ public partial interface ICustomizationTaskListValidationError : SerializedName = @"runAs", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount) })] Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount? TargetRunAs { get; set; } - /// Start time of the task. + /// Start time of the task, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = true, - Description = @"Start time of the task.", + Description = @"Start time of the task, in RFC3339 format.", SerializedName = @"startTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? TargetStartTime { get; } @@ -190,12 +190,12 @@ internal partial interface ICustomizationTaskListValidationErrorInternal { /// List of validation errors for the task. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } /// The customization task that the error is about. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask Target { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask Target { get; set; } /// Display name to help differentiate multiple instances of the same task. string TargetDisplayName { get; set; } - /// End time of the task. + /// End time of the task, in RFC3339 format. global::System.DateTime? TargetEndTime { get; set; } /// ID of the task instance. string TargetId { get; set; } @@ -204,10 +204,10 @@ internal partial interface ICustomizationTaskListValidationErrorInternal /// Name of the task. string TargetName { get; set; } /// Parameters for the task. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters TargetParameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters TargetParameter { get; set; } /// What account to run the task as. Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskExecutionAccount? TargetRunAs { get; set; } - /// Start time of the task. + /// Start time of the task, in RFC3339 format. global::System.DateTime? TargetStartTime { get; set; } /// Status of the task. Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskStatus? TargetStatus { get; set; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationError.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationError.json.cs similarity index 94% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationError.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationError.json.cs index 5bc6a7db03c1..4a49a6f03152 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationError.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationError.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,19 +65,19 @@ internal CustomizationTaskListValidationError(Microsoft.Azure.PowerShell.Cmdlets { return; } - {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTask.FromJson(__jsonTarget) : Target;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError.FromJson(__u) )) ))() : null : Detail;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTask.FromJson(__jsonTarget) : Target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError.FromJson(__u) )) ))() : null : Detail;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new CustomizationTaskListValidationError(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResult.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResult.PowerShell.cs new file mode 100644 index 000000000000..a1f7fb96fdb0 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResult.PowerShell.cs @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// The operation result of validating a list of customization tasks. + [System.ComponentModel.TypeConverter(typeof(CustomizationTaskListValidationOperationResultTypeConverter))] + public partial class CustomizationTaskListValidationOperationResult + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CustomizationTaskListValidationOperationResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Result")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Result = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResult) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Result, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationResultTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + } + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PercentComplete")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).PercentComplete = (double?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).PercentComplete, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationOperationResultPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("OperationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).OperationLocation, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("ResultValidationResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultValidationResult = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus) content.GetValueForProperty("ResultValidationResult",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultValidationResult, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus.CreateFrom); + } + if (content.Contains("ResultError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultError = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError[]) content.GetValueForProperty("ResultError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultError, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationErrorTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CustomizationTaskListValidationOperationResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Result")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Result = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResult) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Result, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationResultTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + } + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PercentComplete")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).PercentComplete = (double?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).PercentComplete, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationOperationResultPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("OperationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).OperationLocation, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("ResultValidationResult")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultValidationResult = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus) content.GetValueForProperty("ResultValidationResult",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultValidationResult, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus.CreateFrom); + } + if (content.Contains("ResultError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultError = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError[]) content.GetValueForProperty("ResultError",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).ResultError, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationErrorTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomizationTaskListValidationOperationResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomizationTaskListValidationOperationResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The operation result of validating a list of customization tasks. + [System.ComponentModel.TypeConverter(typeof(CustomizationTaskListValidationOperationResultTypeConverter))] + public partial interface ICustomizationTaskListValidationOperationResult + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationOperationResult.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationOperationResult.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResult.TypeConverter.cs index 808b3f94a151..3df3bea58dfe 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationOperationResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationOperationResult.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResult.cs similarity index 82% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationOperationResult.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResult.cs index 493027a1a0a7..41cc22fbe8c9 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationOperationResult.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResult.cs @@ -3,38 +3,38 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// The operation result of validating a list of customization tasks. public partial class CustomizationTaskListValidationOperationResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializable { /// One of a server-defined set of error codes. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ?? null; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ?? null; } /// An array of details about specific errors that led to this reported error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } /// Backing field for property. private global::System.DateTime? _endTime; - /// The end time of the operation. + /// The end time of the operation, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public global::System.DateTime? EndTime { get => this._endTime; set => this._endTime = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError _error; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError _error; /// Operation Error message. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); set => this._error = value; } /// Backing field for property. private string _id; @@ -47,23 +47,23 @@ public partial class CustomizationTaskListValidationOperationResult : /// An object containing more specific information than the current object about the error. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ?? null; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ?? null; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); set { {_error = value;} } } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Result - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResult Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal.Result { get => (this._result = this._result ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskListValidationResult()); set { {_result = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResult Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal.Result { get => (this._result = this._result ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationResult()); set { {_result = value;} } } /// Backing field for property. private string _name; @@ -86,11 +86,11 @@ public partial class CustomizationTaskListValidationOperationResult : public double? PercentComplete { get => this._percentComplete; set => this._percentComplete = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny _property; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties _property; /// Custom operation properties, populated only for a successful operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Any()); set => this._property = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationOperationResultProperties()); set => this._property = value; } /// Backing field for property. private string _resourceId; @@ -100,24 +100,24 @@ public partial class CustomizationTaskListValidationOperationResult : public string ResourceId { get => this._resourceId; set => this._resourceId = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResult _result; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResult _result; /// Outcome of validation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResult Result { get => (this._result = this._result ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskListValidationResult()); set => this._result = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResult Result { get => (this._result = this._result ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationResult()); set => this._result = value; } /// List of validation errors. Absent if no errors. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError[] ResultError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResultInternal)Result).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResultInternal)Result).Error = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError[] ResultError { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResultInternal)Result).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResultInternal)Result).Error = value ?? null /* arrayOf */; } /// Outcome of validation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus? ResultValidationResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResultInternal)Result).ValidationResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResultInternal)Result).ValidationResult = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus? ResultValidationResult { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResultInternal)Result).ValidationResult; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResultInternal)Result).ValidationResult = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus)""); } /// Backing field for property. private global::System.DateTime? _startTime; - /// The start time of the operation. + /// The start time of the operation, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public global::System.DateTime? StartTime { get => this._startTime; set => this._startTime = value; } @@ -130,7 +130,7 @@ public partial class CustomizationTaskListValidationOperationResult : /// The target of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } /// /// Creates an new instance. @@ -145,7 +145,7 @@ void Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializabl { if (headers.TryGetValues("Operation-Location", out var __operationLocationHeader0)) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResultInternal)this).OperationLocation = System.Linq.Enumerable.FirstOrDefault(__operationLocationHeader0) is string __headerOperationLocationHeader0 ? __headerOperationLocationHeader0 : (string)null; + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultInternal)this).OperationLocation = System.Linq.Enumerable.FirstOrDefault(__operationLocationHeader0) is string __headerOperationLocationHeader0 ? __headerOperationLocationHeader0 : (string)null; } } } @@ -167,13 +167,13 @@ public partial interface ICustomizationTaskListValidationOperationResult : ReadOnly = false, Description = @"An array of details about specific errors that led to this reported error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } - /// The end time of the operation. + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } + /// The end time of the operation, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The end time of the operation.", + Description = @"The end time of the operation, in RFC3339 format.", SerializedName = @"endTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? EndTime { get; set; } @@ -193,8 +193,8 @@ public partial interface ICustomizationTaskListValidationOperationResult : ReadOnly = false, Description = @"An object containing more specific information than the current object about the error.", SerializedName = @"innererror", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, @@ -233,8 +233,8 @@ public partial interface ICustomizationTaskListValidationOperationResult : ReadOnly = false, Description = @"Custom operation properties, populated only for a successful operation.", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny Property { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties Property { get; set; } /// The id of the resource. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, @@ -249,8 +249,8 @@ public partial interface ICustomizationTaskListValidationOperationResult : ReadOnly = false, Description = @"List of validation errors. Absent if no errors.", SerializedName = @"errors", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError[] ResultError { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError[] ResultError { get; set; } /// Outcome of validation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, @@ -259,11 +259,11 @@ public partial interface ICustomizationTaskListValidationOperationResult : SerializedName = @"validationResult", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus) })] Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus? ResultValidationResult { get; set; } - /// The start time of the operation. + /// The start time of the operation, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The start time of the operation.", + Description = @"The start time of the operation, in RFC3339 format.", SerializedName = @"startTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? StartTime { get; set; } @@ -292,17 +292,17 @@ internal partial interface ICustomizationTaskListValidationOperationResultIntern /// One of a server-defined set of error codes. string Code { get; set; } /// An array of details about specific errors that led to this reported error. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } - /// The end time of the operation. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } + /// The end time of the operation, in RFC3339 format. global::System.DateTime? EndTime { get; set; } /// Operation Error message. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get; set; } /// Fully qualified ID for the operation status. string Id { get; set; } /// /// An object containing more specific information than the current object about the error. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } /// A human-readable representation of the error. string Message { get; set; } /// The operation id name. @@ -312,16 +312,16 @@ internal partial interface ICustomizationTaskListValidationOperationResultIntern /// Percent of the operation that is complete. double? PercentComplete { get; set; } /// Custom operation properties, populated only for a successful operation. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties Property { get; set; } /// The id of the resource. string ResourceId { get; set; } /// Outcome of validation. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResult Result { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResult Result { get; set; } /// List of validation errors. Absent if no errors. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError[] ResultError { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError[] ResultError { get; set; } /// Outcome of validation. Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus? ResultValidationResult { get; set; } - /// The start time of the operation. + /// The start time of the operation, in RFC3339 format. global::System.DateTime? StartTime { get; set; } /// Provisioning state of the resource. Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get; set; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationOperationResult.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResult.json.cs similarity index 96% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationOperationResult.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResult.json.cs index cec86f0882e0..7b7ee2550724 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationOperationResult.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -66,8 +66,8 @@ internal CustomizationTaskListValidationOperationResult(Microsoft.Azure.PowerShe { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} - {_result = If( json?.PropertyT("result"), out var __jsonResult) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskListValidationResult.FromJson(__jsonResult) : Result;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} + {_result = If( json?.PropertyT("result"), out var __jsonResult) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationResult.FromJson(__jsonResult) : Result;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} @@ -75,18 +75,18 @@ internal CustomizationTaskListValidationOperationResult(Microsoft.Azure.PowerShe {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} {_percentComplete = If( json?.PropertyT("percentComplete"), out var __jsonPercentComplete) ? (double?)__jsonPercentComplete : PercentComplete;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Any.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationOperationResultProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationOperationResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new CustomizationTaskListValidationOperationResult(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResultProperties.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResultProperties.PowerShell.cs new file mode 100644 index 000000000000..e53835165c49 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResultProperties.PowerShell.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Custom operation properties, populated only for a successful operation. + [System.ComponentModel.TypeConverter(typeof(CustomizationTaskListValidationOperationResultPropertiesTypeConverter))] + public partial class CustomizationTaskListValidationOperationResultProperties + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CustomizationTaskListValidationOperationResultProperties(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 CustomizationTaskListValidationOperationResultProperties(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); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomizationTaskListValidationOperationResultProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomizationTaskListValidationOperationResultProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Custom operation properties, populated only for a successful operation. + [System.ComponentModel.TypeConverter(typeof(CustomizationTaskListValidationOperationResultPropertiesTypeConverter))] + public partial interface ICustomizationTaskListValidationOperationResultProperties + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResultProperties.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResultProperties.TypeConverter.cs new file mode 100644 index 000000000000..02ba02080ed1 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResultProperties.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CustomizationTaskListValidationOperationResultPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no + /// suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no + /// suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CustomizationTaskListValidationOperationResultProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CustomizationTaskListValidationOperationResultProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CustomizationTaskListValidationOperationResultProperties.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResultProperties.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResultProperties.cs new file mode 100644 index 000000000000..101d0c1c2241 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResultProperties.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Custom operation properties, populated only for a successful operation. + public partial class CustomizationTaskListValidationOperationResultProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultPropertiesInternal + { + + /// + /// Creates an new instance. + /// + public CustomizationTaskListValidationOperationResultProperties() + { + + } + } + /// Custom operation properties, populated only for a successful operation. + public partial interface ICustomizationTaskListValidationOperationResultProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray + { + + } + /// Custom operation properties, populated only for a successful operation. + internal partial interface ICustomizationTaskListValidationOperationResultPropertiesInternal + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResultProperties.dictionary.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResultProperties.dictionary.cs new file mode 100644 index 000000000000..9fdda23078c4 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResultProperties.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + public partial class CustomizationTaskListValidationOperationResultProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public global::System.Object this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, global::System.Object value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 global::System.Object value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationOperationResultProperties source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResultProperties.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResultProperties.json.cs new file mode 100644 index 000000000000..eac42ec769bd --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationOperationResultProperties.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Custom operation properties, populated only for a successful operation. + public partial class CustomizationTaskListValidationOperationResultProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + /// + internal CustomizationTaskListValidationOperationResultProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray)this).AdditionalProperties, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.DeserializeDictionary(()=>new global::System.Collections.Generic.Dictionary()),exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationOperationResultProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new CustomizationTaskListValidationOperationResultProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationResult.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationResult.PowerShell.cs similarity index 86% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationResult.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationResult.PowerShell.cs index 3abd1ebbb604..43232d2e65a1 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationResult.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CustomizationTaskListValidationResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -70,17 +70,17 @@ internal CustomizationTaskListValidationResult(global::System.Collections.IDicti // actually deserialize if (content.Contains("ValidationResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResultInternal)this).ValidationResult = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus) content.GetValueForProperty("ValidationResult",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResultInternal)this).ValidationResult, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResultInternal)this).ValidationResult = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus) content.GetValueForProperty("ValidationResult",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResultInternal)this).ValidationResult, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus.CreateFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError[]) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResultInternal)this).Error, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskListValidationErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError[]) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResultInternal)this).Error, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationErrorTypeConverter.ConvertFrom)); } 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. @@ -95,39 +95,39 @@ internal CustomizationTaskListValidationResult(global::System.Management.Automat // actually deserialize if (content.Contains("ValidationResult")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResultInternal)this).ValidationResult = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus) content.GetValueForProperty("ValidationResult",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResultInternal)this).ValidationResult, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResultInternal)this).ValidationResult = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus) content.GetValueForProperty("ValidationResult",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResultInternal)this).ValidationResult, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus.CreateFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError[]) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResultInternal)this).Error, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskListValidationErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError[]) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResultInternal)this).Error, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationErrorTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CustomizationTaskListValidationResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CustomizationTaskListValidationResult(content); } @@ -140,7 +140,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationResult.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationResult.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationResult.TypeConverter.cs index 28c6ff80dd70..f2e1f614a12b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationResult.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationResult.cs similarity index 89% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationResult.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationResult.cs index 0c83f769735c..ed1654233ed2 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationResult.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationResult.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// The result of validating a list of customization tasks. public partial class CustomizationTaskListValidationResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResultInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError[] _error; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError[] _error; /// List of validation errors. Absent if no errors. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError[] Error { get => this._error; set => this._error = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError[] Error { get => this._error; set => this._error = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus _validationResult; @@ -43,8 +43,8 @@ public partial interface ICustomizationTaskListValidationResult : ReadOnly = false, Description = @"List of validation errors. Absent if no errors.", SerializedName = @"errors", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError[] Error { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError[] Error { get; set; } /// Outcome of validation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, @@ -60,7 +60,7 @@ internal partial interface ICustomizationTaskListValidationResultInternal { /// List of validation errors. Absent if no errors. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError[] Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError[] Error { get; set; } /// Outcome of validation. Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.CustomizationTaskListValidationStatus ValidationResult { get; set; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationResult.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationResult.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationResult.json.cs index a1e9740f6df2..5e842433cea1 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskListValidationResult.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskListValidationResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -66,18 +66,18 @@ internal CustomizationTaskListValidationResult(Microsoft.Azure.PowerShell.Cmdlet return; } {_validationResult = If( json?.PropertyT("validationResult"), out var __jsonValidationResult) ? (string)__jsonValidationResult : (string)ValidationResult;} - {_error = If( json?.PropertyT("errors"), out var __jsonErrors) ? If( __jsonErrors as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationError) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskListValidationError.FromJson(__u) )) ))() : null : Error;} + {_error = If( json?.PropertyT("errors"), out var __jsonErrors) ? If( __jsonErrors as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationError) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskListValidationError.FromJson(__u) )) ))() : null : Error;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskListValidationResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskListValidationResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new CustomizationTaskListValidationResult(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskParameters.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskParameters.PowerShell.cs similarity index 93% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskParameters.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskParameters.PowerShell.cs index 4cb801370a20..99b88fe37f37 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskParameters.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CustomizationTaskParameters partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -74,7 +74,7 @@ internal CustomizationTaskParameters(global::System.Collections.IDictionary cont } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -93,29 +93,29 @@ internal CustomizationTaskParameters(global::System.Management.Automation.PSObje } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CustomizationTaskParameters(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CustomizationTaskParameters(content); } @@ -125,7 +125,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskParameters.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskParameters.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskParameters.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskParameters.TypeConverter.cs index 09ecb97d9365..aabb09dc8df3 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskParameters.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskParameters.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskParameters.cs similarity index 90% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskParameters.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskParameters.cs index 52ac7ebbeaf2..1d569af27172 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskParameters.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskParameters.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Parameters for the task. public partial class CustomizationTaskParameters : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParametersInternal { /// Creates an new instance. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskParameters.dictionary.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskParameters.dictionary.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskParameters.dictionary.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskParameters.dictionary.cs index 9c53c61ede22..329cc1d6c447 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskParameters.dictionary.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskParameters.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskParameters source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskParameters source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskParameters.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskParameters.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskParameters.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskParameters.json.cs index 0dc64c9783e5..433ebb873f3e 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/CustomizationTaskParameters.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/CustomizationTaskParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -71,13 +71,13 @@ internal CustomizationTaskParameters(Microsoft.Azure.PowerShell.Cmdlets.DevCente } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new CustomizationTaskParameters(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBox.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBox.PowerShell.cs new file mode 100644 index 000000000000..42694d1f0ce6 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBox.PowerShell.cs @@ -0,0 +1,464 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// A Dev Box. + [System.ComponentModel.TypeConverter(typeof(DevBoxTypeConverter))] + public partial class DevBox + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DevBox(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DevBox(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DevBox(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("HardwareProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile) content.GetValueForProperty("HardwareProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.HardwareProfileTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StorageProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveHoursConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHoursConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfiguration) content.GetValueForProperty("ActiveHoursConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHoursConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ActiveHoursConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ProjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ProjectName = (string) content.GetValueForProperty("ProjectName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ProjectName, global::System.Convert.ToString); + } + if (content.Contains("PoolName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).PoolName = (string) content.GetValueForProperty("PoolName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).PoolName, global::System.Convert.ToString); + } + if (content.Contains("HibernateSupport")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState.CreateFrom); + } + if (content.Contains("ActionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActionState = (string) content.GetValueForProperty("ActionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActionState, global::System.Convert.ToString); + } + if (content.Contains("PowerState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState?) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState.CreateFrom); + } + if (content.Contains("UniqueId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).UniqueId = (string) content.GetValueForProperty("UniqueId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).UniqueId, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType.CreateFrom); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("CreatedTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).CreatedTime = (global::System.DateTime?) content.GetValueForProperty("CreatedTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).CreatedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastConnectedTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).LastConnectedTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectedTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).LastConnectedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LocalAdministrator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus.CreateFrom); + } + if (content.Contains("OperationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).OperationLocation, global::System.Convert.ToString); + } + if (content.Contains("HardwareProfileSkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfileSkuName = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName?) content.GetValueForProperty("HardwareProfileSkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfileSkuName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName.CreateFrom); + } + if (content.Contains("HardwareProfileMemoryGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfileMemoryGb = (int?) content.GetValueForProperty("HardwareProfileMemoryGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfileMemoryGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageProfileOSDisk")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).StorageProfileOSDisk = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk) content.GetValueForProperty("StorageProfileOSDisk",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).StorageProfileOSDisk, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OSDiskTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReferenceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceName = (string) content.GetValueForProperty("ImageReferenceName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceName, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceVersion = (string) content.GetValueForProperty("ImageReferenceVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceVersion, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceOperatingSystem")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceOperatingSystem = (string) content.GetValueForProperty("ImageReferenceOperatingSystem",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceOperatingSystem, global::System.Convert.ToString); + } + if (content.Contains("ImageReferencePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferencePublishedDate = (global::System.DateTime?) content.GetValueForProperty("ImageReferencePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferencePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActiveHourConfigurationTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationTimeZone = (string) content.GetValueForProperty("ActiveHourConfigurationTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationTimeZone, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("HardwareProfileVCpUs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfileVCpUs = (int?) content.GetValueForProperty("HardwareProfileVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfileVCpUs, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ImageReferenceOSBuildNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceOSBuildNumber = (string) content.GetValueForProperty("ImageReferenceOSBuildNumber",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceOSBuildNumber, global::System.Convert.ToString); + } + if (content.Contains("ActiveHourConfigurationKeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus) content.GetValueForProperty("ActiveHourConfigurationKeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationAutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationAutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus) content.GetValueForProperty("ActiveHourConfigurationAutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationAutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationStartTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationEndTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskSizeGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DevBox(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("HardwareProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile) content.GetValueForProperty("HardwareProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.HardwareProfileTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StorageProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveHoursConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHoursConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfiguration) content.GetValueForProperty("ActiveHoursConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHoursConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ActiveHoursConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ProjectName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ProjectName = (string) content.GetValueForProperty("ProjectName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ProjectName, global::System.Convert.ToString); + } + if (content.Contains("PoolName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).PoolName = (string) content.GetValueForProperty("PoolName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).PoolName, global::System.Convert.ToString); + } + if (content.Contains("HibernateSupport")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState.CreateFrom); + } + if (content.Contains("ActionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActionState = (string) content.GetValueForProperty("ActionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActionState, global::System.Convert.ToString); + } + if (content.Contains("PowerState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState?) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState.CreateFrom); + } + if (content.Contains("UniqueId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).UniqueId = (string) content.GetValueForProperty("UniqueId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).UniqueId, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType.CreateFrom); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("CreatedTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).CreatedTime = (global::System.DateTime?) content.GetValueForProperty("CreatedTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).CreatedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastConnectedTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).LastConnectedTime = (global::System.DateTime?) content.GetValueForProperty("LastConnectedTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).LastConnectedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LocalAdministrator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus.CreateFrom); + } + if (content.Contains("OperationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).OperationLocation, global::System.Convert.ToString); + } + if (content.Contains("HardwareProfileSkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfileSkuName = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName?) content.GetValueForProperty("HardwareProfileSkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfileSkuName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName.CreateFrom); + } + if (content.Contains("HardwareProfileMemoryGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfileMemoryGb = (int?) content.GetValueForProperty("HardwareProfileMemoryGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfileMemoryGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageProfileOSDisk")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).StorageProfileOSDisk = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk) content.GetValueForProperty("StorageProfileOSDisk",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).StorageProfileOSDisk, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OSDiskTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReferenceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceName = (string) content.GetValueForProperty("ImageReferenceName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceName, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceVersion = (string) content.GetValueForProperty("ImageReferenceVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceVersion, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceOperatingSystem")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceOperatingSystem = (string) content.GetValueForProperty("ImageReferenceOperatingSystem",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceOperatingSystem, global::System.Convert.ToString); + } + if (content.Contains("ImageReferencePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferencePublishedDate = (global::System.DateTime?) content.GetValueForProperty("ImageReferencePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferencePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActiveHourConfigurationTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationTimeZone = (string) content.GetValueForProperty("ActiveHourConfigurationTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationTimeZone, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("HardwareProfileVCpUs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfileVCpUs = (int?) content.GetValueForProperty("HardwareProfileVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).HardwareProfileVCpUs, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ImageReferenceOSBuildNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceOSBuildNumber = (string) content.GetValueForProperty("ImageReferenceOSBuildNumber",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ImageReferenceOSBuildNumber, global::System.Convert.ToString); + } + if (content.Contains("ActiveHourConfigurationKeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus) content.GetValueForProperty("ActiveHourConfigurationKeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationAutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationAutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus) content.GetValueForProperty("ActiveHourConfigurationAutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationAutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationStartTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationEndTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).ActiveHourConfigurationEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskSizeGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A Dev Box. + [System.ComponentModel.TypeConverter(typeof(DevBoxTypeConverter))] + public partial interface IDevBox + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBox.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBox.TypeConverter.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBox.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBox.TypeConverter.cs index 8337337d8158..980c68520d3d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBox.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBox.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBox.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBox.cs new file mode 100644 index 000000000000..9dfe46045327 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBox.cs @@ -0,0 +1,763 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// A Dev Box. + public partial class DevBox : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _actionState; + + /// + /// The current action state of the Dev Box. This is state is based on previous + /// action performed by user. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string ActionState { get => this._actionState; } + + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).AutoStartEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).AutoStartEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus)""); } + + /// The end time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public int? ActiveHourConfigurationEndTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).EndTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).EndTimeHour = value ?? default(int); } + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).KeepAwakeEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).KeepAwakeEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus)""); } + + /// The start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public int? ActiveHourConfigurationStartTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).StartTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).StartTimeHour = value ?? default(int); } + + /// The timezone of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string ActiveHourConfigurationTimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).TimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfigurationInternal)ActiveHoursConfiguration).TimeZone = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfiguration _activeHoursConfiguration; + + /// The active hours configuration for this Dev Box, if enabled. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfiguration ActiveHoursConfiguration { get => (this._activeHoursConfiguration = this._activeHoursConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ActiveHoursConfiguration()); } + + /// One of a server-defined set of error codes. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ?? null; } + + /// Backing field for property. + private global::System.DateTime? _createdTime; + + /// Creation time of this Dev Box, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public global::System.DateTime? CreatedTime { get => this._createdTime; } + + /// An array of details about specific errors that led to this reported error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError _error; + + /// Provisioning or action error details. Populated only for error states. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile _hardwareProfile; + + /// Information about the Dev Box's hardware resources. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile HardwareProfile { get => (this._hardwareProfile = this._hardwareProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.HardwareProfile()); } + + /// The amount of memory available for the Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public int? HardwareProfileMemoryGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).MemoryGb; } + + /// The name of the SKU. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? HardwareProfileSkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).SkuName; } + + /// The number of vCPUs available for the Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public int? HardwareProfileVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).VCpUs; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? _hibernateSupport; + + /// Indicates whether hibernate is enabled/disabled or unknown. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? HibernateSupport { get => this._hibernateSupport; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference _imageReference; + + /// Information about the image used for this Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ImageReference()); } + + /// The name of the image used. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string ImageReferenceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Name; } + + /// The operating system build number of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string ImageReferenceOSBuildNumber { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).OSBuildNumber; } + + /// The operating system of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string ImageReferenceOperatingSystem { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).OperatingSystem; } + + /// The datetime that the backing image version was published, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public global::System.DateTime? ImageReferencePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).PublishedDate; } + + /// The version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string ImageReferenceVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Version; } + + /// + /// An object containing more specific information than the current object about the error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } + + /// Backing field for property. + private global::System.DateTime? _lastConnectedTime; + + /// Last time a user connected to this Dev Box, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public global::System.DateTime? LastConnectedTime { get => this._lastConnectedTime; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? _localAdministrator; + + /// Indicates whether the owner of the Dev Box is a local administrator. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? LocalAdministrator { get => this._localAdministrator; } + + /// Backing field for property. + private string _location; + + /// + /// Azure region where this Dev Box is located. This will be the same region as the + /// Virtual Network it is attached to. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Location { get => this._location; } + + /// A human-readable representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ?? null; } + + /// Internal Acessors for ActionState + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.ActionState { get => this._actionState; set { {_actionState = value;} } } + + /// Internal Acessors for ActiveHoursConfiguration + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.ActiveHoursConfiguration { get => (this._activeHoursConfiguration = this._activeHoursConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ActiveHoursConfiguration()); set { {_activeHoursConfiguration = value;} } } + + /// Internal Acessors for CreatedTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.CreatedTime { get => this._createdTime; set { {_createdTime = value;} } } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); set { {_error = value;} } } + + /// Internal Acessors for HardwareProfile + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.HardwareProfile { get => (this._hardwareProfile = this._hardwareProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.HardwareProfile()); set { {_hardwareProfile = value;} } } + + /// Internal Acessors for HardwareProfileMemoryGb + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.HardwareProfileMemoryGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).MemoryGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).MemoryGb = value; } + + /// Internal Acessors for HardwareProfileSkuName + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.HardwareProfileSkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).SkuName = value; } + + /// Internal Acessors for HardwareProfileVCpUs + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.HardwareProfileVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).VCpUs; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).VCpUs = value; } + + /// Internal Acessors for HibernateSupport + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.HibernateSupport { get => this._hibernateSupport; set { {_hibernateSupport = value;} } } + + /// Internal Acessors for ImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ImageReference()); set { {_imageReference = value;} } } + + /// Internal Acessors for ImageReferenceName + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.ImageReferenceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Name = value; } + + /// Internal Acessors for ImageReferenceOSBuildNumber + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.ImageReferenceOSBuildNumber { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).OSBuildNumber; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).OSBuildNumber = value; } + + /// Internal Acessors for ImageReferenceOperatingSystem + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.ImageReferenceOperatingSystem { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).OperatingSystem; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).OperatingSystem = value; } + + /// Internal Acessors for ImageReferencePublishedDate + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.ImageReferencePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).PublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).PublishedDate = value; } + + /// Internal Acessors for ImageReferenceVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.ImageReferenceVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Version = value; } + + /// Internal Acessors for LastConnectedTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.LastConnectedTime { get => this._lastConnectedTime; set { {_lastConnectedTime = value;} } } + + /// Internal Acessors for LocalAdministrator + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.LocalAdministrator { get => this._localAdministrator; set { {_localAdministrator = value;} } } + + /// Internal Acessors for Location + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.Location { get => this._location; set { {_location = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for OSDiskSizeGb + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)StorageProfile).OSDiskSizeGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)StorageProfile).OSDiskSizeGb = value; } + + /// Internal Acessors for OSType + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.OSType { get => this._oSType; set { {_oSType = value;} } } + + /// Internal Acessors for PowerState + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.PowerState { get => this._powerState; set { {_powerState = value;} } } + + /// Internal Acessors for ProjectName + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.ProjectName { get => this._projectName; set { {_projectName = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for StorageProfile + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StorageProfile()); set { {_storageProfile = value;} } } + + /// Internal Acessors for StorageProfileOSDisk + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.StorageProfileOSDisk { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)StorageProfile).OSDisk; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)StorageProfile).OSDisk = value; } + + /// Internal Acessors for UniqueId + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.UniqueId { get => this._uniqueId; set { {_uniqueId = value;} } } + + /// Internal Acessors for Uri + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.Uri { get => this._uri; set { {_uri = value;} } } + + /// Internal Acessors for User + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal.User { get => this._user; set { {_user = value;} } } + + /// Backing field for property. + private string _name; + + /// Display name for the Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// The size of the OS Disk in gigabytes. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public int? OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)StorageProfile).OSDiskSizeGb; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? _oSType; + + /// The operating system type of this Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? OSType { get => this._oSType; } + + /// Backing field for property. + private string _operationLocation; + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string OperationLocation { get => this._operationLocation; set => this._operationLocation = value; } + + /// Backing field for property. + private string _poolName; + + /// The name of the Dev Box pool this machine belongs to. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string PoolName { get => this._poolName; set => this._poolName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState? _powerState; + + /// The current power state of the Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState? PowerState { get => this._powerState; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project this Dev Box belongs to. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string ProjectName { get => this._projectName; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState? _provisioningState; + + /// The current provisioning state of the Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile _storageProfile; + + /// Storage settings for this Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StorageProfile()); } + + /// The target of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } + + /// Backing field for property. + private string _uniqueId; + + /// + /// A unique identifier for the Dev Box. This is a GUID-formatted string (e.g. + /// 00000000-0000-0000-0000-000000000000). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string UniqueId { get => this._uniqueId; } + + /// Backing field for property. + private string _uri; + + /// The unique URI of the dev box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Uri { get => this._uri; } + + /// Backing field for property. + private string _user; + + /// The AAD object id of the user this Dev Box is assigned to. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string User { get => this._user; } + + /// Creates an new instance. + public DevBox() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Operation-Location", out var __operationLocationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxInternal)this).OperationLocation = System.Linq.Enumerable.FirstOrDefault(__operationLocationHeader0) is string __headerOperationLocationHeader0 ? __headerOperationLocationHeader0 : (string)null; + } + } + } + /// A Dev Box. + public partial interface IDevBox : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// + /// The current action state of the Dev Box. This is state is based on previous + /// action performed by user. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current action state of the Dev Box. This is state is based on previous + action performed by user.", + SerializedName = @"actionState", + PossibleTypes = new [] { typeof(string) })] + string ActionState { get; } + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be automatically started at commencement of active hours.", + SerializedName = @"autoStartEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get; set; } + /// The end time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The end time of the active hours.", + SerializedName = @"endTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? ActiveHourConfigurationEndTimeHour { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be kept awake during active hours.", + SerializedName = @"keepAwakeEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get; set; } + /// The start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start time of the active hours.", + SerializedName = @"startTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? ActiveHourConfigurationStartTimeHour { get; set; } + /// The timezone of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timezone of the active hours.", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string ActiveHourConfigurationTimeZone { get; set; } + /// One of a server-defined set of error codes. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"One of a server-defined set of error codes.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// Creation time of this Dev Box, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Creation time of this Dev Box, in RFC3339 format.", + SerializedName = @"createdTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedTime { get; } + /// An array of details about specific errors that led to this reported error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An array of details about specific errors that led to this reported error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } + /// The amount of memory available for the Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The amount of memory available for the Dev Box.", + SerializedName = @"memoryGB", + PossibleTypes = new [] { typeof(int) })] + int? HardwareProfileMemoryGb { get; } + /// The name of the SKU. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the SKU.", + SerializedName = @"skuName", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? HardwareProfileSkuName { get; } + /// The number of vCPUs available for the Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The number of vCPUs available for the Dev Box.", + SerializedName = @"vCPUs", + PossibleTypes = new [] { typeof(int) })] + int? HardwareProfileVCpUs { get; } + /// Indicates whether hibernate is enabled/disabled or unknown. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates whether hibernate is enabled/disabled or unknown.", + SerializedName = @"hibernateSupport", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? HibernateSupport { get; } + /// The name of the image used. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the image used.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceName { get; } + /// The operating system build number of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The operating system build number of the image.", + SerializedName = @"osBuildNumber", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceOSBuildNumber { get; } + /// The operating system of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The operating system of the image.", + SerializedName = @"operatingSystem", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceOperatingSystem { get; } + /// The datetime that the backing image version was published, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The datetime that the backing image version was published, in RFC3339 format.", + SerializedName = @"publishedDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ImageReferencePublishedDate { get; } + /// The version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The version of the image.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceVersion { get; } + /// + /// An object containing more specific information than the current object about the error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An object containing more specific information than the current object about the error.", + SerializedName = @"innererror", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + /// Last time a user connected to this Dev Box, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Last time a user connected to this Dev Box, in RFC3339 format.", + SerializedName = @"lastConnectedTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastConnectedTime { get; } + /// Indicates whether the owner of the Dev Box is a local administrator. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates whether the owner of the Dev Box is a local administrator.", + SerializedName = @"localAdministrator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? LocalAdministrator { get; } + /// + /// Azure region where this Dev Box is located. This will be the same region as the + /// Virtual Network it is attached to. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure region where this Dev Box is located. This will be the same region as the + Virtual Network it is attached to.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; } + /// A human-readable representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A human-readable representation of the error.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// Display name for the Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Display name for the Dev Box.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The size of the OS Disk in gigabytes. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The size of the OS Disk in gigabytes.", + SerializedName = @"diskSizeGB", + PossibleTypes = new [] { typeof(int) })] + int? OSDiskSizeGb { get; } + /// The operating system type of this Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The operating system type of this Dev Box.", + SerializedName = @"osType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? OSType { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Operation-Location", + PossibleTypes = new [] { typeof(string) })] + string OperationLocation { get; set; } + /// The name of the Dev Box pool this machine belongs to. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Dev Box pool this machine belongs to.", + SerializedName = @"poolName", + PossibleTypes = new [] { typeof(string) })] + string PoolName { get; set; } + /// The current power state of the Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current power state of the Dev Box.", + SerializedName = @"powerState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState? PowerState { get; } + /// Name of the project this Dev Box belongs to. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Name of the project this Dev Box belongs to.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + string ProjectName { get; } + /// The current provisioning state of the Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current provisioning state of the Dev Box.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState? ProvisioningState { get; } + /// The target of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target of the error.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; set; } + /// + /// A unique identifier for the Dev Box. This is a GUID-formatted string (e.g. + /// 00000000-0000-0000-0000-000000000000). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A unique identifier for the Dev Box. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000).", + SerializedName = @"uniqueId", + PossibleTypes = new [] { typeof(string) })] + string UniqueId { get; } + /// The unique URI of the dev box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The unique URI of the dev box.", + SerializedName = @"uri", + PossibleTypes = new [] { typeof(string) })] + string Uri { get; } + /// The AAD object id of the user this Dev Box is assigned to. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The AAD object id of the user this Dev Box is assigned to.", + SerializedName = @"user", + PossibleTypes = new [] { typeof(string) })] + string User { get; } + + } + /// A Dev Box. + internal partial interface IDevBoxInternal + + { + /// + /// The current action state of the Dev Box. This is state is based on previous + /// action performed by user. + /// + string ActionState { get; set; } + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get; set; } + /// The end time of the active hours. + int? ActiveHourConfigurationEndTimeHour { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get; set; } + /// The start time of the active hours. + int? ActiveHourConfigurationStartTimeHour { get; set; } + /// The timezone of the active hours. + string ActiveHourConfigurationTimeZone { get; set; } + /// The active hours configuration for this Dev Box, if enabled. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IActiveHoursConfiguration ActiveHoursConfiguration { get; set; } + /// One of a server-defined set of error codes. + string Code { get; set; } + /// Creation time of this Dev Box, in RFC3339 format. + global::System.DateTime? CreatedTime { get; set; } + /// An array of details about specific errors that led to this reported error. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } + /// Provisioning or action error details. Populated only for error states. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get; set; } + /// Information about the Dev Box's hardware resources. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile HardwareProfile { get; set; } + /// The amount of memory available for the Dev Box. + int? HardwareProfileMemoryGb { get; set; } + /// The name of the SKU. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? HardwareProfileSkuName { get; set; } + /// The number of vCPUs available for the Dev Box. + int? HardwareProfileVCpUs { get; set; } + /// Indicates whether hibernate is enabled/disabled or unknown. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? HibernateSupport { get; set; } + /// Information about the image used for this Dev Box. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference ImageReference { get; set; } + /// The name of the image used. + string ImageReferenceName { get; set; } + /// The operating system build number of the image. + string ImageReferenceOSBuildNumber { get; set; } + /// The operating system of the image. + string ImageReferenceOperatingSystem { get; set; } + /// The datetime that the backing image version was published, in RFC3339 format. + global::System.DateTime? ImageReferencePublishedDate { get; set; } + /// The version of the image. + string ImageReferenceVersion { get; set; } + /// + /// An object containing more specific information than the current object about the error. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + /// Last time a user connected to this Dev Box, in RFC3339 format. + global::System.DateTime? LastConnectedTime { get; set; } + /// Indicates whether the owner of the Dev Box is a local administrator. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? LocalAdministrator { get; set; } + /// + /// Azure region where this Dev Box is located. This will be the same region as the + /// Virtual Network it is attached to. + /// + string Location { get; set; } + /// A human-readable representation of the error. + string Message { get; set; } + /// Display name for the Dev Box. + string Name { get; set; } + /// The size of the OS Disk in gigabytes. + int? OSDiskSizeGb { get; set; } + /// The operating system type of this Dev Box. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? OSType { get; set; } + + string OperationLocation { get; set; } + /// The name of the Dev Box pool this machine belongs to. + string PoolName { get; set; } + /// The current power state of the Dev Box. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PowerState? PowerState { get; set; } + /// Name of the project this Dev Box belongs to. + string ProjectName { get; set; } + /// The current provisioning state of the Dev Box. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState? ProvisioningState { get; set; } + /// Storage settings for this Dev Box. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile StorageProfile { get; set; } + /// Settings for the operating system disk. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk StorageProfileOSDisk { get; set; } + /// The target of the error. + string Target { get; set; } + /// + /// A unique identifier for the Dev Box. This is a GUID-formatted string (e.g. + /// 00000000-0000-0000-0000-000000000000). + /// + string UniqueId { get; set; } + /// The unique URI of the dev box. + string Uri { get; set; } + /// The AAD object id of the user this Dev Box is assigned to. + string User { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBox.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBox.json.cs similarity index 86% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBox.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBox.json.cs index cdad73c7c06b..443f12ffa43b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBox.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBox.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,10 +65,11 @@ internal DevBox(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.Js { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} - {_hardwareProfile = If( json?.PropertyT("hardwareProfile"), out var __jsonHardwareProfile) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.HardwareProfile.FromJson(__jsonHardwareProfile) : HardwareProfile;} - {_storageProfile = If( json?.PropertyT("storageProfile"), out var __jsonStorageProfile) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.StorageProfile.FromJson(__jsonStorageProfile) : StorageProfile;} - {_imageReference = If( json?.PropertyT("imageReference"), out var __jsonImageReference) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ImageReference.FromJson(__jsonImageReference) : ImageReference;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} + {_hardwareProfile = If( json?.PropertyT("hardwareProfile"), out var __jsonHardwareProfile) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.HardwareProfile.FromJson(__jsonHardwareProfile) : HardwareProfile;} + {_storageProfile = If( json?.PropertyT("storageProfile"), out var __jsonStorageProfile) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StorageProfile.FromJson(__jsonStorageProfile) : StorageProfile;} + {_imageReference = If( json?.PropertyT("imageReference"), out var __jsonImageReference) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ImageReference.FromJson(__jsonImageReference) : ImageReference;} + {_activeHoursConfiguration = If( json?.PropertyT("activeHoursConfiguration"), out var __jsonActiveHoursConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ActiveHoursConfiguration.FromJson(__jsonActiveHoursConfiguration) : ActiveHoursConfiguration;} {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_projectName = If( json?.PropertyT("projectName"), out var __jsonProjectName) ? (string)__jsonProjectName : (string)ProjectName;} @@ -82,18 +83,19 @@ internal DevBox(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.Js {_oSType = If( json?.PropertyT("osType"), out var __jsonOSType) ? (string)__jsonOSType : (string)OSType;} {_user = If( json?.PropertyT("user"), out var __jsonUser) ? (string)__jsonUser : (string)User;} {_createdTime = If( json?.PropertyT("createdTime"), out var __jsonCreatedTime) ? global::System.DateTime.TryParse((string)__jsonCreatedTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedTimeValue) ? __jsonCreatedTimeValue : CreatedTime : CreatedTime;} + {_lastConnectedTime = If( json?.PropertyT("lastConnectedTime"), out var __jsonLastConnectedTime) ? global::System.DateTime.TryParse((string)__jsonLastConnectedTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastConnectedTimeValue) ? __jsonLastConnectedTimeValue : LastConnectedTime : LastConnectedTime;} {_localAdministrator = If( json?.PropertyT("localAdministrator"), out var __jsonLocalAdministrator) ? (string)__jsonLocalAdministrator : (string)LocalAdministrator;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new DevBox(json) : null; } @@ -134,6 +136,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode To AddIf( null != this._imageReference ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._imageReference.ToJson(null,serializationMode) : null, "imageReference" ,container.Add ); } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._activeHoursConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._activeHoursConfiguration.ToJson(null,serializationMode) : null, "activeHoursConfiguration" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) { AddIf( null != (((object)this._uri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._uri.ToString()) : null, "uri" ,container.Add ); } @@ -182,7 +188,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode To { AddIf( null != this._createdTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._createdTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdTime" ,container.Add ); } - AddIf( null != (((object)this._localAdministrator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._localAdministrator.ToString()) : null, "localAdministrator" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._lastConnectedTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._lastConnectedTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastConnectedTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._localAdministrator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._localAdministrator.ToString()) : null, "localAdministrator" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxAction.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAction.PowerShell.cs similarity index 79% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxAction.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAction.PowerShell.cs index 651c6d2a9880..9d70098d7a31 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxAction.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAction.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,33 +55,33 @@ public partial class DevBoxAction partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevBoxAction(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevBoxAction(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -96,45 +96,45 @@ internal DevBoxAction(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Next")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).Next = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction) content.GetValueForProperty("Next",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).Next, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxNextActionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).Next = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction) content.GetValueForProperty("Next",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).Next, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxNextActionTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("ActionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).ActionType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).ActionType, global::System.Convert.ToString); } if (content.Contains("SourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SourceId, global::System.Convert.ToString); } if (content.Contains("SourceUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SourceUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SourceUri, global::System.Convert.ToString); } if (content.Contains("SourceType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SourceType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType) content.GetValueForProperty("SourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SourceType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SourceType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType) content.GetValueForProperty("SourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SourceType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType.CreateFrom); } if (content.Contains("SuspendedUntil")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SuspendedUntil = (global::System.DateTime?) content.GetValueForProperty("SuspendedUntil",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SuspendedUntil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SuspendedUntil = (global::System.DateTime?) content.GetValueForProperty("SuspendedUntil",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SuspendedUntil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("NextScheduledTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).NextScheduledTime = (global::System.DateTime) content.GetValueForProperty("NextScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).NextScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).NextScheduledTime = (global::System.DateTime) content.GetValueForProperty("NextScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).NextScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } 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. @@ -149,39 +149,39 @@ internal DevBoxAction(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Next")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).Next = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction) content.GetValueForProperty("Next",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).Next, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxNextActionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).Next = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction) content.GetValueForProperty("Next",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).Next, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxNextActionTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("ActionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).ActionType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).ActionType, global::System.Convert.ToString); } if (content.Contains("SourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SourceId, global::System.Convert.ToString); } if (content.Contains("SourceUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SourceUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SourceUri, global::System.Convert.ToString); } if (content.Contains("SourceType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SourceType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType) content.GetValueForProperty("SourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SourceType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SourceType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType) content.GetValueForProperty("SourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SourceType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType.CreateFrom); } if (content.Contains("SuspendedUntil")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SuspendedUntil = (global::System.DateTime?) content.GetValueForProperty("SuspendedUntil",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).SuspendedUntil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SuspendedUntil = (global::System.DateTime?) content.GetValueForProperty("SuspendedUntil",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).SuspendedUntil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("NextScheduledTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).NextScheduledTime = (global::System.DateTime) content.GetValueForProperty("NextScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)this).NextScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).NextScheduledTime = (global::System.DateTime) content.GetValueForProperty("NextScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)this).NextScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } @@ -191,7 +191,7 @@ internal DevBoxAction(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxAction.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAction.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxAction.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAction.TypeConverter.cs index 5872d9411bc1..2bf4b9ff0f39 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxAction.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAction.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxAction.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAction.cs similarity index 90% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxAction.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAction.cs index 7f04bbc3f210..0245c0c4f5b5 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxAction.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAction.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// An action which will take place on a Dev Box. public partial class DevBoxAction : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal { /// Backing field for property. @@ -21,13 +21,13 @@ public partial class DevBoxAction : public string ActionType { get => this._actionType; } /// Internal Acessors for ActionType - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal.ActionType { get => this._actionType; set { {_actionType = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal.ActionType { get => this._actionType; set { {_actionType = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Next - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal.Next { get => (this._next = this._next ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxNextAction()); set { {_next = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal.Next { get => (this._next = this._next ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxNextAction()); set { {_next = value;} } } /// Backing field for property. private string _name; @@ -37,15 +37,15 @@ public partial class DevBoxAction : public string Name { get => this._name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction _next; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction _next; /// Details about the next run of this action. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction Next { get => (this._next = this._next ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxNextAction()); set => this._next = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction Next { get => (this._next = this._next ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxNextAction()); set => this._next = value; } - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public global::System.DateTime? NextScheduledTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextActionInternal)Next).ScheduledTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextActionInternal)Next).ScheduledTime = value ?? default(global::System.DateTime); } + public global::System.DateTime? NextScheduledTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextActionInternal)Next).ScheduledTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextActionInternal)Next).ScheduledTime = value ?? default(global::System.DateTime); } /// Backing field for property. private string _sourceId; @@ -71,7 +71,7 @@ public partial class DevBoxAction : /// Backing field for property. private global::System.DateTime? _suspendedUntil; - /// The earliest time that the action could occur (UTC). + /// The earliest time that the action could occur (UTC), in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public global::System.DateTime? SuspendedUntil { get => this._suspendedUntil; set => this._suspendedUntil = value; } @@ -108,11 +108,11 @@ public partial interface IDevBoxAction : SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string Name { get; } - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The time the action will be triggered (UTC).", + Description = @"The time the action will be triggered (UTC), in RFC3339 format.", SerializedName = @"scheduledTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? NextScheduledTime { get; set; } @@ -140,11 +140,11 @@ public partial interface IDevBoxAction : SerializedName = @"sourceUri", PossibleTypes = new [] { typeof(string) })] string SourceUri { get; set; } - /// The earliest time that the action could occur (UTC). + /// The earliest time that the action could occur (UTC), in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The earliest time that the action could occur (UTC).", + Description = @"The earliest time that the action could occur (UTC), in RFC3339 format.", SerializedName = @"suspendedUntil", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? SuspendedUntil { get; set; } @@ -167,8 +167,8 @@ internal partial interface IDevBoxActionInternal /// The name of the action. string Name { get; set; } /// Details about the next run of this action. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction Next { get; set; } - /// The time the action will be triggered (UTC). + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction Next { get; set; } + /// The time the action will be triggered (UTC), in RFC3339 format. global::System.DateTime? NextScheduledTime { get; set; } /// The id of the resource which triggered this action. string SourceId { get; set; } @@ -176,7 +176,7 @@ internal partial interface IDevBoxActionInternal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType SourceType { get; set; } /// The URI of the resource which triggered this action. string SourceUri { get; set; } - /// The earliest time that the action could occur (UTC). + /// The earliest time that the action could occur (UTC), in RFC3339 format. global::System.DateTime? SuspendedUntil { get; set; } /// The unique URI for the Dev Box action. string Uri { get; set; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxAction.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAction.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxAction.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAction.json.cs index a6c751e873f2..e9c02abb485f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxAction.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAction.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,7 +65,7 @@ internal DevBoxAction(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.J { return; } - {_next = If( json?.PropertyT("next"), out var __jsonNext) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxNextAction.FromJson(__jsonNext) : Next;} + {_next = If( json?.PropertyT("next"), out var __jsonNext) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxNextAction.FromJson(__jsonNext) : Next;} {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_actionType = If( json?.PropertyT("actionType"), out var __jsonActionType) ? (string)__jsonActionType : (string)ActionType;} @@ -77,13 +77,13 @@ internal DevBoxAction(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.J } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new DevBoxAction(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxActionDelayResult.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxActionDelayResult.PowerShell.cs similarity index 75% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxActionDelayResult.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxActionDelayResult.PowerShell.cs index e63df4287ecf..d86223ea74ee 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxActionDelayResult.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxActionDelayResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevBoxActionDelayResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevBoxActionDelayResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevBoxActionDelayResult(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,85 +98,85 @@ internal DevBoxActionDelayResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Action")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxActionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxActionTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Result")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Result = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionDelayResultStatus) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Result, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionDelayResultStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Result = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionDelayResultStatus) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Result, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionDelayResultStatus.CreateFrom); } if (content.Contains("ActionNext")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionNext = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction) content.GetValueForProperty("ActionNext",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionNext, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxNextActionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionNext = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction) content.GetValueForProperty("ActionNext",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionNext, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxNextActionTypeConverter.ConvertFrom); } if (content.Contains("ActionUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionUri = (string) content.GetValueForProperty("ActionUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionUri = (string) content.GetValueForProperty("ActionUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionUri, global::System.Convert.ToString); } if (content.Contains("ActionName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionName = (string) content.GetValueForProperty("ActionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionName = (string) content.GetValueForProperty("ActionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionName, global::System.Convert.ToString); } if (content.Contains("ActionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionType, global::System.Convert.ToString); } if (content.Contains("ActionSourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSourceId = (string) content.GetValueForProperty("ActionSourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSourceId = (string) content.GetValueForProperty("ActionSourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSourceId, global::System.Convert.ToString); } if (content.Contains("ActionSourceUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSourceUri = (string) content.GetValueForProperty("ActionSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSourceUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSourceUri = (string) content.GetValueForProperty("ActionSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSourceUri, global::System.Convert.ToString); } if (content.Contains("ActionSourceType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSourceType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType) content.GetValueForProperty("ActionSourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSourceType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSourceType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType) content.GetValueForProperty("ActionSourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSourceType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType.CreateFrom); } if (content.Contains("ActionSuspendedUntil")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSuspendedUntil = (global::System.DateTime?) content.GetValueForProperty("ActionSuspendedUntil",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSuspendedUntil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSuspendedUntil = (global::System.DateTime?) content.GetValueForProperty("ActionSuspendedUntil",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSuspendedUntil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } if (content.Contains("NextScheduledTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).NextScheduledTime = (global::System.DateTime) content.GetValueForProperty("NextScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).NextScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).NextScheduledTime = (global::System.DateTime) content.GetValueForProperty("NextScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).NextScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } 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. @@ -191,79 +191,79 @@ internal DevBoxActionDelayResult(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("Action")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxActionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxActionTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Result")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Result = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionDelayResultStatus) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Result, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionDelayResultStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Result = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionDelayResultStatus) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Result, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionDelayResultStatus.CreateFrom); } if (content.Contains("ActionNext")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionNext = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction) content.GetValueForProperty("ActionNext",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionNext, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxNextActionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionNext = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction) content.GetValueForProperty("ActionNext",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionNext, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxNextActionTypeConverter.ConvertFrom); } if (content.Contains("ActionUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionUri = (string) content.GetValueForProperty("ActionUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionUri = (string) content.GetValueForProperty("ActionUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionUri, global::System.Convert.ToString); } if (content.Contains("ActionName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionName = (string) content.GetValueForProperty("ActionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionName = (string) content.GetValueForProperty("ActionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionName, global::System.Convert.ToString); } if (content.Contains("ActionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionType, global::System.Convert.ToString); } if (content.Contains("ActionSourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSourceId = (string) content.GetValueForProperty("ActionSourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSourceId = (string) content.GetValueForProperty("ActionSourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSourceId, global::System.Convert.ToString); } if (content.Contains("ActionSourceUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSourceUri = (string) content.GetValueForProperty("ActionSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSourceUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSourceUri = (string) content.GetValueForProperty("ActionSourceUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSourceUri, global::System.Convert.ToString); } if (content.Contains("ActionSourceType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSourceType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType) content.GetValueForProperty("ActionSourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSourceType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSourceType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType) content.GetValueForProperty("ActionSourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSourceType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType.CreateFrom); } if (content.Contains("ActionSuspendedUntil")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSuspendedUntil = (global::System.DateTime?) content.GetValueForProperty("ActionSuspendedUntil",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).ActionSuspendedUntil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSuspendedUntil = (global::System.DateTime?) content.GetValueForProperty("ActionSuspendedUntil",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).ActionSuspendedUntil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } if (content.Contains("NextScheduledTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).NextScheduledTime = (global::System.DateTime) content.GetValueForProperty("NextScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal)this).NextScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).NextScheduledTime = (global::System.DateTime) content.GetValueForProperty("NextScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal)this).NextScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } @@ -273,7 +273,7 @@ internal DevBoxActionDelayResult(global::System.Management.Automation.PSObject c /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxActionDelayResult.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxActionDelayResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxActionDelayResult.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxActionDelayResult.TypeConverter.cs index 5e3085dbb9dd..725952dbcf2b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxActionDelayResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxActionDelayResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxActionDelayResult.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxActionDelayResult.cs similarity index 82% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxActionDelayResult.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxActionDelayResult.cs index f71b9494684e..87f52a8a6e35 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxActionDelayResult.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxActionDelayResult.cs @@ -3,90 +3,90 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// The action delay result. public partial class DevBoxActionDelayResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction _action; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction _action; /// The delayed action. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction Action { get => (this._action = this._action ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxAction()); set => this._action = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction Action { get => (this._action = this._action ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAction()); set => this._action = value; } /// The name of the action. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string ActionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).Name; } + public string ActionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).Name; } /// The id of the resource which triggered this action. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string ActionSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).SourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).SourceId = value ?? null; } + public string ActionSourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).SourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).SourceId = value ?? null; } /// The type of the resource which triggered this action. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType? ActionSourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).SourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).SourceType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType? ActionSourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).SourceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).SourceType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType)""); } /// The URI of the resource which triggered this action. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string ActionSourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).SourceUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).SourceUri = value ?? null; } + public string ActionSourceUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).SourceUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).SourceUri = value ?? null; } - /// The earliest time that the action could occur (UTC). + /// The earliest time that the action could occur (UTC), in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public global::System.DateTime? ActionSuspendedUntil { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).SuspendedUntil; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).SuspendedUntil = value ?? default(global::System.DateTime); } + public global::System.DateTime? ActionSuspendedUntil { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).SuspendedUntil; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).SuspendedUntil = value ?? default(global::System.DateTime); } /// The action that will be taken. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string ActionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).ActionType; } + public string ActionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).ActionType; } /// The unique URI for the Dev Box action. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string ActionUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).Uri = value ?? null; } + public string ActionUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).Uri = value ?? null; } /// One of a server-defined set of error codes. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ?? null; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ?? null; } /// An array of details about specific errors that led to this reported error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError _error; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError _error; /// Information about the error that occurred. Only populated on error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); set => this._error = value; } /// /// An object containing more specific information than the current object about the error. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ?? null; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ?? null; } /// Internal Acessors for Action - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal.Action { get => (this._action = this._action ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxAction()); set { {_action = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal.Action { get => (this._action = this._action ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAction()); set { {_action = value;} } } /// Internal Acessors for ActionName - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal.ActionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).Name = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal.ActionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).Name = value; } /// Internal Acessors for ActionNext - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal.ActionNext { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).Next; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).Next = value; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal.ActionNext { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).Next; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).Next = value; } /// Internal Acessors for ActionType - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal.ActionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).ActionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).ActionType = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal.ActionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).ActionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).ActionType = value; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResultInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResultInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); set { {_error = value;} } } /// Backing field for property. private string _name; @@ -95,9 +95,9 @@ public partial class DevBoxActionDelayResult : [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public string Name { get => this._name; set => this._name = value; } - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public global::System.DateTime? NextScheduledTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).NextScheduledTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionInternal)Action).NextScheduledTime = value ?? default(global::System.DateTime); } + public global::System.DateTime? NextScheduledTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).NextScheduledTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionInternal)Action).NextScheduledTime = value ?? default(global::System.DateTime); } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionDelayResultStatus _result; @@ -108,7 +108,7 @@ public partial class DevBoxActionDelayResult : /// The target of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } /// Backing field for property. private string _uri; @@ -159,11 +159,11 @@ public partial interface IDevBoxActionDelayResult : SerializedName = @"sourceUri", PossibleTypes = new [] { typeof(string) })] string ActionSourceUri { get; set; } - /// The earliest time that the action could occur (UTC). + /// The earliest time that the action could occur (UTC), in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The earliest time that the action could occur (UTC).", + Description = @"The earliest time that the action could occur (UTC), in RFC3339 format.", SerializedName = @"suspendedUntil", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? ActionSuspendedUntil { get; set; } @@ -197,8 +197,8 @@ public partial interface IDevBoxActionDelayResult : ReadOnly = false, Description = @"An array of details about specific errors that led to this reported error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } /// /// An object containing more specific information than the current object about the error. /// @@ -207,8 +207,8 @@ public partial interface IDevBoxActionDelayResult : ReadOnly = false, Description = @"An object containing more specific information than the current object about the error.", SerializedName = @"innererror", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, @@ -225,11 +225,11 @@ public partial interface IDevBoxActionDelayResult : SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string Name { get; set; } - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The time the action will be triggered (UTC).", + Description = @"The time the action will be triggered (UTC), in RFC3339 format.", SerializedName = @"scheduledTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? NextScheduledTime { get; set; } @@ -264,18 +264,18 @@ internal partial interface IDevBoxActionDelayResultInternal { /// The delayed action. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction Action { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction Action { get; set; } /// The name of the action. string ActionName { get; set; } /// Details about the next run of this action. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction ActionNext { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction ActionNext { get; set; } /// The id of the resource which triggered this action. string ActionSourceId { get; set; } /// The type of the resource which triggered this action. Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionSourceType? ActionSourceType { get; set; } /// The URI of the resource which triggered this action. string ActionSourceUri { get; set; } - /// The earliest time that the action could occur (UTC). + /// The earliest time that the action could occur (UTC), in RFC3339 format. global::System.DateTime? ActionSuspendedUntil { get; set; } /// The action that will be taken. string ActionType { get; set; } @@ -284,18 +284,18 @@ internal partial interface IDevBoxActionDelayResultInternal /// One of a server-defined set of error codes. string Code { get; set; } /// An array of details about specific errors that led to this reported error. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } /// Information about the error that occurred. Only populated on error. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get; set; } /// /// An object containing more specific information than the current object about the error. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } /// A human-readable representation of the error. string Message { get; set; } /// The name of the action. string Name { get; set; } - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. global::System.DateTime? NextScheduledTime { get; set; } /// The result of the delay operation on this action. Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxActionDelayResultStatus Result { get; set; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxActionDelayResult.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxActionDelayResult.json.cs similarity index 96% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxActionDelayResult.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxActionDelayResult.json.cs index 01235b45e9b1..b25689eecf34 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxActionDelayResult.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxActionDelayResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,8 +65,8 @@ internal DevBoxActionDelayResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdat { return; } - {_action = If( json?.PropertyT("action"), out var __jsonAction) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxAction.FromJson(__jsonAction) : Action;} - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} + {_action = If( json?.PropertyT("action"), out var __jsonAction) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAction.FromJson(__jsonAction) : Action;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_result = If( json?.PropertyT("result"), out var __jsonResult) ? (string)__jsonResult : (string)Result;} @@ -74,13 +74,13 @@ internal DevBoxActionDelayResult(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdat } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new DevBoxActionDelayResult(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAddOn.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAddOn.PowerShell.cs new file mode 100644 index 000000000000..f8f1e3660ed2 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAddOn.PowerShell.cs @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// A Dev Box addon. + [System.ComponentModel.TypeConverter(typeof(DevBoxAddOnTypeConverter))] + public partial class DevBoxAddOn + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DevBoxAddOn(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DevBoxAddOn(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DevBoxAddOn(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ActionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ActionState = (string) content.GetValueForProperty("ActionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ActionState, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("OperationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).OperationLocation, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DevBoxAddOn(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ActionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ActionState = (string) content.GetValueForProperty("ActionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ActionState, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("OperationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).OperationLocation, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A Dev Box addon. + [System.ComponentModel.TypeConverter(typeof(DevBoxAddOnTypeConverter))] + public partial interface IDevBoxAddOn + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAddOn.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAddOn.TypeConverter.cs new file mode 100644 index 000000000000..289f938e4426 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAddOn.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DevBoxAddOnTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DevBoxAddOn.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DevBoxAddOn.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DevBoxAddOn.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAddOn.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAddOn.cs new file mode 100644 index 000000000000..1de9548b102f --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAddOn.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// A Dev Box addon. + public partial class DevBoxAddOn : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _actionState; + + /// + /// The current action state of the Dev Box addon. This state is based on previous + /// action performed by user. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string ActionState { get => this._actionState; } + + /// One of a server-defined set of error codes. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ?? null; } + + /// An array of details about specific errors that led to this reported error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError _error; + + /// Creation, deletion or action error details. Populated only for error states. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); } + + /// + /// An object containing more specific information than the current object about the error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } + + /// Backing field for property. + private string _kind= @"DevBoxTunnel"; + + /// The type of the Dev Box addon. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Kind { get => this._kind; } + + /// A human-readable representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ?? null; } + + /// Internal Acessors for ActionState + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal.ActionState { get => this._actionState; set { {_actionState = value;} } } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); set { {_error = value;} } } + + /// Internal Acessors for Kind + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal.Kind { get => this._kind; set { {_kind = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _name; + + /// Name of the dev box addon. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private string _operationLocation; + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string OperationLocation { get => this._operationLocation; set => this._operationLocation = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState? _provisioningState; + + /// Provisioning state of this addon. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// The target of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } + + /// Creates an new instance. + public DevBoxAddOn() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Operation-Location", out var __operationLocationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).OperationLocation = System.Linq.Enumerable.FirstOrDefault(__operationLocationHeader0) is string __headerOperationLocationHeader0 ? __headerOperationLocationHeader0 : (string)null; + } + } + } + /// A Dev Box addon. + public partial interface IDevBoxAddOn : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// + /// The current action state of the Dev Box addon. This state is based on previous + /// action performed by user. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current action state of the Dev Box addon. This state is based on previous + action performed by user.", + SerializedName = @"actionState", + PossibleTypes = new [] { typeof(string) })] + string ActionState { get; } + /// One of a server-defined set of error codes. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"One of a server-defined set of error codes.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// An array of details about specific errors that led to this reported error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An array of details about specific errors that led to this reported error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } + /// + /// An object containing more specific information than the current object about the error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An object containing more specific information than the current object about the error.", + SerializedName = @"innererror", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + /// The type of the Dev Box addon. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The type of the Dev Box addon.", + SerializedName = @"kind", + PossibleTypes = new [] { typeof(string) })] + string Kind { get; } + /// A human-readable representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A human-readable representation of the error.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// Name of the dev box addon. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Name of the dev box addon.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Operation-Location", + PossibleTypes = new [] { typeof(string) })] + string OperationLocation { get; set; } + /// Provisioning state of this addon. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Provisioning state of this addon.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState? ProvisioningState { get; } + /// The target of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target of the error.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; set; } + + } + /// A Dev Box addon. + internal partial interface IDevBoxAddOnInternal + + { + /// + /// The current action state of the Dev Box addon. This state is based on previous + /// action performed by user. + /// + string ActionState { get; set; } + /// One of a server-defined set of error codes. + string Code { get; set; } + /// An array of details about specific errors that led to this reported error. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } + /// Creation, deletion or action error details. Populated only for error states. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get; set; } + /// + /// An object containing more specific information than the current object about the error. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + /// The type of the Dev Box addon. + string Kind { get; set; } + /// A human-readable representation of the error. + string Message { get; set; } + /// Name of the dev box addon. + string Name { get; set; } + + string OperationLocation { get; set; } + /// Provisioning state of this addon. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState? ProvisioningState { get; set; } + /// The target of the error. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAddOn.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAddOn.json.cs new file mode 100644 index 000000000000..f21e56c1a81b --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAddOn.json.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// A Dev Box addon. + public partial class DevBoxAddOn + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal DevBoxAddOn(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_kind = If( json?.PropertyT("kind"), out var __jsonKind) ? (string)__jsonKind : (string)Kind;} + {_actionState = If( json?.PropertyT("actionState"), out var __jsonActionState) ? (string)__jsonActionState : (string)ActionState;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("kind") ) + { + case "DevBoxTunnel": + { + return new DevBoxTunnel(json); + } + } + return new DevBoxAddOn(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + AddIf( null != (((object)this._kind)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._kind.ToString()) : null, "kind" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._actionState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._actionState.ToString()) : null, "actionState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAlignOperation.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAlignOperation.PowerShell.cs new file mode 100644 index 000000000000..6ddaf03e2049 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAlignOperation.PowerShell.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Information about an align operation on a Dev Box. + [System.ComponentModel.TypeConverter(typeof(DevBoxAlignOperationTypeConverter))] + public partial class DevBoxAlignOperation + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAlignOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DevBoxAlignOperation(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAlignOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DevBoxAlignOperation(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DevBoxAlignOperation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("OperationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + } + if (content.Contains("CreatedByObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DevBoxAlignOperation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("OperationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + } + if (content.Contains("CreatedByObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAlignOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Information about an align operation on a Dev Box. + [System.ComponentModel.TypeConverter(typeof(DevBoxAlignOperationTypeConverter))] + public partial interface IDevBoxAlignOperation + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAlignOperation.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAlignOperation.TypeConverter.cs new file mode 100644 index 000000000000..cfadce3fcb54 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAlignOperation.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DevBoxAlignOperationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAlignOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAlignOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DevBoxAlignOperation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DevBoxAlignOperation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DevBoxAlignOperation.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAlignOperation.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAlignOperation.cs new file mode 100644 index 000000000000..894dcceab5a0 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAlignOperation.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Information about an align operation on a Dev Box. + public partial class DevBoxAlignOperation : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAlignOperation, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAlignOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation(); + + /// One of a server-defined set of error codes. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Code = value ?? null; } + + /// The object ID of the actor which initiated the operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string CreatedByObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId = value ?? null; } + + /// An array of details about specific errors that led to this reported error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Detail = value ?? null /* arrayOf */; } + + /// The time the operation finished, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime = value ?? default(global::System.DateTime); } + + /// Provisioning or operation error details. Populated only for error states. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Error = value ?? null /* model class */; } + + /// + /// An object containing more specific information than the current object about the error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror = value ?? null /* model class */; } + + /// The kind of operation that occurred. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Kind = value ; } + + /// A human-readable representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Message = value ?? null; } + + /// Internal Acessors for OperationId + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal.OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId = value; } + + /// Unique identifier for the Dev Box operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; } + + /// he time the operation started, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime = value ?? default(global::System.DateTime); } + + /// The operation status. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Status = value ; } + + /// The target of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Target = value ?? null; } + + /// The unique URI for the Dev Box operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Uri = value ; } + + /// Creates an new instance. + public DevBoxAlignOperation() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__devBoxOperation), __devBoxOperation); + await eventListener.AssertObjectIsValid(nameof(__devBoxOperation), __devBoxOperation); + } + } + /// Information about an align operation on a Dev Box. + public partial interface IDevBoxAlignOperation : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation + { + + } + /// Information about an align operation on a Dev Box. + internal partial interface IDevBoxAlignOperationInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAlignOperation.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAlignOperation.json.cs new file mode 100644 index 000000000000..886764e32fcb --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxAlignOperation.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Information about an align operation on a Dev Box. + public partial class DevBoxAlignOperation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal DevBoxAlignOperation(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAlignOperation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAlignOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAlignOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new DevBoxAlignOperation(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __devBoxOperation?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxCaptureSnapshotOperation.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxCaptureSnapshotOperation.PowerShell.cs new file mode 100644 index 000000000000..1bf694c01fd0 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxCaptureSnapshotOperation.PowerShell.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Information about a snapshot creation operation on a Dev Box. + [System.ComponentModel.TypeConverter(typeof(DevBoxCaptureSnapshotOperationTypeConverter))] + public partial class DevBoxCaptureSnapshotOperation + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxCaptureSnapshotOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DevBoxCaptureSnapshotOperation(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxCaptureSnapshotOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DevBoxCaptureSnapshotOperation(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DevBoxCaptureSnapshotOperation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("OperationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + } + if (content.Contains("CreatedByObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DevBoxCaptureSnapshotOperation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("OperationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + } + if (content.Contains("CreatedByObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxCaptureSnapshotOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Information about a snapshot creation operation on a Dev Box. + [System.ComponentModel.TypeConverter(typeof(DevBoxCaptureSnapshotOperationTypeConverter))] + public partial interface IDevBoxCaptureSnapshotOperation + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxCaptureSnapshotOperation.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxCaptureSnapshotOperation.TypeConverter.cs new file mode 100644 index 000000000000..35814f9d58b4 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxCaptureSnapshotOperation.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DevBoxCaptureSnapshotOperationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxCaptureSnapshotOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxCaptureSnapshotOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DevBoxCaptureSnapshotOperation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DevBoxCaptureSnapshotOperation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DevBoxCaptureSnapshotOperation.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxCaptureSnapshotOperation.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxCaptureSnapshotOperation.cs new file mode 100644 index 000000000000..f0166da95483 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxCaptureSnapshotOperation.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Information about a snapshot creation operation on a Dev Box. + public partial class DevBoxCaptureSnapshotOperation : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxCaptureSnapshotOperation, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxCaptureSnapshotOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation(); + + /// One of a server-defined set of error codes. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Code = value ?? null; } + + /// The object ID of the actor which initiated the operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string CreatedByObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId = value ?? null; } + + /// An array of details about specific errors that led to this reported error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Detail = value ?? null /* arrayOf */; } + + /// The time the operation finished, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime = value ?? default(global::System.DateTime); } + + /// Provisioning or operation error details. Populated only for error states. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Error = value ?? null /* model class */; } + + /// + /// An object containing more specific information than the current object about the error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror = value ?? null /* model class */; } + + /// The kind of operation that occurred. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Kind = value ; } + + /// A human-readable representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Message = value ?? null; } + + /// Internal Acessors for OperationId + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal.OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId = value; } + + /// Unique identifier for the Dev Box operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; } + + /// he time the operation started, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime = value ?? default(global::System.DateTime); } + + /// The operation status. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Status = value ; } + + /// The target of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Target = value ?? null; } + + /// The unique URI for the Dev Box operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Uri = value ; } + + /// Creates an new instance. + public DevBoxCaptureSnapshotOperation() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__devBoxOperation), __devBoxOperation); + await eventListener.AssertObjectIsValid(nameof(__devBoxOperation), __devBoxOperation); + } + } + /// Information about a snapshot creation operation on a Dev Box. + public partial interface IDevBoxCaptureSnapshotOperation : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation + { + + } + /// Information about a snapshot creation operation on a Dev Box. + internal partial interface IDevBoxCaptureSnapshotOperationInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxCaptureSnapshotOperation.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxCaptureSnapshotOperation.json.cs new file mode 100644 index 000000000000..c7eadb1ff64d --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxCaptureSnapshotOperation.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Information about a snapshot creation operation on a Dev Box. + public partial class DevBoxCaptureSnapshotOperation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal DevBoxCaptureSnapshotOperation(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxCaptureSnapshotOperation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxCaptureSnapshotOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxCaptureSnapshotOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new DevBoxCaptureSnapshotOperation(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __devBoxOperation?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxNextAction.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxNextAction.PowerShell.cs similarity index 90% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxNextAction.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxNextAction.PowerShell.cs index da7f44d85afb..cea8dd277c89 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxNextAction.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxNextAction.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevBoxNextAction partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevBoxNextAction(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevBoxNextAction(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,13 +98,13 @@ internal DevBoxNextAction(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ScheduledTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextActionInternal)this).ScheduledTime = (global::System.DateTime) content.GetValueForProperty("ScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextActionInternal)this).ScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextActionInternal)this).ScheduledTime = (global::System.DateTime) content.GetValueForProperty("ScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextActionInternal)this).ScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } 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. @@ -119,7 +119,7 @@ internal DevBoxNextAction(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("ScheduledTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextActionInternal)this).ScheduledTime = (global::System.DateTime) content.GetValueForProperty("ScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextActionInternal)this).ScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextActionInternal)this).ScheduledTime = (global::System.DateTime) content.GetValueForProperty("ScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextActionInternal)this).ScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } @@ -129,7 +129,7 @@ internal DevBoxNextAction(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxNextAction.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxNextAction.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxNextAction.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxNextAction.TypeConverter.cs index b6d09c372c99..cf2fb7c8f754 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxNextAction.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxNextAction.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxNextAction.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxNextAction.cs similarity index 90% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxNextAction.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxNextAction.cs index 9edb21eb312b..944e79cb6ca4 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxNextAction.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxNextAction.cs @@ -3,20 +3,20 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Details about the next run of an action. public partial class DevBoxNextAction : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextActionInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextActionInternal { /// Backing field for property. private global::System.DateTime _scheduledTime; - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public global::System.DateTime ScheduledTime { get => this._scheduledTime; set => this._scheduledTime = value; } @@ -30,11 +30,11 @@ public DevBoxNextAction() public partial interface IDevBoxNextAction : Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable { - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The time the action will be triggered (UTC).", + Description = @"The time the action will be triggered (UTC), in RFC3339 format.", SerializedName = @"scheduledTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime ScheduledTime { get; set; } @@ -44,7 +44,7 @@ public partial interface IDevBoxNextAction : internal partial interface IDevBoxNextActionInternal { - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. global::System.DateTime ScheduledTime { get; set; } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxNextAction.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxNextAction.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxNextAction.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxNextAction.json.cs index 00a4f0db9d0e..1f1113bd88c7 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxNextAction.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxNextAction.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -70,13 +70,13 @@ internal DevBoxNextAction(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runti } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxNextAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxNextAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new DevBoxNextAction(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxOperation.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxOperation.PowerShell.cs similarity index 76% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxOperation.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxOperation.PowerShell.cs index 4935949f19b3..55618996e71f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxOperation.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxOperation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevBoxOperation partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevBoxOperation(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevBoxOperation(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,61 +98,61 @@ internal DevBoxOperation(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } 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. @@ -167,55 +167,55 @@ internal DevBoxOperation(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -225,7 +225,7 @@ internal DevBoxOperation(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxOperation.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxOperation.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxOperation.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxOperation.TypeConverter.cs index ce6496cc1374..9b0d72235490 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxOperation.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxOperation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxOperation.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxOperation.cs similarity index 85% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxOperation.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxOperation.cs index 72adbac8d7fe..344df4c7e6a4 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxOperation.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxOperation.cs @@ -3,19 +3,19 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Information about an operation on a Dev Box. public partial class DevBoxOperation : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal { /// One of a server-defined set of error codes. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ?? null; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ?? null; } /// Backing field for property. private string _createdByObjectId; @@ -26,27 +26,27 @@ public partial class DevBoxOperation : /// An array of details about specific errors that led to this reported error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } /// Backing field for property. private global::System.DateTime? _endTime; - /// The time the operation finished. + /// The time the operation finished, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public global::System.DateTime? EndTime { get => this._endTime; set => this._endTime = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError _error; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError _error; /// Provisioning or operation error details. Populated only for error states. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); set => this._error = value; } /// /// An object containing more specific information than the current object about the error. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind _kind; @@ -57,13 +57,13 @@ public partial class DevBoxOperation : /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ?? null; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ?? null; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); set { {_error = value;} } } /// Internal Acessors for OperationId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal.OperationId { get => this._operationId; set { {_operationId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal.OperationId { get => this._operationId; set { {_operationId = value;} } } /// Backing field for property. private string _operationId; @@ -75,7 +75,7 @@ public partial class DevBoxOperation : /// Backing field for property. private global::System.DateTime? _startTime; - /// he time the operation started. + /// he time the operation started, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public global::System.DateTime? StartTime { get => this._startTime; set => this._startTime = value; } @@ -88,7 +88,7 @@ public partial class DevBoxOperation : /// The target of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } /// Backing field for property. private string _uri; @@ -129,13 +129,13 @@ public partial interface IDevBoxOperation : ReadOnly = false, Description = @"An array of details about specific errors that led to this reported error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } - /// The time the operation finished. + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } + /// The time the operation finished, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The time the operation finished.", + Description = @"The time the operation finished, in RFC3339 format.", SerializedName = @"endTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? EndTime { get; set; } @@ -147,8 +147,8 @@ public partial interface IDevBoxOperation : ReadOnly = false, Description = @"An object containing more specific information than the current object about the error.", SerializedName = @"innererror", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } /// The kind of operation that occurred. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, @@ -173,11 +173,11 @@ public partial interface IDevBoxOperation : SerializedName = @"operationId", PossibleTypes = new [] { typeof(string) })] string OperationId { get; } - /// he time the operation started. + /// he time the operation started, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = false, - Description = @"he time the operation started.", + Description = @"he time the operation started, in RFC3339 format.", SerializedName = @"startTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? StartTime { get; set; } @@ -216,22 +216,22 @@ internal partial interface IDevBoxOperationInternal /// The object ID of the actor which initiated the operation. string CreatedByObjectId { get; set; } /// An array of details about specific errors that led to this reported error. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } - /// The time the operation finished. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } + /// The time the operation finished, in RFC3339 format. global::System.DateTime? EndTime { get; set; } /// Provisioning or operation error details. Populated only for error states. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get; set; } /// /// An object containing more specific information than the current object about the error. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } /// The kind of operation that occurred. Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Kind { get; set; } /// A human-readable representation of the error. string Message { get; set; } /// Unique identifier for the Dev Box operation. string OperationId { get; set; } - /// he time the operation started. + /// he time the operation started, in RFC3339 format. global::System.DateTime? StartTime { get; set; } /// The operation status. Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get; set; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxOperation.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxOperation.json.cs similarity index 94% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxOperation.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxOperation.json.cs index 7d82d1397b1e..dda024fd7b3c 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxOperation.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxOperation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,7 +65,7 @@ internal DevBoxOperation(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtim { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} {_operationId = If( json?.PropertyT("operationId"), out var __jsonOperationId) ? (string)__jsonOperationId : (string)OperationId;} {_kind = If( json?.PropertyT("kind"), out var __jsonKind) ? (string)__jsonKind : (string)Kind;} @@ -77,15 +77,15 @@ internal DevBoxOperation(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtim } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation. - /// Note: the Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation interface is polymorphic, + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation interface is polymorphic, /// and the precise model class that will get deserialized is determined at runtime based on the payload. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json)) { @@ -95,6 +95,14 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 switch ( json.StringProperty("kind") ) { + case "Align": + { + return new DevBoxAlignOperation(json); + } + case "CaptureSnapshot": + { + return new DevBoxCaptureSnapshotOperation(json); + } case "Repair": { return new DevBoxRepairOperation(json); @@ -103,6 +111,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 { return new DevBoxRestartOperation(json); } + case "RestoreSnapshot": + { + return new DevBoxRestoreSnapshotOperation(json); + } case "Start": { return new DevBoxStartOperation(json); diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperation.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperation.PowerShell.cs similarity index 75% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperation.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperation.PowerShell.cs index 3ae4795a64bf..1ce861de2eae 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperation.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevBoxRepairOperation partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevBoxRepairOperation(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevBoxRepairOperation(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,77 +98,77 @@ internal DevBoxRepairOperation(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Result")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).Result = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResult) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).Result, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxRepairOperationResultTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).Result = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResult) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).Result, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxRepairOperationResultTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("ResultRepairOutcome")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).ResultRepairOutcome = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome?) content.GetValueForProperty("ResultRepairOutcome",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).ResultRepairOutcome, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).ResultRepairOutcome = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome?) content.GetValueForProperty("ResultRepairOutcome",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).ResultRepairOutcome, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome.CreateFrom); } if (content.Contains("ResultCode")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).ResultCode = (string) content.GetValueForProperty("ResultCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).ResultCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).ResultCode = (string) content.GetValueForProperty("ResultCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).ResultCode, global::System.Convert.ToString); } if (content.Contains("ResultMessage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).ResultMessage = (string) content.GetValueForProperty("ResultMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).ResultMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).ResultMessage = (string) content.GetValueForProperty("ResultMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).ResultMessage, 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. @@ -183,71 +183,71 @@ internal DevBoxRepairOperation(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Result")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).Result = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResult) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).Result, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxRepairOperationResultTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).Result = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResult) content.GetValueForProperty("Result",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).Result, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxRepairOperationResultTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("ResultRepairOutcome")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).ResultRepairOutcome = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome?) content.GetValueForProperty("ResultRepairOutcome",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).ResultRepairOutcome, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).ResultRepairOutcome = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome?) content.GetValueForProperty("ResultRepairOutcome",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).ResultRepairOutcome, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome.CreateFrom); } if (content.Contains("ResultCode")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).ResultCode = (string) content.GetValueForProperty("ResultCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).ResultCode, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).ResultCode = (string) content.GetValueForProperty("ResultCode",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).ResultCode, global::System.Convert.ToString); } if (content.Contains("ResultMessage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).ResultMessage = (string) content.GetValueForProperty("ResultMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal)this).ResultMessage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).ResultMessage = (string) content.GetValueForProperty("ResultMessage",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal)this).ResultMessage, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -257,7 +257,7 @@ internal DevBoxRepairOperation(global::System.Management.Automation.PSObject con /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperation.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperation.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperation.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperation.TypeConverter.cs index 93fffefc04f3..d85d2d3e0170 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperation.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperation.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperation.cs similarity index 79% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperation.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperation.cs index 006568bc2513..648911179c92 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperation.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperation.cs @@ -3,100 +3,100 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Information about a start operation on a Dev Box. public partial class DevBoxRepairOperation : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperation, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperation, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxOperation(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation(); /// One of a server-defined set of error codes. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Code = value ?? null; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Code = value ?? null; } /// The object ID of the actor which initiated the operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string CreatedByObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId = value ?? null; } + public string CreatedByObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId = value ?? null; } /// An array of details about specific errors that led to this reported error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Detail = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Detail = value ?? null /* arrayOf */; } - /// The time the operation finished. + /// The time the operation finished, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime = value ?? default(global::System.DateTime); } + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime = value ?? default(global::System.DateTime); } /// Provisioning or operation error details. Populated only for error states. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Error = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Error = value ?? null /* model class */; } /// /// An object containing more specific information than the current object about the error. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror = value ?? null /* model class */; } /// The kind of operation that occurred. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Kind = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Kind = value ; } /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Message = value ?? null; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Message = value ?? null; } /// Internal Acessors for OperationId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal.OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal.OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId = value; } /// Internal Acessors for Result - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResult Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationInternal.Result { get => (this._result = this._result ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxRepairOperationResult()); set { {_result = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResult Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationInternal.Result { get => (this._result = this._result ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxRepairOperationResult()); set { {_result = value;} } } /// Unique identifier for the Dev Box operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; } + public string OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResult _result; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResult _result; /// The result of the repair operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResult Result { get => (this._result = this._result ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxRepairOperationResult()); set => this._result = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResult Result { get => (this._result = this._result ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxRepairOperationResult()); set => this._result = value; } /// The result code associated with the repair operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string ResultCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)Result).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)Result).Code = value ?? null; } + public string ResultCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)Result).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)Result).Code = value ?? null; } /// The result message associated with the repair operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string ResultMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)Result).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)Result).Message = value ?? null; } + public string ResultMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)Result).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)Result).Message = value ?? null; } /// The outcome of the repair operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome? ResultRepairOutcome { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)Result).RepairOutcome; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)Result).RepairOutcome = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome)""); } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome? ResultRepairOutcome { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)Result).RepairOutcome; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)Result).RepairOutcome = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome)""); } - /// he time the operation started. + /// he time the operation started, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime = value ?? default(global::System.DateTime); } + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime = value ?? default(global::System.DateTime); } /// The operation status. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Status = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Status = value ; } /// The target of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Target = value ?? null; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Target = value ?? null; } /// The unique URI for the Dev Box operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Uri = value ; } + public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Uri = value ; } /// Creates an new instance. public DevBoxRepairOperation() @@ -119,7 +119,7 @@ public DevBoxRepairOperation() /// Information about a start operation on a Dev Box. public partial interface IDevBoxRepairOperation : Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation { /// The result code associated with the repair operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( @@ -149,10 +149,10 @@ public partial interface IDevBoxRepairOperation : } /// Information about a start operation on a Dev Box. internal partial interface IDevBoxRepairOperationInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal { /// The result of the repair operation. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResult Result { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResult Result { get; set; } /// The result code associated with the repair operation. string ResultCode { get; set; } /// The result message associated with the repair operation. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperation.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperation.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperation.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperation.json.cs index 35283d37e3e1..3c178ab6d379 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperation.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,19 +65,19 @@ internal DevBoxRepairOperation(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata. { return; } - __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxOperation(json); - {_result = If( json?.PropertyT("result"), out var __jsonResult) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxRepairOperationResult.FromJson(__jsonResult) : Result;} + __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation(json); + {_result = If( json?.PropertyT("result"), out var __jsonResult) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxRepairOperationResult.FromJson(__jsonResult) : Result;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new DevBoxRepairOperation(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperationResult.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperationResult.PowerShell.cs similarity index 87% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperationResult.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperationResult.PowerShell.cs index ee101d69b73e..2b6aee81e571 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperationResult.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperationResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevBoxRepairOperationResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevBoxRepairOperationResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevBoxRepairOperationResult(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,21 +98,21 @@ internal DevBoxRepairOperationResult(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("RepairOutcome")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)this).RepairOutcome = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome?) content.GetValueForProperty("RepairOutcome",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)this).RepairOutcome, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)this).RepairOutcome = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome?) content.GetValueForProperty("RepairOutcome",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)this).RepairOutcome, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome.CreateFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)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. @@ -127,15 +127,15 @@ internal DevBoxRepairOperationResult(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("RepairOutcome")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)this).RepairOutcome = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome?) content.GetValueForProperty("RepairOutcome",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)this).RepairOutcome, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)this).RepairOutcome = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome?) content.GetValueForProperty("RepairOutcome",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)this).RepairOutcome, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxRepairOutcome.CreateFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal)this).Message, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -145,7 +145,7 @@ internal DevBoxRepairOperationResult(global::System.Management.Automation.PSObje /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperationResult.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperationResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperationResult.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperationResult.TypeConverter.cs index bfbd1d5f2f9e..d8d09e3122cf 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperationResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperationResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperationResult.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperationResult.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperationResult.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperationResult.cs index 0edcf1511749..47297c11ff08 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperationResult.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperationResult.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Information about the result of a repair operation on a Dev Box. public partial class DevBoxRepairOperationResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResultInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperationResult.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperationResult.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperationResult.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperationResult.json.cs index ece64d9dcf3d..ce08e569136a 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRepairOperationResult.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRepairOperationResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -72,13 +72,13 @@ internal DevBoxRepairOperationResult(Microsoft.Azure.PowerShell.Cmdlets.DevCente } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRepairOperationResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRepairOperationResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new DevBoxRepairOperationResult(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRestartOperation.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestartOperation.PowerShell.cs similarity index 77% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRestartOperation.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestartOperation.PowerShell.cs index 4592c3ce95ee..da89d2c9fdcc 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRestartOperation.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestartOperation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevBoxRestartOperation partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRestartOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestartOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevBoxRestartOperation(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRestartOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestartOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevBoxRestartOperation(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,61 +98,61 @@ internal DevBoxRestartOperation(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } 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. @@ -167,55 +167,55 @@ internal DevBoxRestartOperation(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } @@ -225,7 +225,7 @@ internal DevBoxRestartOperation(global::System.Management.Automation.PSObject co /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRestartOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestartOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRestartOperation.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestartOperation.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRestartOperation.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestartOperation.TypeConverter.cs index 0349eb06ed1a..95d90705c8fa 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRestartOperation.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestartOperation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRestartOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestartOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRestartOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestartOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRestartOperation.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestartOperation.cs similarity index 77% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRestartOperation.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestartOperation.cs index f38f56dbbe92..3ea81b9bf88b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRestartOperation.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestartOperation.cs @@ -3,78 +3,78 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Information about a restart operation on a Dev Box. public partial class DevBoxRestartOperation : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRestartOperation, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRestartOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestartOperation, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestartOperationInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxOperation(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation(); /// One of a server-defined set of error codes. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Code = value ?? null; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Code = value ?? null; } /// The object ID of the actor which initiated the operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string CreatedByObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId = value ?? null; } + public string CreatedByObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId = value ?? null; } /// An array of details about specific errors that led to this reported error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Detail = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Detail = value ?? null /* arrayOf */; } - /// The time the operation finished. + /// The time the operation finished, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime = value ?? default(global::System.DateTime); } + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime = value ?? default(global::System.DateTime); } /// Provisioning or operation error details. Populated only for error states. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Error = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Error = value ?? null /* model class */; } /// /// An object containing more specific information than the current object about the error. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror = value ?? null /* model class */; } /// The kind of operation that occurred. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Kind = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Kind = value ; } /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Message = value ?? null; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Message = value ?? null; } /// Internal Acessors for OperationId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal.OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal.OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId = value; } /// Unique identifier for the Dev Box operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; } + public string OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; } - /// he time the operation started. + /// he time the operation started, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime = value ?? default(global::System.DateTime); } + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime = value ?? default(global::System.DateTime); } /// The operation status. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Status = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Status = value ; } /// The target of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Target = value ?? null; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Target = value ?? null; } /// The unique URI for the Dev Box operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Uri = value ; } + public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Uri = value ; } /// Creates an new instance. public DevBoxRestartOperation() @@ -97,13 +97,13 @@ public DevBoxRestartOperation() /// Information about a restart operation on a Dev Box. public partial interface IDevBoxRestartOperation : Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation { } /// Information about a restart operation on a Dev Box. internal partial interface IDevBoxRestartOperationInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal { } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRestartOperation.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestartOperation.json.cs similarity index 96% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRestartOperation.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestartOperation.json.cs index 000ce0c22030..15a5d2dd8a9e 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxRestartOperation.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestartOperation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,18 +65,18 @@ internal DevBoxRestartOperation(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata { return; } - __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxOperation(json); + __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRestartOperation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestartOperation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRestartOperation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestartOperation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxRestartOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestartOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new DevBoxRestartOperation(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestoreSnapshotOperation.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestoreSnapshotOperation.PowerShell.cs new file mode 100644 index 000000000000..61ac4f5c85be --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestoreSnapshotOperation.PowerShell.cs @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Information about a restore from snapshot operation on a Dev Box. + [System.ComponentModel.TypeConverter(typeof(DevBoxRestoreSnapshotOperationTypeConverter))] + public partial class DevBoxRestoreSnapshotOperation + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestoreSnapshotOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DevBoxRestoreSnapshotOperation(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestoreSnapshotOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DevBoxRestoreSnapshotOperation(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DevBoxRestoreSnapshotOperation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SnapshotId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestoreSnapshotOperationInternal)this).SnapshotId = (string) content.GetValueForProperty("SnapshotId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestoreSnapshotOperationInternal)this).SnapshotId, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("OperationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + } + if (content.Contains("CreatedByObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DevBoxRestoreSnapshotOperation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SnapshotId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestoreSnapshotOperationInternal)this).SnapshotId = (string) content.GetValueForProperty("SnapshotId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestoreSnapshotOperationInternal)this).SnapshotId, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("OperationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + } + if (content.Contains("CreatedByObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestoreSnapshotOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Information about a restore from snapshot operation on a Dev Box. + [System.ComponentModel.TypeConverter(typeof(DevBoxRestoreSnapshotOperationTypeConverter))] + public partial interface IDevBoxRestoreSnapshotOperation + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestoreSnapshotOperation.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestoreSnapshotOperation.TypeConverter.cs new file mode 100644 index 000000000000..08924ed27c43 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestoreSnapshotOperation.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DevBoxRestoreSnapshotOperationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestoreSnapshotOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestoreSnapshotOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DevBoxRestoreSnapshotOperation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DevBoxRestoreSnapshotOperation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DevBoxRestoreSnapshotOperation.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestoreSnapshotOperation.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestoreSnapshotOperation.cs new file mode 100644 index 000000000000..c1412af8284e --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestoreSnapshotOperation.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Information about a restore from snapshot operation on a Dev Box. + public partial class DevBoxRestoreSnapshotOperation : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestoreSnapshotOperation, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestoreSnapshotOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation(); + + /// One of a server-defined set of error codes. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Code = value ?? null; } + + /// The object ID of the actor which initiated the operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string CreatedByObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId = value ?? null; } + + /// An array of details about specific errors that led to this reported error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Detail = value ?? null /* arrayOf */; } + + /// The time the operation finished, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime = value ?? default(global::System.DateTime); } + + /// Provisioning or operation error details. Populated only for error states. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Error = value ?? null /* model class */; } + + /// + /// An object containing more specific information than the current object about the error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror = value ?? null /* model class */; } + + /// The kind of operation that occurred. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Kind = value ; } + + /// A human-readable representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Message = value ?? null; } + + /// Internal Acessors for OperationId + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal.OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId = value; } + + /// Unique identifier for the Dev Box operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; } + + /// Backing field for property. + private string _snapshotId; + + /// Specifies the snapshot id that was used for the restore operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string SnapshotId { get => this._snapshotId; set => this._snapshotId = value; } + + /// he time the operation started, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime = value ?? default(global::System.DateTime); } + + /// The operation status. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Status = value ; } + + /// The target of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Target = value ?? null; } + + /// The unique URI for the Dev Box operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Uri = value ; } + + /// Creates an new instance. + public DevBoxRestoreSnapshotOperation() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__devBoxOperation), __devBoxOperation); + await eventListener.AssertObjectIsValid(nameof(__devBoxOperation), __devBoxOperation); + } + } + /// Information about a restore from snapshot operation on a Dev Box. + public partial interface IDevBoxRestoreSnapshotOperation : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation + { + /// Specifies the snapshot id that was used for the restore operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Specifies the snapshot id that was used for the restore operation.", + SerializedName = @"snapshotId", + PossibleTypes = new [] { typeof(string) })] + string SnapshotId { get; set; } + + } + /// Information about a restore from snapshot operation on a Dev Box. + internal partial interface IDevBoxRestoreSnapshotOperationInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal + { + /// Specifies the snapshot id that was used for the restore operation. + string SnapshotId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestoreSnapshotOperation.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestoreSnapshotOperation.json.cs new file mode 100644 index 000000000000..19bbde23a7ec --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxRestoreSnapshotOperation.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Information about a restore from snapshot operation on a Dev Box. + public partial class DevBoxRestoreSnapshotOperation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal DevBoxRestoreSnapshotOperation(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation(json); + {_snapshotId = If( json?.PropertyT("snapshotId"), out var __jsonSnapshotId) ? (string)__jsonSnapshotId : (string)SnapshotId;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestoreSnapshotOperation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestoreSnapshotOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxRestoreSnapshotOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new DevBoxRestoreSnapshotOperation(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __devBoxOperation?.ToJson(container, serializationMode); + AddIf( null != (((object)this._snapshotId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._snapshotId.ToString()) : null, "snapshotId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxSnapshot.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxSnapshot.PowerShell.cs new file mode 100644 index 000000000000..bbd53895bb21 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxSnapshot.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// A DevBox snapshot + [System.ComponentModel.TypeConverter(typeof(DevBoxSnapshotTypeConverter))] + public partial class DevBoxSnapshot + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DevBoxSnapshot(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DevBoxSnapshot(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DevBoxSnapshot(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SnapshotId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).SnapshotId = (string) content.GetValueForProperty("SnapshotId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).SnapshotId, global::System.Convert.ToString); + } + if (content.Contains("CreatedTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).CreatedTime = (global::System.DateTime) content.GetValueForProperty("CreatedTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).CreatedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ExpirationTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).ExpirationTime = (global::System.DateTime?) content.GetValueForProperty("ExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).ExpirationTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SnapshotType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).SnapshotType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType) content.GetValueForProperty("SnapshotType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).SnapshotType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DevBoxSnapshot(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SnapshotId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).SnapshotId = (string) content.GetValueForProperty("SnapshotId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).SnapshotId, global::System.Convert.ToString); + } + if (content.Contains("CreatedTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).CreatedTime = (global::System.DateTime) content.GetValueForProperty("CreatedTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).CreatedTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ExpirationTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).ExpirationTime = (global::System.DateTime?) content.GetValueForProperty("ExpirationTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).ExpirationTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SnapshotType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).SnapshotType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType) content.GetValueForProperty("SnapshotType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal)this).SnapshotType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A DevBox snapshot + [System.ComponentModel.TypeConverter(typeof(DevBoxSnapshotTypeConverter))] + public partial interface IDevBoxSnapshot + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxSnapshot.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxSnapshot.TypeConverter.cs new file mode 100644 index 000000000000..bdbe70c1a83b --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxSnapshot.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DevBoxSnapshotTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DevBoxSnapshot.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DevBoxSnapshot.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DevBoxSnapshot.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxSnapshot.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxSnapshot.cs new file mode 100644 index 000000000000..d4e01fa8dd76 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxSnapshot.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// A DevBox snapshot + public partial class DevBoxSnapshot : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal + { + + /// Backing field for property. + private global::System.DateTime _createdTime; + + /// The datetime that the snapshot was created, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public global::System.DateTime CreatedTime { get => this._createdTime; } + + /// Backing field for property. + private global::System.DateTime? _expirationTime; + + /// + /// The datetime when the snapshot expires, will only be shown for a manual snapshot, in RFC3339 format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public global::System.DateTime? ExpirationTime { get => this._expirationTime; } + + /// Internal Acessors for CreatedTime + global::System.DateTime Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal.CreatedTime { get => this._createdTime; set { {_createdTime = value;} } } + + /// Internal Acessors for ExpirationTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal.ExpirationTime { get => this._expirationTime; set { {_expirationTime = value;} } } + + /// Internal Acessors for SnapshotId + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal.SnapshotId { get => this._snapshotId; set { {_snapshotId = value;} } } + + /// Internal Acessors for SnapshotType + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshotInternal.SnapshotType { get => this._snapshotType; set { {_snapshotType = value;} } } + + /// Backing field for property. + private string _snapshotId; + + /// The id of the snapshot. Should be treated as opaque string. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string SnapshotId { get => this._snapshotId; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType _snapshotType; + + /// The type of the snapshot indicates whether it is manual or automatic. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType SnapshotType { get => this._snapshotType; } + + /// Creates an new instance. + public DevBoxSnapshot() + { + + } + } + /// A DevBox snapshot + public partial interface IDevBoxSnapshot : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// The datetime that the snapshot was created, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The datetime that the snapshot was created, in RFC3339 format.", + SerializedName = @"createdTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime CreatedTime { get; } + /// + /// The datetime when the snapshot expires, will only be shown for a manual snapshot, in RFC3339 format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The datetime when the snapshot expires, will only be shown for a manual snapshot, in RFC3339 format.", + SerializedName = @"expirationTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExpirationTime { get; } + /// The id of the snapshot. Should be treated as opaque string. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The id of the snapshot. Should be treated as opaque string.", + SerializedName = @"snapshotId", + PossibleTypes = new [] { typeof(string) })] + string SnapshotId { get; } + /// The type of the snapshot indicates whether it is manual or automatic. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The type of the snapshot indicates whether it is manual or automatic.", + SerializedName = @"snapshotType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType SnapshotType { get; } + + } + /// A DevBox snapshot + internal partial interface IDevBoxSnapshotInternal + + { + /// The datetime that the snapshot was created, in RFC3339 format. + global::System.DateTime CreatedTime { get; set; } + /// + /// The datetime when the snapshot expires, will only be shown for a manual snapshot, in RFC3339 format. + /// + global::System.DateTime? ExpirationTime { get; set; } + /// The id of the snapshot. Should be treated as opaque string. + string SnapshotId { get; set; } + /// The type of the snapshot indicates whether it is manual or automatic. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType SnapshotType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxSnapshot.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxSnapshot.json.cs new file mode 100644 index 000000000000..b8f3f5c0f78b --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxSnapshot.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// A DevBox snapshot + public partial class DevBoxSnapshot + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal DevBoxSnapshot(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_snapshotId = If( json?.PropertyT("snapshotId"), out var __jsonSnapshotId) ? (string)__jsonSnapshotId : (string)SnapshotId;} + {_createdTime = If( json?.PropertyT("createdTime"), out var __jsonCreatedTime) ? global::System.DateTime.TryParse((string)__jsonCreatedTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedTimeValue) ? __jsonCreatedTimeValue : CreatedTime : CreatedTime;} + {_expirationTime = If( json?.PropertyT("expirationTime"), out var __jsonExpirationTime) ? global::System.DateTime.TryParse((string)__jsonExpirationTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExpirationTimeValue) ? __jsonExpirationTimeValue : ExpirationTime : ExpirationTime;} + {_snapshotType = If( json?.PropertyT("snapshotType"), out var __jsonSnapshotType) ? (string)__jsonSnapshotType : (string)SnapshotType;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new DevBoxSnapshot(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._snapshotId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._snapshotId.ToString()) : null, "snapshotId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._createdTime.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)), "createdTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._expirationTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._expirationTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "expirationTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._snapshotType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._snapshotType.ToString()) : null, "snapshotType" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStartOperation.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStartOperation.PowerShell.cs similarity index 77% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStartOperation.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStartOperation.PowerShell.cs index d1cfc7ca5ac7..35400171ab75 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStartOperation.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStartOperation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevBoxStartOperation partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStartOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStartOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevBoxStartOperation(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStartOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStartOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevBoxStartOperation(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,61 +98,61 @@ internal DevBoxStartOperation(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } 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. @@ -167,55 +167,55 @@ internal DevBoxStartOperation(global::System.Management.Automation.PSObject cont // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } @@ -225,7 +225,7 @@ internal DevBoxStartOperation(global::System.Management.Automation.PSObject cont /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStartOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStartOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStartOperation.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStartOperation.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStartOperation.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStartOperation.TypeConverter.cs index 4700849aa5df..8893607e92b5 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStartOperation.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStartOperation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStartOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStartOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStartOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStartOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStartOperation.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStartOperation.cs similarity index 77% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStartOperation.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStartOperation.cs index 8107d8228d62..1a40dc783886 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStartOperation.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStartOperation.cs @@ -3,78 +3,78 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Information about a start operation on a Dev Box. public partial class DevBoxStartOperation : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStartOperation, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStartOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStartOperation, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStartOperationInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxOperation(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation(); /// One of a server-defined set of error codes. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Code = value ?? null; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Code = value ?? null; } /// The object ID of the actor which initiated the operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string CreatedByObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId = value ?? null; } + public string CreatedByObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId = value ?? null; } /// An array of details about specific errors that led to this reported error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Detail = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Detail = value ?? null /* arrayOf */; } - /// The time the operation finished. + /// The time the operation finished, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime = value ?? default(global::System.DateTime); } + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime = value ?? default(global::System.DateTime); } /// Provisioning or operation error details. Populated only for error states. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Error = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Error = value ?? null /* model class */; } /// /// An object containing more specific information than the current object about the error. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror = value ?? null /* model class */; } /// The kind of operation that occurred. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Kind = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Kind = value ; } /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Message = value ?? null; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Message = value ?? null; } /// Internal Acessors for OperationId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal.OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal.OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId = value; } /// Unique identifier for the Dev Box operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; } + public string OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; } - /// he time the operation started. + /// he time the operation started, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime = value ?? default(global::System.DateTime); } + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime = value ?? default(global::System.DateTime); } /// The operation status. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Status = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Status = value ; } /// The target of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Target = value ?? null; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Target = value ?? null; } /// The unique URI for the Dev Box operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Uri = value ; } + public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Uri = value ; } /// Creates an new instance. public DevBoxStartOperation() @@ -97,13 +97,13 @@ public DevBoxStartOperation() /// Information about a start operation on a Dev Box. public partial interface IDevBoxStartOperation : Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation { } /// Information about a start operation on a Dev Box. internal partial interface IDevBoxStartOperationInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal { } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStartOperation.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStartOperation.json.cs similarity index 96% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStartOperation.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStartOperation.json.cs index 2ffdc1812b59..3c2f3afdad16 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStartOperation.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStartOperation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,18 +65,18 @@ internal DevBoxStartOperation(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.R { return; } - __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxOperation(json); + __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStartOperation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStartOperation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStartOperation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStartOperation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStartOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStartOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new DevBoxStartOperation(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStopOperation.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStopOperation.PowerShell.cs similarity index 76% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStopOperation.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStopOperation.PowerShell.cs index e70fa8a9bf3b..864adf77d8a3 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStopOperation.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStopOperation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class DevBoxStopOperation partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStopOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStopOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new DevBoxStopOperation(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStopOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStopOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new DevBoxStopOperation(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,61 +98,61 @@ internal DevBoxStopOperation(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } 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. @@ -167,55 +167,55 @@ internal DevBoxStopOperation(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } @@ -225,7 +225,7 @@ internal DevBoxStopOperation(global::System.Management.Automation.PSObject conte /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStopOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStopOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStopOperation.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStopOperation.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStopOperation.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStopOperation.TypeConverter.cs index efa8cd9f0f10..9352c0a273ca 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStopOperation.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStopOperation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStopOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStopOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStopOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStopOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStopOperation.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStopOperation.cs similarity index 77% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStopOperation.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStopOperation.cs index 070552e34ea9..7ec9c264f5d6 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStopOperation.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStopOperation.cs @@ -3,78 +3,78 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Information about a stop operation on a Dev Box. public partial class DevBoxStopOperation : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStopOperation, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStopOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStopOperation, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStopOperationInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxOperation(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation(); /// One of a server-defined set of error codes. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Code = value ?? null; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Code = value ?? null; } /// The object ID of the actor which initiated the operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string CreatedByObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId = value ?? null; } + public string CreatedByObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).CreatedByObjectId = value ?? null; } /// An array of details about specific errors that led to this reported error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Detail = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Detail = value ?? null /* arrayOf */; } - /// The time the operation finished. + /// The time the operation finished, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime = value ?? default(global::System.DateTime); } + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).EndTime = value ?? default(global::System.DateTime); } /// Provisioning or operation error details. Populated only for error states. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Error = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Error = value ?? null /* model class */; } /// /// An object containing more specific information than the current object about the error. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Innererror = value ?? null /* model class */; } /// The kind of operation that occurred. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Kind = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Kind = value ; } /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Message = value ?? null; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Message = value ?? null; } /// Internal Acessors for OperationId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal.OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal.OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId = value; } /// Unique identifier for the Dev Box operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; } + public string OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).OperationId; } - /// he time the operation started. + /// he time the operation started, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime = value ?? default(global::System.DateTime); } + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).StartTime = value ?? default(global::System.DateTime); } /// The operation status. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Status = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Status = value ; } /// The target of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Target = value ?? null; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Target = value ?? null; } /// The unique URI for the Dev Box operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal)__devBoxOperation).Uri = value ; } + public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal)__devBoxOperation).Uri = value ; } /// Creates an new instance. public DevBoxStopOperation() @@ -97,13 +97,13 @@ public DevBoxStopOperation() /// Information about a stop operation on a Dev Box. public partial interface IDevBoxStopOperation : Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation { } /// Information about a stop operation on a Dev Box. internal partial interface IDevBoxStopOperationInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperationInternal { } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStopOperation.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStopOperation.json.cs similarity index 96% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStopOperation.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStopOperation.json.cs index c62efa207193..517923e42494 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/DevBoxStopOperation.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxStopOperation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,18 +65,18 @@ internal DevBoxStopOperation(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Ru { return; } - __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxOperation(json); + __devBoxOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStopOperation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStopOperation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStopOperation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStopOperation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxStopOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxStopOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new DevBoxStopOperation(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxTunnel.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxTunnel.PowerShell.cs new file mode 100644 index 000000000000..1a1ce357b885 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxTunnel.PowerShell.cs @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// The Dev Box Tunnel addon. + [System.ComponentModel.TypeConverter(typeof(DevBoxTunnelTypeConverter))] + public partial class DevBoxTunnel + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnel DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DevBoxTunnel(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnel DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DevBoxTunnel(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DevBoxTunnel(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus.CreateFrom); + } + if (content.Contains("CodeTunnelName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).CodeTunnelName = (string) content.GetValueForProperty("CodeTunnelName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).CodeTunnelName, global::System.Convert.ToString); + } + if (content.Contains("CodeTunnelUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).CodeTunnelUrl = (string) content.GetValueForProperty("CodeTunnelUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).CodeTunnelUrl, global::System.Convert.ToString); + } + if (content.Contains("HostingResourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).HostingResourceName = (string) content.GetValueForProperty("HostingResourceName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).HostingResourceName, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ActionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ActionState = (string) content.GetValueForProperty("ActionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ActionState, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("OperationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).OperationLocation, 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 DevBoxTunnel(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus.CreateFrom); + } + if (content.Contains("CodeTunnelName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).CodeTunnelName = (string) content.GetValueForProperty("CodeTunnelName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).CodeTunnelName, global::System.Convert.ToString); + } + if (content.Contains("CodeTunnelUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).CodeTunnelUrl = (string) content.GetValueForProperty("CodeTunnelUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).CodeTunnelUrl, global::System.Convert.ToString); + } + if (content.Contains("HostingResourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).HostingResourceName = (string) content.GetValueForProperty("HostingResourceName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal)this).HostingResourceName, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Kind")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).Kind, global::System.Convert.ToString); + } + if (content.Contains("ActionState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ActionState = (string) content.GetValueForProperty("ActionState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ActionState, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState.CreateFrom); + } + if (content.Contains("OperationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).OperationLocation, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnel FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The Dev Box Tunnel addon. + [System.ComponentModel.TypeConverter(typeof(DevBoxTunnelTypeConverter))] + public partial interface IDevBoxTunnel + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxTunnel.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxTunnel.TypeConverter.cs new file mode 100644 index 000000000000..d30013676f20 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxTunnel.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DevBoxTunnelTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnel ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnel).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DevBoxTunnel.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DevBoxTunnel.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DevBoxTunnel.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxTunnel.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxTunnel.cs new file mode 100644 index 000000000000..5de3f5de2dd5 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxTunnel.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// The Dev Box Tunnel addon. + public partial class DevBoxTunnel : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnel, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn __devBoxAddOn = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAddOn(); + + /// + /// The current action state of the Dev Box addon. This state is based on previous + /// action performed by user. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string ActionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).ActionState; } + + /// One of a server-defined set of error codes. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Code = value ?? null; } + + /// Backing field for property. + private string _codeTunnelName; + + /// The code tunnel name. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string CodeTunnelName { get => this._codeTunnelName; } + + /// Backing field for property. + private string _codeTunnelUrl; + + /// The code tunnel's url. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string CodeTunnelUrl { get => this._codeTunnelUrl; } + + /// An array of details about specific errors that led to this reported error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Detail = value ?? null /* arrayOf */; } + + /// Creation, deletion or action error details. Populated only for error states. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Error; } + + /// Backing field for property. + private string _hostingResourceName; + + /// + /// The hosting resource name, either a DevBox or HyperV. + /// Leaving it empty or `Default` if it's for DevBox. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string HostingResourceName { get => this._hostingResourceName; set => this._hostingResourceName = value; } + + /// + /// An object containing more specific information than the current object about the error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Innererror = value ?? null /* model class */; } + + /// The type of the Dev Box addon. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Kind; } + + /// A human-readable representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Message = value ?? null; } + + /// Internal Acessors for ActionState + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal.ActionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).ActionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).ActionState = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal.Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Error = value; } + + /// Internal Acessors for Kind + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal.Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Kind = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Name = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).ProvisioningState = value; } + + /// Internal Acessors for CodeTunnelName + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal.CodeTunnelName { get => this._codeTunnelName; set { {_codeTunnelName = value;} } } + + /// Internal Acessors for CodeTunnelUrl + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal.CodeTunnelUrl { get => this._codeTunnelUrl; set { {_codeTunnelUrl = value;} } } + + /// Internal Acessors for Status + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnelInternal.Status { get => this._status; set { {_status = value;} } } + + /// Name of the dev box addon. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Name; } + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string OperationLocation { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).OperationLocation; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).OperationLocation = value ?? null; } + + /// Provisioning state of this addon. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).ProvisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus _status; + + /// The tunnel status. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus Status { get => this._status; } + + /// The target of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)__devBoxAddOn).Target = value ?? null; } + + /// Creates an new instance. + public DevBoxTunnel() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Operation-Location", out var __operationLocationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal)this).OperationLocation = System.Linq.Enumerable.FirstOrDefault(__operationLocationHeader0) is string __headerOperationLocationHeader0 ? __headerOperationLocationHeader0 : (string)null; + } + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__devBoxAddOn), __devBoxAddOn); + await eventListener.AssertObjectIsValid(nameof(__devBoxAddOn), __devBoxAddOn); + } + } + /// The Dev Box Tunnel addon. + public partial interface IDevBoxTunnel : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + { + /// The code tunnel name. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The code tunnel name.", + SerializedName = @"codeTunnelName", + PossibleTypes = new [] { typeof(string) })] + string CodeTunnelName { get; } + /// The code tunnel's url. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The code tunnel's url.", + SerializedName = @"codeTunnelUrl", + PossibleTypes = new [] { typeof(string) })] + string CodeTunnelUrl { get; } + /// + /// The hosting resource name, either a DevBox or HyperV. + /// Leaving it empty or `Default` if it's for DevBox. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The hosting resource name, either a DevBox or HyperV. + Leaving it empty or `Default` if it's for DevBox.", + SerializedName = @"hostingResourceName", + PossibleTypes = new [] { typeof(string) })] + string HostingResourceName { get; set; } + /// The tunnel status. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The tunnel status.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus Status { get; } + + } + /// The Dev Box Tunnel addon. + internal partial interface IDevBoxTunnelInternal : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOnInternal + { + /// The code tunnel name. + string CodeTunnelName { get; set; } + /// The code tunnel's url. + string CodeTunnelUrl { get; set; } + /// + /// The hosting resource name, either a DevBox or HyperV. + /// Leaving it empty or `Default` if it's for DevBox. + /// + string HostingResourceName { get; set; } + /// The tunnel status. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus Status { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxTunnel.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxTunnel.json.cs new file mode 100644 index 000000000000..21f23f734b73 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/DevBoxTunnel.json.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// The Dev Box Tunnel addon. + public partial class DevBoxTunnel + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal DevBoxTunnel(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __devBoxAddOn = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAddOn(json); + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_codeTunnelName = If( json?.PropertyT("codeTunnelName"), out var __jsonCodeTunnelName) ? (string)__jsonCodeTunnelName : (string)CodeTunnelName;} + {_codeTunnelUrl = If( json?.PropertyT("codeTunnelUrl"), out var __jsonCodeTunnelUrl) ? (string)__jsonCodeTunnelUrl : (string)CodeTunnelUrl;} + {_hostingResourceName = If( json?.PropertyT("hostingResourceName"), out var __jsonHostingResourceName) ? (string)__jsonHostingResourceName : (string)HostingResourceName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnel. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnel. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxTunnel FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new DevBoxTunnel(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __devBoxAddOn?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._codeTunnelName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._codeTunnelName.ToString()) : null, "codeTunnelName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._codeTunnelUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._codeTunnelUrl.ToString()) : null, "codeTunnelUrl" ,container.Add ); + } + AddIf( null != (((object)this._hostingResourceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._hostingResourceName.ToString()) : null, "hostingResourceName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Environment.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Environment.PowerShell.cs new file mode 100644 index 000000000000..3936fa8a59d1 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Environment.PowerShell.cs @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Properties of an environment. + [System.ComponentModel.TypeConverter(typeof(EnvironmentTypeConverter))] + public partial class Environment + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Environment(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Environment(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Environment(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentProvisioningState.CreateFrom); + } + if (content.Contains("ResourceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).ResourceGroupId = (string) content.GetValueForProperty("ResourceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).ResourceGroupId, global::System.Convert.ToString); + } + if (content.Contains("CatalogName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).CatalogName = (string) content.GetValueForProperty("CatalogName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).CatalogName, global::System.Convert.ToString); + } + if (content.Contains("DefinitionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).DefinitionName = (string) content.GetValueForProperty("DefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).DefinitionName, global::System.Convert.ToString); + } + if (content.Contains("OperationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).OperationLocation, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Environment(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Parameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentParametersTypeConverter.ConvertFrom); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentProvisioningState.CreateFrom); + } + if (content.Contains("ResourceGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).ResourceGroupId = (string) content.GetValueForProperty("ResourceGroupId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).ResourceGroupId, global::System.Convert.ToString); + } + if (content.Contains("CatalogName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).CatalogName = (string) content.GetValueForProperty("CatalogName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).CatalogName, global::System.Convert.ToString); + } + if (content.Contains("DefinitionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).DefinitionName = (string) content.GetValueForProperty("DefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).DefinitionName, global::System.Convert.ToString); + } + if (content.Contains("OperationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).OperationLocation, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Properties of an environment. + [System.ComponentModel.TypeConverter(typeof(EnvironmentTypeConverter))] + public partial interface IEnvironment + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Environment.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Environment.TypeConverter.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Environment.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Environment.TypeConverter.cs index 4dc20fad6f7d..b23b635ee103 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Environment.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Environment.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Environment.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Environment.cs similarity index 88% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Environment.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Environment.cs index 85478a4082fa..f96ad265ca1c 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Environment.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Environment.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Properties of an environment. public partial class Environment : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializable { @@ -23,7 +23,7 @@ public partial class Environment : /// One of a server-defined set of error codes. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ?? null; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ?? null; } /// Backing field for property. private string _definitionName; @@ -34,14 +34,14 @@ public partial class Environment : /// An array of details about specific errors that led to this reported error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError _error; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError _error; /// Provisioning error details. Populated only for error states. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); } /// Backing field for property. private global::System.DateTime? _expirationDate; @@ -57,29 +57,29 @@ public partial class Environment : /// An object containing more specific information than the current object about the error. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ?? null; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ?? null; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); set { {_error = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for ResourceGroupId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal.ResourceGroupId { get => this._resourceGroupId; set { {_resourceGroupId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal.ResourceGroupId { get => this._resourceGroupId; set { {_resourceGroupId = value;} } } /// Internal Acessors for Uri - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal.Uri { get => this._uri; set { {_uri = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal.Uri { get => this._uri; set { {_uri = value;} } } /// Internal Acessors for User - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal.User { get => this._user; set { {_user = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal.User { get => this._user; set { {_user = value;} } } /// Backing field for property. private string _name; @@ -95,11 +95,11 @@ public partial class Environment : public string OperationLocation { get => this._operationLocation; set => this._operationLocation = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters _parameter; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters _parameter; /// Parameters object for the environment. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentParameters()); set => this._parameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters Parameter { get => (this._parameter = this._parameter ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentParameters()); set => this._parameter = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentProvisioningState? _provisioningState; @@ -117,7 +117,7 @@ public partial class Environment : /// The target of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } /// Backing field for property. private string _type; @@ -151,7 +151,7 @@ void Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializabl { if (headers.TryGetValues("Operation-Location", out var __operationLocationHeader0)) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentInternal)this).OperationLocation = System.Linq.Enumerable.FirstOrDefault(__operationLocationHeader0) is string __headerOperationLocationHeader0 ? __headerOperationLocationHeader0 : (string)null; + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentInternal)this).OperationLocation = System.Linq.Enumerable.FirstOrDefault(__operationLocationHeader0) is string __headerOperationLocationHeader0 ? __headerOperationLocationHeader0 : (string)null; } } } @@ -189,8 +189,8 @@ public partial interface IEnvironment : ReadOnly = false, Description = @"An array of details about specific errors that led to this reported error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } /// /// The time the expiration date will be triggered (UTC), after which the /// environment and associated resources will be deleted. @@ -211,8 +211,8 @@ public partial interface IEnvironment : ReadOnly = false, Description = @"An object containing more specific information than the current object about the error.", SerializedName = @"innererror", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, @@ -243,8 +243,8 @@ public partial interface IEnvironment : ReadOnly = false, Description = @"Parameters object for the environment.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters Parameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters Parameter { get; set; } /// The provisioning state of the environment. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, @@ -306,9 +306,9 @@ internal partial interface IEnvironmentInternal /// Name of the environment definition. string DefinitionName { get; set; } /// An array of details about specific errors that led to this reported error. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } /// Provisioning error details. Populated only for error states. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get; set; } /// /// The time the expiration date will be triggered (UTC), after which the /// environment and associated resources will be deleted. @@ -317,7 +317,7 @@ internal partial interface IEnvironmentInternal /// /// An object containing more specific information than the current object about the error. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } /// A human-readable representation of the error. string Message { get; set; } /// Environment name. @@ -325,7 +325,7 @@ internal partial interface IEnvironmentInternal string OperationLocation { get; set; } /// Parameters object for the environment. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters Parameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters Parameter { get; set; } /// The provisioning state of the environment. Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentProvisioningState? ProvisioningState { get; set; } /// The identifier of the resource group containing the environment's resources. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Environment.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Environment.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Environment.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Environment.json.cs index 3868b6e6e349..9b0dc324b4a9 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/Environment.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Environment.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,9 +65,9 @@ internal Environment(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Js { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} {_expirationDate = If( json?.PropertyT("expirationDate"), out var __jsonExpirationDate) ? global::System.DateTime.TryParse((string)__jsonExpirationDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExpirationDateValue) ? __jsonExpirationDateValue : ExpirationDate : ExpirationDate;} - {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentParameters.FromJson(__jsonParameters) : Parameter;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentParameters.FromJson(__jsonParameters) : Parameter;} {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_type = If( json?.PropertyT("environmentType"), out var __jsonEnvironmentType) ? (string)__jsonEnvironmentType : (string)Type;} @@ -80,13 +80,13 @@ internal Environment(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Js } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new Environment(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentAction.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentAction.PowerShell.cs similarity index 81% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentAction.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentAction.PowerShell.cs index 179c9c855f6a..e02b48a15fe0 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentAction.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentAction.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EnvironmentAction partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentAction(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentAction(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,37 +98,37 @@ internal EnvironmentAction(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Next")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).Next = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextAction) content.GetValueForProperty("Next",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).Next, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentNextActionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).Next = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextAction) content.GetValueForProperty("Next",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).Next, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentNextActionTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("ActionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).ActionType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).ActionType, global::System.Convert.ToString); } if (content.Contains("LastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).LastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).LastModifiedBy, global::System.Convert.ToString); } if (content.Contains("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("NextScheduledTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).NextScheduledTime = (global::System.DateTime?) content.GetValueForProperty("NextScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).NextScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).NextScheduledTime = (global::System.DateTime?) content.GetValueForProperty("NextScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).NextScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } 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. @@ -143,31 +143,31 @@ internal EnvironmentAction(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Next")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).Next = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextAction) content.GetValueForProperty("Next",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).Next, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentNextActionTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).Next = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextAction) content.GetValueForProperty("Next",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).Next, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentNextActionTypeConverter.ConvertFrom); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("ActionType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).ActionType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).ActionType, global::System.Convert.ToString); } if (content.Contains("LastModifiedBy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).LastModifiedBy, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).LastModifiedBy, global::System.Convert.ToString); } if (content.Contains("LastModifiedAt")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("NextScheduledTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).NextScheduledTime = (global::System.DateTime?) content.GetValueForProperty("NextScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal)this).NextScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).NextScheduledTime = (global::System.DateTime?) content.GetValueForProperty("NextScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal)this).NextScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } @@ -177,7 +177,7 @@ internal EnvironmentAction(global::System.Management.Automation.PSObject content /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentAction.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentAction.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentAction.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentAction.TypeConverter.cs index bbb81415ffc1..95226c1b2d97 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentAction.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentAction.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentAction.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentAction.cs similarity index 85% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentAction.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentAction.cs index e348732e1fe2..3d7ab0b66d0d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentAction.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentAction.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// An upcoming Environment Action. public partial class EnvironmentAction : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal { /// Backing field for property. @@ -23,7 +23,7 @@ public partial class EnvironmentAction : /// Backing field for property. private global::System.DateTime? _lastModifiedAt; - /// Time the object was last modified. + /// Time the object was last modified, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public global::System.DateTime? LastModifiedAt { get => this._lastModifiedAt; set => this._lastModifiedAt = value; } @@ -35,19 +35,19 @@ public partial class EnvironmentAction : public string LastModifiedBy { get => this._lastModifiedBy; } /// Internal Acessors for ActionType - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal.ActionType { get => this._actionType; set { {_actionType = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal.ActionType { get => this._actionType; set { {_actionType = value;} } } /// Internal Acessors for LastModifiedBy - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal.LastModifiedBy { get => this._lastModifiedBy; set { {_lastModifiedBy = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal.LastModifiedBy { get => this._lastModifiedBy; set { {_lastModifiedBy = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Next - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextAction Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal.Next { get => (this._next = this._next ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentNextAction()); set { {_next = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextAction Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal.Next { get => (this._next = this._next ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentNextAction()); set { {_next = value;} } } /// Internal Acessors for Uri - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentActionInternal.Uri { get => this._uri; set { {_uri = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentActionInternal.Uri { get => this._uri; set { {_uri = value;} } } /// Backing field for property. private string _name; @@ -57,15 +57,15 @@ public partial class EnvironmentAction : public string Name { get => this._name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextAction _next; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextAction _next; /// Details about the next run of this action. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextAction Next { get => (this._next = this._next ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentNextAction()); set => this._next = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextAction Next { get => (this._next = this._next ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentNextAction()); set => this._next = value; } - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public global::System.DateTime? NextScheduledTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextActionInternal)Next).ScheduledTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextActionInternal)Next).ScheduledTime = value ?? default(global::System.DateTime); } + public global::System.DateTime? NextScheduledTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextActionInternal)Next).ScheduledTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextActionInternal)Next).ScheduledTime = value ?? default(global::System.DateTime); } /// Backing field for property. private string _uri; @@ -92,11 +92,11 @@ public partial interface IEnvironmentAction : SerializedName = @"actionType", PossibleTypes = new [] { typeof(string) })] string ActionType { get; } - /// Time the object was last modified. + /// Time the object was last modified, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Time the object was last modified.", + Description = @"Time the object was last modified, in RFC3339 format.", SerializedName = @"lastModifiedAt", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? LastModifiedAt { get; set; } @@ -116,11 +116,11 @@ public partial interface IEnvironmentAction : SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string Name { get; } - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The time the action will be triggered (UTC).", + Description = @"The time the action will be triggered (UTC), in RFC3339 format.", SerializedName = @"scheduledTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? NextScheduledTime { get; set; } @@ -140,15 +140,15 @@ internal partial interface IEnvironmentActionInternal { /// The action that will be taken. string ActionType { get; set; } - /// Time the object was last modified. + /// Time the object was last modified, in RFC3339 format. global::System.DateTime? LastModifiedAt { get; set; } /// Object Id of the user who last modified the action. string LastModifiedBy { get; set; } /// Uniquely identifies the action. string Name { get; set; } /// Details about the next run of this action. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextAction Next { get; set; } - /// The time the action will be triggered (UTC). + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextAction Next { get; set; } + /// The time the action will be triggered (UTC), in RFC3339 format. global::System.DateTime? NextScheduledTime { get; set; } /// Uri of the action resource. string Uri { get; set; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentAction.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentAction.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentAction.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentAction.json.cs index b841c0fe5e33..f04f4dcf5da5 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentAction.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentAction.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,7 +65,7 @@ internal EnvironmentAction(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runt { return; } - {_next = If( json?.PropertyT("next"), out var __jsonNext) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentNextAction.FromJson(__jsonNext) : Next;} + {_next = If( json?.PropertyT("next"), out var __jsonNext) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentNextAction.FromJson(__jsonNext) : Next;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} {_actionType = If( json?.PropertyT("actionType"), out var __jsonActionType) ? (string)__jsonActionType : (string)ActionType;} @@ -75,13 +75,13 @@ internal EnvironmentAction(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runt } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentAction(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.PowerShell.cs new file mode 100644 index 000000000000..2e4833a663e8 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// An environment definition. + [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionTypeConverter))] + public partial class EnvironmentDefinition + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EnvironmentDefinition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EnvironmentDefinition(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EnvironmentDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("CatalogName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).CatalogName = (string) content.GetValueForProperty("CatalogName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).CatalogName, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentDefinitionParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("ParametersSchema")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).ParametersSchema = (string) content.GetValueForProperty("ParametersSchema",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).ParametersSchema, global::System.Convert.ToString); + } + if (content.Contains("TemplatePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).TemplatePath = (string) content.GetValueForProperty("TemplatePath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).TemplatePath, 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 EnvironmentDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("CatalogName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).CatalogName = (string) content.GetValueForProperty("CatalogName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).CatalogName, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Parameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Parameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter[]) content.GetValueForProperty("Parameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).Parameter, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentDefinitionParameterTypeConverter.ConvertFrom)); + } + if (content.Contains("ParametersSchema")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).ParametersSchema = (string) content.GetValueForProperty("ParametersSchema",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).ParametersSchema, global::System.Convert.ToString); + } + if (content.Contains("TemplatePath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).TemplatePath = (string) content.GetValueForProperty("TemplatePath",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal)this).TemplatePath, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// An environment definition. + [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionTypeConverter))] + public partial interface IEnvironmentDefinition + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.TypeConverter.cs new file mode 100644 index 000000000000..b4fd723c2aae --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EnvironmentDefinitionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EnvironmentDefinition.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EnvironmentDefinition.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EnvironmentDefinition.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.cs new file mode 100644 index 000000000000..ab8a38ce46fd --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// An environment definition. + public partial class EnvironmentDefinition : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal + { + + /// Backing field for property. + private string _catalogName; + + /// Name of the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string CatalogName { get => this._catalogName; set => this._catalogName = value; } + + /// Backing field for property. + private string _description; + + /// A short description of the environment definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private string _id; + + /// The ID of the environment definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionInternal.Name { get => this._name; set { {_name = value;} } } + + /// Backing field for property. + private string _name; + + /// Name of the environment definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter[] _parameter; + + /// Input parameters passed to an environment. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter[] Parameter { get => this._parameter; set => this._parameter = value; } + + /// Backing field for property. + private string _parametersSchema; + + /// JSON schema defining the parameters object passed to an environment. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string ParametersSchema { get => this._parametersSchema; set => this._parametersSchema = value; } + + /// Backing field for property. + private string _templatePath; + + /// Path to the Environment Definition entrypoint file. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string TemplatePath { get => this._templatePath; set => this._templatePath = value; } + + /// Backing field for property. + private string _uri; + + /// The unique URI of the environment definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Uri { get => this._uri; set => this._uri = value; } + + /// Creates an new instance. + public EnvironmentDefinition() + { + + } + } + /// An environment definition. + public partial interface IEnvironmentDefinition : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// Name of the catalog. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the catalog.", + SerializedName = @"catalogName", + PossibleTypes = new [] { typeof(string) })] + string CatalogName { get; set; } + /// A short description of the environment definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A short description of the environment definition.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The ID of the environment definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the environment definition.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// Name of the environment definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Name of the environment definition.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// Input parameters passed to an environment. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Input parameters passed to an environment.", + SerializedName = @"parameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter[] Parameter { get; set; } + /// JSON schema defining the parameters object passed to an environment. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"JSON schema defining the parameters object passed to an environment.", + SerializedName = @"parametersSchema", + PossibleTypes = new [] { typeof(string) })] + string ParametersSchema { get; set; } + /// Path to the Environment Definition entrypoint file. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Path to the Environment Definition entrypoint file.", + SerializedName = @"templatePath", + PossibleTypes = new [] { typeof(string) })] + string TemplatePath { get; set; } + /// The unique URI of the environment definition. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The unique URI of the environment definition.", + SerializedName = @"uri", + PossibleTypes = new [] { typeof(string) })] + string Uri { get; set; } + + } + /// An environment definition. + internal partial interface IEnvironmentDefinitionInternal + + { + /// Name of the catalog. + string CatalogName { get; set; } + /// A short description of the environment definition. + string Description { get; set; } + /// The ID of the environment definition. + string Id { get; set; } + /// Name of the environment definition. + string Name { get; set; } + /// Input parameters passed to an environment. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter[] Parameter { get; set; } + /// JSON schema defining the parameters object passed to an environment. + string ParametersSchema { get; set; } + /// Path to the Environment Definition entrypoint file. + string TemplatePath { get; set; } + /// The unique URI of the environment definition. + string Uri { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.json.cs new file mode 100644 index 000000000000..5ae27b685a75 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinition.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// An environment definition. + public partial class EnvironmentDefinition + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal EnvironmentDefinition(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_catalogName = If( json?.PropertyT("catalogName"), out var __jsonCatalogName) ? (string)__jsonCatalogName : (string)CatalogName;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_parameter = If( json?.PropertyT("parameters"), out var __jsonParameters) ? If( __jsonParameters as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentDefinitionParameter.FromJson(__u) )) ))() : null : Parameter;} + {_parametersSchema = If( json?.PropertyT("parametersSchema"), out var __jsonParametersSchema) ? (string)__jsonParametersSchema : (string)ParametersSchema;} + {_templatePath = If( json?.PropertyT("templatePath"), out var __jsonTemplatePath) ? (string)__jsonTemplatePath : (string)TemplatePath;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentDefinition(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._uri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._uri.ToString()) : null, "uri" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + AddIf( null != (((object)this._catalogName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._catalogName.ToString()) : null, "catalogName" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + if (null != this._parameter) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.XNodeArray(); + foreach( var __x in this._parameter ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("parameters",__w); + } + AddIf( null != (((object)this._parametersSchema)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._parametersSchema.ToString()) : null, "parametersSchema" ,container.Add ); + AddIf( null != (((object)this._templatePath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._templatePath.ToString()) : null, "templatePath" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.PowerShell.cs new file mode 100644 index 000000000000..e7beac7e2ccf --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Properties of an Environment Definition parameter + [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionParameterTypeConverter))] + public partial class EnvironmentDefinitionParameter + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EnvironmentDefinitionParameter(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EnvironmentDefinitionParameter(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EnvironmentDefinitionParameter(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Default")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Default = (string) content.GetValueForProperty("Default",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Default, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType.CreateFrom); + } + if (content.Contains("ReadOnly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly = (bool?) content.GetValueForProperty("ReadOnly",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Required")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Required = (bool) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Allowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Allowed = (string[]) content.GetValueForProperty("Allowed",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Allowed, __y => TypeConverterExtensions.SelectToArray(__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 EnvironmentDefinitionParameter(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Default")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Default = (string) content.GetValueForProperty("Default",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Default, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType.CreateFrom); + } + if (content.Contains("ReadOnly")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly = (bool?) content.GetValueForProperty("ReadOnly",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).ReadOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Required")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Required = (bool) content.GetValueForProperty("Required",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Required, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Allowed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Allowed = (string[]) content.GetValueForProperty("Allowed",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal)this).Allowed, __y => TypeConverterExtensions.SelectToArray(__y, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Properties of an Environment Definition parameter + [System.ComponentModel.TypeConverter(typeof(EnvironmentDefinitionParameterTypeConverter))] + public partial interface IEnvironmentDefinitionParameter + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.TypeConverter.cs new file mode 100644 index 000000000000..d43b9e1c53f9 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EnvironmentDefinitionParameterTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EnvironmentDefinitionParameter.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EnvironmentDefinitionParameter.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EnvironmentDefinitionParameter.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.cs new file mode 100644 index 000000000000..1d8466ac36ff --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Properties of an Environment Definition parameter + public partial class EnvironmentDefinitionParameter : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameterInternal + { + + /// Backing field for property. + private string[] _allowed; + + /// An array of allowed values. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string[] Allowed { get => this._allowed; set => this._allowed = value; } + + /// Backing field for property. + private string _default; + + /// Default value of the parameter. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Default { get => this._default; set => this._default = value; } + + /// Backing field for property. + private string _description; + + /// Description of the parameter. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private string _id; + + /// Unique ID of the parameter. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Backing field for property. + private string _name; + + /// Display name of the parameter. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private bool? _readOnly; + + /// + /// Whether or not this parameter is read-only. If true, default should have a + /// value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public bool? ReadOnly { get => this._readOnly; set => this._readOnly = value; } + + /// Backing field for property. + private bool _required; + + /// Whether or not this parameter is required. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public bool Required { get => this._required; set => this._required = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType _type; + + /// + /// A string of one of the basic JSON types (number, integer, array, object, + /// boolean, string). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public EnvironmentDefinitionParameter() + { + + } + } + /// Properties of an Environment Definition parameter + public partial interface IEnvironmentDefinitionParameter : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// An array of allowed values. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An array of allowed values.", + SerializedName = @"allowed", + PossibleTypes = new [] { typeof(string) })] + string[] Allowed { get; set; } + /// Default value of the parameter. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Default value of the parameter.", + SerializedName = @"default", + PossibleTypes = new [] { typeof(string) })] + string Default { get; set; } + /// Description of the parameter. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the parameter.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Unique ID of the parameter. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Unique ID of the parameter.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// Display name of the parameter. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display name of the parameter.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// + /// Whether or not this parameter is read-only. If true, default should have a + /// value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether or not this parameter is read-only. If true, default should have a + value.", + SerializedName = @"readOnly", + PossibleTypes = new [] { typeof(bool) })] + bool? ReadOnly { get; set; } + /// Whether or not this parameter is required. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Whether or not this parameter is required.", + SerializedName = @"required", + PossibleTypes = new [] { typeof(bool) })] + bool Required { get; set; } + /// + /// A string of one of the basic JSON types (number, integer, array, object, + /// boolean, string). + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A string of one of the basic JSON types (number, integer, array, object, + boolean, string).", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType Type { get; set; } + + } + /// Properties of an Environment Definition parameter + internal partial interface IEnvironmentDefinitionParameterInternal + + { + /// An array of allowed values. + string[] Allowed { get; set; } + /// Default value of the parameter. + string Default { get; set; } + /// Description of the parameter. + string Description { get; set; } + /// Unique ID of the parameter. + string Id { get; set; } + /// Display name of the parameter. + string Name { get; set; } + /// + /// Whether or not this parameter is read-only. If true, default should have a + /// value. + /// + bool? ReadOnly { get; set; } + /// Whether or not this parameter is required. + bool Required { get; set; } + /// + /// A string of one of the basic JSON types (number, integer, array, object, + /// boolean, string). + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ParameterType Type { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.json.cs new file mode 100644 index 000000000000..9520c82a3092 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDefinitionParameter.json.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Properties of an Environment Definition parameter + public partial class EnvironmentDefinitionParameter + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal EnvironmentDefinitionParameter(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_default = If( json?.PropertyT("default"), out var __jsonDefault) ? (string)__jsonDefault : (string)Default;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_readOnly = If( json?.PropertyT("readOnly"), out var __jsonReadOnly) ? (bool?)__jsonReadOnly : ReadOnly;} + {_required = If( json?.PropertyT("required"), out var __jsonRequired) ? (bool)__jsonRequired : Required;} + {_allowed = If( json?.PropertyT("allowed"), out var __jsonAllowed) ? If( __jsonAllowed as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Allowed;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinitionParameter FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentDefinitionParameter(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AddIf( null != (((object)this._default)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._default.ToString()) : null, "default" ,container.Add ); + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + AddIf( null != this._readOnly ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonBoolean((bool)this._readOnly) : null, "readOnly" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonBoolean(this._required), "required" ,container.Add ); + if (null != this._allowed) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.XNodeArray(); + foreach( var __x in this._allowed ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("allowed",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeleteOperation.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeleteOperation.PowerShell.cs similarity index 75% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeleteOperation.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeleteOperation.PowerShell.cs index b413b9395f6e..c1214d9b3f3e 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeleteOperation.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeleteOperation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EnvironmentDeleteOperation partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeleteOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeleteOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentDeleteOperation(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeleteOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeleteOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentDeleteOperation(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,65 +98,65 @@ internal EnvironmentDeleteOperation(global::System.Collections.IDictionary conte // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EnvironmentParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EnvironmentParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters) content.GetValueForProperty("EnvironmentParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EnvironmentParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperationEnvironmentParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EnvironmentParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters) content.GetValueForProperty("EnvironmentParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EnvironmentParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperationEnvironmentParametersTypeConverter.ConvertFrom); } 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. @@ -171,59 +171,59 @@ internal EnvironmentDeleteOperation(global::System.Management.Automation.PSObjec // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EnvironmentParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EnvironmentParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters) content.GetValueForProperty("EnvironmentParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EnvironmentParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperationEnvironmentParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EnvironmentParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters) content.GetValueForProperty("EnvironmentParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EnvironmentParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperationEnvironmentParametersTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -233,7 +233,7 @@ internal EnvironmentDeleteOperation(global::System.Management.Automation.PSObjec /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeleteOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeleteOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeleteOperation.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeleteOperation.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeleteOperation.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeleteOperation.TypeConverter.cs index 2ca17cbbc55b..752e05c2420d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeleteOperation.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeleteOperation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeleteOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeleteOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeleteOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeleteOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeleteOperation.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeleteOperation.cs similarity index 76% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeleteOperation.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeleteOperation.cs index d8ecc219ce88..009a2a6337ee 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeleteOperation.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeleteOperation.cs @@ -3,82 +3,82 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Information about a delete operation on an environment. public partial class EnvironmentDeleteOperation : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeleteOperation, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeleteOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeleteOperation, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeleteOperationInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation __environmentOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperation(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation __environmentOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperation(); /// One of a server-defined set of error codes. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Code = value ?? null; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Code = value ?? null; } /// The object ID of the actor which initiated the operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string CreatedByObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).CreatedByObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).CreatedByObjectId = value ?? null; } + public string CreatedByObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).CreatedByObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).CreatedByObjectId = value ?? null; } /// An array of details about specific errors that led to this reported error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Detail = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Detail = value ?? null /* arrayOf */; } - /// The time the operation finished. + /// The time the operation finished, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).EndTime = value ?? default(global::System.DateTime); } + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).EndTime = value ?? default(global::System.DateTime); } /// Parameters object for the environment at the time of the operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters EnvironmentParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).EnvironmentParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).EnvironmentParameter = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters EnvironmentParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).EnvironmentParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).EnvironmentParameter = value ?? null /* model class */; } /// Provisioning or operation error details. Populated only for error states. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Error = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Error = value ?? null /* model class */; } /// /// An object containing more specific information than the current object about the error. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Innererror = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Innererror = value ?? null /* model class */; } /// The kind of operation that occurred. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Kind = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Kind = value ; } /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Message = value ?? null; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Message = value ?? null; } /// Internal Acessors for OperationId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal.OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).OperationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).OperationId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal.OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).OperationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).OperationId = value; } /// Unique identifier for the environment operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).OperationId; } + public string OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).OperationId; } - /// The time the operation started. + /// The time the operation started, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).StartTime = value ?? default(global::System.DateTime); } + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).StartTime = value ?? default(global::System.DateTime); } /// The operation status. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Status = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Status = value ; } /// The target of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Target = value ?? null; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Target = value ?? null; } /// The unique URI for the environment operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Uri = value ; } + public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Uri = value ; } /// Creates an new instance. public EnvironmentDeleteOperation() @@ -101,13 +101,13 @@ public EnvironmentDeleteOperation() /// Information about a delete operation on an environment. public partial interface IEnvironmentDeleteOperation : Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation { } /// Information about a delete operation on an environment. internal partial interface IEnvironmentDeleteOperationInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal { } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeleteOperation.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeleteOperation.json.cs similarity index 96% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeleteOperation.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeleteOperation.json.cs index 22f932b41f0b..1015a50ef55b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeleteOperation.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeleteOperation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,18 +65,18 @@ internal EnvironmentDeleteOperation(Microsoft.Azure.PowerShell.Cmdlets.DevCenter { return; } - __environmentOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperation(json); + __environmentOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperation(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeleteOperation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeleteOperation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeleteOperation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeleteOperation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeleteOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeleteOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentDeleteOperation(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeployOperation.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeployOperation.PowerShell.cs similarity index 75% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeployOperation.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeployOperation.PowerShell.cs index 8527120b51fe..cb6eb9456650 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeployOperation.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeployOperation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EnvironmentDeployOperation partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeployOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeployOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentDeployOperation(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeployOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeployOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentDeployOperation(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,65 +98,65 @@ internal EnvironmentDeployOperation(global::System.Collections.IDictionary conte // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EnvironmentParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EnvironmentParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters) content.GetValueForProperty("EnvironmentParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EnvironmentParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperationEnvironmentParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EnvironmentParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters) content.GetValueForProperty("EnvironmentParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EnvironmentParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperationEnvironmentParametersTypeConverter.ConvertFrom); } 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. @@ -171,59 +171,59 @@ internal EnvironmentDeployOperation(global::System.Management.Automation.PSObjec // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EnvironmentParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EnvironmentParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters) content.GetValueForProperty("EnvironmentParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EnvironmentParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperationEnvironmentParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EnvironmentParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters) content.GetValueForProperty("EnvironmentParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EnvironmentParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperationEnvironmentParametersTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -233,7 +233,7 @@ internal EnvironmentDeployOperation(global::System.Management.Automation.PSObjec /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeployOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeployOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeployOperation.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeployOperation.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeployOperation.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeployOperation.TypeConverter.cs index 9d07e4347834..bfd84b975d2c 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeployOperation.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeployOperation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeployOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeployOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeployOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeployOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeployOperation.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeployOperation.cs similarity index 76% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeployOperation.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeployOperation.cs index 36df8480a885..da647842e0ed 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeployOperation.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeployOperation.cs @@ -3,82 +3,82 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Information about a deploy operation on an environment. public partial class EnvironmentDeployOperation : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeployOperation, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeployOperationInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeployOperation, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeployOperationInternal, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation __environmentOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperation(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation __environmentOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperation(); /// One of a server-defined set of error codes. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Code = value ?? null; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Code = value ?? null; } /// The object ID of the actor which initiated the operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string CreatedByObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).CreatedByObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).CreatedByObjectId = value ?? null; } + public string CreatedByObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).CreatedByObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).CreatedByObjectId = value ?? null; } /// An array of details about specific errors that led to this reported error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Detail = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Detail = value ?? null /* arrayOf */; } - /// The time the operation finished. + /// The time the operation finished, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).EndTime = value ?? default(global::System.DateTime); } + public global::System.DateTime? EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).EndTime = value ?? default(global::System.DateTime); } /// Parameters object for the environment at the time of the operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters EnvironmentParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).EnvironmentParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).EnvironmentParameter = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters EnvironmentParameter { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).EnvironmentParameter; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).EnvironmentParameter = value ?? null /* model class */; } /// Provisioning or operation error details. Populated only for error states. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Error = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Error = value ?? null /* model class */; } /// /// An object containing more specific information than the current object about the error. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Innererror = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Innererror = value ?? null /* model class */; } /// The kind of operation that occurred. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Kind = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind Kind { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Kind; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Kind = value ; } /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Message = value ?? null; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Message = value ?? null; } /// Internal Acessors for OperationId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal.OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).OperationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).OperationId = value; } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal.OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).OperationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).OperationId = value; } /// Unique identifier for the environment operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).OperationId; } + public string OperationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).OperationId; } - /// The time the operation started. + /// The time the operation started, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).StartTime = value ?? default(global::System.DateTime); } + public global::System.DateTime? StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).StartTime = value ?? default(global::System.DateTime); } /// The operation status. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Status = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Status = value ; } /// The target of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Target = value ?? null; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Target = value ?? null; } /// The unique URI for the environment operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inherited)] - public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)__environmentOperation).Uri = value ; } + public string Uri { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Uri; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)__environmentOperation).Uri = value ; } /// Creates an new instance. public EnvironmentDeployOperation() @@ -101,13 +101,13 @@ public EnvironmentDeployOperation() /// Information about a deploy operation on an environment. public partial interface IEnvironmentDeployOperation : Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation { } /// Information about a deploy operation on an environment. internal partial interface IEnvironmentDeployOperationInternal : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal { } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeployOperation.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeployOperation.json.cs similarity index 96% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeployOperation.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeployOperation.json.cs index 874c5db7f06a..5a1967b0c53f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentDeployOperation.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentDeployOperation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,18 +65,18 @@ internal EnvironmentDeployOperation(Microsoft.Azure.PowerShell.Cmdlets.DevCenter { return; } - __environmentOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperation(json); + __environmentOperation = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperation(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeployOperation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeployOperation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeployOperation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeployOperation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDeployOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDeployOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentDeployOperation(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentNextAction.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentNextAction.PowerShell.cs similarity index 90% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentNextAction.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentNextAction.PowerShell.cs index ae5106295f3c..a71c25bbf95a 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentNextAction.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentNextAction.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EnvironmentNextAction partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextAction DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentNextAction(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentNextAction(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,13 +98,13 @@ internal EnvironmentNextAction(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ScheduledTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextActionInternal)this).ScheduledTime = (global::System.DateTime?) content.GetValueForProperty("ScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextActionInternal)this).ScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextActionInternal)this).ScheduledTime = (global::System.DateTime?) content.GetValueForProperty("ScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextActionInternal)this).ScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } 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. @@ -119,7 +119,7 @@ internal EnvironmentNextAction(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("ScheduledTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextActionInternal)this).ScheduledTime = (global::System.DateTime?) content.GetValueForProperty("ScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextActionInternal)this).ScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextActionInternal)this).ScheduledTime = (global::System.DateTime?) content.GetValueForProperty("ScheduledTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextActionInternal)this).ScheduledTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } AfterDeserializePSObject(content); } @@ -129,7 +129,7 @@ internal EnvironmentNextAction(global::System.Management.Automation.PSObject con /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentNextAction.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentNextAction.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentNextAction.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentNextAction.TypeConverter.cs index 469e95aaddb0..e5bc075d9ccb 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentNextAction.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentNextAction.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextAction ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextAction ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextAction).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextAction).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentNextAction.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentNextAction.cs similarity index 90% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentNextAction.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentNextAction.cs index 2418f245d5e6..7658bf9cd886 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentNextAction.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentNextAction.cs @@ -3,20 +3,20 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Details about the next run of an action. public partial class EnvironmentNextAction : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextAction, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextActionInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextAction, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextActionInternal { /// Backing field for property. private global::System.DateTime? _scheduledTime; - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public global::System.DateTime? ScheduledTime { get => this._scheduledTime; set => this._scheduledTime = value; } @@ -30,11 +30,11 @@ public EnvironmentNextAction() public partial interface IEnvironmentNextAction : Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable { - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The time the action will be triggered (UTC).", + Description = @"The time the action will be triggered (UTC), in RFC3339 format.", SerializedName = @"scheduledTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? ScheduledTime { get; set; } @@ -44,7 +44,7 @@ public partial interface IEnvironmentNextAction : internal partial interface IEnvironmentNextActionInternal { - /// The time the action will be triggered (UTC). + /// The time the action will be triggered (UTC), in RFC3339 format. global::System.DateTime? ScheduledTime { get; set; } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentNextAction.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentNextAction.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentNextAction.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentNextAction.json.cs index f6ecf208e912..cddfa0df31ea 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentNextAction.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentNextAction.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -70,13 +70,13 @@ internal EnvironmentNextAction(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata. } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextAction. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextAction. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextAction. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextAction. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentNextAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentNextAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentNextAction(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperation.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperation.PowerShell.cs similarity index 75% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperation.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperation.PowerShell.cs index 8a95bc1aa1a8..4a8e05fa3344 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperation.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EnvironmentOperation partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentOperation(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentOperation(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,65 +98,65 @@ internal EnvironmentOperation(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EnvironmentParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EnvironmentParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters) content.GetValueForProperty("EnvironmentParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EnvironmentParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperationEnvironmentParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EnvironmentParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters) content.GetValueForProperty("EnvironmentParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EnvironmentParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperationEnvironmentParametersTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } 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. @@ -171,59 +171,59 @@ internal EnvironmentOperation(global::System.Management.Automation.PSObject cont // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); } if (content.Contains("Uri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Uri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Uri, global::System.Convert.ToString); } if (content.Contains("OperationId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).OperationId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).OperationId, global::System.Convert.ToString); } if (content.Contains("Kind")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Kind = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Kind, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind.CreateFrom); } if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); } if (content.Contains("CreatedByObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).CreatedByObjectId = (string) content.GetValueForProperty("CreatedByObjectId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).CreatedByObjectId, global::System.Convert.ToString); } if (content.Contains("StartTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EndTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } if (content.Contains("EnvironmentParameter")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EnvironmentParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters) content.GetValueForProperty("EnvironmentParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).EnvironmentParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperationEnvironmentParametersTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EnvironmentParameter = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters) content.GetValueForProperty("EnvironmentParameter",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).EnvironmentParameter, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperationEnvironmentParametersTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); } if (content.Contains("Innererror")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -233,7 +233,7 @@ internal EnvironmentOperation(global::System.Management.Automation.PSObject cont /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperation.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperation.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperation.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperation.TypeConverter.cs index 6749e8b01b98..89628df393fa 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperation.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperation.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperation.cs similarity index 84% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperation.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperation.cs index 94e8ca83184e..ac48d18f51d1 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperation.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperation.cs @@ -3,19 +3,19 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Information about an operation on an environment. public partial class EnvironmentOperation : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal { /// One of a server-defined set of error codes. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ?? null; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ?? null; } /// Backing field for property. private string _createdByObjectId; @@ -26,34 +26,34 @@ public partial class EnvironmentOperation : /// An array of details about specific errors that led to this reported error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } /// Backing field for property. private global::System.DateTime? _endTime; - /// The time the operation finished. + /// The time the operation finished, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public global::System.DateTime? EndTime { get => this._endTime; set => this._endTime = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters _environmentParameter; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters _environmentParameter; /// Parameters object for the environment at the time of the operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters EnvironmentParameter { get => (this._environmentParameter = this._environmentParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperationEnvironmentParameters()); set => this._environmentParameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters EnvironmentParameter { get => (this._environmentParameter = this._environmentParameter ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperationEnvironmentParameters()); set => this._environmentParameter = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError _error; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError _error; /// Provisioning or operation error details. Populated only for error states. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); set => this._error = value; } /// /// An object containing more specific information than the current object about the error. /// [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind _kind; @@ -64,13 +64,13 @@ public partial class EnvironmentOperation : /// A human-readable representation of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ?? null; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ?? null; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); set { {_error = value;} } } /// Internal Acessors for OperationId - string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationInternal.OperationId { get => this._operationId; set { {_operationId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationInternal.OperationId { get => this._operationId; set { {_operationId = value;} } } /// Backing field for property. private string _operationId; @@ -82,7 +82,7 @@ public partial class EnvironmentOperation : /// Backing field for property. private global::System.DateTime? _startTime; - /// The time the operation started. + /// The time the operation started, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public global::System.DateTime? StartTime { get => this._startTime; set => this._startTime = value; } @@ -95,7 +95,7 @@ public partial class EnvironmentOperation : /// The target of the error. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } /// Backing field for property. private string _uri; @@ -136,13 +136,13 @@ public partial interface IEnvironmentOperation : ReadOnly = false, Description = @"An array of details about specific errors that led to this reported error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } - /// The time the operation finished. + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } + /// The time the operation finished, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The time the operation finished.", + Description = @"The time the operation finished, in RFC3339 format.", SerializedName = @"endTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? EndTime { get; set; } @@ -152,8 +152,8 @@ public partial interface IEnvironmentOperation : ReadOnly = false, Description = @"Parameters object for the environment at the time of the operation.", SerializedName = @"environmentParameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters EnvironmentParameter { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters EnvironmentParameter { get; set; } /// /// An object containing more specific information than the current object about the error. /// @@ -162,8 +162,8 @@ public partial interface IEnvironmentOperation : ReadOnly = false, Description = @"An object containing more specific information than the current object about the error.", SerializedName = @"innererror", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } /// The kind of operation that occurred. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, @@ -188,11 +188,11 @@ public partial interface IEnvironmentOperation : SerializedName = @"operationId", PossibleTypes = new [] { typeof(string) })] string OperationId { get; } - /// The time the operation started. + /// The time the operation started, in RFC3339 format. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The time the operation started.", + Description = @"The time the operation started, in RFC3339 format.", SerializedName = @"startTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] global::System.DateTime? StartTime { get; set; } @@ -231,24 +231,24 @@ internal partial interface IEnvironmentOperationInternal /// The object ID of the actor which initiated the operation. string CreatedByObjectId { get; set; } /// An array of details about specific errors that led to this reported error. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError[] Detail { get; set; } - /// The time the operation finished. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } + /// The time the operation finished, in RFC3339 format. global::System.DateTime? EndTime { get; set; } /// Parameters object for the environment at the time of the operation. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters EnvironmentParameter { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters EnvironmentParameter { get; set; } /// Provisioning or operation error details. Populated only for error states. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsError Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get; set; } /// /// An object containing more specific information than the current object about the error. /// - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } /// The kind of operation that occurred. Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOperationKind Kind { get; set; } /// A human-readable representation of the error. string Message { get; set; } /// Unique identifier for the environment operation. string OperationId { get; set; } - /// The time the operation started. + /// The time the operation started, in RFC3339 format. global::System.DateTime? StartTime { get; set; } /// The operation status. Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get; set; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperation.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperation.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperation.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperation.json.cs index 345fe34e1185..9706a0381872 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperation.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,7 +65,7 @@ internal EnvironmentOperation(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.R { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} {_operationId = If( json?.PropertyT("operationId"), out var __jsonOperationId) ? (string)__jsonOperationId : (string)OperationId;} {_kind = If( json?.PropertyT("kind"), out var __jsonKind) ? (string)__jsonKind : (string)Kind;} @@ -73,20 +73,20 @@ internal EnvironmentOperation(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.R {_createdByObjectId = If( json?.PropertyT("createdByObjectId"), out var __jsonCreatedByObjectId) ? (string)__jsonCreatedByObjectId : (string)CreatedByObjectId;} {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} - {_environmentParameter = If( json?.PropertyT("environmentParameters"), out var __jsonEnvironmentParameters) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperationEnvironmentParameters.FromJson(__jsonEnvironmentParameters) : EnvironmentParameter;} + {_environmentParameter = If( json?.PropertyT("environmentParameters"), out var __jsonEnvironmentParameters) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperationEnvironmentParameters.FromJson(__jsonEnvironmentParameters) : EnvironmentParameter;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation. - /// Note: the Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation interface is + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation interface is /// polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json)) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperationEnvironmentParameters.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperationEnvironmentParameters.PowerShell.cs similarity index 93% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperationEnvironmentParameters.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperationEnvironmentParameters.PowerShell.cs index 42d3b41d4fd0..c1b01556ac0e 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperationEnvironmentParameters.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperationEnvironmentParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EnvironmentOperationEnvironmentParameters partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentOperationEnvironmentParameters(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentOperationEnvironmentParameters(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -102,7 +102,7 @@ internal EnvironmentOperationEnvironmentParameters(global::System.Collections.ID } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -128,7 +128,7 @@ internal EnvironmentOperationEnvironmentParameters(global::System.Management.Aut /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperationEnvironmentParameters.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperationEnvironmentParameters.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperationEnvironmentParameters.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperationEnvironmentParameters.TypeConverter.cs index 0c6b82563bd3..be12b75fab81 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperationEnvironmentParameters.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperationEnvironmentParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperationEnvironmentParameters.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperationEnvironmentParameters.cs similarity index 91% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperationEnvironmentParameters.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperationEnvironmentParameters.cs index 2247e33f8ce3..680a19423db1 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperationEnvironmentParameters.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperationEnvironmentParameters.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Parameters object for the environment at the time of the operation. public partial class EnvironmentOperationEnvironmentParameters : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParametersInternal { /// diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperationEnvironmentParameters.dictionary.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperationEnvironmentParameters.dictionary.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperationEnvironmentParameters.dictionary.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperationEnvironmentParameters.dictionary.cs index 15c52ba3e64a..9461af8ccf85 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperationEnvironmentParameters.dictionary.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperationEnvironmentParameters.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperationEnvironmentParameters source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperationEnvironmentParameters source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperationEnvironmentParameters.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperationEnvironmentParameters.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperationEnvironmentParameters.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperationEnvironmentParameters.json.cs index 017f7a1b9b47..c4b793ea62f7 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOperationEnvironmentParameters.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOperationEnvironmentParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -71,13 +71,13 @@ internal EnvironmentOperationEnvironmentParameters(Microsoft.Azure.PowerShell.Cm } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperationEnvironmentParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperationEnvironmentParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentOperationEnvironmentParameters(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutput.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutput.PowerShell.cs similarity index 87% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutput.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutput.PowerShell.cs index 58cfb3fc1131..beefa9ea5da6 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutput.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutput.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EnvironmentOutput partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutput DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutput DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentOutput(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentOutput(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,21 +98,21 @@ internal EnvironmentOutput(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOutputType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOutputType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOutputType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOutputType.CreateFrom); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputInternal)this).Value, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputInternal)this).Value, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.AnyTypeConverter.ConvertFrom); } if (content.Contains("Sensitive")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputInternal)this).Sensitive = (bool?) content.GetValueForProperty("Sensitive",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputInternal)this).Sensitive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputInternal)this).Sensitive = (bool?) content.GetValueForProperty("Sensitive",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputInternal)this).Sensitive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } 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. @@ -127,15 +127,15 @@ internal EnvironmentOutput(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOutputType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOutputType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOutputType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentOutputType.CreateFrom); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputInternal)this).Value, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IAny) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputInternal)this).Value, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.AnyTypeConverter.ConvertFrom); } if (content.Contains("Sensitive")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputInternal)this).Sensitive = (bool?) content.GetValueForProperty("Sensitive",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputInternal)this).Sensitive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputInternal)this).Sensitive = (bool?) content.GetValueForProperty("Sensitive",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputInternal)this).Sensitive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } @@ -145,7 +145,7 @@ internal EnvironmentOutput(global::System.Management.Automation.PSObject content /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutput.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutput.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutput.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutput.TypeConverter.cs index 45239b922d57..09746ec5bed9 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutput.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutput.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutput ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutput ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutput).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutput).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutput.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutput.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutput.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutput.cs index d777d5a65557..4a44ea1fd999 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutput.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutput.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Output from environment deployment. public partial class EnvironmentOutput : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutput, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutput, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutput.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutput.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutput.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutput.json.cs index 49c848a3cccb..fd0e12daf30f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutput.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutput.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -72,13 +72,13 @@ internal EnvironmentOutput(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runt } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutput. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutput. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutput. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutput. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutput FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutput FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentOutput(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs.PowerShell.cs similarity index 92% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs.PowerShell.cs index 855cff7813df..0a03790c4ca3 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EnvironmentOutputs partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentOutputs(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentOutputs(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -102,7 +102,7 @@ internal EnvironmentOutputs(global::System.Collections.IDictionary content) } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -125,7 +125,7 @@ internal EnvironmentOutputs(global::System.Management.Automation.PSObject conten /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs.TypeConverter.cs index c21301fd92a8..312d0b6bdfd8 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs.cs similarity index 88% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs.cs index db371a917ec1..dc82463af667 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// The outputs Names and Values. public partial class EnvironmentOutputs : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputsInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputsInternal { /// Creates an new instance. @@ -22,7 +22,7 @@ public EnvironmentOutputs() /// The outputs Names and Values. public partial interface IEnvironmentOutputs : Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray { } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs.dictionary.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs.dictionary.cs similarity index 81% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs.dictionary.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs.dictionary.cs index 529c72fa5c63..8de9ca966930 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs.dictionary.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs.dictionary.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; public partial class EnvironmentOutputs : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - int Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + int Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutput this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutput this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } /// /// - public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutput value) => __additionalProperties.Add( key, value); + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutput value) => __additionalProperties.Add( key, value); public void Clear() => __additionalProperties.Clear(); @@ -40,7 +40,7 @@ public void CopyFrom(global::System.Collections.IDictionary source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -55,7 +55,7 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -66,10 +66,10 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// /// - public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutput value) => __additionalProperties.TryGetValue( key, out value); + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutput value) => __additionalProperties.TryGetValue( key, out value); /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOutputs source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOutputs source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs.json.cs index 85971706f6b3..7491382eb7dc 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -66,18 +66,18 @@ internal EnvironmentOutputs(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Run { return; } - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOutput.FromJson(j) ,exclusions ); + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOutput.FromJson(j) ,exclusions ); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentOutputs(json) : null; } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode To { return container; } - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray)this).AdditionalProperties, container); + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray)this).AdditionalProperties, container); AfterToJson(ref container); return container; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs1.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs1.PowerShell.cs similarity index 87% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs1.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs1.PowerShell.cs index 00e4b7013a00..0ade341a2671 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs1.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs1.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EnvironmentOutputs1 partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1 DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1 DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentOutputs1(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1 DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1 DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentOutputs1(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,13 +98,13 @@ internal EnvironmentOutputs1(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Output")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1Internal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1Internal)this).Output, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOutputsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1Internal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1Internal)this).Output, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOutputsTypeConverter.ConvertFrom); } 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. @@ -119,7 +119,7 @@ internal EnvironmentOutputs1(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Output")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1Internal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1Internal)this).Output, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOutputsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1Internal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1Internal)this).Output, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOutputsTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -129,7 +129,7 @@ internal EnvironmentOutputs1(global::System.Management.Automation.PSObject conte /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1 FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1 FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs1.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs1.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs1.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs1.TypeConverter.cs index f564037da263..e818ffc65f7b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs1.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs1.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1 ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1 ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs1.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs1.cs similarity index 82% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs1.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs1.cs index e5b45b0e5afb..ce92df175b9c 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs1.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs1.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Outputs from environment deployment. public partial class EnvironmentOutputs1 : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1Internal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1Internal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs _output; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs _output; /// The outputs Names and Values. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs Output { get => (this._output = this._output ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOutputs()); set => this._output = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs Output { get => (this._output = this._output ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOutputs()); set => this._output = value; } /// Creates an new instance. public EnvironmentOutputs1() @@ -36,8 +36,8 @@ public partial interface IEnvironmentOutputs1 : ReadOnly = false, Description = @"The outputs Names and Values.", SerializedName = @"outputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs Output { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs Output { get; set; } } /// Outputs from environment deployment. @@ -45,7 +45,7 @@ internal partial interface IEnvironmentOutputs1Internal { /// The outputs Names and Values. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs Output { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs Output { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs1.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs1.json.cs similarity index 96% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs1.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs1.json.cs index 6229edcabbd6..a902a142da6e 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentOutputs1.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentOutputs1.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -65,18 +65,18 @@ internal EnvironmentOutputs1(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Ru { return; } - {_output = If( json?.PropertyT("outputs"), out var __jsonOutputs) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOutputs.FromJson(__jsonOutputs) : Output;} + {_output = If( json?.PropertyT("outputs"), out var __jsonOutputs) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOutputs.FromJson(__jsonOutputs) : Output;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1 FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1 FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentOutputs1(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentParameters.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentParameters.PowerShell.cs similarity index 92% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentParameters.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentParameters.PowerShell.cs index a1dddf40e92c..6ca706cba40b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentParameters.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EnvironmentParameters partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentParameters(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentParameters(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -102,7 +102,7 @@ internal EnvironmentParameters(global::System.Collections.IDictionary content) } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -125,7 +125,7 @@ internal EnvironmentParameters(global::System.Management.Automation.PSObject con /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentParameters.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentParameters.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentParameters.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentParameters.TypeConverter.cs index 7f43eb0d929b..a5e8bc9b6ca1 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentParameters.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentParameters.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentParameters.cs similarity index 91% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentParameters.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentParameters.cs index d53b4278ac51..dfbc5293a86f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentParameters.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentParameters.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Parameters object for the environment. public partial class EnvironmentParameters : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParametersInternal { /// Creates an new instance. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentParameters.dictionary.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentParameters.dictionary.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentParameters.dictionary.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentParameters.dictionary.cs index 828407109f23..f3b53373e801 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentParameters.dictionary.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentParameters.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentParameters source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentParameters source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentParameters.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentParameters.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentParameters.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentParameters.json.cs index 8e3c3e2669aa..581c8733a489 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentParameters.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -71,13 +71,13 @@ internal EnvironmentParameters(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata. } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentParameters(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentPatchProperties.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentPatchProperties.PowerShell.cs new file mode 100644 index 000000000000..9e2798b327e0 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentPatchProperties.PowerShell.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// Properties of an environment. These properties can be updated via PATCH after the resource has been created. + /// + [System.ComponentModel.TypeConverter(typeof(EnvironmentPatchPropertiesTypeConverter))] + public partial class EnvironmentPatchProperties + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EnvironmentPatchProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EnvironmentPatchProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EnvironmentPatchProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchPropertiesInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchPropertiesInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EnvironmentPatchProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ExpirationDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchPropertiesInternal)this).ExpirationDate = (global::System.DateTime?) content.GetValueForProperty("ExpirationDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchPropertiesInternal)this).ExpirationDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Properties of an environment. These properties can be updated via PATCH after the resource has been created. + [System.ComponentModel.TypeConverter(typeof(EnvironmentPatchPropertiesTypeConverter))] + public partial interface IEnvironmentPatchProperties + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentPatchProperties.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentPatchProperties.TypeConverter.cs new file mode 100644 index 000000000000..754143ef59fc --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentPatchProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EnvironmentPatchPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EnvironmentPatchProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EnvironmentPatchProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EnvironmentPatchProperties.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentPatchProperties.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentPatchProperties.cs new file mode 100644 index 000000000000..969426c95461 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentPatchProperties.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// + /// Properties of an environment. These properties can be updated via PATCH after the resource has been created. + /// + public partial class EnvironmentPatchProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchPropertiesInternal + { + + /// Backing field for property. + private global::System.DateTime? _expirationDate; + + /// + /// The time the expiration date will be triggered (UTC), after which the + /// environment and associated resources will be deleted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public global::System.DateTime? ExpirationDate { get => this._expirationDate; set => this._expirationDate = value; } + + /// Creates an new instance. + public EnvironmentPatchProperties() + { + + } + } + /// Properties of an environment. These properties can be updated via PATCH after the resource has been created. + public partial interface IEnvironmentPatchProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// + /// The time the expiration date will be triggered (UTC), after which the + /// environment and associated resources will be deleted. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time the expiration date will be triggered (UTC), after which the + environment and associated resources will be deleted.", + SerializedName = @"expirationDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExpirationDate { get; set; } + + } + /// Properties of an environment. These properties can be updated via PATCH after the resource has been created. + internal partial interface IEnvironmentPatchPropertiesInternal + + { + /// + /// The time the expiration date will be triggered (UTC), after which the + /// environment and associated resources will be deleted. + /// + global::System.DateTime? ExpirationDate { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentPatchProperties.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentPatchProperties.json.cs new file mode 100644 index 000000000000..c7cdd3cdaea7 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentPatchProperties.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// + /// Properties of an environment. These properties can be updated via PATCH after the resource has been created. + /// + public partial class EnvironmentPatchProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal EnvironmentPatchProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_expirationDate = If( json?.PropertyT("expirationDate"), out var __jsonExpirationDate) ? global::System.DateTime.TryParse((string)__jsonExpirationDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExpirationDateValue) ? __jsonExpirationDateValue : ExpirationDate : ExpirationDate;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentPatchProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._expirationDate ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._expirationDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "expirationDate" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.PowerShell.cs new file mode 100644 index 000000000000..ca650cbba0bd --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Properties of an environment type. + [System.ComponentModel.TypeConverter(typeof(EnvironmentTypeTypeConverter))] + public partial class EnvironmentType + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EnvironmentType(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EnvironmentType(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EnvironmentType(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DeploymentTargetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).DeploymentTargetId, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).DisplayName, 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 EnvironmentType(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DeploymentTargetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).DeploymentTargetId = (string) content.GetValueForProperty("DeploymentTargetId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).DeploymentTargetId, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal)this).DisplayName, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Properties of an environment type. + [System.ComponentModel.TypeConverter(typeof(EnvironmentTypeTypeConverter))] + public partial interface IEnvironmentType + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.TypeConverter.cs new file mode 100644 index 000000000000..15d5136790f5 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EnvironmentTypeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EnvironmentType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EnvironmentType.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EnvironmentType.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.cs new file mode 100644 index 000000000000..1f8a53889ba7 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Properties of an environment type. + public partial class EnvironmentType : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal + { + + /// Backing field for property. + private string _deploymentTargetId; + + /// + /// Id of a subscription or management group that the environment type will be + /// mapped to. The environment's resources will be deployed into this subscription + /// or management group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string DeploymentTargetId { get => this._deploymentTargetId; set => this._deploymentTargetId = value; } + + /// Backing field for property. + private string _displayName; + + /// Display name of the environment type. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeInternal.Name { get => this._name; set { {_name = value;} } } + + /// Backing field for property. + private string _name; + + /// Name of the environment type. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus _status; + + /// Indicates whether this environment type is enabled for use in this project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus Status { get => this._status; set => this._status = value; } + + /// Backing field for property. + private string _uri; + + /// The unique URI of the environment type. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Uri { get => this._uri; set => this._uri = value; } + + /// Creates an new instance. + public EnvironmentType() + { + + } + } + /// Properties of an environment type. + public partial interface IEnvironmentType : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// + /// Id of a subscription or management group that the environment type will be + /// mapped to. The environment's resources will be deployed into this subscription + /// or management group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Id of a subscription or management group that the environment type will be + mapped to. The environment's resources will be deployed into this subscription + or management group.", + SerializedName = @"deploymentTargetId", + PossibleTypes = new [] { typeof(string) })] + string DeploymentTargetId { get; set; } + /// Display name of the environment type. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display name of the environment type.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Name of the environment type. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Name of the environment type.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// Indicates whether this environment type is enabled for use in this project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Indicates whether this environment type is enabled for use in this project.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus Status { get; set; } + /// The unique URI of the environment type. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The unique URI of the environment type.", + SerializedName = @"uri", + PossibleTypes = new [] { typeof(string) })] + string Uri { get; set; } + + } + /// Properties of an environment type. + internal partial interface IEnvironmentTypeInternal + + { + /// + /// Id of a subscription or management group that the environment type will be + /// mapped to. The environment's resources will be deployed into this subscription + /// or management group. + /// + string DeploymentTargetId { get; set; } + /// Display name of the environment type. + string DisplayName { get; set; } + /// Name of the environment type. + string Name { get; set; } + /// Indicates whether this environment type is enabled for use in this project. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeEnableStatus Status { get; set; } + /// The unique URI of the environment type. + string Uri { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.json.cs new file mode 100644 index 000000000000..2e36785ad784 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentType.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Properties of an environment type. + public partial class EnvironmentType + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal EnvironmentType(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_deploymentTargetId = If( json?.PropertyT("deploymentTargetId"), out var __jsonDeploymentTargetId) ? (string)__jsonDeploymentTargetId : (string)DeploymentTargetId;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentType(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._uri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._uri.ToString()) : null, "uri" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + AddIf( null != (((object)this._deploymentTargetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._deploymentTargetId.ToString()) : null, "deploymentTargetId" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeAbilities.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeAbilities.PowerShell.cs similarity index 89% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeAbilities.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeAbilities.PowerShell.cs index cd2d08e9b9f4..d622701f05b8 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeAbilities.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeAbilities.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,35 +55,35 @@ public partial class EnvironmentTypeAbilities partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EnvironmentTypeAbilities(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EnvironmentTypeAbilities(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -98,17 +98,17 @@ internal EnvironmentTypeAbilities(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("AbilitiesAsAdmin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsAdmin = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsAdmin[]) content.GetValueForProperty("AbilitiesAsAdmin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsAdmin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsAdmin.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsAdmin = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsAdmin[]) content.GetValueForProperty("AbilitiesAsAdmin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsAdmin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsAdmin.CreateFrom)); } if (content.Contains("AbilitiesAsDeveloper")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsDeveloper = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsDeveloper[]) content.GetValueForProperty("AbilitiesAsDeveloper",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsDeveloper, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsDeveloper.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsDeveloper = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsDeveloper[]) content.GetValueForProperty("AbilitiesAsDeveloper",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsDeveloper, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsDeveloper.CreateFrom)); } 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. @@ -123,11 +123,11 @@ internal EnvironmentTypeAbilities(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("AbilitiesAsAdmin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsAdmin = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsAdmin[]) content.GetValueForProperty("AbilitiesAsAdmin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsAdmin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsAdmin.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsAdmin = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsAdmin[]) content.GetValueForProperty("AbilitiesAsAdmin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsAdmin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsAdmin.CreateFrom)); } if (content.Contains("AbilitiesAsDeveloper")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsDeveloper = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsDeveloper[]) content.GetValueForProperty("AbilitiesAsDeveloper",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsDeveloper, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsDeveloper.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsDeveloper = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsDeveloper[]) content.GetValueForProperty("AbilitiesAsDeveloper",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilitiesInternal)this).AbilitiesAsDeveloper, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.EnvironmentTypeAbilityAsDeveloper.CreateFrom)); } AfterDeserializePSObject(content); } @@ -137,7 +137,7 @@ internal EnvironmentTypeAbilities(global::System.Management.Automation.PSObject /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeAbilities.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeAbilities.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeAbilities.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeAbilities.TypeConverter.cs index 23dd416bb1b2..43d5096be342 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeAbilities.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeAbilities.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeAbilities.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeAbilities.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeAbilities.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeAbilities.cs index c5333a72d4b7..b73ff277c338 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeAbilities.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeAbilities.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Abilities a user has on an environment type. public partial class EnvironmentTypeAbilities : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilitiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilitiesInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeAbilities.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeAbilities.json.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeAbilities.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeAbilities.json.cs index 1f59252eb50f..4f0c2f53560a 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/EnvironmentTypeAbilities.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/EnvironmentTypeAbilities.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -71,13 +71,13 @@ internal EnvironmentTypeAbilities(Microsoft.Azure.PowerShell.Cmdlets.DevCenterda } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new EnvironmentTypeAbilities(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/HardwareProfile.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/HardwareProfile.PowerShell.cs similarity index 87% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/HardwareProfile.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/HardwareProfile.PowerShell.cs index ce539ca2ada8..dc76cd3060a0 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/HardwareProfile.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/HardwareProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class HardwareProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new HardwareProfile(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new HardwareProfile(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -105,21 +105,21 @@ internal HardwareProfile(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("SkuName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName.CreateFrom); } if (content.Contains("VCpUs")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)this).VCpUs = (int?) content.GetValueForProperty("VCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)this).VCpUs, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)this).VCpUs = (int?) content.GetValueForProperty("VCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)this).VCpUs, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("MemoryGb")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)this).MemoryGb = (int?) content.GetValueForProperty("MemoryGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)this).MemoryGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)this).MemoryGb = (int?) content.GetValueForProperty("MemoryGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)this).MemoryGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -134,15 +134,15 @@ internal HardwareProfile(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("SkuName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName.CreateFrom); } if (content.Contains("VCpUs")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)this).VCpUs = (int?) content.GetValueForProperty("VCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)this).VCpUs, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)this).VCpUs = (int?) content.GetValueForProperty("VCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)this).VCpUs, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("MemoryGb")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)this).MemoryGb = (int?) content.GetValueForProperty("MemoryGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal)this).MemoryGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)this).MemoryGb = (int?) content.GetValueForProperty("MemoryGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)this).MemoryGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/HardwareProfile.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/HardwareProfile.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/HardwareProfile.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/HardwareProfile.TypeConverter.cs index ed588e598a31..02c2c7299990 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/HardwareProfile.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/HardwareProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/HardwareProfile.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/HardwareProfile.cs similarity index 93% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/HardwareProfile.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/HardwareProfile.cs index 4c7071111082..0ee4ce1006d9 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/HardwareProfile.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/HardwareProfile.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Hardware specifications for the Dev Box. public partial class HardwareProfile : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal { /// Backing field for property. @@ -21,13 +21,13 @@ public partial class HardwareProfile : public int? MemoryGb { get => this._memoryGb; } /// Internal Acessors for MemoryGb - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal.MemoryGb { get => this._memoryGb; set { {_memoryGb = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal.MemoryGb { get => this._memoryGb; set { {_memoryGb = value;} } } /// Internal Acessors for SkuName - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal.SkuName { get => this._skuName; set { {_skuName = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal.SkuName { get => this._skuName; set { {_skuName = value;} } } /// Internal Acessors for VCpUs - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfileInternal.VCpUs { get => this._vCpUs; set { {_vCpUs = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal.VCpUs { get => this._vCpUs; set { {_vCpUs = value;} } } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? _skuName; diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/HardwareProfile.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/HardwareProfile.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/HardwareProfile.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/HardwareProfile.json.cs index 1dcdd2800804..a25f8c3e996d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/HardwareProfile.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/HardwareProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class HardwareProfile partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IHardwareProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new HardwareProfile(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.PowerShell.cs new file mode 100644 index 000000000000..bde9a8e7ec10 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Specifies information about the image used. + [System.ComponentModel.TypeConverter(typeof(ImageReferenceTypeConverter))] + public partial class ImageReference + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ImageReference(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ImageReference(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ImageReference(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("OperatingSystem")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).OperatingSystem = (string) content.GetValueForProperty("OperatingSystem",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).OperatingSystem, global::System.Convert.ToString); + } + if (content.Contains("OSBuildNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).OSBuildNumber = (string) content.GetValueForProperty("OSBuildNumber",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).OSBuildNumber, global::System.Convert.ToString); + } + if (content.Contains("PublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ImageReference(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("OperatingSystem")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).OperatingSystem = (string) content.GetValueForProperty("OperatingSystem",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).OperatingSystem, global::System.Convert.ToString); + } + if (content.Contains("OSBuildNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).OSBuildNumber = (string) content.GetValueForProperty("OSBuildNumber",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).OSBuildNumber, global::System.Convert.ToString); + } + if (content.Contains("PublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).PublishedDate = (global::System.DateTime?) content.GetValueForProperty("PublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)this).PublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Specifies information about the image used. + [System.ComponentModel.TypeConverter(typeof(ImageReferenceTypeConverter))] + public partial interface IImageReference + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.TypeConverter.cs new file mode 100644 index 000000000000..80cc304a1703 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ImageReferenceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ImageReference.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ImageReference.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ImageReference.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.cs new file mode 100644 index 000000000000..cb5f93f804d5 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Specifies information about the image used. + public partial class ImageReference : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal + { + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for OSBuildNumber + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal.OSBuildNumber { get => this._oSBuildNumber; set { {_oSBuildNumber = value;} } } + + /// Internal Acessors for OperatingSystem + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal.OperatingSystem { get => this._operatingSystem; set { {_operatingSystem = value;} } } + + /// Internal Acessors for PublishedDate + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal.PublishedDate { get => this._publishedDate; set { {_publishedDate = value;} } } + + /// Internal Acessors for Version + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal.Version { get => this._version; set { {_version = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the image used. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private string _oSBuildNumber; + + /// The operating system build number of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string OSBuildNumber { get => this._oSBuildNumber; } + + /// Backing field for property. + private string _operatingSystem; + + /// The operating system of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string OperatingSystem { get => this._operatingSystem; } + + /// Backing field for property. + private global::System.DateTime? _publishedDate; + + /// The datetime that the backing image version was published, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public global::System.DateTime? PublishedDate { get => this._publishedDate; } + + /// Backing field for property. + private string _version; + + /// The version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Version { get => this._version; } + + /// Creates an new instance. + public ImageReference() + { + + } + } + /// Specifies information about the image used. + public partial interface IImageReference : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// The name of the image used. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the image used.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The operating system build number of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The operating system build number of the image.", + SerializedName = @"osBuildNumber", + PossibleTypes = new [] { typeof(string) })] + string OSBuildNumber { get; } + /// The operating system of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The operating system of the image.", + SerializedName = @"operatingSystem", + PossibleTypes = new [] { typeof(string) })] + string OperatingSystem { get; } + /// The datetime that the backing image version was published, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The datetime that the backing image version was published, in RFC3339 format.", + SerializedName = @"publishedDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? PublishedDate { get; } + /// The version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The version of the image.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; } + + } + /// Specifies information about the image used. + internal partial interface IImageReferenceInternal + + { + /// The name of the image used. + string Name { get; set; } + /// The operating system build number of the image. + string OSBuildNumber { get; set; } + /// The operating system of the image. + string OperatingSystem { get; set; } + /// The datetime that the backing image version was published, in RFC3339 format. + global::System.DateTime? PublishedDate { get; set; } + /// The version of the image. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.json.cs new file mode 100644 index 000000000000..b19661f34b90 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ImageReference.json.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Specifies information about the image used. + public partial class ImageReference + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new ImageReference(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal ImageReference(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version;} + {_operatingSystem = If( json?.PropertyT("operatingSystem"), out var __jsonOperatingSystem) ? (string)__jsonOperatingSystem : (string)OperatingSystem;} + {_oSBuildNumber = If( json?.PropertyT("osBuildNumber"), out var __jsonOSBuildNumber) ? (string)__jsonOSBuildNumber : (string)OSBuildNumber;} + {_publishedDate = If( json?.PropertyT("publishedDate"), out var __jsonPublishedDate) ? global::System.DateTime.TryParse((string)__jsonPublishedDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonPublishedDateValue) ? __jsonPublishedDateValue : PublishedDate : PublishedDate;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._operatingSystem)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._operatingSystem.ToString()) : null, "operatingSystem" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._oSBuildNumber)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._oSBuildNumber.ToString()) : null, "osBuildNumber" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._publishedDate ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._publishedDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "publishedDate" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OSDisk.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OSDisk.PowerShell.cs similarity index 89% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OSDisk.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OSDisk.PowerShell.cs index 4b93e9409990..6627ecfaf245 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OSDisk.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OSDisk.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class OSDisk partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OSDisk(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OSDisk(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -103,13 +103,13 @@ internal OSDisk(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("DiskSizeGb")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDiskInternal)this).DiskSizeGb = (int?) content.GetValueForProperty("DiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDiskInternal)this).DiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDiskInternal)this).DiskSizeGb = (int?) content.GetValueForProperty("DiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDiskInternal)this).DiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -124,7 +124,7 @@ internal OSDisk(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("DiskSizeGb")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDiskInternal)this).DiskSizeGb = (int?) content.GetValueForProperty("DiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDiskInternal)this).DiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDiskInternal)this).DiskSizeGb = (int?) content.GetValueForProperty("DiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDiskInternal)this).DiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OSDisk.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OSDisk.TypeConverter.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OSDisk.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OSDisk.TypeConverter.cs index 83208c32a4bd..099f665f42d0 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OSDisk.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OSDisk.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OSDisk.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OSDisk.cs similarity index 93% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OSDisk.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OSDisk.cs index 985bcfab0b57..b9a2d2a0743d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OSDisk.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OSDisk.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Settings for the operating system disk. public partial class OSDisk : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDiskInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDiskInternal { /// Backing field for property. @@ -21,7 +21,7 @@ public partial class OSDisk : public int? DiskSizeGb { get => this._diskSizeGb; } /// Internal Acessors for DiskSizeGb - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDiskInternal.DiskSizeGb { get => this._diskSizeGb; set { {_diskSizeGb = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDiskInternal.DiskSizeGb { get => this._diskSizeGb; set { {_diskSizeGb = value;} } } /// Creates an new instance. public OSDisk() diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OSDisk.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OSDisk.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OSDisk.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OSDisk.json.cs index 459bd2d24076..603032129957 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/OSDisk.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OSDisk.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class OSDisk partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new OSDisk(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.PowerShell.cs new file mode 100644 index 000000000000..9491643ed71d --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.PowerShell.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// The current status of an async operation. + [System.ComponentModel.TypeConverter(typeof(OperationStatusTypeConverter))] + public partial class OperationStatus + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationStatus(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationStatus(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationStatus(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + } + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PercentComplete")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).PercentComplete = (double?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).PercentComplete, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatusPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("OperationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).OperationLocation, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationStatus(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState.CreateFrom); + } + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).StartTime = (global::System.DateTime?) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).StartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).EndTime = (global::System.DateTime?) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).EndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PercentComplete")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).PercentComplete = (double?) content.GetValueForProperty("PercentComplete",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).PercentComplete, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatusPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("OperationLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).OperationLocation = (string) content.GetValueForProperty("OperationLocation",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).OperationLocation, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsErrorTypeConverter.ConvertFrom)); + } + if (content.Contains("Innererror")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Innererror = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) content.GetValueForProperty("Innererror",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).Innererror, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsInnerErrorTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The current status of an async operation. + [System.ComponentModel.TypeConverter(typeof(OperationStatusTypeConverter))] + public partial interface IOperationStatus + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.TypeConverter.cs new file mode 100644 index 000000000000..6862636d13a9 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationStatusTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationStatus.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationStatus.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationStatus.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.cs new file mode 100644 index 000000000000..9b6b461c1b78 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.cs @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// The current status of an async operation. + public partial class OperationStatus : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializable + { + + /// One of a server-defined set of error codes. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Code = value ?? null; } + + /// An array of details about specific errors that led to this reported error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Detail = value ?? null /* arrayOf */; } + + /// Backing field for property. + private global::System.DateTime? _endTime; + + /// The end time of the operation, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public global::System.DateTime? EndTime { get => this._endTime; set => this._endTime = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError _error; + + /// Operation Error message. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); set => this._error = value; } + + /// Backing field for property. + private string _id; + + /// Fully qualified ID for the operation status. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// + /// An object containing more specific information than the current object about the error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Innererror = value ?? null /* model class */; } + + /// A human-readable representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Message = value ?? null; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError()); set { {_error = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal.Name { get => this._name; set { {_name = value;} } } + + /// Backing field for property. + private string _name; + + /// The operation id name. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private string _operationLocation; + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string OperationLocation { get => this._operationLocation; set => this._operationLocation = value; } + + /// Backing field for property. + private double? _percentComplete; + + /// Percent of the operation that is complete. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public double? PercentComplete { get => this._percentComplete; set => this._percentComplete = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusProperties _property; + + /// Custom operation properties, populated only for a successful operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatusProperties()); set => this._property = value; } + + /// Backing field for property. + private string _resourceId; + + /// The id of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string ResourceId { get => this._resourceId; set => this._resourceId = value; } + + /// Backing field for property. + private global::System.DateTime? _startTime; + + /// The start time of the operation, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public global::System.DateTime? StartTime { get => this._startTime; set => this._startTime = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState _status; + + /// Provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get => this._status; set => this._status = value; } + + /// The target of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorInternal)Error).Target = value ?? null; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Operation-Location", out var __operationLocationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusInternal)this).OperationLocation = System.Linq.Enumerable.FirstOrDefault(__operationLocationHeader0) is string __headerOperationLocationHeader0 ? __headerOperationLocationHeader0 : (string)null; + } + } + + /// Creates an new instance. + public OperationStatus() + { + + } + } + /// The current status of an async operation. + public partial interface IOperationStatus : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// One of a server-defined set of error codes. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"One of a server-defined set of error codes.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// An array of details about specific errors that led to this reported error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An array of details about specific errors that led to this reported error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } + /// The end time of the operation, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The end time of the operation, in RFC3339 format.", + SerializedName = @"endTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? EndTime { get; set; } + /// Fully qualified ID for the operation status. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Fully qualified ID for the operation status.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// + /// An object containing more specific information than the current object about the error. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An object containing more specific information than the current object about the error.", + SerializedName = @"innererror", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + /// A human-readable representation of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A human-readable representation of the error.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// The operation id name. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The operation id name.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Operation-Location", + PossibleTypes = new [] { typeof(string) })] + string OperationLocation { get; set; } + /// Percent of the operation that is complete. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Percent of the operation that is complete.", + SerializedName = @"percentComplete", + PossibleTypes = new [] { typeof(double) })] + double? PercentComplete { get; set; } + /// Custom operation properties, populated only for a successful operation. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Custom operation properties, populated only for a successful operation.", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusProperties Property { get; set; } + /// The id of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The id of the resource.", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + string ResourceId { get; set; } + /// The start time of the operation, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start time of the operation, in RFC3339 format.", + SerializedName = @"startTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartTime { get; set; } + /// Provisioning state of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Provisioning state of the resource.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get; set; } + /// The target of the error. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The target of the error.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; set; } + + } + /// The current status of an async operation. + internal partial interface IOperationStatusInternal + + { + /// One of a server-defined set of error codes. + string Code { get; set; } + /// An array of details about specific errors that led to this reported error. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError[] Detail { get; set; } + /// The end time of the operation, in RFC3339 format. + global::System.DateTime? EndTime { get; set; } + /// Operation Error message. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsError Error { get; set; } + /// Fully qualified ID for the operation status. + string Id { get; set; } + /// + /// An object containing more specific information than the current object about the error. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsInnerError Innererror { get; set; } + /// A human-readable representation of the error. + string Message { get; set; } + /// The operation id name. + string Name { get; set; } + + string OperationLocation { get; set; } + /// Percent of the operation that is complete. + double? PercentComplete { get; set; } + /// Custom operation properties, populated only for a successful operation. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusProperties Property { get; set; } + /// The id of the resource. + string ResourceId { get; set; } + /// The start time of the operation, in RFC3339 format. + global::System.DateTime? StartTime { get; set; } + /// Provisioning state of the resource. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OperationState Status { get; set; } + /// The target of the error. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.json.cs new file mode 100644 index 000000000000..250d2956c8ce --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatus.json.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// The current status of an async operation. + public partial class OperationStatus + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new OperationStatus(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal OperationStatus(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.AzureCoreFoundationsError.FromJson(__jsonError) : Error;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)ResourceId;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? global::System.DateTime.TryParse((string)__jsonStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartTimeValue) ? __jsonStartTimeValue : StartTime : StartTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? global::System.DateTime.TryParse((string)__jsonEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndTimeValue) ? __jsonEndTimeValue : EndTime : EndTime;} + {_percentComplete = If( json?.PropertyT("percentComplete"), out var __jsonPercentComplete) ? (double?)__jsonPercentComplete : PercentComplete;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatusProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != (((object)this._resourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._resourceId.ToString()) : null, "resourceId" ,container.Add ); + AddIf( null != this._startTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._startTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startTime" ,container.Add ); + AddIf( null != this._endTime ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._endTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "endTime" ,container.Add ); + AddIf( null != this._percentComplete ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNumber((double)this._percentComplete) : null, "percentComplete" ,container.Add ); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatusProperties.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatusProperties.PowerShell.cs new file mode 100644 index 000000000000..3a1e46019a91 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatusProperties.PowerShell.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Custom operation properties, populated only for a successful operation. + [System.ComponentModel.TypeConverter(typeof(OperationStatusPropertiesTypeConverter))] + public partial class OperationStatusProperties + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationStatusProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationStatusProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationStatusProperties(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 OperationStatusProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Custom operation properties, populated only for a successful operation. + [System.ComponentModel.TypeConverter(typeof(OperationStatusPropertiesTypeConverter))] + public partial interface IOperationStatusProperties + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatusProperties.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatusProperties.TypeConverter.cs new file mode 100644 index 000000000000..114f96cc7eac --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatusProperties.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatusProperties.cs new file mode 100644 index 000000000000..9d58bb307094 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatusProperties.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Custom operation properties, populated only for a successful operation. + public partial class OperationStatusProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusProperties, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusPropertiesInternal + { + + /// Creates an new instance. + public OperationStatusProperties() + { + + } + } + /// Custom operation properties, populated only for a successful operation. + public partial interface IOperationStatusProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray + { + + } + /// Custom operation properties, populated only for a successful operation. + internal partial interface IOperationStatusPropertiesInternal + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatusProperties.dictionary.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatusProperties.dictionary.cs new file mode 100644 index 000000000000..36ad92a3c7f5 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatusProperties.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + public partial class OperationStatusProperties : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public global::System.Object this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, global::System.Object value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 global::System.Object value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OperationStatusProperties source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatusProperties.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatusProperties.json.cs new file mode 100644 index 000000000000..af829a918cf4 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/OperationStatusProperties.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Custom operation properties, populated only for a successful operation. + public partial class OperationStatusProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatusProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new OperationStatusProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + /// + internal OperationStatusProperties(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray)this).AdditionalProperties, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.DeserializeDictionary(()=>new global::System.Collections.Generic.Dictionary()),exclusions ); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedApproval.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedApproval.PowerShell.cs new file mode 100644 index 000000000000..86830e9f6482 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedApproval.PowerShell.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Paged collection of Approval items + [System.ComponentModel.TypeConverter(typeof(PagedApprovalTypeConverter))] + public partial class PagedApproval + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApproval DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PagedApproval(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApproval DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PagedApproval(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApproval FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PagedApproval(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApprovalInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApprovalInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ApprovalTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApprovalInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApprovalInternal)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 PagedApproval(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApprovalInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApprovalInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ApprovalTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApprovalInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApprovalInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Paged collection of Approval items + [System.ComponentModel.TypeConverter(typeof(PagedApprovalTypeConverter))] + public partial interface IPagedApproval + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedApproval.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedApproval.TypeConverter.cs new file mode 100644 index 000000000000..5907d18321b6 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedApproval.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PagedApprovalTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApproval ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApproval).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PagedApproval.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PagedApproval.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PagedApproval.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedApproval.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedApproval.cs new file mode 100644 index 000000000000..27547db7a136 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedApproval.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Paged collection of Approval items + public partial class PagedApproval : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApproval, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApprovalInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval[] _value; + + /// The Approval items on this page + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public PagedApproval() + { + + } + } + /// Paged collection of Approval items + public partial interface IPagedApproval : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The Approval items on this page + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Approval items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval[] Value { get; set; } + + } + /// Paged collection of Approval items + internal partial interface IPagedApprovalInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The Approval items on this page + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedApproval.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedApproval.json.cs new file mode 100644 index 000000000000..c75c566e0717 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedApproval.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Paged collection of Approval items + public partial class PagedApproval + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApproval. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApproval. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApproval FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedApproval(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal PagedApproval(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Approval.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCatalog.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCatalog.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCatalog.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCatalog.PowerShell.cs index 3a728c27b450..1b4b37fc36db 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCatalog.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCatalog.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class PagedCatalog partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalog DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalog DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PagedCatalog(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalog DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalog DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PagedCatalog(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalog FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalog FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -103,17 +103,17 @@ internal PagedCatalog(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalogInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalogInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CatalogTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalogInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalogInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CatalogTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalogInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalogInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalogInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalogInternal)this).NextLink, 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. @@ -128,11 +128,11 @@ internal PagedCatalog(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalogInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalogInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CatalogTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalogInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalogInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CatalogTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalogInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalogInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalogInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalogInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCatalog.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCatalog.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCatalog.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCatalog.TypeConverter.cs index 8483f3e2d69c..5a315b3088f5 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCatalog.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCatalog.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalog ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalog ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalog).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalog).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCatalog.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCatalog.cs similarity index 88% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCatalog.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCatalog.cs index 1ead604c230f..2748bbf0503e 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCatalog.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCatalog.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Paged collection of Catalog items public partial class PagedCatalog : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalog, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalogInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalog, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalogInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class PagedCatalog : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog[] _value; /// The Catalog items on this page [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PagedCatalog() @@ -51,8 +51,8 @@ public partial interface IPagedCatalog : ReadOnly = false, Description = @"The Catalog items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog[] Value { get; set; } } /// Paged collection of Catalog items @@ -62,7 +62,7 @@ internal partial interface IPagedCatalogInternal /// The link to the next page of items string NextLink { get; set; } /// The Catalog items on this page - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCatalog.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCatalog.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCatalog.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCatalog.json.cs index efc0a1881e2f..8d9d929a726c 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCatalog.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCatalog.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PagedCatalog partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalog. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalog. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalog. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalog. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalog FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalog FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedCatalog(json) : null; } @@ -77,7 +77,7 @@ internal PagedCatalog(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.J { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Catalog.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Catalog.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationGroup.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationGroup.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationGroup.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationGroup.PowerShell.cs index f8cd45f85399..ea671b5d643b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationGroup.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationGroup.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class PagedCustomizationGroup partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroup DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PagedCustomizationGroup(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PagedCustomizationGroup(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -105,17 +105,17 @@ internal PagedCustomizationGroup(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroupInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroupInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroupInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroupInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationGroupTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroupInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroupInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroupInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroupInternal)this).NextLink, 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. @@ -130,11 +130,11 @@ internal PagedCustomizationGroup(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroupInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroupInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationGroupTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroupInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroupInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationGroupTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroupInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroupInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroupInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroupInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationGroup.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationGroup.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationGroup.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationGroup.TypeConverter.cs index 5083329e947b..a0537a3cffbb 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationGroup.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationGroup.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroup ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroup ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroup).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroup).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationGroup.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationGroup.cs similarity index 88% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationGroup.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationGroup.cs index cba8c27cf284..2a119125700f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationGroup.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationGroup.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Paged collection of CustomizationGroup items public partial class PagedCustomizationGroup : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroup, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroupInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroup, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroupInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class PagedCustomizationGroup : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup[] _value; /// The CustomizationGroup items on this page [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PagedCustomizationGroup() @@ -51,8 +51,8 @@ public partial interface IPagedCustomizationGroup : ReadOnly = false, Description = @"The CustomizationGroup items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup[] Value { get; set; } } /// Paged collection of CustomizationGroup items @@ -62,7 +62,7 @@ internal partial interface IPagedCustomizationGroupInternal /// The link to the next page of items string NextLink { get; set; } /// The CustomizationGroup items on this page - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationGroup.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationGroup.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationGroup.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationGroup.json.cs index 1331e26b0b6d..ac58ef5bd82d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationGroup.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationGroup.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PagedCustomizationGroup partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroup. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroup. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroup. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroup. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroup FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedCustomizationGroup(json) : null; } @@ -77,7 +77,7 @@ internal PagedCustomizationGroup(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdat { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationGroup.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationGroup.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationTaskDefinition.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationTaskDefinition.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationTaskDefinition.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationTaskDefinition.PowerShell.cs index 54ff5e8dd0a2..b456a4250121 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationTaskDefinition.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationTaskDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class PagedCustomizationTaskDefinition partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PagedCustomizationTaskDefinition(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PagedCustomizationTaskDefinition(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -105,17 +105,17 @@ internal PagedCustomizationTaskDefinition(global::System.Collections.IDictionary // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinitionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinitionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskDefinitionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinitionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinitionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskDefinitionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinitionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinitionInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinitionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinitionInternal)this).NextLink, 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. @@ -130,11 +130,11 @@ internal PagedCustomizationTaskDefinition(global::System.Management.Automation.P // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinitionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinitionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskDefinitionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinitionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinitionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskDefinitionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinitionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinitionInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinitionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinitionInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationTaskDefinition.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationTaskDefinition.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationTaskDefinition.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationTaskDefinition.TypeConverter.cs index 2c492775edae..315f0af065dd 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationTaskDefinition.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationTaskDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationTaskDefinition.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationTaskDefinition.cs similarity index 87% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationTaskDefinition.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationTaskDefinition.cs index 7f2db6afb54c..4ecb7eb9cbe5 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationTaskDefinition.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationTaskDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// The Customization Task list result. public partial class PagedCustomizationTaskDefinition : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinition, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinition, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinitionInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class PagedCustomizationTaskDefinition : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition[] _value; /// The CustomizationTaskDefinition items on this page [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PagedCustomizationTaskDefinition() @@ -51,8 +51,8 @@ public partial interface IPagedCustomizationTaskDefinition : ReadOnly = false, Description = @"The CustomizationTaskDefinition items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition[] Value { get; set; } } /// The Customization Task list result. @@ -62,7 +62,7 @@ internal partial interface IPagedCustomizationTaskDefinitionInternal /// The link to the next page of items string NextLink { get; set; } /// The CustomizationTaskDefinition items on this page - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationTaskDefinition.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationTaskDefinition.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationTaskDefinition.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationTaskDefinition.json.cs index e362bfffebf4..579eff630452 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedCustomizationTaskDefinition.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedCustomizationTaskDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PagedCustomizationTaskDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedCustomizationTaskDefinition(json) : null; } @@ -77,7 +77,7 @@ internal PagedCustomizationTaskDefinition(Microsoft.Azure.PowerShell.Cmdlets.Dev { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskDefinition.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskDefinition.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBox.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBox.PowerShell.cs similarity index 83% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBox.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBox.PowerShell.cs index dec81784e234..9c08acf4ea19 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBox.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBox.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class PagedDevBox partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBox DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBox DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PagedDevBox(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBox DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBox DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PagedDevBox(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBox FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBox FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -103,17 +103,17 @@ internal PagedDevBox(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxInternal)this).NextLink, 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. @@ -128,11 +128,11 @@ internal PagedDevBox(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBox.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBox.TypeConverter.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBox.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBox.TypeConverter.cs index 6b01800b8c58..ec9787014b43 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBox.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBox.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBox ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBox ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBox).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBox).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBox.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBox.cs similarity index 89% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBox.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBox.cs index 253b8e7175a0..a9751f966254 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBox.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBox.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Paged collection of DevBox items public partial class PagedDevBox : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBox, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBox, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class PagedDevBox : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox[] _value; /// The DevBox items on this page [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PagedDevBox() @@ -51,8 +51,8 @@ public partial interface IPagedDevBox : ReadOnly = false, Description = @"The DevBox items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox[] Value { get; set; } } /// Paged collection of DevBox items @@ -62,7 +62,7 @@ internal partial interface IPagedDevBoxInternal /// The link to the next page of items string NextLink { get; set; } /// The DevBox items on this page - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBox.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBox.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBox.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBox.json.cs index 5e06eaa0e1a6..6d0ef4e759bd 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBox.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBox.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PagedDevBox partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBox. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBox. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBox. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBox. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBox FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBox FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedDevBox(json) : null; } @@ -77,7 +77,7 @@ internal PagedDevBox(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Js { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBox.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBox.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxAction.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAction.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxAction.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAction.PowerShell.cs index de790344b807..b2d1e7dc2583 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxAction.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAction.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class PagedDevBoxAction partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAction DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PagedDevBoxAction(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PagedDevBoxAction(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -105,17 +105,17 @@ internal PagedDevBoxAction(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxActionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxActionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionInternal)this).NextLink, 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. @@ -130,11 +130,11 @@ internal PagedDevBoxAction(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxActionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxActionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxAction.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAction.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxAction.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAction.TypeConverter.cs index f49e792a29dc..d37f23bade6e 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxAction.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAction.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxAction ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAction ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxAction).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAction).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxAction.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAction.cs similarity index 88% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxAction.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAction.cs index ebfcae49f391..c4f63b0cd601 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxAction.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAction.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Paged collection of DevBoxAction items public partial class PagedDevBoxAction : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxAction, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAction, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class PagedDevBoxAction : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction[] _value; /// The DevBoxAction items on this page [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PagedDevBoxAction() @@ -51,8 +51,8 @@ public partial interface IPagedDevBoxAction : ReadOnly = false, Description = @"The DevBoxAction items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction[] Value { get; set; } } /// Paged collection of DevBoxAction items @@ -62,7 +62,7 @@ internal partial interface IPagedDevBoxActionInternal /// The link to the next page of items string NextLink { get; set; } /// The DevBoxAction items on this page - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxAction.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAction.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxAction.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAction.json.cs index 0794e0b4f1bd..9bbcb8dce7ce 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxAction.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAction.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PagedDevBoxAction partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxAction. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAction. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxAction. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAction. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedDevBoxAction(json) : null; } @@ -77,7 +77,7 @@ internal PagedDevBoxAction(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runt { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxAction.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAction.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxActionDelayResult.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxActionDelayResult.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxActionDelayResult.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxActionDelayResult.PowerShell.cs index 17adeb6b1474..3f58d16f82f9 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxActionDelayResult.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxActionDelayResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class PagedDevBoxActionDelayResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PagedDevBoxActionDelayResult(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PagedDevBoxActionDelayResult(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -105,17 +105,17 @@ internal PagedDevBoxActionDelayResult(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxActionDelayResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxActionDelayResultTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResultInternal)this).NextLink, 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. @@ -130,11 +130,11 @@ internal PagedDevBoxActionDelayResult(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxActionDelayResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxActionDelayResultTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxActionDelayResult.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxActionDelayResult.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxActionDelayResult.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxActionDelayResult.TypeConverter.cs index 61d0ad7e6570..aa2bfabcc0cc 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxActionDelayResult.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxActionDelayResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxActionDelayResult.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxActionDelayResult.cs similarity index 87% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxActionDelayResult.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxActionDelayResult.cs index fa991112bbb6..6be252b08ff6 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxActionDelayResult.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxActionDelayResult.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Paged collection of DevBoxActionDelayResult items public partial class PagedDevBoxActionDelayResult : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResult, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResultInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResult, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResultInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class PagedDevBoxActionDelayResult : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult[] _value; /// The DevBoxActionDelayResult items on this page [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PagedDevBoxActionDelayResult() @@ -51,8 +51,8 @@ public partial interface IPagedDevBoxActionDelayResult : ReadOnly = false, Description = @"The DevBoxActionDelayResult items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult[] Value { get; set; } } /// Paged collection of DevBoxActionDelayResult items @@ -62,7 +62,7 @@ internal partial interface IPagedDevBoxActionDelayResultInternal /// The link to the next page of items string NextLink { get; set; } /// The DevBoxActionDelayResult items on this page - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxActionDelayResult.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxActionDelayResult.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxActionDelayResult.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxActionDelayResult.json.cs index 9e34d5b83579..e47cc8c0264f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxActionDelayResult.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxActionDelayResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PagedDevBoxActionDelayResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedDevBoxActionDelayResult(json) : null; } @@ -77,7 +77,7 @@ internal PagedDevBoxActionDelayResult(Microsoft.Azure.PowerShell.Cmdlets.DevCent { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxActionDelayResult.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxActionDelayResult.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAddOn.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAddOn.PowerShell.cs new file mode 100644 index 000000000000..546656fec9ed --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAddOn.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Paged collection of DevBoxAddOn items + [System.ComponentModel.TypeConverter(typeof(PagedDevBoxAddOnTypeConverter))] + public partial class PagedDevBoxAddOn + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOn DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PagedDevBoxAddOn(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOn DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PagedDevBoxAddOn(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOn FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PagedDevBoxAddOn(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOnInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOnInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAddOnTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOnInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOnInternal)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 PagedDevBoxAddOn(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOnInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOnInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAddOnTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOnInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOnInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Paged collection of DevBoxAddOn items + [System.ComponentModel.TypeConverter(typeof(PagedDevBoxAddOnTypeConverter))] + public partial interface IPagedDevBoxAddOn + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAddOn.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAddOn.TypeConverter.cs new file mode 100644 index 000000000000..e5a7f9482905 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAddOn.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PagedDevBoxAddOnTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOn ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOn).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PagedDevBoxAddOn.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PagedDevBoxAddOn.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PagedDevBoxAddOn.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAddOn.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAddOn.cs new file mode 100644 index 000000000000..3f62ac4c4fa0 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAddOn.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Paged collection of DevBoxAddOn items + public partial class PagedDevBoxAddOn : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOn, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOnInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn[] _value; + + /// The DevBoxAddOn items on this page + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public PagedDevBoxAddOn() + { + + } + } + /// Paged collection of DevBoxAddOn items + public partial interface IPagedDevBoxAddOn : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The DevBoxAddOn items on this page + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevBoxAddOn items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn[] Value { get; set; } + + } + /// Paged collection of DevBoxAddOn items + internal partial interface IPagedDevBoxAddOnInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The DevBoxAddOn items on this page + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAddOn.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAddOn.json.cs new file mode 100644 index 000000000000..c7d33aa53155 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxAddOn.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Paged collection of DevBoxAddOn items + public partial class PagedDevBoxAddOn + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOn. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOn. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOn FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedDevBoxAddOn(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal PagedDevBoxAddOn(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAddOn.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxOperation.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxOperation.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxOperation.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxOperation.PowerShell.cs index 5e5646373c75..4432db564904 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxOperation.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxOperation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class PagedDevBoxOperation partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PagedDevBoxOperation(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PagedDevBoxOperation(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -105,17 +105,17 @@ internal PagedDevBoxOperation(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperationInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperationInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxOperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperationInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperationInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperationInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperationInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperationInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperationInternal)this).NextLink, 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. @@ -130,11 +130,11 @@ internal PagedDevBoxOperation(global::System.Management.Automation.PSObject cont // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperationInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperationInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxOperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperationInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperationInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperationInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperationInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperationInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperationInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxOperation.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxOperation.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxOperation.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxOperation.TypeConverter.cs index 90939aabf6d4..f37f62b223b3 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxOperation.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxOperation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxOperation.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxOperation.cs similarity index 88% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxOperation.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxOperation.cs index ee377dd6dae9..e0014dac4d26 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxOperation.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxOperation.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Paged collection of DevBoxOperation items public partial class PagedDevBoxOperation : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperation, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperation, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperationInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class PagedDevBoxOperation : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation[] _value; /// The DevBoxOperation items on this page [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PagedDevBoxOperation() @@ -51,8 +51,8 @@ public partial interface IPagedDevBoxOperation : ReadOnly = false, Description = @"The DevBoxOperation items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation[] Value { get; set; } } /// Paged collection of DevBoxOperation items @@ -62,7 +62,7 @@ internal partial interface IPagedDevBoxOperationInternal /// The link to the next page of items string NextLink { get; set; } /// The DevBoxOperation items on this page - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxOperation.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxOperation.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxOperation.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxOperation.json.cs index 3b69f12f702a..c7c3f05cd1fe 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedDevBoxOperation.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxOperation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PagedDevBoxOperation partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedDevBoxOperation(json) : null; } @@ -77,7 +77,7 @@ internal PagedDevBoxOperation(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.R { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBoxOperation.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxOperation.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxSnapshot.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxSnapshot.PowerShell.cs new file mode 100644 index 000000000000..47716a64ac2a --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxSnapshot.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Paged collection of DevBoxSnapshot items + [System.ComponentModel.TypeConverter(typeof(PagedDevBoxSnapshotTypeConverter))] + public partial class PagedDevBoxSnapshot + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshot DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PagedDevBoxSnapshot(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshot DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PagedDevBoxSnapshot(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshot FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PagedDevBoxSnapshot(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshotInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshotInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxSnapshotTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshotInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshotInternal)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 PagedDevBoxSnapshot(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshotInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshotInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxSnapshotTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshotInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshotInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Paged collection of DevBoxSnapshot items + [System.ComponentModel.TypeConverter(typeof(PagedDevBoxSnapshotTypeConverter))] + public partial interface IPagedDevBoxSnapshot + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxSnapshot.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxSnapshot.TypeConverter.cs new file mode 100644 index 000000000000..5a5876e1e4ec --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxSnapshot.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PagedDevBoxSnapshotTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshot ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshot).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PagedDevBoxSnapshot.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PagedDevBoxSnapshot.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PagedDevBoxSnapshot.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxSnapshot.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxSnapshot.cs new file mode 100644 index 000000000000..61cf579474f1 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxSnapshot.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Paged collection of DevBoxSnapshot items + public partial class PagedDevBoxSnapshot : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshot, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshotInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot[] _value; + + /// The DevBoxSnapshot items on this page + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public PagedDevBoxSnapshot() + { + + } + } + /// Paged collection of DevBoxSnapshot items + public partial interface IPagedDevBoxSnapshot : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The DevBoxSnapshot items on this page + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevBoxSnapshot items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot[] Value { get; set; } + + } + /// Paged collection of DevBoxSnapshot items + internal partial interface IPagedDevBoxSnapshotInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The DevBoxSnapshot items on this page + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxSnapshot.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxSnapshot.json.cs new file mode 100644 index 000000000000..7d847dd48f31 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedDevBoxSnapshot.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Paged collection of DevBoxSnapshot items + public partial class PagedDevBoxSnapshot + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshot. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshot. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshot FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedDevBoxSnapshot(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal PagedDevBoxSnapshot(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxSnapshot.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironment.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironment.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironment.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironment.PowerShell.cs index 5f936a541f8a..e46087423b10 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironment.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironment.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class PagedEnvironment partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironment DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironment DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PagedEnvironment(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironment DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironment DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PagedEnvironment(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironment FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironment FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -105,17 +105,17 @@ internal PagedEnvironment(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentInternal)this).NextLink, 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. @@ -130,11 +130,11 @@ internal PagedEnvironment(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironment.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironment.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironment.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironment.TypeConverter.cs index 33f258d42a74..9409ee992b54 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironment.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironment.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironment ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironment ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironment).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironment).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironment.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironment.cs similarity index 88% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironment.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironment.cs index 74f829836193..d007961a2f70 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironment.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironment.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Paged collection of Environment items public partial class PagedEnvironment : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironment, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironment, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class PagedEnvironment : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment[] _value; /// The Environment items on this page [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PagedEnvironment() @@ -51,8 +51,8 @@ public partial interface IPagedEnvironment : ReadOnly = false, Description = @"The Environment items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment[] Value { get; set; } } /// Paged collection of Environment items @@ -62,7 +62,7 @@ internal partial interface IPagedEnvironmentInternal /// The link to the next page of items string NextLink { get; set; } /// The Environment items on this page - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironment.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironment.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironment.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironment.json.cs index 998bfbee89ad..248cd3854bed 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironment.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironment.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PagedEnvironment partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironment. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironment. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironment. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironment. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironment FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironment FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedEnvironment(json) : null; } @@ -77,7 +77,7 @@ internal PagedEnvironment(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runti { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Environment.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Environment.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentAction.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentAction.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentAction.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentAction.PowerShell.cs index a6adc54d48bb..810c4b3fa66b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentAction.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentAction.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class PagedEnvironmentAction partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentAction DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PagedEnvironmentAction(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PagedEnvironmentAction(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -105,17 +105,17 @@ internal PagedEnvironmentAction(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentActionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentActionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentActionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentActionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentActionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentActionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentActionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentActionInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentActionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentActionInternal)this).NextLink, 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. @@ -130,11 +130,11 @@ internal PagedEnvironmentAction(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentActionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentActionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentActionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentActionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentActionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentActionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentActionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentActionInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentActionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentActionInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentAction.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentAction.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentAction.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentAction.TypeConverter.cs index b0a411c724eb..92088264614b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentAction.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentAction.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentAction ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentAction ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentAction).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentAction).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentAction.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentAction.cs similarity index 88% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentAction.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentAction.cs index 8af728e8edb2..409be6280652 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentAction.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentAction.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Paged collection of EnvironmentAction items public partial class PagedEnvironmentAction : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentAction, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentActionInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentAction, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentActionInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class PagedEnvironmentAction : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction[] _value; /// The EnvironmentAction items on this page [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PagedEnvironmentAction() @@ -51,8 +51,8 @@ public partial interface IPagedEnvironmentAction : ReadOnly = false, Description = @"The EnvironmentAction items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction[] Value { get; set; } } /// Paged collection of EnvironmentAction items @@ -62,7 +62,7 @@ internal partial interface IPagedEnvironmentActionInternal /// The link to the next page of items string NextLink { get; set; } /// The EnvironmentAction items on this page - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentAction.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentAction.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentAction.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentAction.json.cs index b988946bb99d..abb176082d28 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentAction.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentAction.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PagedEnvironmentAction partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentAction. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentAction. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentAction. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentAction. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedEnvironmentAction(json) : null; } @@ -77,7 +77,7 @@ internal PagedEnvironmentAction(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentAction.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentAction.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentDefinition.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentDefinition.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentDefinition.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentDefinition.PowerShell.cs index 3d328009f21b..c00c6b51f311 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentDefinition.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentDefinition.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class PagedEnvironmentDefinition partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PagedEnvironmentDefinition(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PagedEnvironmentDefinition(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -105,17 +105,17 @@ internal PagedEnvironmentDefinition(global::System.Collections.IDictionary conte // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinitionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinitionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentDefinitionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinitionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinitionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentDefinitionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinitionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinitionInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinitionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinitionInternal)this).NextLink, 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. @@ -130,11 +130,11 @@ internal PagedEnvironmentDefinition(global::System.Management.Automation.PSObjec // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinitionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinitionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentDefinitionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinitionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinitionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentDefinitionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinitionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinitionInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinitionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinitionInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentDefinition.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentDefinition.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentDefinition.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentDefinition.TypeConverter.cs index 1770b296bad3..68c75b7f213c 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentDefinition.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentDefinition.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentDefinition.cs similarity index 87% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentDefinition.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentDefinition.cs index 24742c324902..3016327bdf0d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentDefinition.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentDefinition.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Paged collection of EnvironmentDefinition items public partial class PagedEnvironmentDefinition : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinition, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinitionInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinition, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinitionInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class PagedEnvironmentDefinition : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition[] _value; /// The EnvironmentDefinition items on this page [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PagedEnvironmentDefinition() @@ -51,8 +51,8 @@ public partial interface IPagedEnvironmentDefinition : ReadOnly = false, Description = @"The EnvironmentDefinition items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition[] Value { get; set; } } /// Paged collection of EnvironmentDefinition items @@ -62,7 +62,7 @@ internal partial interface IPagedEnvironmentDefinitionInternal /// The link to the next page of items string NextLink { get; set; } /// The EnvironmentDefinition items on this page - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentDefinition.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentDefinition.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentDefinition.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentDefinition.json.cs index 9cda14c34ea2..7425e0c37f3e 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentDefinition.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PagedEnvironmentDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedEnvironmentDefinition(json) : null; } @@ -77,7 +77,7 @@ internal PagedEnvironmentDefinition(Microsoft.Azure.PowerShell.Cmdlets.DevCenter { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentDefinition.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentDefinition.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentOperation.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentOperation.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentOperation.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentOperation.PowerShell.cs index caee63569501..63aa8fed2411 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentOperation.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentOperation.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class PagedEnvironmentOperation partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PagedEnvironmentOperation(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PagedEnvironmentOperation(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -105,17 +105,17 @@ internal PagedEnvironmentOperation(global::System.Collections.IDictionary conten // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperationInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperationInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperationInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperationInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperationInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperationInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperationInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperationInternal)this).NextLink, 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. @@ -130,11 +130,11 @@ internal PagedEnvironmentOperation(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperationInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperationInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperationTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperationInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperationInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperationTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperationInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperationInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperationInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperationInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentOperation.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentOperation.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentOperation.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentOperation.TypeConverter.cs index 7083a8a4e937..abeb46faf18d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentOperation.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentOperation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentOperation.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentOperation.cs similarity index 87% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentOperation.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentOperation.cs index c90c414d27e6..106ea8c779bb 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentOperation.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentOperation.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Paged collection of EnvironmentOperation items public partial class PagedEnvironmentOperation : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperation, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperationInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperation, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperationInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class PagedEnvironmentOperation : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation[] _value; /// The EnvironmentOperation items on this page [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PagedEnvironmentOperation() @@ -51,8 +51,8 @@ public partial interface IPagedEnvironmentOperation : ReadOnly = false, Description = @"The EnvironmentOperation items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation[] Value { get; set; } } /// Paged collection of EnvironmentOperation items @@ -62,7 +62,7 @@ internal partial interface IPagedEnvironmentOperationInternal /// The link to the next page of items string NextLink { get; set; } /// The EnvironmentOperation items on this page - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentOperation.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentOperation.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentOperation.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentOperation.json.cs index 1e433e3e6126..628bc0457679 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentOperation.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentOperation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PagedEnvironmentOperation partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedEnvironmentOperation(json) : null; } @@ -77,7 +77,7 @@ internal PagedEnvironmentOperation(Microsoft.Azure.PowerShell.Cmdlets.DevCenterd { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentOperation.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentOperation.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentType.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentType.PowerShell.cs similarity index 85% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentType.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentType.PowerShell.cs index 3ebff4d28c3a..efb538409451 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentType.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentType.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class PagedEnvironmentType partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentType DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentType DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PagedEnvironmentType(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PagedEnvironmentType(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -105,17 +105,17 @@ internal PagedEnvironmentType(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentTypeInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentTypeInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentTypeTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentTypeInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentTypeInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentTypeTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentTypeInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentTypeInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentTypeInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentTypeInternal)this).NextLink, 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. @@ -130,11 +130,11 @@ internal PagedEnvironmentType(global::System.Management.Automation.PSObject cont // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentTypeInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentTypeInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentTypeTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentTypeInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentTypeInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentTypeTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentTypeInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentTypeInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentTypeInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentTypeInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentType.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentType.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentType.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentType.TypeConverter.cs index 90f9968927ee..92840309f250 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentType.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentType.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentType ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentType ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentType).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentType).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentType.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentType.cs similarity index 88% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentType.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentType.cs index 03d4d9e6c65f..ccd77f83b2cd 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentType.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentType.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Paged collection of EnvironmentType items public partial class PagedEnvironmentType : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentType, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentTypeInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentType, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentTypeInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class PagedEnvironmentType : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType[] _value; /// The EnvironmentType items on this page [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PagedEnvironmentType() @@ -51,8 +51,8 @@ public partial interface IPagedEnvironmentType : ReadOnly = false, Description = @"The EnvironmentType items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType[] Value { get; set; } } /// Paged collection of EnvironmentType items @@ -62,7 +62,7 @@ internal partial interface IPagedEnvironmentTypeInternal /// The link to the next page of items string NextLink { get; set; } /// The EnvironmentType items on this page - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentType.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentType.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentType.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentType.json.cs index b228f3727012..85a74409a9c6 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedEnvironmentType.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedEnvironmentType.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PagedEnvironmentType partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentType. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentType. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentType. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentType. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentType FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentType FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedEnvironmentType(json) : null; } @@ -77,7 +77,7 @@ internal PagedEnvironmentType(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.R { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentType.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentType.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedPool.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedPool.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedPool.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedPool.PowerShell.cs index 0fac5d9b4833..2f73aa8707a4 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedPool.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedPool.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class PagedPool partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPool DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPool DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PagedPool(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPool DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPool DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PagedPool(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPool FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPool FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -103,17 +103,17 @@ internal PagedPool(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPoolInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPoolInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PoolTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPoolInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPoolInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PoolTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPoolInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPoolInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPoolInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPoolInternal)this).NextLink, 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. @@ -128,11 +128,11 @@ internal PagedPool(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPoolInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPoolInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.PoolTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPoolInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPoolInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PoolTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPoolInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPoolInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPoolInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPoolInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedPool.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedPool.TypeConverter.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedPool.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedPool.TypeConverter.cs index 4cff5ebba3e0..4add65e343cc 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedPool.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedPool.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPool ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPool ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPool).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPool).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedPool.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedPool.cs similarity index 89% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedPool.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedPool.cs index 78a47d3c38dd..54e73e635a12 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedPool.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedPool.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Paged collection of Pool items public partial class PagedPool : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPool, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPoolInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPool, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPoolInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class PagedPool : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool[] _value; /// The Pool items on this page [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PagedPool() @@ -51,8 +51,8 @@ public partial interface IPagedPool : ReadOnly = false, Description = @"The Pool items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool[] Value { get; set; } } /// Paged collection of Pool items @@ -62,7 +62,7 @@ internal partial interface IPagedPoolInternal /// The link to the next page of items string NextLink { get; set; } /// The Pool items on this page - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedPool.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedPool.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedPool.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedPool.json.cs index 27735b8b3d16..efb22c72265f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedPool.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedPool.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PagedPool partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPool. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPool. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPool. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPool. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPool FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPool FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedPool(json) : null; } @@ -77,7 +77,7 @@ internal PagedPool(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Pool.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Pool.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedProject.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedProject.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedProject.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedProject.PowerShell.cs index 2f26e73685a3..818fbfa5fec7 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedProject.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedProject.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class PagedProject partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProject DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProject DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PagedProject(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProject DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProject DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PagedProject(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProject FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProject FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -103,17 +103,17 @@ internal PagedProject(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProjectInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProjectInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ProjectTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProjectInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProjectInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ProjectTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProjectInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProjectInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProjectInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProjectInternal)this).NextLink, 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. @@ -128,11 +128,11 @@ internal PagedProject(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProjectInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProjectInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ProjectTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProjectInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProjectInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ProjectTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProjectInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProjectInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProjectInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProjectInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedProject.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedProject.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedProject.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedProject.TypeConverter.cs index 45aca12022a3..a3f6688286bf 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedProject.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedProject.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProject ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProject ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProject).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProject).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedProject.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedProject.cs similarity index 88% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedProject.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedProject.cs index 67a4fb5bc680..ac788e95fcef 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedProject.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedProject.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Paged collection of Project items public partial class PagedProject : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProject, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProjectInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProject, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProjectInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class PagedProject : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject[] _value; /// The Project items on this page [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PagedProject() @@ -51,8 +51,8 @@ public partial interface IPagedProject : ReadOnly = false, Description = @"The Project items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject[] Value { get; set; } } /// Paged collection of Project items @@ -62,7 +62,7 @@ internal partial interface IPagedProjectInternal /// The link to the next page of items string NextLink { get; set; } /// The Project items on this page - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedProject.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedProject.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedProject.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedProject.json.cs index 0a1694569451..d8c6e06235da 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedProject.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedProject.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PagedProject partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProject. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProject. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProject. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProject. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProject FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProject FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedProject(json) : null; } @@ -77,7 +77,7 @@ internal PagedProject(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.J { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Project.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Project.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedSchedule.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedSchedule.PowerShell.cs similarity index 83% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedSchedule.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedSchedule.PowerShell.cs index a90d2c05b0e7..4ca1aaf7ca17 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedSchedule.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedSchedule.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class PagedSchedule partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedSchedule DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedSchedule DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PagedSchedule(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedSchedule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedSchedule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PagedSchedule(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedSchedule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedSchedule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -103,17 +103,17 @@ internal PagedSchedule(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedScheduleInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedScheduleInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ScheduleTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedScheduleInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedScheduleInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ScheduleTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedScheduleInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedScheduleInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedScheduleInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedScheduleInternal)this).NextLink, 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. @@ -128,11 +128,11 @@ internal PagedSchedule(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedScheduleInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedScheduleInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ScheduleTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedScheduleInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedScheduleInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ScheduleTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedScheduleInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedScheduleInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedScheduleInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedScheduleInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedSchedule.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedSchedule.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedSchedule.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedSchedule.TypeConverter.cs index c361fe10c7fa..0eaa2462a77e 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedSchedule.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedSchedule.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedSchedule ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedSchedule ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedSchedule).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedSchedule).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedSchedule.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedSchedule.cs similarity index 88% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedSchedule.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedSchedule.cs index 01edae2d56df..519cf30d644b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedSchedule.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedSchedule.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Paged collection of Schedule items public partial class PagedSchedule : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedSchedule, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedScheduleInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedSchedule, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedScheduleInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class PagedSchedule : public string NextLink { get => this._nextLink; set => this._nextLink = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule[] _value; /// The Schedule items on this page [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PagedSchedule() @@ -51,8 +51,8 @@ public partial interface IPagedSchedule : ReadOnly = false, Description = @"The Schedule items on this page", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule) })] - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule[] Value { get; set; } } /// Paged collection of Schedule items @@ -62,7 +62,7 @@ internal partial interface IPagedScheduleInternal /// The link to the next page of items string NextLink { get; set; } /// The Schedule items on this page - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule[] Value { get; set; } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedSchedule.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedSchedule.json.cs similarity index 95% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedSchedule.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedSchedule.json.cs index 9f0eeb4012ba..5a8e2a0bcdd6 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/PagedSchedule.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PagedSchedule.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PagedSchedule partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedSchedule. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedSchedule. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedSchedule. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedSchedule. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedSchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedSchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PagedSchedule(json) : null; } @@ -77,7 +77,7 @@ internal PagedSchedule(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime. { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Schedule.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule) (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Schedule.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Pool.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Pool.PowerShell.cs new file mode 100644 index 000000000000..bf59921ded33 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Pool.PowerShell.cs @@ -0,0 +1,400 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// A pool of Dev Boxes. + [System.ComponentModel.TypeConverter(typeof(PoolTypeConverter))] + public partial class Pool + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Pool(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Pool(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Pool(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HardwareProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile) content.GetValueForProperty("HardwareProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.HardwareProfileTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StorageProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnDisconnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnNoConnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfiguration) content.GetValueForProperty("StopOnNoConnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StopOnNoConnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveHoursConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHoursConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfiguration) content.GetValueForProperty("ActiveHoursConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHoursConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PoolActiveHoursConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType.CreateFrom); + } + if (content.Contains("HibernateSupport")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport.CreateFrom); + } + if (content.Contains("LocalAdministrator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus.CreateFrom); + } + if (content.Contains("HealthStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HealthStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus) content.GetValueForProperty("HealthStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HealthStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("HardwareProfileSkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfileSkuName = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName?) content.GetValueForProperty("HardwareProfileSkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfileSkuName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName.CreateFrom); + } + if (content.Contains("HardwareProfileMemoryGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfileMemoryGb = (int?) content.GetValueForProperty("HardwareProfileMemoryGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfileMemoryGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageProfileOSDisk")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StorageProfileOSDisk = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk) content.GetValueForProperty("StorageProfileOSDisk",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StorageProfileOSDisk, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OSDiskTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReferenceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceName = (string) content.GetValueForProperty("ImageReferenceName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceName, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceVersion = (string) content.GetValueForProperty("ImageReferenceVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceVersion, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceOperatingSystem")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceOperatingSystem = (string) content.GetValueForProperty("ImageReferenceOperatingSystem",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceOperatingSystem, global::System.Convert.ToString); + } + if (content.Contains("ImageReferencePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferencePublishedDate = (global::System.DateTime?) content.GetValueForProperty("ImageReferencePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferencePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("HardwareProfileVCpUs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfileVCpUs = (int?) content.GetValueForProperty("HardwareProfileVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfileVCpUs, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ImageReferenceOSBuildNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceOSBuildNumber = (string) content.GetValueForProperty("ImageReferenceOSBuildNumber",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceOSBuildNumber, global::System.Convert.ToString); + } + if (content.Contains("StopOnDisconnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnDisconnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnNoConnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus) content.GetValueForProperty("StopOnNoConnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnNoConnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnNoConnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationKeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus) content.GetValueForProperty("ActiveHourConfigurationKeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationAutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationAutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus) content.GetValueForProperty("ActiveHourConfigurationAutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationAutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationDefaultTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultTimeZone = (string) content.GetValueForProperty("ActiveHourConfigurationDefaultTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultTimeZone, global::System.Convert.ToString); + } + if (content.Contains("ActiveHourConfigurationDefaultStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultStartTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationDefaultEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultEndTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskSizeGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Pool(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HardwareProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile) content.GetValueForProperty("HardwareProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.HardwareProfileTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StorageProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReference = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference) content.GetValueForProperty("ImageReference",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReference, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ImageReferenceTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnDisconnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfiguration) content.GetValueForProperty("StopOnDisconnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StopOnDisconnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("StopOnNoConnect")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnect = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfiguration) content.GetValueForProperty("StopOnNoConnect",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnect, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StopOnNoConnectConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("ActiveHoursConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHoursConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfiguration) content.GetValueForProperty("ActiveHoursConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHoursConfiguration, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PoolActiveHoursConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType.CreateFrom); + } + if (content.Contains("HibernateSupport")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HibernateSupport = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport?) content.GetValueForProperty("HibernateSupport",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HibernateSupport, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport.CreateFrom); + } + if (content.Contains("LocalAdministrator")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).LocalAdministrator = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus?) content.GetValueForProperty("LocalAdministrator",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).LocalAdministrator, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus.CreateFrom); + } + if (content.Contains("HealthStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HealthStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus) content.GetValueForProperty("HealthStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HealthStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("HardwareProfileSkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfileSkuName = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName?) content.GetValueForProperty("HardwareProfileSkuName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfileSkuName, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName.CreateFrom); + } + if (content.Contains("HardwareProfileMemoryGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfileMemoryGb = (int?) content.GetValueForProperty("HardwareProfileMemoryGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfileMemoryGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageProfileOSDisk")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StorageProfileOSDisk = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk) content.GetValueForProperty("StorageProfileOSDisk",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StorageProfileOSDisk, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OSDiskTypeConverter.ConvertFrom); + } + if (content.Contains("ImageReferenceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceName = (string) content.GetValueForProperty("ImageReferenceName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceName, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceVersion = (string) content.GetValueForProperty("ImageReferenceVersion",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceVersion, global::System.Convert.ToString); + } + if (content.Contains("ImageReferenceOperatingSystem")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceOperatingSystem = (string) content.GetValueForProperty("ImageReferenceOperatingSystem",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceOperatingSystem, global::System.Convert.ToString); + } + if (content.Contains("ImageReferencePublishedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferencePublishedDate = (global::System.DateTime?) content.GetValueForProperty("ImageReferencePublishedDate",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferencePublishedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("HardwareProfileVCpUs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfileVCpUs = (int?) content.GetValueForProperty("HardwareProfileVCpUs",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).HardwareProfileVCpUs, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ImageReferenceOSBuildNumber")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceOSBuildNumber = (string) content.GetValueForProperty("ImageReferenceOSBuildNumber",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ImageReferenceOSBuildNumber, global::System.Convert.ToString); + } + if (content.Contains("StopOnDisconnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus) content.GetValueForProperty("StopOnDisconnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnDisconnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnDisconnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnDisconnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StopOnNoConnectStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus) content.GetValueForProperty("StopOnNoConnectStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus.CreateFrom); + } + if (content.Contains("StopOnNoConnectGracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectGracePeriodMinute = (int?) content.GetValueForProperty("StopOnNoConnectGracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).StopOnNoConnectGracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationKeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus) content.GetValueForProperty("ActiveHourConfigurationKeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationKeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationAutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationAutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus) content.GetValueForProperty("ActiveHourConfigurationAutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationAutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("ActiveHourConfigurationDefaultTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultTimeZone = (string) content.GetValueForProperty("ActiveHourConfigurationDefaultTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultTimeZone, global::System.Convert.ToString); + } + if (content.Contains("ActiveHourConfigurationDefaultStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultStartTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ActiveHourConfigurationDefaultEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultEndTimeHour = (int?) content.GetValueForProperty("ActiveHourConfigurationDefaultEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).ActiveHourConfigurationDefaultEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskSizeGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A pool of Dev Boxes. + [System.ComponentModel.TypeConverter(typeof(PoolTypeConverter))] + public partial interface IPool + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Pool.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Pool.TypeConverter.cs new file mode 100644 index 000000000000..fede64e300c1 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Pool.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PoolTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Pool.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Pool.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Pool.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Pool.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Pool.cs new file mode 100644 index 000000000000..23cb13152506 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Pool.cs @@ -0,0 +1,596 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// A pool of Dev Boxes. + public partial class Pool : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal + { + + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)ActiveHoursConfiguration).AutoStartEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)ActiveHoursConfiguration).AutoStartEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus)""); } + + /// The default end time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public int? ActiveHourConfigurationDefaultEndTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)ActiveHoursConfiguration).DefaultEndTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)ActiveHoursConfiguration).DefaultEndTimeHour = value ?? default(int); } + + /// The default start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public int? ActiveHourConfigurationDefaultStartTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)ActiveHoursConfiguration).DefaultStartTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)ActiveHoursConfiguration).DefaultStartTimeHour = value ?? default(int); } + + /// The default IANA timezone id of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string ActiveHourConfigurationDefaultTimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)ActiveHoursConfiguration).DefaultTimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)ActiveHoursConfiguration).DefaultTimeZone = value ?? null; } + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)ActiveHoursConfiguration).KeepAwakeEnableStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)ActiveHoursConfiguration).KeepAwakeEnableStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfiguration _activeHoursConfiguration; + + /// The default active hours configuration for Dev Boxes created in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfiguration ActiveHoursConfiguration { get => (this._activeHoursConfiguration = this._activeHoursConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PoolActiveHoursConfiguration()); set => this._activeHoursConfiguration = value; } + + /// Backing field for property. + private string _displayName; + + /// Display name of the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile _hardwareProfile; + + /// Hardware settings for the Dev Boxes created in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile HardwareProfile { get => (this._hardwareProfile = this._hardwareProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.HardwareProfile()); set => this._hardwareProfile = value; } + + /// The amount of memory available for the Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public int? HardwareProfileMemoryGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).MemoryGb; } + + /// The name of the SKU. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? HardwareProfileSkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).SkuName; } + + /// The number of vCPUs available for the Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public int? HardwareProfileVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).VCpUs; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus _healthStatus; + + /// + /// Overall health status of the Pool. Indicates whether or not the Pool is + /// available to create Dev Boxes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus HealthStatus { get => this._healthStatus; set => this._healthStatus = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? _hibernateSupport; + + /// Indicates whether hibernate is enabled/disabled or unknown. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? HibernateSupport { get => this._hibernateSupport; set => this._hibernateSupport = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference _imageReference; + + /// Image settings for Dev Boxes create in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ImageReference()); set => this._imageReference = value; } + + /// The name of the image used. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string ImageReferenceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Name; } + + /// The operating system build number of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string ImageReferenceOSBuildNumber { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).OSBuildNumber; } + + /// The operating system of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string ImageReferenceOperatingSystem { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).OperatingSystem; } + + /// The datetime that the backing image version was published, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public global::System.DateTime? ImageReferencePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).PublishedDate; } + + /// The version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public string ImageReferenceVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Version; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? _localAdministrator; + + /// + /// Indicates whether owners of Dev Boxes in this pool are local administrators on + /// the Dev Boxes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? LocalAdministrator { get => this._localAdministrator; set => this._localAdministrator = value; } + + /// Backing field for property. + private string _location; + + /// Azure region where Dev Boxes in the pool are located. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for ActiveHoursConfiguration + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.ActiveHoursConfiguration { get => (this._activeHoursConfiguration = this._activeHoursConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PoolActiveHoursConfiguration()); set { {_activeHoursConfiguration = value;} } } + + /// Internal Acessors for HardwareProfile + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.HardwareProfile { get => (this._hardwareProfile = this._hardwareProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.HardwareProfile()); set { {_hardwareProfile = value;} } } + + /// Internal Acessors for HardwareProfileMemoryGb + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.HardwareProfileMemoryGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).MemoryGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).MemoryGb = value; } + + /// Internal Acessors for HardwareProfileSkuName + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.HardwareProfileSkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).SkuName = value; } + + /// Internal Acessors for HardwareProfileVCpUs + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.HardwareProfileVCpUs { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).VCpUs; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfileInternal)HardwareProfile).VCpUs = value; } + + /// Internal Acessors for ImageReference + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.ImageReference { get => (this._imageReference = this._imageReference ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ImageReference()); set { {_imageReference = value;} } } + + /// Internal Acessors for ImageReferenceName + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.ImageReferenceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Name = value; } + + /// Internal Acessors for ImageReferenceOSBuildNumber + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.ImageReferenceOSBuildNumber { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).OSBuildNumber; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).OSBuildNumber = value; } + + /// Internal Acessors for ImageReferenceOperatingSystem + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.ImageReferenceOperatingSystem { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).OperatingSystem; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).OperatingSystem = value; } + + /// Internal Acessors for ImageReferencePublishedDate + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.ImageReferencePublishedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).PublishedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).PublishedDate = value; } + + /// Internal Acessors for ImageReferenceVersion + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.ImageReferenceVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReferenceInternal)ImageReference).Version = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for OSDiskSizeGb + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)StorageProfile).OSDiskSizeGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)StorageProfile).OSDiskSizeGb = value; } + + /// Internal Acessors for StopOnDisconnect + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.StopOnDisconnect { get => (this._stopOnDisconnect = this._stopOnDisconnect ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StopOnDisconnectConfiguration()); set { {_stopOnDisconnect = value;} } } + + /// Internal Acessors for StopOnNoConnect + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfiguration Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.StopOnNoConnect { get => (this._stopOnNoConnect = this._stopOnNoConnect ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StopOnNoConnectConfiguration()); set { {_stopOnNoConnect = value;} } } + + /// Internal Acessors for StorageProfile + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StorageProfile()); set { {_storageProfile = value;} } } + + /// Internal Acessors for StorageProfileOSDisk + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolInternal.StorageProfileOSDisk { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)StorageProfile).OSDisk; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)StorageProfile).OSDisk = value; } + + /// Backing field for property. + private string _name; + + /// Pool name. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// The size of the OS Disk in gigabytes. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public int? OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)StorageProfile).OSDiskSizeGb; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? _oSType; + + /// The operating system type of Dev Boxes in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? OSType { get => this._oSType; set => this._oSType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfiguration _stopOnDisconnect; + + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfiguration StopOnDisconnect { get => (this._stopOnDisconnect = this._stopOnDisconnect ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StopOnDisconnectConfiguration()); set => this._stopOnDisconnect = value; } + + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect + /// is detected. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public int? StopOnDisconnectGracePeriodMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).GracePeriodMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).GracePeriodMinute = value ?? default(int); } + + /// + /// Indicates whether the feature to stop the devbox on disconnect once the grace + /// period has lapsed is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)StopOnDisconnect).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfiguration _stopOnNoConnect; + + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfiguration StopOnNoConnect { get => (this._stopOnNoConnect = this._stopOnNoConnect ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StopOnNoConnectConfiguration()); set => this._stopOnNoConnect = value; } + + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. This will only be present if + /// stop on no connect is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public int? StopOnNoConnectGracePeriodMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)StopOnNoConnect).GracePeriodMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)StopOnNoConnect).GracePeriodMinute = value ?? default(int); } + + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus? StopOnNoConnectStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)StopOnNoConnect).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)StopOnNoConnect).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile _storageProfile; + + /// Storage settings for Dev Box created in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StorageProfile()); set => this._storageProfile = value; } + + /// Backing field for property. + private string _uri; + + /// The unique URI of the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Uri { get => this._uri; set => this._uri = value; } + + /// Creates an new instance. + public Pool() + { + + } + } + /// A pool of Dev Boxes. + public partial interface IPool : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be automatically started at commencement of active hours.", + SerializedName = @"autoStartEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get; set; } + /// The default end time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default end time of the active hours.", + SerializedName = @"defaultEndTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? ActiveHourConfigurationDefaultEndTimeHour { get; set; } + /// The default start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default start time of the active hours.", + SerializedName = @"defaultStartTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? ActiveHourConfigurationDefaultStartTimeHour { get; set; } + /// The default IANA timezone id of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default IANA timezone id of the active hours.", + SerializedName = @"defaultTimeZone", + PossibleTypes = new [] { typeof(string) })] + string ActiveHourConfigurationDefaultTimeZone { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be kept awake during active hours.", + SerializedName = @"keepAwakeEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get; set; } + /// Display name of the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display name of the pool.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// The amount of memory available for the Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The amount of memory available for the Dev Box.", + SerializedName = @"memoryGB", + PossibleTypes = new [] { typeof(int) })] + int? HardwareProfileMemoryGb { get; } + /// The name of the SKU. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the SKU.", + SerializedName = @"skuName", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? HardwareProfileSkuName { get; } + /// The number of vCPUs available for the Dev Box. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The number of vCPUs available for the Dev Box.", + SerializedName = @"vCPUs", + PossibleTypes = new [] { typeof(int) })] + int? HardwareProfileVCpUs { get; } + /// + /// Overall health status of the Pool. Indicates whether or not the Pool is + /// available to create Dev Boxes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Overall health status of the Pool. Indicates whether or not the Pool is + available to create Dev Boxes.", + SerializedName = @"healthStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus HealthStatus { get; set; } + /// Indicates whether hibernate is enabled/disabled or unknown. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether hibernate is enabled/disabled or unknown.", + SerializedName = @"hibernateSupport", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? HibernateSupport { get; set; } + /// The name of the image used. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the image used.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceName { get; } + /// The operating system build number of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The operating system build number of the image.", + SerializedName = @"osBuildNumber", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceOSBuildNumber { get; } + /// The operating system of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The operating system of the image.", + SerializedName = @"operatingSystem", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceOperatingSystem { get; } + /// The datetime that the backing image version was published, in RFC3339 format. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The datetime that the backing image version was published, in RFC3339 format.", + SerializedName = @"publishedDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ImageReferencePublishedDate { get; } + /// The version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The version of the image.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string ImageReferenceVersion { get; } + /// + /// Indicates whether owners of Dev Boxes in this pool are local administrators on + /// the Dev Boxes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether owners of Dev Boxes in this pool are local administrators on + the Dev Boxes.", + SerializedName = @"localAdministrator", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? LocalAdministrator { get; set; } + /// Azure region where Dev Boxes in the pool are located. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure region where Dev Boxes in the pool are located.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Pool name. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Pool name.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The size of the OS Disk in gigabytes. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The size of the OS Disk in gigabytes.", + SerializedName = @"diskSizeGB", + PossibleTypes = new [] { typeof(int) })] + int? OSDiskSizeGb { get; } + /// The operating system type of Dev Boxes in this pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The operating system type of Dev Boxes in this pool.", + SerializedName = @"osType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? OSType { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect + /// is detected. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box once disconnect + is detected.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + int? StopOnDisconnectGracePeriodMinute { get; set; } + /// + /// Indicates whether the feature to stop the devbox on disconnect once the grace + /// period has lapsed is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the feature to stop the devbox on disconnect once the grace + period has lapsed is enabled.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. This will only be present if + /// stop on no connect is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box if no connection is made. This will only be present if stop on no connect is enabled.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + int? StopOnNoConnectGracePeriodMinute { get; set; } + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus? StopOnNoConnectStatus { get; set; } + /// The unique URI of the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The unique URI of the pool.", + SerializedName = @"uri", + PossibleTypes = new [] { typeof(string) })] + string Uri { get; set; } + + } + /// A pool of Dev Boxes. + internal partial interface IPoolInternal + + { + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus? ActiveHourConfigurationAutoStartEnableStatus { get; set; } + /// The default end time of the active hours. + int? ActiveHourConfigurationDefaultEndTimeHour { get; set; } + /// The default start time of the active hours. + int? ActiveHourConfigurationDefaultStartTimeHour { get; set; } + /// The default IANA timezone id of the active hours. + string ActiveHourConfigurationDefaultTimeZone { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus? ActiveHourConfigurationKeepAwakeEnableStatus { get; set; } + /// The default active hours configuration for Dev Boxes created in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfiguration ActiveHoursConfiguration { get; set; } + /// Display name of the pool. + string DisplayName { get; set; } + /// Hardware settings for the Dev Boxes created in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IHardwareProfile HardwareProfile { get; set; } + /// The amount of memory available for the Dev Box. + int? HardwareProfileMemoryGb { get; set; } + /// The name of the SKU. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SkuName? HardwareProfileSkuName { get; set; } + /// The number of vCPUs available for the Dev Box. + int? HardwareProfileVCpUs { get; set; } + /// + /// Overall health status of the Pool. Indicates whether or not the Pool is + /// available to create Dev Boxes. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolHealthStatus HealthStatus { get; set; } + /// Indicates whether hibernate is enabled/disabled or unknown. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.HibernateSupport? HibernateSupport { get; set; } + /// Image settings for Dev Boxes create in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IImageReference ImageReference { get; set; } + /// The name of the image used. + string ImageReferenceName { get; set; } + /// The operating system build number of the image. + string ImageReferenceOSBuildNumber { get; set; } + /// The operating system of the image. + string ImageReferenceOperatingSystem { get; set; } + /// The datetime that the backing image version was published, in RFC3339 format. + global::System.DateTime? ImageReferencePublishedDate { get; set; } + /// The version of the image. + string ImageReferenceVersion { get; set; } + /// + /// Indicates whether owners of Dev Boxes in this pool are local administrators on + /// the Dev Boxes. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus? LocalAdministrator { get; set; } + /// Azure region where Dev Boxes in the pool are located. + string Location { get; set; } + /// Pool name. + string Name { get; set; } + /// The size of the OS Disk in gigabytes. + int? OSDiskSizeGb { get; set; } + /// The operating system type of Dev Boxes in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.OSType? OSType { get; set; } + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfiguration StopOnDisconnect { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect + /// is detected. + /// + int? StopOnDisconnectGracePeriodMinute { get; set; } + /// + /// Indicates whether the feature to stop the devbox on disconnect once the grace + /// period has lapsed is enabled. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus? StopOnDisconnectStatus { get; set; } + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfiguration StopOnNoConnect { get; set; } + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. This will only be present if + /// stop on no connect is enabled. + /// + int? StopOnNoConnectGracePeriodMinute { get; set; } + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus? StopOnNoConnectStatus { get; set; } + /// Storage settings for Dev Box created in this pool. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile StorageProfile { get; set; } + /// Settings for the operating system disk. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk StorageProfileOSDisk { get; set; } + /// The unique URI of the pool. + string Uri { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Pool.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Pool.json.cs new file mode 100644 index 000000000000..c6daebbf19af --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Pool.json.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// A pool of Dev Boxes. + public partial class Pool + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new Pool(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal Pool(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_hardwareProfile = If( json?.PropertyT("hardwareProfile"), out var __jsonHardwareProfile) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.HardwareProfile.FromJson(__jsonHardwareProfile) : HardwareProfile;} + {_storageProfile = If( json?.PropertyT("storageProfile"), out var __jsonStorageProfile) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StorageProfile.FromJson(__jsonStorageProfile) : StorageProfile;} + {_imageReference = If( json?.PropertyT("imageReference"), out var __jsonImageReference) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ImageReference.FromJson(__jsonImageReference) : ImageReference;} + {_stopOnDisconnect = If( json?.PropertyT("stopOnDisconnect"), out var __jsonStopOnDisconnect) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StopOnDisconnectConfiguration.FromJson(__jsonStopOnDisconnect) : StopOnDisconnect;} + {_stopOnNoConnect = If( json?.PropertyT("stopOnNoConnect"), out var __jsonStopOnNoConnect) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.StopOnNoConnectConfiguration.FromJson(__jsonStopOnNoConnect) : StopOnNoConnect;} + {_activeHoursConfiguration = If( json?.PropertyT("activeHoursConfiguration"), out var __jsonActiveHoursConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PoolActiveHoursConfiguration.FromJson(__jsonActiveHoursConfiguration) : ActiveHoursConfiguration;} + {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + {_oSType = If( json?.PropertyT("osType"), out var __jsonOSType) ? (string)__jsonOSType : (string)OSType;} + {_hibernateSupport = If( json?.PropertyT("hibernateSupport"), out var __jsonHibernateSupport) ? (string)__jsonHibernateSupport : (string)HibernateSupport;} + {_localAdministrator = If( json?.PropertyT("localAdministrator"), out var __jsonLocalAdministrator) ? (string)__jsonLocalAdministrator : (string)LocalAdministrator;} + {_healthStatus = If( json?.PropertyT("healthStatus"), out var __jsonHealthStatus) ? (string)__jsonHealthStatus : (string)HealthStatus;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._hardwareProfile ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._hardwareProfile.ToJson(null,serializationMode) : null, "hardwareProfile" ,container.Add ); + AddIf( null != this._storageProfile ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._storageProfile.ToJson(null,serializationMode) : null, "storageProfile" ,container.Add ); + AddIf( null != this._imageReference ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._imageReference.ToJson(null,serializationMode) : null, "imageReference" ,container.Add ); + AddIf( null != this._stopOnDisconnect ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._stopOnDisconnect.ToJson(null,serializationMode) : null, "stopOnDisconnect" ,container.Add ); + AddIf( null != this._stopOnNoConnect ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._stopOnNoConnect.ToJson(null,serializationMode) : null, "stopOnNoConnect" ,container.Add ); + AddIf( null != this._activeHoursConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) this._activeHoursConfiguration.ToJson(null,serializationMode) : null, "activeHoursConfiguration" ,container.Add ); + AddIf( null != (((object)this._uri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._uri.ToString()) : null, "uri" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + AddIf( null != (((object)this._oSType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._oSType.ToString()) : null, "osType" ,container.Add ); + AddIf( null != (((object)this._hibernateSupport)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._hibernateSupport.ToString()) : null, "hibernateSupport" ,container.Add ); + AddIf( null != (((object)this._localAdministrator)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._localAdministrator.ToString()) : null, "localAdministrator" ,container.Add ); + AddIf( null != (((object)this._healthStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._healthStatus.ToString()) : null, "healthStatus" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolActiveHoursConfiguration.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolActiveHoursConfiguration.PowerShell.cs new file mode 100644 index 000000000000..f56625b42a8b --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolActiveHoursConfiguration.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// The default active hours configuration settings. + [System.ComponentModel.TypeConverter(typeof(PoolActiveHoursConfigurationTypeConverter))] + public partial class PoolActiveHoursConfiguration + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PoolActiveHoursConfiguration(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PoolActiveHoursConfiguration(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PoolActiveHoursConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("KeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).KeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus) content.GetValueForProperty("KeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).KeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("AutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).AutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus) content.GetValueForProperty("AutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).AutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("DefaultTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).DefaultTimeZone = (string) content.GetValueForProperty("DefaultTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).DefaultTimeZone, global::System.Convert.ToString); + } + if (content.Contains("DefaultStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).DefaultStartTimeHour = (int?) content.GetValueForProperty("DefaultStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).DefaultStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DefaultEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).DefaultEndTimeHour = (int?) content.GetValueForProperty("DefaultEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).DefaultEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PoolActiveHoursConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("KeepAwakeEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).KeepAwakeEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus) content.GetValueForProperty("KeepAwakeEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).KeepAwakeEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus.CreateFrom); + } + if (content.Contains("AutoStartEnableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).AutoStartEnableStatus = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus) content.GetValueForProperty("AutoStartEnableStatus",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).AutoStartEnableStatus, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus.CreateFrom); + } + if (content.Contains("DefaultTimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).DefaultTimeZone = (string) content.GetValueForProperty("DefaultTimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).DefaultTimeZone, global::System.Convert.ToString); + } + if (content.Contains("DefaultStartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).DefaultStartTimeHour = (int?) content.GetValueForProperty("DefaultStartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).DefaultStartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DefaultEndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).DefaultEndTimeHour = (int?) content.GetValueForProperty("DefaultEndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal)this).DefaultEndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The default active hours configuration settings. + [System.ComponentModel.TypeConverter(typeof(PoolActiveHoursConfigurationTypeConverter))] + public partial interface IPoolActiveHoursConfiguration + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolActiveHoursConfiguration.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolActiveHoursConfiguration.TypeConverter.cs new file mode 100644 index 000000000000..c7fb4018f310 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolActiveHoursConfiguration.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PoolActiveHoursConfigurationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfiguration ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfiguration).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PoolActiveHoursConfiguration.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PoolActiveHoursConfiguration.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PoolActiveHoursConfiguration.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolActiveHoursConfiguration.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolActiveHoursConfiguration.cs new file mode 100644 index 000000000000..fc05b5357996 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolActiveHoursConfiguration.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// The default active hours configuration settings. + public partial class PoolActiveHoursConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfigurationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus _autoStartEnableStatus; + + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus AutoStartEnableStatus { get => this._autoStartEnableStatus; set => this._autoStartEnableStatus = value; } + + /// Backing field for property. + private int? _defaultEndTimeHour; + + /// The default end time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public int? DefaultEndTimeHour { get => this._defaultEndTimeHour; set => this._defaultEndTimeHour = value; } + + /// Backing field for property. + private int? _defaultStartTimeHour; + + /// The default start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public int? DefaultStartTimeHour { get => this._defaultStartTimeHour; set => this._defaultStartTimeHour = value; } + + /// Backing field for property. + private string _defaultTimeZone; + + /// The default IANA timezone id of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string DefaultTimeZone { get => this._defaultTimeZone; set => this._defaultTimeZone = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus _keepAwakeEnableStatus; + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus KeepAwakeEnableStatus { get => this._keepAwakeEnableStatus; set => this._keepAwakeEnableStatus = value; } + + /// Creates an new instance. + public PoolActiveHoursConfiguration() + { + + } + } + /// The default active hours configuration settings. + public partial interface IPoolActiveHoursConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be automatically started at commencement of active hours.", + SerializedName = @"autoStartEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus AutoStartEnableStatus { get; set; } + /// The default end time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default end time of the active hours.", + SerializedName = @"defaultEndTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? DefaultEndTimeHour { get; set; } + /// The default start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default start time of the active hours.", + SerializedName = @"defaultStartTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? DefaultStartTimeHour { get; set; } + /// The default IANA timezone id of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default IANA timezone id of the active hours.", + SerializedName = @"defaultTimeZone", + PossibleTypes = new [] { typeof(string) })] + string DefaultTimeZone { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Enables or disables whether the Dev Box should be kept awake during active hours.", + SerializedName = @"keepAwakeEnableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus KeepAwakeEnableStatus { get; set; } + + } + /// The default active hours configuration settings. + internal partial interface IPoolActiveHoursConfigurationInternal + + { + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus AutoStartEnableStatus { get; set; } + /// The default end time of the active hours. + int? DefaultEndTimeHour { get; set; } + /// The default start time of the active hours. + int? DefaultStartTimeHour { get; set; } + /// The default IANA timezone id of the active hours. + string DefaultTimeZone { get; set; } + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus KeepAwakeEnableStatus { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolActiveHoursConfiguration.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolActiveHoursConfiguration.json.cs new file mode 100644 index 000000000000..711a598e5592 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolActiveHoursConfiguration.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// The default active hours configuration settings. + public partial class PoolActiveHoursConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolActiveHoursConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PoolActiveHoursConfiguration(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal PoolActiveHoursConfiguration(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_keepAwakeEnableStatus = If( json?.PropertyT("keepAwakeEnableStatus"), out var __jsonKeepAwakeEnableStatus) ? (string)__jsonKeepAwakeEnableStatus : (string)KeepAwakeEnableStatus;} + {_autoStartEnableStatus = If( json?.PropertyT("autoStartEnableStatus"), out var __jsonAutoStartEnableStatus) ? (string)__jsonAutoStartEnableStatus : (string)AutoStartEnableStatus;} + {_defaultTimeZone = If( json?.PropertyT("defaultTimeZone"), out var __jsonDefaultTimeZone) ? (string)__jsonDefaultTimeZone : (string)DefaultTimeZone;} + {_defaultStartTimeHour = If( json?.PropertyT("defaultStartTimeHour"), out var __jsonDefaultStartTimeHour) ? (int?)__jsonDefaultStartTimeHour : DefaultStartTimeHour;} + {_defaultEndTimeHour = If( json?.PropertyT("defaultEndTimeHour"), out var __jsonDefaultEndTimeHour) ? (int?)__jsonDefaultEndTimeHour : DefaultEndTimeHour;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._keepAwakeEnableStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._keepAwakeEnableStatus.ToString()) : null, "keepAwakeEnableStatus" ,container.Add ); + AddIf( null != (((object)this._autoStartEnableStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._autoStartEnableStatus.ToString()) : null, "autoStartEnableStatus" ,container.Add ); + AddIf( null != (((object)this._defaultTimeZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._defaultTimeZone.ToString()) : null, "defaultTimeZone" ,container.Add ); + AddIf( null != this._defaultStartTimeHour ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNumber((int)this._defaultStartTimeHour) : null, "defaultStartTimeHour" ,container.Add ); + AddIf( null != this._defaultEndTimeHour ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNumber((int)this._defaultEndTimeHour) : null, "defaultEndTimeHour" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolAlignBody.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolAlignBody.PowerShell.cs new file mode 100644 index 000000000000..c672218eb6df --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolAlignBody.PowerShell.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Indicates which pool properties to align on. + [System.ComponentModel.TypeConverter(typeof(PoolAlignBodyTypeConverter))] + public partial class PoolAlignBody + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PoolAlignBody(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PoolAlignBody(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PoolAlignBody(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBodyInternal)this).Target = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[]) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBodyInternal)this).Target, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget.CreateFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PoolAlignBody(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBodyInternal)this).Target = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[]) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBodyInternal)this).Target, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget.CreateFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Indicates which pool properties to align on. + [System.ComponentModel.TypeConverter(typeof(PoolAlignBodyTypeConverter))] + public partial interface IPoolAlignBody + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolAlignBody.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolAlignBody.TypeConverter.cs new file mode 100644 index 000000000000..06e2bfecf7a7 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolAlignBody.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PoolAlignBodyTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PoolAlignBody.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PoolAlignBody.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PoolAlignBody.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolAlignBody.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolAlignBody.cs new file mode 100644 index 000000000000..d9a99b1bd80e --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolAlignBody.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Indicates which pool properties to align on. + public partial class PoolAlignBody : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBodyInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[] _target; + + /// The targets to align on. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[] Target { get => this._target; set => this._target = value; } + + /// Creates an new instance. + public PoolAlignBody() + { + + } + } + /// Indicates which pool properties to align on. + public partial interface IPoolAlignBody : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// The targets to align on. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The targets to align on.", + SerializedName = @"targets", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[] Target { get; set; } + + } + /// Indicates which pool properties to align on. + internal partial interface IPoolAlignBodyInternal + + { + /// The targets to align on. + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[] Target { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolAlignBody.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolAlignBody.json.cs new file mode 100644 index 000000000000..7ddb2bc14536 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/PoolAlignBody.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Indicates which pool properties to align on. + public partial class PoolAlignBody + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new PoolAlignBody(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal PoolAlignBody(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_target = If( json?.PropertyT("targets"), out var __jsonTargets) ? If( __jsonTargets as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget) (__u is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget)""))) ))() : null : Target;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._target) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.XNodeArray(); + foreach( var __x in this._target ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("targets",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Project.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Project.PowerShell.cs new file mode 100644 index 000000000000..891a310c3439 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Project.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Project details. + [System.ComponentModel.TypeConverter(typeof(ProjectTypeConverter))] + public partial class Project + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Project(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Project(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Project(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("MaxDevBoxesPerUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).DisplayName, 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 Project(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("MaxDevBoxesPerUser")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).MaxDevBoxesPerUser = (int?) content.GetValueForProperty("MaxDevBoxesPerUser",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).MaxDevBoxesPerUser, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal)this).DisplayName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Project details. + [System.ComponentModel.TypeConverter(typeof(ProjectTypeConverter))] + public partial interface IProject + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Project.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Project.TypeConverter.cs new file mode 100644 index 000000000000..a8cb61ad0a12 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Project.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Project.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Project.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Project.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Project.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Project.cs new file mode 100644 index 000000000000..8494e5915f32 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Project.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Project details. + public partial class Project : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal + { + + /// Backing field for property. + private string _description; + + /// Description of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private string _displayName; + + /// Display name of the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private int? _maxDevBoxesPerUser; + + /// + /// When specified, indicates the maximum number of Dev Boxes a single user can + /// create across all pools in the project. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public int? MaxDevBoxesPerUser { get => this._maxDevBoxesPerUser; set => this._maxDevBoxesPerUser = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectInternal.Name { get => this._name; set { {_name = value;} } } + + /// Backing field for property. + private string _name; + + /// Name of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private string _uri; + + /// The unique URI of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Uri { get => this._uri; set => this._uri = value; } + + /// Creates an new instance. + public Project() + { + + } + } + /// Project details. + public partial interface IProject : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// Description of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the project.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Display name of the pool. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display name of the pool.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// When specified, indicates the maximum number of Dev Boxes a single user can + /// create across all pools in the project. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"When specified, indicates the maximum number of Dev Boxes a single user can + create across all pools in the project.", + SerializedName = @"maxDevBoxesPerUser", + PossibleTypes = new [] { typeof(int) })] + int? MaxDevBoxesPerUser { get; set; } + /// Name of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Name of the project.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The unique URI of the project. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The unique URI of the project.", + SerializedName = @"uri", + PossibleTypes = new [] { typeof(string) })] + string Uri { get; set; } + + } + /// Project details. + internal partial interface IProjectInternal + + { + /// Description of the project. + string Description { get; set; } + /// Display name of the pool. + string DisplayName { get; set; } + /// + /// When specified, indicates the maximum number of Dev Boxes a single user can + /// create across all pools in the project. + /// + int? MaxDevBoxesPerUser { get; set; } + /// Name of the project. + string Name { get; set; } + /// The unique URI of the project. + string Uri { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Project.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Project.json.cs new file mode 100644 index 000000000000..2d93e1826079 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Project.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Project details. + public partial class Project + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new Project(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal Project(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_maxDevBoxesPerUser = If( json?.PropertyT("maxDevBoxesPerUser"), out var __jsonMaxDevBoxesPerUser) ? (int?)__jsonMaxDevBoxesPerUser : MaxDevBoxesPerUser;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._uri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._uri.ToString()) : null, "uri" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AddIf( null != this._maxDevBoxesPerUser ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNumber((int)this._maxDevBoxesPerUser) : null, "maxDevBoxesPerUser" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ProjectAbilities.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ProjectAbilities.PowerShell.cs similarity index 89% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ProjectAbilities.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ProjectAbilities.PowerShell.cs index c7752ce75396..a08fe15ee88a 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ProjectAbilities.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ProjectAbilities.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ProjectAbilities partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProjectAbilities(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProjectAbilities(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -105,17 +105,17 @@ internal ProjectAbilities(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("AbilitiesAsAdmin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilitiesInternal)this).AbilitiesAsAdmin = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsAdmin[]) content.GetValueForProperty("AbilitiesAsAdmin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilitiesInternal)this).AbilitiesAsAdmin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsAdmin.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilitiesInternal)this).AbilitiesAsAdmin = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsAdmin[]) content.GetValueForProperty("AbilitiesAsAdmin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilitiesInternal)this).AbilitiesAsAdmin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsAdmin.CreateFrom)); } if (content.Contains("AbilitiesAsDeveloper")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilitiesInternal)this).AbilitiesAsDeveloper = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsDeveloper[]) content.GetValueForProperty("AbilitiesAsDeveloper",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilitiesInternal)this).AbilitiesAsDeveloper, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsDeveloper.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilitiesInternal)this).AbilitiesAsDeveloper = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsDeveloper[]) content.GetValueForProperty("AbilitiesAsDeveloper",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilitiesInternal)this).AbilitiesAsDeveloper, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsDeveloper.CreateFrom)); } 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. @@ -130,11 +130,11 @@ internal ProjectAbilities(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("AbilitiesAsAdmin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilitiesInternal)this).AbilitiesAsAdmin = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsAdmin[]) content.GetValueForProperty("AbilitiesAsAdmin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilitiesInternal)this).AbilitiesAsAdmin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsAdmin.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilitiesInternal)this).AbilitiesAsAdmin = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsAdmin[]) content.GetValueForProperty("AbilitiesAsAdmin",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilitiesInternal)this).AbilitiesAsAdmin, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsAdmin.CreateFrom)); } if (content.Contains("AbilitiesAsDeveloper")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilitiesInternal)this).AbilitiesAsDeveloper = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsDeveloper[]) content.GetValueForProperty("AbilitiesAsDeveloper",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilitiesInternal)this).AbilitiesAsDeveloper, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsDeveloper.CreateFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilitiesInternal)this).AbilitiesAsDeveloper = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsDeveloper[]) content.GetValueForProperty("AbilitiesAsDeveloper",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilitiesInternal)this).AbilitiesAsDeveloper, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsDeveloper.CreateFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ProjectAbilities.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ProjectAbilities.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ProjectAbilities.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ProjectAbilities.TypeConverter.cs index 89ae782487f9..02fb20cfcd89 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ProjectAbilities.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ProjectAbilities.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ProjectAbilities.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ProjectAbilities.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ProjectAbilities.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ProjectAbilities.cs index 5e815dc8d32d..0f921eed2f85 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ProjectAbilities.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ProjectAbilities.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Abilities a user has on a project. public partial class ProjectAbilities : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilitiesInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilitiesInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ProjectAbilities.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ProjectAbilities.json.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ProjectAbilities.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ProjectAbilities.json.cs index fd6706523b99..abd49cf2c190 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/ProjectAbilities.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/ProjectAbilities.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ProjectAbilities partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new ProjectAbilities(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/RemoteConnection.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/RemoteConnection.PowerShell.cs similarity index 86% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/RemoteConnection.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/RemoteConnection.PowerShell.cs index f5060293704c..1f8d47cb4918 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/RemoteConnection.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/RemoteConnection.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class RemoteConnection partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new RemoteConnection(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new RemoteConnection(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -105,21 +105,21 @@ internal RemoteConnection(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("WebUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnectionInternal)this).WebUrl = (string) content.GetValueForProperty("WebUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnectionInternal)this).WebUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnectionInternal)this).WebUrl = (string) content.GetValueForProperty("WebUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnectionInternal)this).WebUrl, global::System.Convert.ToString); } if (content.Contains("RdpConnectionUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnectionInternal)this).RdpConnectionUrl = (string) content.GetValueForProperty("RdpConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnectionInternal)this).RdpConnectionUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnectionInternal)this).RdpConnectionUrl = (string) content.GetValueForProperty("RdpConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnectionInternal)this).RdpConnectionUrl, global::System.Convert.ToString); } if (content.Contains("CloudPcConnectionUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnectionInternal)this).CloudPcConnectionUrl = (string) content.GetValueForProperty("CloudPcConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnectionInternal)this).CloudPcConnectionUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnectionInternal)this).CloudPcConnectionUrl = (string) content.GetValueForProperty("CloudPcConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnectionInternal)this).CloudPcConnectionUrl, 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. @@ -134,15 +134,15 @@ internal RemoteConnection(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("WebUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnectionInternal)this).WebUrl = (string) content.GetValueForProperty("WebUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnectionInternal)this).WebUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnectionInternal)this).WebUrl = (string) content.GetValueForProperty("WebUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnectionInternal)this).WebUrl, global::System.Convert.ToString); } if (content.Contains("RdpConnectionUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnectionInternal)this).RdpConnectionUrl = (string) content.GetValueForProperty("RdpConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnectionInternal)this).RdpConnectionUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnectionInternal)this).RdpConnectionUrl = (string) content.GetValueForProperty("RdpConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnectionInternal)this).RdpConnectionUrl, global::System.Convert.ToString); } if (content.Contains("CloudPcConnectionUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnectionInternal)this).CloudPcConnectionUrl = (string) content.GetValueForProperty("CloudPcConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnectionInternal)this).CloudPcConnectionUrl, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnectionInternal)this).CloudPcConnectionUrl = (string) content.GetValueForProperty("CloudPcConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnectionInternal)this).CloudPcConnectionUrl, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/RemoteConnection.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/RemoteConnection.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/RemoteConnection.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/RemoteConnection.TypeConverter.cs index 32533669c596..5cb89c79a801 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/RemoteConnection.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/RemoteConnection.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/RemoteConnection.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/RemoteConnection.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/RemoteConnection.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/RemoteConnection.cs index a106b0e0f3ea..60715cd77fa2 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/RemoteConnection.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/RemoteConnection.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Provides remote connection information for a Dev Box. public partial class RemoteConnection : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnectionInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnectionInternal { /// Backing field for property. diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/RemoteConnection.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/RemoteConnection.json.cs similarity index 97% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/RemoteConnection.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/RemoteConnection.json.cs index e628dc2d9d11..2efbf46f6256 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/RemoteConnection.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/RemoteConnection.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class RemoteConnection partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new RemoteConnection(json) : null; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Schedule.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Schedule.PowerShell.cs new file mode 100644 index 000000000000..1305d695e0ba --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Schedule.PowerShell.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// A Schedule to execute action. + [System.ComponentModel.TypeConverter(typeof(ScheduleTypeConverter))] + public partial class Schedule + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Schedule(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Schedule(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Schedule(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("SourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).SourceUri, global::System.Convert.ToString); + } + if (content.Contains("SourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).SourceType = (string) content.GetValueForProperty("SourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).SourceType, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Frequency")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Frequency = (string) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Frequency, global::System.Convert.ToString); + } + if (content.Contains("Time")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Time, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).TimeZone, 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 Schedule(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Uri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Uri = (string) content.GetValueForProperty("Uri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Uri, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("SourceUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).SourceUri = (string) content.GetValueForProperty("SourceUri",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).SourceUri, global::System.Convert.ToString); + } + if (content.Contains("SourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).SourceType = (string) content.GetValueForProperty("SourceType",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).SourceType, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Frequency")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Frequency = (string) content.GetValueForProperty("Frequency",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Frequency, global::System.Convert.ToString); + } + if (content.Contains("Time")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Time = (string) content.GetValueForProperty("Time",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).Time, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal)this).TimeZone, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A Schedule to execute action. + [System.ComponentModel.TypeConverter(typeof(ScheduleTypeConverter))] + public partial interface ISchedule + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Schedule.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Schedule.TypeConverter.cs new file mode 100644 index 000000000000..0296a81b0ebe --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Schedule.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ScheduleTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Schedule.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Schedule.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Schedule.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Schedule.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Schedule.cs new file mode 100644 index 000000000000..ed1e8171bff6 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Schedule.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// A Schedule to execute action. + public partial class Schedule : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal + { + + /// Backing field for property. + private string _frequency= @"Daily"; + + /// The frequency of this scheduled task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Frequency { get => this._frequency; } + + /// Internal Acessors for Frequency + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal.Frequency { get => this._frequency; set { {_frequency = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for SourceType + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal.SourceType { get => this._sourceType; set { {_sourceType = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IScheduleInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// Display name for the Schedule. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private string _sourceType= @"Pool"; + + /// The type of the resource that this schedule belongs to. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string SourceType { get => this._sourceType; } + + /// Backing field for property. + private string _sourceUri; + + /// The URI of the resource that this schedule belongs to. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string SourceUri { get => this._sourceUri; set => this._sourceUri = value; } + + /// Backing field for property. + private string _time; + + /// The target time to trigger the action. The format is HH:MM. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Time { get => this._time; set => this._time = value; } + + /// Backing field for property. + private string _timeZone; + + /// The IANA timezone id at which the schedule should execute. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string TimeZone { get => this._timeZone; set => this._timeZone = value; } + + /// Backing field for property. + private string _type= @"StopDevBox"; + + /// Supported type this scheduled task represents. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Backing field for property. + private string _uri; + + /// The unique URI of the schedule. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string Uri { get => this._uri; set => this._uri = value; } + + /// Creates an new instance. + public Schedule() + { + + } + } + /// A Schedule to execute action. + public partial interface ISchedule : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// The frequency of this scheduled task. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The frequency of this scheduled task.", + SerializedName = @"frequency", + PossibleTypes = new [] { typeof(string) })] + string Frequency { get; } + /// Display name for the Schedule. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Display name for the Schedule.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The type of the resource that this schedule belongs to. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The type of the resource that this schedule belongs to.", + SerializedName = @"sourceType", + PossibleTypes = new [] { typeof(string) })] + string SourceType { get; } + /// The URI of the resource that this schedule belongs to. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The URI of the resource that this schedule belongs to.", + SerializedName = @"sourceUri", + PossibleTypes = new [] { typeof(string) })] + string SourceUri { get; set; } + /// The target time to trigger the action. The format is HH:MM. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The target time to trigger the action. The format is HH:MM.", + SerializedName = @"time", + PossibleTypes = new [] { typeof(string) })] + string Time { get; set; } + /// The IANA timezone id at which the schedule should execute. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The IANA timezone id at which the schedule should execute.", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + /// Supported type this scheduled task represents. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"Supported type this scheduled task represents.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + /// The unique URI of the schedule. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The unique URI of the schedule.", + SerializedName = @"uri", + PossibleTypes = new [] { typeof(string) })] + string Uri { get; set; } + + } + /// A Schedule to execute action. + internal partial interface IScheduleInternal + + { + /// The frequency of this scheduled task. + string Frequency { get; set; } + /// Display name for the Schedule. + string Name { get; set; } + /// The type of the resource that this schedule belongs to. + string SourceType { get; set; } + /// The URI of the resource that this schedule belongs to. + string SourceUri { get; set; } + /// The target time to trigger the action. The format is HH:MM. + string Time { get; set; } + /// The IANA timezone id at which the schedule should execute. + string TimeZone { get; set; } + /// Supported type this scheduled task represents. + string Type { get; set; } + /// The unique URI of the schedule. + string Uri { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Schedule.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Schedule.json.cs new file mode 100644 index 000000000000..63d1cb616099 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/Schedule.json.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// A Schedule to execute action. + public partial class Schedule + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new Schedule(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal Schedule(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_uri = If( json?.PropertyT("uri"), out var __jsonUri) ? (string)__jsonUri : (string)Uri;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_sourceUri = If( json?.PropertyT("sourceUri"), out var __jsonSourceUri) ? (string)__jsonSourceUri : (string)SourceUri;} + {_sourceType = If( json?.PropertyT("sourceType"), out var __jsonSourceType) ? (string)__jsonSourceType : (string)SourceType;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_frequency = If( json?.PropertyT("frequency"), out var __jsonFrequency) ? (string)__jsonFrequency : (string)Frequency;} + {_time = If( json?.PropertyT("time"), out var __jsonTime) ? (string)__jsonTime : (string)Time;} + {_timeZone = If( json?.PropertyT("timeZone"), out var __jsonTimeZone) ? (string)__jsonTimeZone : (string)TimeZone;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._uri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._uri.ToString()) : null, "uri" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + AddIf( null != (((object)this._sourceUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._sourceUri.ToString()) : null, "sourceUri" ,container.Add ); + AddIf( null != (((object)this._sourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._sourceType.ToString()) : null, "sourceType" ,container.Add ); + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + AddIf( null != (((object)this._frequency)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._frequency.ToString()) : null, "frequency" ,container.Add ); + AddIf( null != (((object)this._time)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._time.ToString()) : null, "time" ,container.Add ); + AddIf( null != (((object)this._timeZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._timeZone.ToString()) : null, "timeZone" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.PowerShell.cs new file mode 100644 index 000000000000..a89b9fe5c726 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + [System.ComponentModel.TypeConverter(typeof(StopOnDisconnectConfigurationTypeConverter))] + public partial class StopOnDisconnectConfiguration + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StopOnDisconnectConfiguration(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StopOnDisconnectConfiguration(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StopOnDisconnectConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus.CreateFrom); + } + if (content.Contains("GracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute = (int?) content.GetValueForProperty("GracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StopOnDisconnectConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus.CreateFrom); + } + if (content.Contains("GracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute = (int?) content.GetValueForProperty("GracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal)this).GracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + [System.ComponentModel.TypeConverter(typeof(StopOnDisconnectConfigurationTypeConverter))] + public partial interface IStopOnDisconnectConfiguration + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.TypeConverter.cs new file mode 100644 index 000000000000..4ad6b5bcf907 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StopOnDisconnectConfigurationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfiguration ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfiguration).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StopOnDisconnectConfiguration.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StopOnDisconnectConfiguration.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StopOnDisconnectConfiguration.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.cs new file mode 100644 index 000000000000..9f1f01938fbc --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + public partial class StopOnDisconnectConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfigurationInternal + { + + /// Backing field for property. + private int? _gracePeriodMinute; + + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect + /// is detected. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public int? GracePeriodMinute { get => this._gracePeriodMinute; set => this._gracePeriodMinute = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus _status; + + /// + /// Indicates whether the feature to stop the devbox on disconnect once the grace + /// period has lapsed is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public StopOnDisconnectConfiguration() + { + + } + } + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + public partial interface IStopOnDisconnectConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect + /// is detected. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box once disconnect + is detected.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + int? GracePeriodMinute { get; set; } + /// + /// Indicates whether the feature to stop the devbox on disconnect once the grace + /// period has lapsed is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Indicates whether the feature to stop the devbox on disconnect once the grace + period has lapsed is enabled.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus Status { get; set; } + + } + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + internal partial interface IStopOnDisconnectConfigurationInternal + + { + /// + /// The specified time in minutes to wait before stopping a Dev Box once disconnect + /// is detected. + /// + int? GracePeriodMinute { get; set; } + /// + /// Indicates whether the feature to stop the devbox on disconnect once the grace + /// period has lapsed is enabled. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnDisconnectEnableStatus Status { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.json.cs new file mode 100644 index 000000000000..1e2dbb121d3d --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnDisconnectConfiguration.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Stop on disconnect configuration settings for Dev Boxes created in this pool. + public partial class StopOnDisconnectConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnDisconnectConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new StopOnDisconnectConfiguration(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal StopOnDisconnectConfiguration(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_gracePeriodMinute = If( json?.PropertyT("gracePeriodMinutes"), out var __jsonGracePeriodMinutes) ? (int?)__jsonGracePeriodMinutes : GracePeriodMinute;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != this._gracePeriodMinute ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNumber((int)this._gracePeriodMinute) : null, "gracePeriodMinutes" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.PowerShell.cs new file mode 100644 index 000000000000..2f0d6418de24 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + [System.ComponentModel.TypeConverter(typeof(StopOnNoConnectConfigurationTypeConverter))] + public partial class StopOnNoConnectConfiguration + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StopOnNoConnectConfiguration(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StopOnNoConnectConfiguration(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StopOnNoConnectConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus.CreateFrom); + } + if (content.Contains("GracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).GracePeriodMinute = (int?) content.GetValueForProperty("GracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).GracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StopOnNoConnectConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus.CreateFrom); + } + if (content.Contains("GracePeriodMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).GracePeriodMinute = (int?) content.GetValueForProperty("GracePeriodMinute",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal)this).GracePeriodMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + [System.ComponentModel.TypeConverter(typeof(StopOnNoConnectConfigurationTypeConverter))] + public partial interface IStopOnNoConnectConfiguration + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.TypeConverter.cs new file mode 100644 index 000000000000..7ca690806f73 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class StopOnNoConnectConfigurationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfiguration ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfiguration).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return StopOnNoConnectConfiguration.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return StopOnNoConnectConfiguration.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return StopOnNoConnectConfiguration.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.cs new file mode 100644 index 000000000000..05902b606873 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + public partial class StopOnNoConnectConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfigurationInternal + { + + /// Backing field for property. + private int? _gracePeriodMinute; + + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. This will only be present if + /// stop on no connect is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public int? GracePeriodMinute { get => this._gracePeriodMinute; set => this._gracePeriodMinute = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus _status; + + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public StopOnNoConnectConfiguration() + { + + } + } + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + public partial interface IStopOnNoConnectConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. This will only be present if + /// stop on no connect is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The specified time in minutes to wait before stopping a Dev Box if no connection is made. This will only be present if stop on no connect is enabled.", + SerializedName = @"gracePeriodMinutes", + PossibleTypes = new [] { typeof(int) })] + int? GracePeriodMinute { get; set; } + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus Status { get; set; } + + } + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + internal partial interface IStopOnNoConnectConfigurationInternal + + { + /// + /// The specified time in minutes to wait before stopping a Dev Box if no connection is made. This will only be present if + /// stop on no connect is enabled. + /// + int? GracePeriodMinute { get; set; } + /// + /// Enables the feature to stop a started Dev Box when it has not been connected to, once the grace period has lapsed. + /// + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus Status { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.json.cs new file mode 100644 index 000000000000..ab841a1eacc5 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StopOnNoConnectConfiguration.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Stop on no connect configuration settings for Dev Boxes created in this pool. + public partial class StopOnNoConnectConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStopOnNoConnectConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new StopOnNoConnectConfiguration(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal StopOnNoConnectConfiguration(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_gracePeriodMinute = If( json?.PropertyT("gracePeriodMinutes"), out var __jsonGracePeriodMinutes) ? (int?)__jsonGracePeriodMinutes : GracePeriodMinute;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != this._gracePeriodMinute ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNumber((int)this._gracePeriodMinute) : null, "gracePeriodMinutes" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StorageProfile.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StorageProfile.PowerShell.cs similarity index 84% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StorageProfile.PowerShell.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StorageProfile.PowerShell.cs index 2040518da542..32a3df2fe444 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StorageProfile.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StorageProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class StorageProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new StorageProfile(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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new StorageProfile(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api2024050 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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. @@ -105,17 +105,17 @@ internal StorageProfile(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("OSDisk")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)this).OSDisk = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk) content.GetValueForProperty("OSDisk",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)this).OSDisk, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OSDiskTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)this).OSDisk = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk) content.GetValueForProperty("OSDisk",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)this).OSDisk, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OSDiskTypeConverter.ConvertFrom); } if (content.Contains("OSDiskSizeGb")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -130,11 +130,11 @@ internal StorageProfile(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("OSDisk")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)this).OSDisk = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk) content.GetValueForProperty("OSDisk",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)this).OSDisk, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OSDiskTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)this).OSDisk = (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk) content.GetValueForProperty("OSDisk",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)this).OSDisk, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OSDiskTypeConverter.ConvertFrom); } if (content.Contains("OSDiskSizeGb")) { - ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StorageProfile.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StorageProfile.TypeConverter.cs similarity index 98% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StorageProfile.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StorageProfile.TypeConverter.cs index 020f8cbb6849..28acb9739ab7 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StorageProfile.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StorageProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StorageProfile.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StorageProfile.cs similarity index 78% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StorageProfile.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StorageProfile.cs index 64777dc1bbeb..2053826c9794 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StorageProfile.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StorageProfile.cs @@ -3,32 +3,32 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; /// Storage settings for the Dev Box's disks. public partial class StorageProfile : - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile, - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal { /// Internal Acessors for OSDisk - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal.OSDisk { get => (this._oSDisk = this._oSDisk ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OSDisk()); set { {_oSDisk = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal.OSDisk { get => (this._oSDisk = this._oSDisk ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OSDisk()); set { {_oSDisk = value;} } } /// Internal Acessors for OSDiskSizeGb - int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfileInternal.OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDiskInternal)OSDisk).DiskSizeGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDiskInternal)OSDisk).DiskSizeGb = value; } + int? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfileInternal.OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDiskInternal)OSDisk).DiskSizeGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDiskInternal)OSDisk).DiskSizeGb = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk _oSDisk; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk _oSDisk; /// Settings for the operating system disk. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk OSDisk { get => (this._oSDisk = this._oSDisk ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OSDisk()); set => this._oSDisk = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk OSDisk { get => (this._oSDisk = this._oSDisk ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OSDisk()); set => this._oSDisk = value; } /// The size of the OS Disk in gigabytes. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Inlined)] - public int? OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDiskInternal)OSDisk).DiskSizeGb; } + public int? OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDiskInternal)OSDisk).DiskSizeGb; } /// Creates an new instance. public StorageProfile() @@ -55,7 +55,7 @@ internal partial interface IStorageProfileInternal { /// Settings for the operating system disk. - Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOSDisk OSDisk { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOSDisk OSDisk { get; set; } /// The size of the OS Disk in gigabytes. int? OSDiskSizeGb { get; set; } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StorageProfile.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StorageProfile.json.cs similarity index 96% rename from generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StorageProfile.json.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StorageProfile.json.cs index 126da8b401e3..ef1524522533 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20240501Preview/StorageProfile.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/StorageProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview { using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class StorageProfile partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IStorageProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IStorageProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new StorageProfile(json) : null; } @@ -77,7 +77,7 @@ internal StorageProfile(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime { return; } - {_oSDisk = If( json?.PropertyT("osDisk"), out var __jsonOSDisk) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.OSDisk.FromJson(__jsonOSDisk) : OSDisk;} + {_oSDisk = If( json?.PropertyT("osDisk"), out var __jsonOSDisk) ? Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.OSDisk.FromJson(__jsonOSDisk) : OSDisk;} AfterFromJson(json); } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/UserActiveHoursConfiguration.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/UserActiveHoursConfiguration.PowerShell.cs new file mode 100644 index 000000000000..54bd23f36993 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/UserActiveHoursConfiguration.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// Manual user set active hours configuration. + [System.ComponentModel.TypeConverter(typeof(UserActiveHoursConfigurationTypeConverter))] + public partial class UserActiveHoursConfiguration + { + + /// + /// 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); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UserActiveHoursConfiguration(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UserActiveHoursConfiguration(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode.IncludeAll)?.ToString(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UserActiveHoursConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfigurationInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfigurationInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("StartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfigurationInternal)this).StartTimeHour = (int?) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfigurationInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfigurationInternal)this).EndTimeHour = (int?) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfigurationInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UserActiveHoursConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfigurationInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfigurationInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("StartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfigurationInternal)this).StartTimeHour = (int?) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfigurationInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfigurationInternal)this).EndTimeHour = (int?) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfigurationInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + } + /// Manual user set active hours configuration. + [System.ComponentModel.TypeConverter(typeof(UserActiveHoursConfigurationTypeConverter))] + public partial interface IUserActiveHoursConfiguration + + { + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/UserActiveHoursConfiguration.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/UserActiveHoursConfiguration.TypeConverter.cs new file mode 100644 index 000000000000..f067a6b421dc --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/UserActiveHoursConfiguration.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UserActiveHoursConfigurationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UserActiveHoursConfiguration.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UserActiveHoursConfiguration.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UserActiveHoursConfiguration.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/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/UserActiveHoursConfiguration.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/UserActiveHoursConfiguration.cs new file mode 100644 index 000000000000..0f6aea2ca579 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/UserActiveHoursConfiguration.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Manual user set active hours configuration. + public partial class UserActiveHoursConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfigurationInternal + { + + /// Backing field for property. + private int? _endTimeHour; + + /// The end time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public int? EndTimeHour { get => this._endTimeHour; set => this._endTimeHour = value; } + + /// Backing field for property. + private int? _startTimeHour; + + /// The start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public int? StartTimeHour { get => this._startTimeHour; set => this._startTimeHour = value; } + + /// Backing field for property. + private string _timeZone; + + /// The timezone of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string TimeZone { get => this._timeZone; set => this._timeZone = value; } + + /// Creates an new instance. + public UserActiveHoursConfiguration() + { + + } + } + /// Manual user set active hours configuration. + public partial interface IUserActiveHoursConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IJsonSerializable + { + /// The end time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The end time of the active hours.", + SerializedName = @"endTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? EndTimeHour { get; set; } + /// The start time of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start time of the active hours.", + SerializedName = @"startTimeHour", + PossibleTypes = new [] { typeof(int) })] + int? StartTimeHour { get; set; } + /// The timezone of the active hours. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timezone of the active hours.", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + + } + /// Manual user set active hours configuration. + internal partial interface IUserActiveHoursConfigurationInternal + + { + /// The end time of the active hours. + int? EndTimeHour { get; set; } + /// The start time of the active hours. + int? StartTimeHour { get; set; } + /// The timezone of the active hours. + string TimeZone { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/UserActiveHoursConfiguration.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/UserActiveHoursConfiguration.json.cs new file mode 100644 index 000000000000..ac53ef2e8bfa --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/Api20250401Preview/UserActiveHoursConfiguration.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + + /// Manual user set active hours configuration. + public partial class UserActiveHoursConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json ? new UserActiveHoursConfiguration(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._timeZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._timeZone.ToString()) : null, "timeZone" ,container.Add ); + AddIf( null != this._startTimeHour ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNumber((int)this._startTimeHour) : null, "startTimeHour" ,container.Add ); + AddIf( null != this._endTimeHour ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNumber((int)this._endTimeHour) : null, "endTimeHour" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject instance to deserialize from. + internal UserActiveHoursConfiguration(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_timeZone = If( json?.PropertyT("timeZone"), out var __jsonTimeZone) ? (string)__jsonTimeZone : (string)TimeZone;} + {_startTimeHour = If( json?.PropertyT("startTimeHour"), out var __jsonStartTimeHour) ? (int?)__jsonStartTimeHour : StartTimeHour;} + {_endTimeHour = If( json?.PropertyT("endTimeHour"), out var __jsonEndTimeHour) ? (int?)__jsonEndTimeHour : EndTimeHour;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/DevCenterdataIdentity.PowerShell.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/DevCenterdataIdentity.PowerShell.cs index 2bb638da2e24..d07c26a8de9d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/DevCenterdataIdentity.PowerShell.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/DevCenterdataIdentity.PowerShell.cs @@ -105,6 +105,10 @@ internal DevCenterdataIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).TaskName = (string) content.GetValueForProperty("TaskName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).TaskName, global::System.Convert.ToString); } + if (content.Contains("ImageBuildLogId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).ImageBuildLogId = (string) content.GetValueForProperty("ImageBuildLogId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).ImageBuildLogId, global::System.Convert.ToString); + } if (content.Contains("PoolName")) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).PoolName = (string) content.GetValueForProperty("PoolName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).PoolName, global::System.Convert.ToString); @@ -125,6 +129,10 @@ internal DevCenterdataIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).ActionName = (string) content.GetValueForProperty("ActionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).ActionName, global::System.Convert.ToString); } + if (content.Contains("AddOnName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).AddOnName = (string) content.GetValueForProperty("AddOnName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).AddOnName, global::System.Convert.ToString); + } if (content.Contains("CustomizationGroupName")) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).CustomizationGroupName = (string) content.GetValueForProperty("CustomizationGroupName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).CustomizationGroupName, global::System.Convert.ToString); @@ -137,6 +145,10 @@ internal DevCenterdataIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).OperationId, global::System.Convert.ToString); } + if (content.Contains("SnapshotId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).SnapshotId = (string) content.GetValueForProperty("SnapshotId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).SnapshotId, global::System.Convert.ToString); + } if (content.Contains("DefinitionName")) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).DefinitionName = (string) content.GetValueForProperty("DefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).DefinitionName, global::System.Convert.ToString); @@ -182,6 +194,10 @@ internal DevCenterdataIdentity(global::System.Management.Automation.PSObject con { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).TaskName = (string) content.GetValueForProperty("TaskName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).TaskName, global::System.Convert.ToString); } + if (content.Contains("ImageBuildLogId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).ImageBuildLogId = (string) content.GetValueForProperty("ImageBuildLogId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).ImageBuildLogId, global::System.Convert.ToString); + } if (content.Contains("PoolName")) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).PoolName = (string) content.GetValueForProperty("PoolName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).PoolName, global::System.Convert.ToString); @@ -202,6 +218,10 @@ internal DevCenterdataIdentity(global::System.Management.Automation.PSObject con { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).ActionName = (string) content.GetValueForProperty("ActionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).ActionName, global::System.Convert.ToString); } + if (content.Contains("AddOnName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).AddOnName = (string) content.GetValueForProperty("AddOnName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).AddOnName, global::System.Convert.ToString); + } if (content.Contains("CustomizationGroupName")) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).CustomizationGroupName = (string) content.GetValueForProperty("CustomizationGroupName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).CustomizationGroupName, global::System.Convert.ToString); @@ -214,6 +234,10 @@ internal DevCenterdataIdentity(global::System.Management.Automation.PSObject con { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).OperationId = (string) content.GetValueForProperty("OperationId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).OperationId, global::System.Convert.ToString); } + if (content.Contains("SnapshotId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).SnapshotId = (string) content.GetValueForProperty("SnapshotId",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).SnapshotId, global::System.Convert.ToString); + } if (content.Contains("DefinitionName")) { ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).DefinitionName = (string) content.GetValueForProperty("DefinitionName",((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentityInternal)this).DefinitionName, global::System.Convert.ToString); diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/DevCenterdataIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/DevCenterdataIdentity.cs index 0e95700f023c..7b2b113bf890 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/DevCenterdataIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/DevCenterdataIdentity.cs @@ -19,6 +19,13 @@ public partial class DevCenterdataIdentity : [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public string ActionName { get => this._actionName; set => this._actionName = value; } + /// Backing field for property. + private string _addOnName; + + /// Name of the dev box addon. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string AddOnName { get => this._addOnName; set => this._addOnName = value; } + /// Backing field for property. private string _catalogName; @@ -75,6 +82,13 @@ public partial class DevCenterdataIdentity : [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public string Id { get => this._id; set => this._id = value; } + /// Backing field for property. + private string _imageBuildLogId; + + /// An imaging build log id. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string ImageBuildLogId { get => this._imageBuildLogId; set => this._imageBuildLogId = value; } + /// Backing field for property. private string _operationId; @@ -103,6 +117,13 @@ public partial class DevCenterdataIdentity : [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] public string ScheduleName { get => this._scheduleName; set => this._scheduleName = value; } + /// Backing field for property. + private string _snapshotId; + + /// The id of the snapshot. Should be treated as opaque string. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Origin(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.PropertyOrigin.Owned)] + public string SnapshotId { get => this._snapshotId; set => this._snapshotId = value; } + /// Backing field for property. private string _taskName; @@ -136,6 +157,14 @@ public partial interface IDevCenterdataIdentity : SerializedName = @"actionName", PossibleTypes = new [] { typeof(string) })] string ActionName { get; set; } + /// Name of the dev box addon. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the dev box addon.", + SerializedName = @"addOnName", + PossibleTypes = new [] { typeof(string) })] + string AddOnName { get; set; } /// Name of the catalog. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, @@ -200,6 +229,14 @@ public partial interface IDevCenterdataIdentity : SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string Id { get; set; } + /// An imaging build log id. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An imaging build log id.", + SerializedName = @"imageBuildLogId", + PossibleTypes = new [] { typeof(string) })] + string ImageBuildLogId { get; set; } /// Unique identifier for the Dev Box operation. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, @@ -232,6 +269,14 @@ public partial interface IDevCenterdataIdentity : SerializedName = @"scheduleName", PossibleTypes = new [] { typeof(string) })] string ScheduleName { get; set; } + /// The id of the snapshot. Should be treated as opaque string. + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The id of the snapshot. Should be treated as opaque string.", + SerializedName = @"snapshotId", + PossibleTypes = new [] { typeof(string) })] + string SnapshotId { get; set; } /// Full name of the task: {catalogName}/{taskName}. [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = false, @@ -257,6 +302,8 @@ internal partial interface IDevCenterdataIdentityInternal { /// The name of the action. string ActionName { get; set; } + /// Name of the dev box addon. + string AddOnName { get; set; } /// Name of the catalog. string CatalogName { get; set; } /// Name of the customization group. @@ -273,6 +320,8 @@ internal partial interface IDevCenterdataIdentityInternal string EnvironmentTypeName { get; set; } /// Resource identity path string Id { get; set; } + /// An imaging build log id. + string ImageBuildLogId { get; set; } /// Unique identifier for the Dev Box operation. string OperationId { get; set; } /// Pool name. @@ -281,6 +330,8 @@ internal partial interface IDevCenterdataIdentityInternal string ProjectName { get; set; } /// Display name for the Schedule. string ScheduleName { get; set; } + /// The id of the snapshot. Should be treated as opaque string. + string SnapshotId { get; set; } /// Full name of the task: {catalogName}/{taskName}. string TaskName { get; set; } /// diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/DevCenterdataIdentity.json.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/DevCenterdataIdentity.json.cs index c3484e7f52af..20cb2520f314 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/DevCenterdataIdentity.json.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Models/DevCenterdataIdentity.json.cs @@ -67,14 +67,17 @@ internal DevCenterdataIdentity(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata. {_projectName = If( json?.PropertyT("projectName"), out var __jsonProjectName) ? (string)__jsonProjectName : (string)ProjectName;} {_catalogName = If( json?.PropertyT("catalogName"), out var __jsonCatalogName) ? (string)__jsonCatalogName : (string)CatalogName;} {_taskName = If( json?.PropertyT("taskName"), out var __jsonTaskName) ? (string)__jsonTaskName : (string)TaskName;} + {_imageBuildLogId = If( json?.PropertyT("imageBuildLogId"), out var __jsonImageBuildLogId) ? (string)__jsonImageBuildLogId : (string)ImageBuildLogId;} {_poolName = If( json?.PropertyT("poolName"), out var __jsonPoolName) ? (string)__jsonPoolName : (string)PoolName;} {_scheduleName = If( json?.PropertyT("scheduleName"), out var __jsonScheduleName) ? (string)__jsonScheduleName : (string)ScheduleName;} {_userId = If( json?.PropertyT("userId"), out var __jsonUserId) ? (string)__jsonUserId : (string)UserId;} {_devBoxName = If( json?.PropertyT("devBoxName"), out var __jsonDevBoxName) ? (string)__jsonDevBoxName : (string)DevBoxName;} {_actionName = If( json?.PropertyT("actionName"), out var __jsonActionName) ? (string)__jsonActionName : (string)ActionName;} + {_addOnName = If( json?.PropertyT("addOnName"), out var __jsonAddOnName) ? (string)__jsonAddOnName : (string)AddOnName;} {_customizationGroupName = If( json?.PropertyT("customizationGroupName"), out var __jsonCustomizationGroupName) ? (string)__jsonCustomizationGroupName : (string)CustomizationGroupName;} {_customizationTaskId = If( json?.PropertyT("customizationTaskId"), out var __jsonCustomizationTaskId) ? (string)__jsonCustomizationTaskId : (string)CustomizationTaskId;} {_operationId = If( json?.PropertyT("operationId"), out var __jsonOperationId) ? (string)__jsonOperationId : (string)OperationId;} + {_snapshotId = If( json?.PropertyT("snapshotId"), out var __jsonSnapshotId) ? (string)__jsonSnapshotId : (string)SnapshotId;} {_definitionName = If( json?.PropertyT("definitionName"), out var __jsonDefinitionName) ? (string)__jsonDefinitionName : (string)DefinitionName;} {_environmentName = If( json?.PropertyT("environmentName"), out var __jsonEnvironmentName) ? (string)__jsonEnvironmentName : (string)EnvironmentName;} {_environmentTypeName = If( json?.PropertyT("environmentTypeName"), out var __jsonEnvironmentTypeName) ? (string)__jsonEnvironmentTypeName : (string)EnvironmentTypeName;} @@ -116,14 +119,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode To AddIf( null != (((object)this._projectName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._projectName.ToString()) : null, "projectName" ,container.Add ); AddIf( null != (((object)this._catalogName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._catalogName.ToString()) : null, "catalogName" ,container.Add ); AddIf( null != (((object)this._taskName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._taskName.ToString()) : null, "taskName" ,container.Add ); + AddIf( null != (((object)this._imageBuildLogId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._imageBuildLogId.ToString()) : null, "imageBuildLogId" ,container.Add ); AddIf( null != (((object)this._poolName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._poolName.ToString()) : null, "poolName" ,container.Add ); AddIf( null != (((object)this._scheduleName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._scheduleName.ToString()) : null, "scheduleName" ,container.Add ); AddIf( null != (((object)this._userId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._userId.ToString()) : null, "userId" ,container.Add ); AddIf( null != (((object)this._devBoxName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._devBoxName.ToString()) : null, "devBoxName" ,container.Add ); AddIf( null != (((object)this._actionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._actionName.ToString()) : null, "actionName" ,container.Add ); + AddIf( null != (((object)this._addOnName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._addOnName.ToString()) : null, "addOnName" ,container.Add ); AddIf( null != (((object)this._customizationGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._customizationGroupName.ToString()) : null, "customizationGroupName" ,container.Add ); AddIf( null != (((object)this._customizationTaskId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._customizationTaskId.ToString()) : null, "customizationTaskId" ,container.Add ); AddIf( null != (((object)this._operationId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._operationId.ToString()) : null, "operationId" ,container.Add ); + AddIf( null != (((object)this._snapshotId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._snapshotId.ToString()) : null, "snapshotId" ,container.Add ); AddIf( null != (((object)this._definitionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._definitionName.ToString()) : null, "definitionName" ,container.Add ); AddIf( null != (((object)this._environmentName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._environmentName.ToString()) : null, "environmentName" ,container.Add ); AddIf( null != (((object)this._environmentTypeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Json.JsonString(this._environmentTypeName.ToString()) : null, "environmentTypeName" ,container.Add ); diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/AutoStartEnableStatus.Completer.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/AutoStartEnableStatus.Completer.cs new file mode 100644 index 000000000000..299adb1233de --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/AutoStartEnableStatus.Completer.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatusTypeConverter))] + public partial struct AutoStartEnableStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/AutoStartEnableStatus.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/AutoStartEnableStatus.TypeConverter.cs new file mode 100644 index 000000000000..cb8bc4f101b4 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/AutoStartEnableStatus.TypeConverter.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + public partial class AutoStartEnableStatusTypeConverter : + 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) => true; + + /// + /// 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 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) => AutoStartEnableStatus.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenterData.AutoRest/generated/api/Support/AutoStartEnableStatus.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/AutoStartEnableStatus.cs new file mode 100644 index 000000000000..b74435aad3bb --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/AutoStartEnableStatus.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// + /// Enables or disables whether the Dev Box should be automatically started at commencement of active hours. + /// + public partial struct AutoStartEnableStatus : + System.IEquatable + { + /// Auto start is disabled. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus Disabled = @"Disabled"; + + /// Auto start is enabled. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus Enabled = @"Enabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private AutoStartEnableStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AutoStartEnableStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AutoStartEnableStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AutoStartEnableStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AutoStartEnableStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AutoStartEnableStatus && Equals((AutoStartEnableStatus)obj); + } + + /// Returns hashCode for enum AutoStartEnableStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AutoStartEnableStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AutoStartEnableStatus + /// the value to convert to an instance of . + + public static implicit operator AutoStartEnableStatus(string value) + { + return new AutoStartEnableStatus(value); + } + + /// Implicit operator to convert AutoStartEnableStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus e) + { + return e._value; + } + + /// Overriding != operator for enum AutoStartEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AutoStartEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.AutoStartEnableStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxOperationKind.Completer.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxOperationKind.Completer.cs index f99587c39b09..2b0f54b881a4 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxOperationKind.Completer.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxOperationKind.Completer.cs @@ -42,6 +42,18 @@ public partial struct DevBoxOperationKind : { yield return new global::System.Management.Automation.CompletionResult("'Repair'", "Repair", global::System.Management.Automation.CompletionResultType.ParameterValue, "Repair"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RestoreSnapshot".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RestoreSnapshot'", "RestoreSnapshot", global::System.Management.Automation.CompletionResultType.ParameterValue, "RestoreSnapshot"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CaptureSnapshot".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CaptureSnapshot'", "CaptureSnapshot", global::System.Management.Automation.CompletionResultType.ParameterValue, "CaptureSnapshot"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Align".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Align'", "Align", global::System.Management.Automation.CompletionResultType.ParameterValue, "Align"); + } } } } \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxOperationKind.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxOperationKind.cs index 62b9b1e1f1d7..8ef9eec7f857 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxOperationKind.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxOperationKind.cs @@ -10,12 +10,21 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support public partial struct DevBoxOperationKind : System.IEquatable { + /// The operation represents a Dev Box align to the current network connection. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Align = @"Align"; + + /// The operation represents a Dev Box manual snapshot creation. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind CaptureSnapshot = @"CaptureSnapshot"; + /// The operation represents a Dev Box repair. public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Repair = @"Repair"; /// The operation represents a Dev Box restart. public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Restart = @"Restart"; + /// The operation represents a Dev Box restore from snapshot. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind RestoreSnapshot = @"RestoreSnapshot"; + /// The operation represents a Dev Box start. public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxOperationKind Start = @"Start"; diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxProvisioningState.Completer.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxProvisioningState.Completer.cs index 366f0c75d3dd..83d7dcde63ac 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxProvisioningState.Completer.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxProvisioningState.Completer.cs @@ -62,6 +62,10 @@ public partial struct DevBoxProvisioningState : { yield return new global::System.Management.Automation.CompletionResult("'Provisioning'", "Provisioning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Provisioning"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "PendingApproval".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'PendingApproval'", "PendingApproval", global::System.Management.Automation.CompletionResultType.ParameterValue, "PendingApproval"); + } if (global::System.String.IsNullOrEmpty(wordToComplete) || "ProvisionedWithWarning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { yield return new global::System.Management.Automation.CompletionResult("'ProvisionedWithWarning'", "ProvisionedWithWarning", global::System.Management.Automation.CompletionResultType.ParameterValue, "ProvisionedWithWarning"); diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxProvisioningState.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxProvisioningState.cs index 3cc9978954cc..8e4614307b0b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxProvisioningState.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxProvisioningState.cs @@ -28,6 +28,9 @@ public partial struct DevBoxProvisioningState : /// Dev Box is not provisioned. public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState NotProvisioned = @"NotProvisioned"; + /// Dev Box is pending approval. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState PendingApproval = @"PendingApproval"; + /// Dev Box was provisioned with warning. public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxProvisioningState ProvisionedWithWarning = @"ProvisionedWithWarning"; diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxTunnelStatus.Completer.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxTunnelStatus.Completer.cs new file mode 100644 index 000000000000..34ae29cd07e5 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxTunnelStatus.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// The detailed status of Dev Box Tunnel addon. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatusTypeConverter))] + public partial struct DevBoxTunnelStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Suspended".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Suspended'", "Suspended", global::System.Management.Automation.CompletionResultType.ParameterValue, "Suspended"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxTunnelStatus.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxTunnelStatus.TypeConverter.cs new file mode 100644 index 000000000000..4bd7534a54d6 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxTunnelStatus.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// The detailed status of Dev Box Tunnel addon. + public partial class DevBoxTunnelStatusTypeConverter : + 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) => true; + + /// + /// 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 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) => DevBoxTunnelStatus.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxTunnelStatus.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxTunnelStatus.cs new file mode 100644 index 000000000000..949c9d1ecb52 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/DevBoxTunnelStatus.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// The detailed status of Dev Box Tunnel addon. + public partial struct DevBoxTunnelStatus : + System.IEquatable + { + /// The tunnel is inactive and can't be connected. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus Disabled = @"Disabled"; + + /// The tunnel is active and can be connected. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus Enabled = @"Enabled"; + + /// The tunnel is suspended due to hibernation or other reasons. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus Suspended = @"Suspended"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DevBoxTunnelStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DevBoxTunnelStatus(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DevBoxTunnelStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DevBoxTunnelStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DevBoxTunnelStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DevBoxTunnelStatus && Equals((DevBoxTunnelStatus)obj); + } + + /// Returns hashCode for enum DevBoxTunnelStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DevBoxTunnelStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DevBoxTunnelStatus + /// the value to convert to an instance of . + + public static implicit operator DevBoxTunnelStatus(string value) + { + return new DevBoxTunnelStatus(value); + } + + /// Implicit operator to convert DevBoxTunnelStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus e) + { + return e._value; + } + + /// Overriding != operator for enum DevBoxTunnelStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DevBoxTunnelStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.DevBoxTunnelStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/KeepAwakeEnableStatus.Completer.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/KeepAwakeEnableStatus.Completer.cs new file mode 100644 index 000000000000..8ac66ed1e112 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/KeepAwakeEnableStatus.Completer.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatusTypeConverter))] + public partial struct KeepAwakeEnableStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/KeepAwakeEnableStatus.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/KeepAwakeEnableStatus.TypeConverter.cs new file mode 100644 index 000000000000..830ef0283898 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/KeepAwakeEnableStatus.TypeConverter.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + public partial class KeepAwakeEnableStatusTypeConverter : + 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) => true; + + /// + /// 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 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) => KeepAwakeEnableStatus.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenterData.AutoRest/generated/api/Support/KeepAwakeEnableStatus.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/KeepAwakeEnableStatus.cs new file mode 100644 index 000000000000..6db72f30be0e --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/KeepAwakeEnableStatus.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// + /// Enables or disables whether the Dev Box should be kept awake during active hours. + /// + public partial struct KeepAwakeEnableStatus : + System.IEquatable + { + /// Keep awake is disabled. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus Disabled = @"Disabled"; + + /// Keep awake is enabled. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus Enabled = @"Enabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to KeepAwakeEnableStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new KeepAwakeEnableStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type KeepAwakeEnableStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type KeepAwakeEnableStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is KeepAwakeEnableStatus && Equals((KeepAwakeEnableStatus)obj); + } + + /// Returns hashCode for enum KeepAwakeEnableStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private KeepAwakeEnableStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for KeepAwakeEnableStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to KeepAwakeEnableStatus + /// the value to convert to an instance of . + + public static implicit operator KeepAwakeEnableStatus(string value) + { + return new KeepAwakeEnableStatus(value); + } + + /// Implicit operator to convert KeepAwakeEnableStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus e) + { + return e._value; + } + + /// Overriding != operator for enum KeepAwakeEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum KeepAwakeEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.KeepAwakeEnableStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/PoolAlignTarget.Completer.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/PoolAlignTarget.Completer.cs new file mode 100644 index 000000000000..0a3564022be3 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/PoolAlignTarget.Completer.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// Possible values for the pool align target. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTargetTypeConverter))] + public partial struct PoolAlignTarget : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "NetworkProperties".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'NetworkProperties'", "NetworkProperties", global::System.Management.Automation.CompletionResultType.ParameterValue, "NetworkProperties"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/PoolAlignTarget.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/PoolAlignTarget.TypeConverter.cs new file mode 100644 index 000000000000..260507008989 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/PoolAlignTarget.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// Possible values for the pool align target. + public partial class PoolAlignTargetTypeConverter : + 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) => true; + + /// + /// 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 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) => PoolAlignTarget.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenterData.AutoRest/generated/api/Support/PoolAlignTarget.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/PoolAlignTarget.cs new file mode 100644 index 000000000000..d99e67a67bc3 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/PoolAlignTarget.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// Possible values for the pool align target. + public partial struct PoolAlignTarget : + System.IEquatable + { + /// Network properties. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget NetworkProperties = @"NetworkProperties"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to PoolAlignTarget + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new PoolAlignTarget(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type PoolAlignTarget + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type PoolAlignTarget (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is PoolAlignTarget && Equals((PoolAlignTarget)obj); + } + + /// Returns hashCode for enum PoolAlignTarget + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private PoolAlignTarget(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for PoolAlignTarget + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to PoolAlignTarget + /// the value to convert to an instance of . + + public static implicit operator PoolAlignTarget(string value) + { + return new PoolAlignTarget(value); + } + + /// Implicit operator to convert PoolAlignTarget to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget e) + { + return e._value; + } + + /// Overriding != operator for enum PoolAlignTarget + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum PoolAlignTarget + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProjectAbilityAsDeveloper.Completer.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProjectAbilityAsDeveloper.Completer.cs index 901f789f2fed..6d0c0651a440 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProjectAbilityAsDeveloper.Completer.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProjectAbilityAsDeveloper.Completer.cs @@ -30,6 +30,18 @@ public partial struct ProjectAbilityAsDeveloper : { yield return new global::System.Management.Automation.CompletionResult("'CustomizeDevBoxes'", "CustomizeDevBoxes", global::System.Management.Automation.CompletionResultType.ParameterValue, "CustomizeDevBoxes"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ConnectWithDevBoxTunnels".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ConnectWithDevBoxTunnels'", "ConnectWithDevBoxTunnels", global::System.Management.Automation.CompletionResultType.ParameterValue, "ConnectWithDevBoxTunnels"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CreateDevBoxTunnels".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CreateDevBoxTunnels'", "CreateDevBoxTunnels", global::System.Management.Automation.CompletionResultType.ParameterValue, "CreateDevBoxTunnels"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "DeleteDevBoxTunnels".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'DeleteDevBoxTunnels'", "DeleteDevBoxTunnels", global::System.Management.Automation.CompletionResultType.ParameterValue, "DeleteDevBoxTunnels"); + } if (global::System.String.IsNullOrEmpty(wordToComplete) || "DeleteDevBoxes".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { yield return new global::System.Management.Automation.CompletionResult("'DeleteDevBoxes'", "DeleteDevBoxes", global::System.Management.Automation.CompletionResultType.ParameterValue, "DeleteDevBoxes"); diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProjectAbilityAsDeveloper.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProjectAbilityAsDeveloper.cs index 9d475c2b3d6b..45fd41423591 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProjectAbilityAsDeveloper.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProjectAbilityAsDeveloper.cs @@ -10,9 +10,18 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support public partial struct ProjectAbilityAsDeveloper : System.IEquatable { + /// User can perform connect using DevBox tunnels. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsDeveloper ConnectWithDevBoxTunnels = @"ConnectWithDevBoxTunnels"; + + /// User can create DevBox tunnels. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsDeveloper CreateDevBoxTunnels = @"CreateDevBoxTunnels"; + /// User can customize their own dev boxes. public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsDeveloper CustomizeDevBoxes = @"CustomizeDevBoxes"; + /// User can delete DevBox tunnels. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsDeveloper DeleteDevBoxTunnels = @"DeleteDevBoxTunnels"; + /// User can delete their own dev boxes. public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProjectAbilityAsDeveloper DeleteDevBoxes = @"DeleteDevBoxes"; diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ProvisioningState.Completer.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProvisioningState.Completer.cs similarity index 79% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Support/ProvisioningState.Completer.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProvisioningState.Completer.cs index 5517fcd7a22e..57a081c223ae 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ProvisioningState.Completer.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProvisioningState.Completer.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support { - /// The provisioning state of a resource. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningStateTypeConverter))] + /// Indicates the general provisioning state. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningStateTypeConverter))] public partial struct ProvisioningState : System.Management.Automation.IArgumentCompleter { @@ -26,22 +26,26 @@ public partial struct ProvisioningState : /// public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { - yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); + yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { - yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); } if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } } } } \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProvisioningState.TypeConverter.cs similarity index 96% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs rename to generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProvisioningState.TypeConverter.cs index c81017062d21..ef8c1f1dbed3 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProvisioningState.TypeConverter.cs @@ -3,10 +3,10 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support { - /// The provisioning state of a resource. + /// Indicates the general provisioning state. public partial class ProvisioningStateTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProvisioningState.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProvisioningState.cs new file mode 100644 index 000000000000..00b6e1dec596 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/ProvisioningState.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// Indicates the general provisioning state. + public partial struct ProvisioningState : + System.IEquatable + { + /// Resource is creating. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState Creating = @"Creating"; + + /// Resource is being deleted. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState Deleting = @"Deleting"; + + /// Resource failed to provision. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState Failed = @"Failed"; + + /// Resource was successfully provisioned. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState Succeeded = @"Succeeded"; + + /// Resource is being updated. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState Updating = @"Updating"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ProvisioningState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ProvisioningState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ProvisioningState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ProvisioningState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ProvisioningState && Equals((ProvisioningState)obj); + } + + /// Returns hashCode for enum ProvisioningState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ProvisioningState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ProvisioningState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ProvisioningState + /// the value to convert to an instance of . + + public static implicit operator ProvisioningState(string value) + { + return new ProvisioningState(value); + } + + /// Implicit operator to convert ProvisioningState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState e) + { + return e._value; + } + + /// Overriding != operator for enum ProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ProvisioningState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/SnapshotType.Completer.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/SnapshotType.Completer.cs new file mode 100644 index 000000000000..fc6f57eb5f9c --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/SnapshotType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// The type of snapshot. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotTypeTypeConverter))] + public partial struct SnapshotType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Manual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Manual'", "Manual", global::System.Management.Automation.CompletionResultType.ParameterValue, "Manual"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Automatic".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Automatic'", "Automatic", global::System.Management.Automation.CompletionResultType.ParameterValue, "Automatic"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/SnapshotType.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/SnapshotType.TypeConverter.cs new file mode 100644 index 000000000000..587f98776f92 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/SnapshotType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// The type of snapshot. + public partial class SnapshotTypeTypeConverter : + 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) => true; + + /// + /// 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 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) => SnapshotType.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenterData.AutoRest/generated/api/Support/SnapshotType.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/SnapshotType.cs new file mode 100644 index 000000000000..fbf018cd2f27 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/SnapshotType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// The type of snapshot. + public partial struct SnapshotType : + System.IEquatable + { + /// The snapshot type indicates that this is an automatically taken snapshot. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType Automatic = @"Automatic"; + + /// The snapshot type indicates that this is a manually taken snapshot. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType Manual = @"Manual"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SnapshotType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SnapshotType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SnapshotType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SnapshotType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SnapshotType && Equals((SnapshotType)obj); + } + + /// Returns hashCode for enum SnapshotType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SnapshotType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SnapshotType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SnapshotType + /// the value to convert to an instance of . + + public static implicit operator SnapshotType(string value) + { + return new SnapshotType(value); + } + + /// Implicit operator to convert SnapshotType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType e) + { + return e._value; + } + + /// Overriding != operator for enum SnapshotType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SnapshotType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.SnapshotType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.Completer.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.Completer.cs new file mode 100644 index 000000000000..00a2f1b09614 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// Stop on no connect enable or disable status. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatusTypeConverter))] + public partial struct StopOnNoConnectEnableStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.TypeConverter.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.TypeConverter.cs new file mode 100644 index 000000000000..fb3908db7103 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// Stop on no connect enable or disable status. + public partial class StopOnNoConnectEnableStatusTypeConverter : + 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) => true; + + /// + /// 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 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) => StopOnNoConnectEnableStatus.CreateFrom(sourceValue); + + /// 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/DevCenter/DevCenterData.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.cs new file mode 100644 index 000000000000..a9990c333cc0 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/api/Support/StopOnNoConnectEnableStatus.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support +{ + + /// Stop on no connect enable or disable status. + public partial struct StopOnNoConnectEnableStatus : + System.IEquatable + { + /// Stop on no connect is not enabled on the Dev Box. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus Disabled = @"Disabled"; + + /// Stop on no connect is enabled on the Dev Box. + public static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus Enabled = @"Enabled"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to StopOnNoConnectEnableStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new StopOnNoConnectEnableStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type StopOnNoConnectEnableStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type StopOnNoConnectEnableStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is StopOnNoConnectEnableStatus && Equals((StopOnNoConnectEnableStatus)obj); + } + + /// Returns hashCode for enum StopOnNoConnectEnableStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private StopOnNoConnectEnableStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for StopOnNoConnectEnableStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to StopOnNoConnectEnableStatus + /// the value to convert to an instance of . + + public static implicit operator StopOnNoConnectEnableStatus(string value) + { + return new StopOnNoConnectEnableStatus(value); + } + + /// Implicit operator to convert StopOnNoConnectEnableStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus e) + { + return e._value; + } + + /// Overriding != operator for enum StopOnNoConnectEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum StopOnNoConnectEnableStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus e1, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.StopOnNoConnectEnableStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/ApproveAzDevCenterUserDevBox_Approve.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/ApproveAzDevCenterUserDevBox_Approve.cs new file mode 100644 index 000000000000..7cea9957f650 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/ApproveAzDevCenterUserDevBox_Approve.cs @@ -0,0 +1,518 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Approves the creation of a Dev Box. + /// + /// [OpenAPI] ApproveDevBox=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:approve" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Approve, @"AzDevCenterUserDevBox_Approve", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Approves the creation of a Dev Box.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:approve", ApiVersion = "2025-04-01-preview")] + public partial class ApproveAzDevCenterUserDevBox_Approve : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Display name for the Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Display name for the Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Display name for the Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("DevBoxName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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); + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ApproveAzDevCenterUserDevBox_Approve() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of ApproveAzDevCenterUserDevBox_Approve + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.ApproveAzDevCenterUserDevBox_Approve Clone() + { + var clone = new ApproveAzDevCenterUserDevBox_Approve(); + 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.Endpoint = this.Endpoint; + clone.ProjectName = this.ProjectName; + clone.UserId = this.UserId; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesApproveDevBox' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesApproveDevBox(Endpoint, ProjectName, UserId, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/ApproveAzDevCenterUserDevBox_ApproveViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/ApproveAzDevCenterUserDevBox_ApproveViaIdentity.cs new file mode 100644 index 000000000000..49fbc08ab7ff --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/ApproveAzDevCenterUserDevBox_ApproveViaIdentity.cs @@ -0,0 +1,498 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Approves the creation of a Dev Box. + /// + /// [OpenAPI] ApproveDevBox=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:approve" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Approve, @"AzDevCenterUserDevBox_ApproveViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Approves the creation of a Dev Box.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:approve", ApiVersion = "2025-04-01-preview")] + public partial class ApproveAzDevCenterUserDevBox_ApproveViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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); + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ApproveAzDevCenterUserDevBox_ApproveViaIdentity() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of ApproveAzDevCenterUserDevBox_ApproveViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.ApproveAzDevCenterUserDevBox_ApproveViaIdentity Clone() + { + var clone = new ApproveAzDevCenterUserDevBox_ApproveViaIdentity(); + 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.Endpoint = this.Endpoint; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesApproveDevBox' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevBoxesApproveDevBoxViaIdentity(InputObject.Id, Endpoint, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.UserId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.UserId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DevBoxName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevBoxName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevBoxesApproveDevBox(Endpoint, InputObject.ProjectName ?? null, InputObject.UserId ?? null, InputObject.DevBoxName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) + { + 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 { Endpoint=Endpoint }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/DisableAzDevCenterUserDevBoxAddOn_Disable.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/DisableAzDevCenterUserDevBoxAddOn_Disable.cs new file mode 100644 index 000000000000..ad2efb71ab0a --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/DisableAzDevCenterUserDevBoxAddOn_Disable.cs @@ -0,0 +1,536 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Disable a Dev Box addon. + /// + /// [OpenAPI] DisableDevBoxAddOn=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}:disable" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Disable, @"AzDevCenterUserDevBoxAddOn_Disable", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Disable a Dev Box addon.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}:disable", ApiVersion = "2025-04-01-preview")] + public partial class DisableAzDevCenterUserDevBoxAddOn_Disable : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// Backing field for property. + private string _addOnName; + + /// Name of the dev box addon. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the dev box addon.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the dev box addon.", + SerializedName = @"addOnName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string AddOnName { get => this._addOnName; set => this._addOnName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// Display name for the Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Display name for the Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Display name for the Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of DisableAzDevCenterUserDevBoxAddOn_Disable + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.DisableAzDevCenterUserDevBoxAddOn_Disable Clone() + { + var clone = new DisableAzDevCenterUserDevBoxAddOn_Disable(); + 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.Endpoint = this.Endpoint; + clone.ProjectName = this.ProjectName; + clone.UserId = this.UserId; + clone.DevBoxName = this.DevBoxName; + clone.AddOnName = this.AddOnName; + return clone; + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public DisableAzDevCenterUserDevBoxAddOn_Disable() + { + + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesDisableDevBoxAddOn' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesDisableDevBoxAddOn(Endpoint, ProjectName, UserId, DevBoxName, AddOnName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName,AddOnName=AddOnName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, AddOnName=AddOnName }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, AddOnName=AddOnName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/DisableAzDevCenterUserDevBoxAddOn_DisableViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/DisableAzDevCenterUserDevBoxAddOn_DisableViaIdentity.cs new file mode 100644 index 000000000000..c64c9f81cb52 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/DisableAzDevCenterUserDevBoxAddOn_DisableViaIdentity.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Disable a Dev Box addon. + /// + /// [OpenAPI] DisableDevBoxAddOn=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}:disable" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Disable, @"AzDevCenterUserDevBoxAddOn_DisableViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Disable a Dev Box addon.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}:disable", ApiVersion = "2025-04-01-preview")] + public partial class DisableAzDevCenterUserDevBoxAddOn_DisableViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of DisableAzDevCenterUserDevBoxAddOn_DisableViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.DisableAzDevCenterUserDevBoxAddOn_DisableViaIdentity Clone() + { + var clone = new DisableAzDevCenterUserDevBoxAddOn_DisableViaIdentity(); + 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.Endpoint = this.Endpoint; + return clone; + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public DisableAzDevCenterUserDevBoxAddOn_DisableViaIdentity() + { + + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesDisableDevBoxAddOn' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevBoxesDisableDevBoxAddOnViaIdentity(InputObject.Id, Endpoint, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.UserId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.UserId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DevBoxName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevBoxName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.AddOnName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AddOnName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevBoxesDisableDevBoxAddOn(Endpoint, InputObject.ProjectName ?? null, InputObject.UserId ?? null, InputObject.DevBoxName ?? null, InputObject.AddOnName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) + { + 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 { Endpoint=Endpoint }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/EnableAzDevCenterUserDevBoxAddOn_Enable.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/EnableAzDevCenterUserDevBoxAddOn_Enable.cs new file mode 100644 index 000000000000..176d7dfc687b --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/EnableAzDevCenterUserDevBoxAddOn_Enable.cs @@ -0,0 +1,536 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Enable a Dev Box addon. + /// + /// [OpenAPI] EnableDevBoxAddOn=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}:enable" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Enable, @"AzDevCenterUserDevBoxAddOn_Enable", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Enable a Dev Box addon.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}:enable", ApiVersion = "2025-04-01-preview")] + public partial class EnableAzDevCenterUserDevBoxAddOn_Enable : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// Backing field for property. + private string _addOnName; + + /// Name of the dev box addon. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the dev box addon.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the dev box addon.", + SerializedName = @"addOnName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string AddOnName { get => this._addOnName; set => this._addOnName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// Display name for the Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Display name for the Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Display name for the Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of EnableAzDevCenterUserDevBoxAddOn_Enable + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.EnableAzDevCenterUserDevBoxAddOn_Enable Clone() + { + var clone = new EnableAzDevCenterUserDevBoxAddOn_Enable(); + 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.Endpoint = this.Endpoint; + clone.ProjectName = this.ProjectName; + clone.UserId = this.UserId; + clone.DevBoxName = this.DevBoxName; + clone.AddOnName = this.AddOnName; + return clone; + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public EnableAzDevCenterUserDevBoxAddOn_Enable() + { + + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesEnableDevBoxAddOn' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesEnableDevBoxAddOn(Endpoint, ProjectName, UserId, DevBoxName, AddOnName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName,AddOnName=AddOnName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, AddOnName=AddOnName }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, AddOnName=AddOnName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/EnableAzDevCenterUserDevBoxAddOn_EnableViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/EnableAzDevCenterUserDevBoxAddOn_EnableViaIdentity.cs new file mode 100644 index 000000000000..a9becb7f4286 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/EnableAzDevCenterUserDevBoxAddOn_EnableViaIdentity.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Enable a Dev Box addon. + /// + /// [OpenAPI] EnableDevBoxAddOn=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}:enable" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Enable, @"AzDevCenterUserDevBoxAddOn_EnableViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Enable a Dev Box addon.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}:enable", ApiVersion = "2025-04-01-preview")] + public partial class EnableAzDevCenterUserDevBoxAddOn_EnableViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of EnableAzDevCenterUserDevBoxAddOn_EnableViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.EnableAzDevCenterUserDevBoxAddOn_EnableViaIdentity Clone() + { + var clone = new EnableAzDevCenterUserDevBoxAddOn_EnableViaIdentity(); + 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.Endpoint = this.Endpoint; + return clone; + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public EnableAzDevCenterUserDevBoxAddOn_EnableViaIdentity() + { + + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesEnableDevBoxAddOn' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevBoxesEnableDevBoxAddOnViaIdentity(InputObject.Id, Endpoint, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.UserId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.UserId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DevBoxName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevBoxName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.AddOnName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AddOnName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevBoxesEnableDevBoxAddOn(Endpoint, InputObject.ProjectName ?? null, InputObject.UserId ?? null, InputObject.DevBoxName ?? null, InputObject.AddOnName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) + { + 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 { Endpoint=Endpoint }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/ExportAzDevCenterUserDevBoxSnapshot_Capture.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/ExportAzDevCenterUserDevBoxSnapshot_Capture.cs new file mode 100644 index 000000000000..72ccd286d1ea --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/ExportAzDevCenterUserDevBoxSnapshot_Capture.cs @@ -0,0 +1,524 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// + /// Captures a manual snapshot of the Dev Box.\nUpon completion, a snapshotId will be generated.\nTo retrieve all snapshots + /// and their corresponding IDs, use the list snapshots endpoint. + /// + /// + /// [OpenAPI] CaptureSnapshot=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:captureSnapshot" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Export, @"AzDevCenterUserDevBoxSnapshot_Capture", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Captures a manual snapshot of the Dev Box.\nUpon completion, a snapshotId will be generated.\nTo retrieve all snapshots and their corresponding IDs, use the list snapshots endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:captureSnapshot", ApiVersion = "2025-04-01-preview")] + public partial class ExportAzDevCenterUserDevBoxSnapshot_Capture : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// Display name for the Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Display name for the Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Display name for the Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of ExportAzDevCenterUserDevBoxSnapshot_Capture + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.ExportAzDevCenterUserDevBoxSnapshot_Capture Clone() + { + var clone = new ExportAzDevCenterUserDevBoxSnapshot_Capture(); + 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.Endpoint = this.Endpoint; + clone.ProjectName = this.ProjectName; + clone.UserId = this.UserId; + clone.DevBoxName = this.DevBoxName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ExportAzDevCenterUserDevBoxSnapshot_Capture() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesCaptureSnapshot' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesCaptureSnapshot(Endpoint, ProjectName, UserId, DevBoxName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/ExportAzDevCenterUserDevBoxSnapshot_CaptureViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/ExportAzDevCenterUserDevBoxSnapshot_CaptureViaIdentity.cs new file mode 100644 index 000000000000..7b2739dde6ef --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/ExportAzDevCenterUserDevBoxSnapshot_CaptureViaIdentity.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// + /// Captures a manual snapshot of the Dev Box.\nUpon completion, a snapshotId will be generated.\nTo retrieve all snapshots + /// and their corresponding IDs, use the list snapshots endpoint. + /// + /// + /// [OpenAPI] CaptureSnapshot=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:captureSnapshot" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Export, @"AzDevCenterUserDevBoxSnapshot_CaptureViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Captures a manual snapshot of the Dev Box.\nUpon completion, a snapshotId will be generated.\nTo retrieve all snapshots and their corresponding IDs, use the list snapshots endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:captureSnapshot", ApiVersion = "2025-04-01-preview")] + public partial class ExportAzDevCenterUserDevBoxSnapshot_CaptureViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of ExportAzDevCenterUserDevBoxSnapshot_CaptureViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.ExportAzDevCenterUserDevBoxSnapshot_CaptureViaIdentity Clone() + { + var clone = new ExportAzDevCenterUserDevBoxSnapshot_CaptureViaIdentity(); + 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.Endpoint = this.Endpoint; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public ExportAzDevCenterUserDevBoxSnapshot_CaptureViaIdentity() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesCaptureSnapshot' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevBoxesCaptureSnapshotViaIdentity(InputObject.Id, Endpoint, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.UserId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.UserId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DevBoxName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevBoxName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevBoxesCaptureSnapshot(Endpoint, InputObject.ProjectName ?? null, InputObject.UserId ?? null, InputObject.DevBoxName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) + { + 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 { Endpoint=Endpoint }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserCatalog_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserCatalog_Get.cs index 15e0b4a41d12..8ee2bd13c8da 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserCatalog_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserCatalog_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserCatalog_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets the specified catalog within the project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserCatalog_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -144,24 +144,24 @@ public partial class GetAzDevCenterUserCatalog_Get : global::System.Management.A /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -366,12 +366,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -388,7 +388,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, CatalogName=CatalogName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -406,12 +406,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,7 +423,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserCatalog_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserCatalog_GetViaIdentity.cs index 4b18cb8a9958..c0999cc62896 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserCatalog_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserCatalog_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserCatalog_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets the specified catalog within the project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs/{catalogName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserCatalog_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserCatalog_GetViaIdentity : global::System.M /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog /// 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); + 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) @@ -362,12 +362,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -384,7 +384,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -402,12 +402,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -419,7 +419,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserCatalog_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserCatalog_List.cs index 8f982d9a3a3d..5c62faedac8c 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserCatalog_List.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserCatalog_List.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserCatalog_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists all of the catalogs available for a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserCatalog_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -136,24 +136,24 @@ public partial class GetAzDevCenterUserCatalog_List : global::System.Management. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalog /// 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); + 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) @@ -358,12 +358,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -380,7 +380,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -398,12 +398,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCatalog + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCatalog /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAction_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAction_Get.cs index 8437d329f155..a712707da4d9 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAction_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAction_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxAction_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets an action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxAction_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -179,24 +179,24 @@ public partial class GetAzDevCenterUserDevBoxAction_Get : global::System.Managem /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction /// 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); + 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) @@ -401,12 +401,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,7 +423,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -441,12 +441,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -458,7 +458,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAction_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAction_GetViaIdentity.cs index b826268cba14..4cda04157b27 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAction_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAction_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxAction_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets an action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxAction_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserDevBoxAction_GetViaIdentity : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction /// 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); + 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) @@ -370,12 +370,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -392,7 +392,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -410,12 +410,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,7 +427,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAction_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAction_List.cs index 02b5f49b2fb4..4d67f37c4873 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAction_List.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAction_List.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxAction_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists actions on a Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxAction_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -170,24 +170,24 @@ public partial class GetAzDevCenterUserDevBoxAction_List : global::System.Manage /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAction /// 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); + 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) @@ -392,12 +392,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -414,7 +414,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -432,12 +432,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAddon_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAddon_Get.cs new file mode 100644 index 000000000000..0ab9e2516bd2 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAddon_Get.cs @@ -0,0 +1,465 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Gets a Dev Box addon by Dev Box addon id. + /// + /// [OpenAPI] GetDevBoxAddon=>GET:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxAddon_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets a Dev Box addon by Dev Box addon id.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterUserDevBoxAddon_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// Backing field for property. + private string _addOnName; + + /// Name of the dev box addon. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the dev box addon.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the dev box addon.", + SerializedName = @"addOnName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string AddOnName { get => this._addOnName; set => this._addOnName = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// Display name for the Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Display name for the Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Display name for the Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterUserDevBoxAddon_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesGetDevBoxAddon(Endpoint, ProjectName, UserId, DevBoxName, AddOnName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName,AddOnName=AddOnName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, AddOnName=AddOnName }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, AddOnName=AddOnName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAddon_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAddon_GetViaIdentity.cs new file mode 100644 index 000000000000..e552466f8cd9 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAddon_GetViaIdentity.cs @@ -0,0 +1,435 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Gets a Dev Box addon by Dev Box addon id. + /// + /// [OpenAPI] GetDevBoxAddon=>GET:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxAddon_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets a Dev Box addon by Dev Box addon id.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterUserDevBoxAddon_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterUserDevBoxAddon_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevBoxesGetDevBoxAddonViaIdentity(InputObject.Id, Endpoint, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.UserId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.UserId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DevBoxName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevBoxName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.AddOnName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AddOnName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevBoxesGetDevBoxAddon(Endpoint, InputObject.ProjectName ?? null, InputObject.UserId ?? null, InputObject.DevBoxName ?? null, InputObject.AddOnName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) + { + 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 { Endpoint=Endpoint }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAddon_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAddon_List.cs new file mode 100644 index 000000000000..e98c0d74970c --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxAddon_List.cs @@ -0,0 +1,473 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Lists addons for this Dev Box. + /// + /// [OpenAPI] ListDevBoxAddons=>GET:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxAddon_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists addons for this Dev Box.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterUserDevBoxAddon_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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 flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// Display name for the Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Display name for the Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Display name for the Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOn + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterUserDevBoxAddon_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesListDevBoxAddons(Endpoint, ProjectName, UserId, DevBoxName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxAddOn + /// 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 + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesListDevBoxAddons_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationGroup_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationGroup_Get.cs index caea672b042a..968825cd6bc0 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationGroup_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationGroup_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxCustomizationGroup_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@" Gets a customization group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxCustomizationGroup_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -178,24 +178,24 @@ public partial class GetAzDevCenterUserDevBoxCustomizationGroup_Get : global::Sy /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup /// 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); + 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) @@ -400,12 +400,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -422,7 +422,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, CustomizationGroupName=CustomizationGroupName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -440,12 +440,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -457,7 +457,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationGroup_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationGroup_GetViaIdentity.cs index 154a31f01c63..d472ba030af6 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationGroup_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationGroup_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxCustomizationGroup_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@" Gets a customization group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxCustomizationGroup_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserDevBoxCustomizationGroup_GetViaIdentity : /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup /// 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); + 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) @@ -370,12 +370,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -392,7 +392,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -410,12 +410,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,7 +427,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationGroup_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationGroup_List.cs index d8d495fde997..83fa78763d19 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationGroup_List.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationGroup_List.cs @@ -9,7 +9,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets using System; /// - /// Lists customization groups on the Dev Box. Listed customization groups exclude \n task information unless specified via + /// Lists customization groups on the Dev Box. Listed customization groups exclude\n task information unless specified via /// the include parameter. /// /// @@ -17,10 +17,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxCustomizationGroup_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup))] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@" Lists customization groups on the Dev Box. Listed customization groups exclude \n task information unless specified via the include parameter.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@" Lists customization groups on the Dev Box. Listed customization groups exclude\n task information unless specified via the include parameter.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxCustomizationGroup_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -190,24 +190,24 @@ public partial class GetAzDevCenterUserDevBoxCustomizationGroup_List : global::S /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroup /// 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); + 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) @@ -412,12 +412,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -434,7 +434,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, Include=this.InvocationInformation.BoundParameters.ContainsKey("Include") ? Include : null }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -452,12 +452,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationGroup /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskDefinition_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskDefinition_Get.cs index 942175673024..36ebbca39008 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskDefinition_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskDefinition_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxCustomizationTaskDefinition_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets a customization task.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs/{catalogName}/customizationTasks/{taskName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs/{catalogName}/customizationTasks/{taskName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxCustomizationTaskDefinition_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -158,24 +158,24 @@ public partial class GetAzDevCenterUserDevBoxCustomizationTaskDefinition_Get : g /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition /// 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); + 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) @@ -380,12 +380,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -402,7 +402,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, CatalogName=CatalogName, TaskName=TaskName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -420,12 +420,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -437,7 +437,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskDefinition_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskDefinition_GetViaIdentity.cs index 9b4a51e4b794..54a6784e449f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskDefinition_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskDefinition_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxCustomizationTaskDefinition_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets a customization task.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs/{catalogName}/customizationTasks/{taskName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs/{catalogName}/customizationTasks/{taskName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxCustomizationTaskDefinition_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserDevBoxCustomizationTaskDefinition_GetViaI /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition /// 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); + 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) @@ -367,12 +367,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -389,7 +389,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -407,12 +407,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -424,7 +424,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskDefinition_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskDefinition_List.cs index 107552c3db38..89c605793178 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskDefinition_List.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskDefinition_List.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxCustomizationTaskDefinition_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists all customization tasks available to the project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/customizationTasks", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/customizationTasks", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxCustomizationTaskDefinition_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -136,24 +136,24 @@ public partial class GetAzDevCenterUserDevBoxCustomizationTaskDefinition_List : /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinition /// 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); + 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) @@ -358,12 +358,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -380,7 +380,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -398,12 +398,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedCustomizationTaskDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedCustomizationTaskDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskLog_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskLog_Get.cs index dec556f5e807..7c0c2e3555e1 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskLog_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskLog_Get.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets [global::System.Management.Automation.OutputType(typeof(string))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets the log for a customization task.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}/logs/{customizationTaskId}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}/logs/{customizationTaskId}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxCustomizationTaskLog_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -171,15 +171,13 @@ public partial class GetAzDevCenterUserDevBoxCustomizationTaskLog_Get : global:: private string _userId; /// - /// The AAD object id of the user. If value is 'me', the identity is taken from the - /// authentication context. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = " The AAD object id of the user. If value is 'me', the identity is taken from the \n authentication context.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, ReadOnly = false, - Description = @" The AAD object id of the user. If value is 'me', the identity is taken from the - authentication context.", + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", SerializedName = @"userId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( @@ -194,12 +192,12 @@ public partial class GetAzDevCenterUserDevBoxCustomizationTaskLog_Get : global:: /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 @@ -415,12 +413,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -437,7 +435,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, CustomizationGroupName=CustomizationGroupName, CustomizationTaskId=CustomizationTaskId }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskLog_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskLog_GetViaIdentity.cs index d19cf091196f..7ec9f0ae4996 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskLog_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxCustomizationTaskLog_GetViaIdentity.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets [global::System.Management.Automation.OutputType(typeof(string))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets the log for a customization task.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}/logs/{customizationTaskId}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}/logs/{customizationTaskId}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxCustomizationTaskLog_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,12 +124,12 @@ public partial class GetAzDevCenterUserDevBoxCustomizationTaskLog_GetViaIdentity /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 @@ -373,12 +373,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -395,7 +395,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxImagingTaskLog_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxImagingTaskLog_Get.cs new file mode 100644 index 000000000000..cf56b5b3c4ef --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxImagingTaskLog_Get.cs @@ -0,0 +1,429 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Gets the log for an imaging build task. + /// + /// [OpenAPI] GetImagingTaskLog=>GET:"/projects/{projectName}/imageBuildLogs/{imageBuildLogId}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxImagingTaskLog_Get")] + [global::System.Management.Automation.OutputType(typeof(string))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets the log for an imaging build task.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/imageBuildLogs/{imageBuildLogId}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterUserDevBoxImagingTaskLog_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _imageBuildLogId; + + /// An imaging build log id. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "An imaging build log id.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"An imaging build log id.", + SerializedName = @"imageBuildLogId", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ImageBuildLogId { get => this._imageBuildLogId; set => this._imageBuildLogId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The DevCenter Project upon which to execute operations. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter Project upon which to execute operations.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter Project upon which to execute operations.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 string 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterUserDevBoxImagingTaskLog_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesGetImagingTaskLog(Endpoint, ProjectName, ImageBuildLogId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,ImageBuildLogId=ImageBuildLogId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, ImageBuildLogId=ImageBuildLogId }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, ImageBuildLogId=ImageBuildLogId }) + { + 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 string 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 string + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxImagingTaskLog_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxImagingTaskLog_GetViaIdentity.cs new file mode 100644 index 000000000000..c862df39551c --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxImagingTaskLog_GetViaIdentity.cs @@ -0,0 +1,425 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Gets the log for an imaging build task. + /// + /// [OpenAPI] GetImagingTaskLog=>GET:"/projects/{projectName}/imageBuildLogs/{imageBuildLogId}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxImagingTaskLog_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(string))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets the log for an imaging build task.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/imageBuildLogs/{imageBuildLogId}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterUserDevBoxImagingTaskLog_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 string 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterUserDevBoxImagingTaskLog_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevBoxesGetImagingTaskLogViaIdentity(InputObject.Id, Endpoint, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ImageBuildLogId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ImageBuildLogId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevBoxesGetImagingTaskLog(Endpoint, InputObject.ProjectName ?? null, InputObject.ImageBuildLogId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) + { + 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 { Endpoint=Endpoint }) + { + 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 string 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 string + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxOperation_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxOperation_Get.cs index e9785b1cbb82..34762ec24f18 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxOperation_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxOperation_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxOperation_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets an operation on a Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/operations/{operationId}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/operations/{operationId}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxOperation_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -178,24 +178,24 @@ public partial class GetAzDevCenterUserDevBoxOperation_Get : global::System.Mana /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation /// 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); + 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) @@ -400,12 +400,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -422,7 +422,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, OperationId=OperationId }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -440,12 +440,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -457,7 +457,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxOperation_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxOperation_GetViaIdentity.cs index 22f10e107ae3..6f420534ab1a 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxOperation_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxOperation_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxOperation_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets an operation on a Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/operations/{operationId}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/operations/{operationId}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxOperation_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserDevBoxOperation_GetViaIdentity : global:: /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation /// 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); + 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) @@ -370,12 +370,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -392,7 +392,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -410,12 +410,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,7 +427,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxOperation_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxOperation_List.cs index 685d3c729a53..25f0a161912d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxOperation_List.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxOperation_List.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxOperation_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists operations on the Dev Box which have occurred within the past 90 days.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/operations", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/operations", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxOperation_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -170,24 +170,24 @@ public partial class GetAzDevCenterUserDevBoxOperation_List : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperation /// 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); + 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) @@ -392,12 +392,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -414,7 +414,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -432,12 +432,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxOperation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxOperation /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxRemoteConnection_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxRemoteConnection_Get.cs index 7f697e74cd3f..dfabbf59e747 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxRemoteConnection_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxRemoteConnection_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxRemoteConnection_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets RDP Connection info.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/remoteConnection", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/remoteConnection", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxRemoteConnection_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -164,24 +164,24 @@ public partial class GetAzDevCenterUserDevBoxRemoteConnection_Get : global::Syst /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection /// 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); + 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) @@ -386,12 +386,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -408,7 +408,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -426,12 +426,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -443,7 +443,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxRemoteConnection_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxRemoteConnection_GetViaIdentity.cs index 497c2d6a67b1..cae9b9c22ba2 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxRemoteConnection_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxRemoteConnection_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxRemoteConnection_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets RDP Connection info.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/remoteConnection", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/remoteConnection", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBoxRemoteConnection_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserDevBoxRemoteConnection_GetViaIdentity : g /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection /// 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); + 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) @@ -366,12 +366,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -388,7 +388,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -406,12 +406,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,7 +423,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxSnapshot_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxSnapshot_Get.cs new file mode 100644 index 000000000000..98b690174d7b --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxSnapshot_Get.cs @@ -0,0 +1,465 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Gets a snapshot by snapshot id. + /// + /// [OpenAPI] GetSnapshot=>GET:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/snapshots/{snapshotId}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxSnapshot_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets a snapshot by snapshot id.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/snapshots/{snapshotId}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterUserDevBoxSnapshot_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// Display name for the Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Display name for the Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Display name for the Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _snapshotId; + + /// The id of the snapshot. Should be treated as opaque string. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The id of the snapshot. Should be treated as opaque string.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The id of the snapshot. Should be treated as opaque string.", + SerializedName = @"snapshotId", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string SnapshotId { get => this._snapshotId; set => this._snapshotId = value; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterUserDevBoxSnapshot_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesGetSnapshot(Endpoint, ProjectName, UserId, DevBoxName, SnapshotId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName,SnapshotId=SnapshotId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, SnapshotId=SnapshotId }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, SnapshotId=SnapshotId }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxSnapshot_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxSnapshot_GetViaIdentity.cs new file mode 100644 index 000000000000..7d0506948532 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxSnapshot_GetViaIdentity.cs @@ -0,0 +1,435 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Gets a snapshot by snapshot id. + /// + /// [OpenAPI] GetSnapshot=>GET:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/snapshots/{snapshotId}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxSnapshot_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets a snapshot by snapshot id.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/snapshots/{snapshotId}", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterUserDevBoxSnapshot_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterUserDevBoxSnapshot_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevBoxesGetSnapshotViaIdentity(InputObject.Id, Endpoint, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.UserId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.UserId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DevBoxName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevBoxName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.SnapshotId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SnapshotId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevBoxesGetSnapshot(Endpoint, InputObject.ProjectName ?? null, InputObject.UserId ?? null, InputObject.DevBoxName ?? null, InputObject.SnapshotId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) + { + 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 { Endpoint=Endpoint }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxSnapshot_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxSnapshot_List.cs new file mode 100644 index 000000000000..4e8cd1db4ba0 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBoxSnapshot_List.cs @@ -0,0 +1,473 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Lists snapshots for this Dev Box. + /// + /// [OpenAPI] ListSnapshots=>GET:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/snapshots" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBoxSnapshot_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists snapshots for this Dev Box.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/snapshots", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterUserDevBoxSnapshot_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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 flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// Display name for the Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Display name for the Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Display name for the Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshot + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterUserDevBoxSnapshot_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesListSnapshots(Endpoint, ProjectName, UserId, DevBoxName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxSnapshot + /// 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 + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesListSnapshots_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_Get.cs index 1c42204e241c..ff907ce492dd 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBox_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets a Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBox_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -161,24 +161,24 @@ public partial class GetAzDevCenterUserDevBox_Get : global::System.Management.Au /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox /// 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); + 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) @@ -383,12 +383,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -405,7 +405,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -423,12 +423,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -440,7 +440,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_GetViaIdentity.cs index d867375a1c3d..418599a650e8 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBox_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets a Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBox_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserDevBox_GetViaIdentity : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox /// 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); + 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) @@ -366,12 +366,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -388,7 +388,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -406,12 +406,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,7 +423,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_List.cs index ccf508ea20dd..45b2509aac04 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_List.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_List.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBox_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists Dev Boxes that the caller has access to in the DevCenter.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/devboxes", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/devboxes", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBox_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -122,24 +122,24 @@ public partial class GetAzDevCenterUserDevBox_List : global::System.Management.A /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBox + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBox /// 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); + 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) @@ -344,12 +344,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -366,7 +366,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -384,12 +384,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBox + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBox /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_List1.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_List1.cs index e32cf0bf5a29..8fd56d175417 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_List1.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_List1.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBox_List1")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists Dev Boxes in the project for a particular user.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBox_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -152,24 +152,24 @@ public partial class GetAzDevCenterUserDevBox_List1 : global::System.Management. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBox + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBox /// 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); + 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) @@ -374,12 +374,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -396,7 +396,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -414,12 +414,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBox + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBox /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_List2.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_List2.cs index 79e89bc5baea..de185cc7c804 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_List2.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevBox_List2.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevBox_List2")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists Dev Boxes in the Dev Center for a particular user.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/users/{userId}/devboxes", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/users/{userId}/devboxes", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserDevBox_List2 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -138,24 +138,24 @@ public partial class GetAzDevCenterUserDevBox_List2 : global::System.Management. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBox + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBox /// 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); + 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) @@ -360,12 +360,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -382,7 +382,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, UserId=UserId }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -400,12 +400,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBox + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBox /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevCenterApproval_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevCenterApproval_List.cs new file mode 100644 index 000000000000..3daf1519df7d --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserDevCenterApproval_List.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Gets a list of Dev Box creations that are pending approval. + /// + /// [OpenAPI] ListApprovals=>GET:"/projects/{projectName}/approvals" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserDevCenterApproval_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets a list of Dev Box creations that are pending approval.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/approvals", ApiVersion = "2025-04-01-preview")] + public partial class GetAzDevCenterUserDevCenterApproval_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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 flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 int _maxpagesize; + + /// The maximum number of result items per page. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum number of result items per page.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of result items per page.", + SerializedName = @"maxpagesize", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Query)] + public int Maxpagesize { get => this._maxpagesize; set => this._maxpagesize = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _select; + + /// Select the specified fields to be included in the response. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Select the specified fields to be included in the response.")] + [global::System.Management.Automation.AllowEmptyCollection] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Select the specified fields to be included in the response.", + SerializedName = @"select", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Query)] + public string[] Select { get => this._select; set => this._select = value; } + + /// Backing field for property. + private int _skip; + + /// The number of result items to skip. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to skip.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to skip.", + SerializedName = @"skip", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Query)] + public int Skip { get => this._skip; set => this._skip = value; } + + /// Backing field for property. + private int _top; + + /// The number of result items to return. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of result items to return.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of result items to return.", + SerializedName = @"top", + PossibleTypes = new [] { typeof(int) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DoNotExport] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Query)] + public int Top { get => this._top; set => this._top = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApproval + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzDevCenterUserDevCenterApproval_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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevCenterListApprovals(Endpoint, ProjectName, this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null /* arrayOf */, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?),Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?),Maxpagesize=this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?),Select=this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null /* arrayOf */}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Maxpagesize=this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), Select=this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null /* arrayOf */ }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?), Skip=this.InvocationInformation.BoundParameters.ContainsKey("Skip") ? Skip : default(int?), Maxpagesize=this.InvocationInformation.BoundParameters.ContainsKey("Maxpagesize") ? Maxpagesize : default(int?), Select=this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null /* arrayOf */ }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedApproval + /// 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 + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevCenterListApprovals_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentAction_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentAction_Get.cs index 6b5fdf9061f1..36cab7ec1337 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentAction_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentAction_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentAction_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Retrieve a specific environment action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/actions/{actionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/actions/{actionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentAction_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -179,24 +179,24 @@ public partial class GetAzDevCenterUserEnvironmentAction_Get : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction /// 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); + 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) @@ -401,12 +401,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,7 +423,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, EnvironmentName=EnvironmentName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -441,12 +441,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -458,7 +458,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentAction_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentAction_GetViaIdentity.cs index 39a33e9bc226..eac2e1b2ff5a 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentAction_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentAction_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentAction_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Retrieve a specific environment action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/actions/{actionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/actions/{actionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentAction_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserEnvironmentAction_GetViaIdentity : global /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction /// 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); + 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) @@ -370,12 +370,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -392,7 +392,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -410,12 +410,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,7 +427,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentAction_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentAction_List.cs index 290322d94dad..3db376a69f5a 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentAction_List.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentAction_List.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentAction_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Get all scheduled actions for a user within an environment.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/actions", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/actions", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentAction_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -170,24 +170,24 @@ public partial class GetAzDevCenterUserEnvironmentAction_List : global::System.M /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentAction /// 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); + 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) @@ -392,12 +392,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -414,7 +414,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, EnvironmentName=EnvironmentName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -432,12 +432,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentAction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_Get.cs index 8adc18868357..5f527ab90ecb 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentDefinition_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Get an environment definition from a catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{definitionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{definitionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentDefinition_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -158,24 +158,24 @@ public partial class GetAzDevCenterUserEnvironmentDefinition_Get : global::Syste /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition /// 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); + 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) @@ -380,12 +380,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -402,7 +402,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, CatalogName=CatalogName, DefinitionName=DefinitionName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -420,12 +420,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -437,7 +437,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_GetViaIdentity.cs index ec887d9733c9..36de7a2ad127 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentDefinition_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Get an environment definition from a catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{definitionName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions/{definitionName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentDefinition_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserEnvironmentDefinition_GetViaIdentity : gl /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition /// 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); + 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) @@ -366,12 +366,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -388,7 +388,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -406,12 +406,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,7 +423,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_List.cs index 09bc6f0d1e86..d6bcf860ed68 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_List.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_List.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentDefinition_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists all environment definitions available within a catalog.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/catalogs/{catalogName}/environmentDefinitions", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentDefinition_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -150,24 +150,24 @@ public partial class GetAzDevCenterUserEnvironmentDefinition_List : global::Syst /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinition /// 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); + 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) @@ -372,12 +372,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -394,7 +394,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, CatalogName=CatalogName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -412,12 +412,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_List1.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_List1.cs index b8f7916c6829..7a8b53887448 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_List1.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentDefinition_List1.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentDefinition_List1")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists all environment definitions available for a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/environmentDefinitions", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/environmentDefinitions", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentDefinition_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -136,24 +136,24 @@ public partial class GetAzDevCenterUserEnvironmentDefinition_List1 : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinition /// 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); + 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) @@ -358,12 +358,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -380,7 +380,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -398,12 +398,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentLog_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentLog_Get.cs index d82dc2e7aef5..b9dc72bedd66 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentLog_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentLog_Get.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets [global::System.Management.Automation.OutputType(typeof(string))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets the logs for an operation on an environment.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/operations/{operationId}/logs", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/operations/{operationId}/logs", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentLog_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -178,12 +178,12 @@ public partial class GetAzDevCenterUserEnvironmentLog_Get : global::System.Manag /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 @@ -399,12 +399,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -421,7 +421,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, EnvironmentName=EnvironmentName, OperationId=OperationId }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentLog_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentLog_GetViaIdentity.cs index 05d93c1bb2a3..d65ca4a7b3ed 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentLog_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentLog_GetViaIdentity.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets [global::System.Management.Automation.OutputType(typeof(string))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets the logs for an operation on an environment.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/operations/{operationId}/logs", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/operations/{operationId}/logs", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentLog_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,12 +124,12 @@ public partial class GetAzDevCenterUserEnvironmentLog_GetViaIdentity : global::S /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 @@ -369,12 +369,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -391,7 +391,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOperation_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOperation_Get.cs index cf522511cd1b..b84fc1b0d224 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOperation_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOperation_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentOperation_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets an environment action result.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/operations/{operationId}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/operations/{operationId}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentOperation_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -178,24 +178,24 @@ public partial class GetAzDevCenterUserEnvironmentOperation_Get : global::System /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation /// 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); + 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) @@ -400,12 +400,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -422,7 +422,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, EnvironmentName=EnvironmentName, OperationId=OperationId }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -440,12 +440,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -457,7 +457,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOperation_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOperation_GetViaIdentity.cs index 7f69a65ed35b..be905d8a263b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOperation_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOperation_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentOperation_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets an environment action result.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/operations/{operationId}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/operations/{operationId}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentOperation_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserEnvironmentOperation_GetViaIdentity : glo /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation /// 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); + 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) @@ -370,12 +370,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -392,7 +392,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -410,12 +410,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,7 +427,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOperation_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOperation_List.cs index c2a8dd603c43..0618c13f5f56 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOperation_List.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOperation_List.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentOperation_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists operations on the environment which have occurred within the past 90 days")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/operations", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/operations", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentOperation_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -170,24 +170,24 @@ public partial class GetAzDevCenterUserEnvironmentOperation_List : global::Syste /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperation /// 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); + 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) @@ -392,12 +392,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -414,7 +414,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, EnvironmentName=EnvironmentName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -432,12 +432,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentOperation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentOperation /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOutput_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOutput_Get.cs index 8eb5f08a208d..5217c01d3469 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOutput_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOutput_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentOutput_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets Outputs from the environment.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/outputs", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/outputs", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentOutput_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -164,24 +164,24 @@ public partial class GetAzDevCenterUserEnvironmentOutput_Get : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1 + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1 /// 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); + 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) @@ -386,12 +386,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -408,7 +408,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, EnvironmentName=EnvironmentName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -426,12 +426,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1 + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1 /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -443,7 +443,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1 + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1 WriteObject((await response).Output); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOutput_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOutput_GetViaIdentity.cs index 23527c3814ba..fa14e1013d90 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOutput_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentOutput_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentOutput_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets Outputs from the environment.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/outputs", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/outputs", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentOutput_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserEnvironmentOutput_GetViaIdentity : global /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1 + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1 /// 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); + 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) @@ -366,12 +366,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -388,7 +388,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -406,12 +406,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1 + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1 /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,7 +423,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs1 + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs1 WriteObject((await response).Output); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentTypeAbility_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentTypeAbility_Get.cs index fe71a9aed094..e87f45b4633f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentTypeAbility_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentTypeAbility_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentTypeAbility_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets the signed-in user's permitted abilities in an environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/environmentTypes/{environmentTypeName}/users/{userId}/abilities", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/environmentTypes/{environmentTypeName}/users/{userId}/abilities", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentTypeAbility_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -160,15 +160,13 @@ public partial class GetAzDevCenterUserEnvironmentTypeAbility_Get : global::Syst private string _userId; /// - /// The AAD object id of the user. If value is 'me', the identity is taken from the - /// authentication context. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = " The AAD object id of the user. If value is 'me', the identity is taken from the\n authentication context.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, ReadOnly = false, - Description = @" The AAD object id of the user. If value is 'me', the identity is taken from the - authentication context.", + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", SerializedName = @"userId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( @@ -183,24 +181,24 @@ public partial class GetAzDevCenterUserEnvironmentTypeAbility_Get : global::Syst /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities /// 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); + 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) @@ -405,12 +403,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,7 +425,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, EnvironmentTypeName=EnvironmentTypeName, UserId=UserId, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -445,12 +443,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -462,7 +460,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentTypeAbility_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentTypeAbility_GetViaIdentity.cs index 244186146939..7cb31e5e6720 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentTypeAbility_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentTypeAbility_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentTypeAbility_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets the signed-in user's permitted abilities in an environment type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/environmentTypes/{environmentTypeName}/users/{userId}/abilities", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/environmentTypes/{environmentTypeName}/users/{userId}/abilities", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentTypeAbility_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -141,24 +141,24 @@ public partial class GetAzDevCenterUserEnvironmentTypeAbility_GetViaIdentity : g /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities /// 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); + 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) @@ -383,12 +383,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -405,7 +405,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, Top=this.InvocationInformation.BoundParameters.ContainsKey("Top") ? Top : default(int?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -423,12 +423,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -440,7 +440,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentType_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentType_Get.cs index c6b4fac3fca0..d53701517556 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentType_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentType_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentType_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Get an environment type configured for a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentType_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -145,24 +145,24 @@ public partial class GetAzDevCenterUserEnvironmentType_Get : global::System.Mana /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType /// 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); + 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) @@ -367,12 +367,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -389,7 +389,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -407,12 +407,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -424,7 +424,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentType_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentType_GetViaIdentity.cs index cc1b6914c5f3..0bdf66c4dbd0 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentType_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentType_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentType_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Get an environment type configured for a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/environmentTypes/{environmentTypeName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentType_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserEnvironmentType_GetViaIdentity : global:: /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType /// 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); + 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) @@ -362,12 +362,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -384,7 +384,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -402,12 +402,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -419,7 +419,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentType_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentType_List.cs index 28414d7809f3..642170a3cab7 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentType_List.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironmentType_List.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironmentType_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists all environment types configured for a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/environmentTypes", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/environmentTypes", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironmentType_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -136,24 +136,24 @@ public partial class GetAzDevCenterUserEnvironmentType_List : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentType /// 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); + 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) @@ -358,12 +358,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -380,7 +380,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -398,12 +398,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironmentType + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironmentType /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_Get.cs index 4d77feeeacac..fe5f2c8ff2ef 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironment_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets an environment.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironment_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -161,24 +161,24 @@ public partial class GetAzDevCenterUserEnvironment_Get : global::System.Manageme /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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); + 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) @@ -383,12 +383,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -405,7 +405,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -423,12 +423,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -440,7 +440,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_GetViaIdentity.cs index dfe68d9d955c..ac496e472437 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironment_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets an environment.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironment_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserEnvironment_GetViaIdentity : global::Syst /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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); + 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) @@ -366,12 +366,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -388,7 +388,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -406,12 +406,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,7 +423,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_List.cs index 07e351325ada..c062ddfd0147 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_List.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_List.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironment_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists the environments for a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/environments", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/environments", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironment_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -136,24 +136,24 @@ public partial class GetAzDevCenterUserEnvironment_List : global::System.Managem /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironment /// 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); + 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) @@ -358,12 +358,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -380,7 +380,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -398,12 +398,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironment /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_List1.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_List1.cs index cb2f93993692..aa045a8bc647 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_List1.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserEnvironment_List1.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserEnvironment_List1")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists the environments for a project and user.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserEnvironment_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -152,24 +152,24 @@ public partial class GetAzDevCenterUserEnvironment_List1 : global::System.Manage /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironment /// 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); + 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) @@ -374,12 +374,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -396,7 +396,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -414,12 +414,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedEnvironment /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserOperationStatuses_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserOperationStatuses_Get.cs index 45425bcb65d6..b9c409719114 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserOperationStatuses_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserOperationStatuses_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserOperationStatuses_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Get the status of an operation.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/operationstatuses/{operationId}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/operationstatuses/{operationId}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserOperationStatuses_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -144,24 +144,24 @@ public partial class GetAzDevCenterUserOperationStatuses_Get : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -366,12 +366,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -388,7 +388,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, OperationId=OperationId }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -406,12 +406,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,7 +423,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserOperationStatuses_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserOperationStatuses_GetViaIdentity.cs index 1dbb14e07519..5b97e2bc8d6e 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserOperationStatuses_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserOperationStatuses_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserOperationStatuses_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Get the status of an operation.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/operationstatuses/{operationId}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/operationstatuses/{operationId}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserOperationStatuses_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserOperationStatuses_GetViaIdentity : global /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -362,12 +362,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -384,7 +384,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -402,12 +402,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -419,7 +419,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserPool_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserPool_Get.cs index 881baba238c5..9ed2e4bf5770 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserPool_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserPool_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserPool_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets a pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools/{poolName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools/{poolName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserPool_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -144,24 +144,24 @@ public partial class GetAzDevCenterUserPool_Get : global::System.Management.Auto /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool /// 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); + 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) @@ -366,12 +366,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -388,7 +388,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, PoolName=PoolName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -406,12 +406,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,7 +423,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserPool_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserPool_GetViaIdentity.cs index 2c29be99accd..64865e423359 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserPool_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserPool_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserPool_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets a pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools/{poolName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools/{poolName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserPool_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserPool_GetViaIdentity : global::System.Mana /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool /// 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); + 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) @@ -362,12 +362,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -384,7 +384,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -402,12 +402,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -419,7 +419,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserPool_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserPool_List.cs index 37194a75c010..c94eef95c476 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserPool_List.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserPool_List.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserPool_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists available pools.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserPool_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -136,24 +136,24 @@ public partial class GetAzDevCenterUserPool_List : global::System.Management.Aut /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPool /// 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); + 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) @@ -358,12 +358,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -380,7 +380,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -398,12 +398,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedPool + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedPool /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProjectAbility_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProjectAbility_Get.cs index 6a5397ef1267..1c7432d09cc1 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProjectAbility_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProjectAbility_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserProjectAbility_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets the signed-in user's permitted abilities in a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/abilities", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/abilities", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserProjectAbility_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -129,15 +129,13 @@ public partial class GetAzDevCenterUserProjectAbility_Get : global::System.Manag private string _userId; /// - /// The AAD object id of the user. If value is 'me', the identity is taken from the - /// authentication context. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = " The AAD object id of the user. If value is 'me', the identity is taken from the\n authentication context.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, ReadOnly = false, - Description = @" The AAD object id of the user. If value is 'me', the identity is taken from the - authentication context.", + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", SerializedName = @"userId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( @@ -152,24 +150,24 @@ public partial class GetAzDevCenterUserProjectAbility_Get : global::System.Manag /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities /// 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); + 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) @@ -374,12 +372,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -396,7 +394,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -414,12 +412,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -431,7 +429,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProjectAbility_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProjectAbility_GetViaIdentity.cs index 23f2e2604634..9f972675c6f1 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProjectAbility_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProjectAbility_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserProjectAbility_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets the signed-in user's permitted abilities in a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/abilities", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/abilities", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserProjectAbility_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserProjectAbility_GetViaIdentity : global::S /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities /// 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); + 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) @@ -362,12 +362,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -384,7 +384,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -402,12 +402,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -419,7 +419,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProject_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProject_Get.cs index ec1f7969a06b..5e00a219bd1a 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProject_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProject_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserProject_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserProject_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -131,24 +131,24 @@ public partial class GetAzDevCenterUserProject_Get : global::System.Management.A /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject /// 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); + 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) @@ -353,12 +353,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -375,7 +375,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -393,12 +393,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,7 +410,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProject_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProject_GetViaIdentity.cs index 11da37cedfec..806f68709fcb 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProject_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProject_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserProject_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets a project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserProject_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserProject_GetViaIdentity : global::System.M /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject /// 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); + 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) @@ -358,12 +358,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -380,7 +380,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -398,12 +398,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -415,7 +415,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProject_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProject_List.cs index a6dc16bbd4f7..f1033c5676d4 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProject_List.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserProject_List.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserProject_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists all projects.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserProject_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -122,24 +122,24 @@ public partial class GetAzDevCenterUserProject_List : global::System.Management. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProject /// 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); + 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) @@ -344,12 +344,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -366,7 +366,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -384,12 +384,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_Get.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_Get.cs index 28905058f654..403812df1e37 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_Get.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_Get.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserSchedule_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets a schedule.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserSchedule_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -158,24 +158,24 @@ public partial class GetAzDevCenterUserSchedule_Get : global::System.Management. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule /// 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); + 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) @@ -380,12 +380,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -402,7 +402,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, PoolName=PoolName, ScheduleName=ScheduleName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -420,12 +420,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -437,7 +437,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_GetViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_GetViaIdentity.cs index 03459f942623..44adb8065260 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_GetViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_GetViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserSchedule_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Gets a schedule.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserSchedule_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -124,24 +124,24 @@ public partial class GetAzDevCenterUserSchedule_GetViaIdentity : global::System. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule /// 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); + 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) @@ -366,12 +366,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -388,7 +388,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -406,12 +406,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,7 +423,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_List.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_List.cs index 78df5e933ae0..fae9d07a11b3 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_List.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_List.cs @@ -16,10 +16,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserSchedule_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists all schedules within a pool that are configured by your project administrator.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools/{poolName}/schedules", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools/{poolName}/schedules", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserSchedule_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -152,24 +152,24 @@ public partial class GetAzDevCenterUserSchedule_List : global::System.Management /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedSchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedSchedule /// 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); + 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) @@ -374,12 +374,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -396,7 +396,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, PoolName=PoolName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -414,12 +414,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedSchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedSchedule /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_List1.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_List1.cs index c2e8d470a3dd..457bce7c3c34 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_List1.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/GetAzDevCenterUserSchedule_List1.cs @@ -16,10 +16,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDevCenterUserSchedule_List1")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lists all schedules within a project that are configured by your project administrator.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/schedules", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/schedules", ApiVersion = "2025-04-01-preview")] public partial class GetAzDevCenterUserSchedule_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -138,24 +138,24 @@ public partial class GetAzDevCenterUserSchedule_List1 : global::System.Managemen /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedSchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedSchedule /// 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); + 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) @@ -360,12 +360,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -382,7 +382,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -400,12 +400,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedSchedule + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedSchedule /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignDevBox_Align.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignDevBox_Align.cs new file mode 100644 index 000000000000..607e7490f51c --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignDevBox_Align.cs @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Aligns a Dev Box to the pools current pool configuration. + /// + /// [OpenAPI] AlignDevBox=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:align" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterUserAlignDevBox_Align", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Aligns a Dev Box to the pools current pool configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:align", ApiVersion = "2025-04-01-preview")] + public partial class InvokeAzDevCenterUserAlignDevBox_Align : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody _body; + + /// Indicates which pool properties to align on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Indicates which pool properties to align on.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Indicates which pool properties to align on.", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// Display name for the Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Display name for the Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Display name for the Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of InvokeAzDevCenterUserAlignDevBox_Align + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.InvokeAzDevCenterUserAlignDevBox_Align Clone() + { + var clone = new InvokeAzDevCenterUserAlignDevBox_Align(); + 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.Endpoint = this.Endpoint; + clone.ProjectName = this.ProjectName; + clone.UserId = this.UserId; + clone.DevBoxName = this.DevBoxName; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzDevCenterUserAlignDevBox_Align() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesAlignDevBox' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesAlignDevBox(Endpoint, ProjectName, UserId, DevBoxName, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, body=Body }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, body=Body }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignDevBox_AlignExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignDevBox_AlignExpanded.cs new file mode 100644 index 000000000000..13053fd98320 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignDevBox_AlignExpanded.cs @@ -0,0 +1,538 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Aligns a Dev Box to the pools current pool configuration. + /// + /// [OpenAPI] AlignDevBox=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:align" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterUserAlignDevBox_AlignExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Aligns a Dev Box to the pools current pool configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:align", ApiVersion = "2025-04-01-preview")] + public partial class InvokeAzDevCenterUserAlignDevBox_AlignExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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; + + /// Indicates which pool properties to align on. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PoolAlignBody(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// Display name for the Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Display name for the Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Display name for the Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The targets to align on. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The targets to align on.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The targets to align on.", + SerializedName = @"targets", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[] Target { get => _body.Target ?? null /* arrayOf */; set => _body.Target = value; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of InvokeAzDevCenterUserAlignDevBox_AlignExpanded + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.InvokeAzDevCenterUserAlignDevBox_AlignExpanded Clone() + { + var clone = new InvokeAzDevCenterUserAlignDevBox_AlignExpanded(); + 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._body = this._body; + clone.Endpoint = this.Endpoint; + clone.ProjectName = this.ProjectName; + clone.UserId = this.UserId; + clone.DevBoxName = this.DevBoxName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzDevCenterUserAlignDevBox_AlignExpanded() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesAlignDevBox' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesAlignDevBox(Endpoint, ProjectName, UserId, DevBoxName, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, body=_body }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, body=_body }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignDevBox_AlignViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignDevBox_AlignViaIdentity.cs new file mode 100644 index 000000000000..2726e2b22f58 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignDevBox_AlignViaIdentity.cs @@ -0,0 +1,512 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Aligns a Dev Box to the pools current pool configuration. + /// + /// [OpenAPI] AlignDevBox=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:align" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterUserAlignDevBox_AlignViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Aligns a Dev Box to the pools current pool configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:align", ApiVersion = "2025-04-01-preview")] + public partial class InvokeAzDevCenterUserAlignDevBox_AlignViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody _body; + + /// Indicates which pool properties to align on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Indicates which pool properties to align on.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Indicates which pool properties to align on.", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of InvokeAzDevCenterUserAlignDevBox_AlignViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.InvokeAzDevCenterUserAlignDevBox_AlignViaIdentity Clone() + { + var clone = new InvokeAzDevCenterUserAlignDevBox_AlignViaIdentity(); + 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.Endpoint = this.Endpoint; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzDevCenterUserAlignDevBox_AlignViaIdentity() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesAlignDevBox' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevBoxesAlignDevBoxViaIdentity(InputObject.Id, Endpoint, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.UserId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.UserId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DevBoxName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevBoxName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevBoxesAlignDevBox(Endpoint, InputObject.ProjectName ?? null, InputObject.UserId ?? null, InputObject.DevBoxName ?? null, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, body=Body }) + { + 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 { Endpoint=Endpoint, body=Body }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignDevBox_AlignViaIdentityExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignDevBox_AlignViaIdentityExpanded.cs new file mode 100644 index 000000000000..2563fb16b094 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignDevBox_AlignViaIdentityExpanded.cs @@ -0,0 +1,517 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Aligns a Dev Box to the pools current pool configuration. + /// + /// [OpenAPI] AlignDevBox=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:align" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterUserAlignDevBox_AlignViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Aligns a Dev Box to the pools current pool configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:align", ApiVersion = "2025-04-01-preview")] + public partial class InvokeAzDevCenterUserAlignDevBox_AlignViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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; + + /// Indicates which pool properties to align on. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PoolAlignBody(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The targets to align on. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The targets to align on.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The targets to align on.", + SerializedName = @"targets", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[] Target { get => _body.Target ?? null /* arrayOf */; set => _body.Target = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzDevCenterUserAlignDevBox_AlignViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.InvokeAzDevCenterUserAlignDevBox_AlignViaIdentityExpanded Clone() + { + var clone = new InvokeAzDevCenterUserAlignDevBox_AlignViaIdentityExpanded(); + 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._body = this._body; + clone.Endpoint = this.Endpoint; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzDevCenterUserAlignDevBox_AlignViaIdentityExpanded() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesAlignDevBox' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevBoxesAlignDevBoxViaIdentity(InputObject.Id, Endpoint, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.UserId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.UserId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DevBoxName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevBoxName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevBoxesAlignDevBox(Endpoint, InputObject.ProjectName ?? null, InputObject.UserId ?? null, InputObject.DevBoxName ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, body=_body }) + { + 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 { Endpoint=Endpoint, body=_body }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignPool_Align.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignPool_Align.cs new file mode 100644 index 000000000000..0681afa73677 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignPool_Align.cs @@ -0,0 +1,478 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Aligns all Dev Boxes in the pool with the current configuration. + /// + /// [OpenAPI] AlignPool=>POST:"/projects/{projectName}/pools/{poolName}:align" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterUserAlignPool_Align", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Aligns all Dev Boxes in the pool with the current configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools/{poolName}:align", ApiVersion = "2025-04-01-preview")] + public partial class InvokeAzDevCenterUserAlignPool_Align : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody _body; + + /// Indicates which pool properties to align on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Indicates which pool properties to align on.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Indicates which pool properties to align on.", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _poolName; + + /// Pool name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Pool name.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Pool name.", + SerializedName = @"poolName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string PoolName { get => this._poolName; set => this._poolName = value; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of InvokeAzDevCenterUserAlignPool_Align + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.InvokeAzDevCenterUserAlignPool_Align Clone() + { + var clone = new InvokeAzDevCenterUserAlignPool_Align(); + 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.Endpoint = this.Endpoint; + clone.ProjectName = this.ProjectName; + clone.PoolName = this.PoolName; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzDevCenterUserAlignPool_Align() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesAlignPool' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesAlignPool(Endpoint, ProjectName, PoolName, Body, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,PoolName=PoolName,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, PoolName=PoolName, body=Body }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, PoolName=PoolName, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignPool_AlignExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignPool_AlignExpanded.cs new file mode 100644 index 000000000000..4ec0b6c8fe16 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignPool_AlignExpanded.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Aligns all Dev Boxes in the pool with the current configuration. + /// + /// [OpenAPI] AlignPool=>POST:"/projects/{projectName}/pools/{poolName}:align" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterUserAlignPool_AlignExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Aligns all Dev Boxes in the pool with the current configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools/{poolName}:align", ApiVersion = "2025-04-01-preview")] + public partial class InvokeAzDevCenterUserAlignPool_AlignExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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; + + /// Indicates which pool properties to align on. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PoolAlignBody(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _poolName; + + /// Pool name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Pool name.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Pool name.", + SerializedName = @"poolName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string PoolName { get => this._poolName; set => this._poolName = value; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The targets to align on. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The targets to align on.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The targets to align on.", + SerializedName = @"targets", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[] Target { get => _body.Target ?? null /* arrayOf */; set => _body.Target = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of InvokeAzDevCenterUserAlignPool_AlignExpanded + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.InvokeAzDevCenterUserAlignPool_AlignExpanded Clone() + { + var clone = new InvokeAzDevCenterUserAlignPool_AlignExpanded(); + 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._body = this._body; + clone.Endpoint = this.Endpoint; + clone.ProjectName = this.ProjectName; + clone.PoolName = this.PoolName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzDevCenterUserAlignPool_AlignExpanded() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesAlignPool' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesAlignPool(Endpoint, ProjectName, PoolName, _body, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,PoolName=PoolName,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, PoolName=PoolName, body=_body }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, PoolName=PoolName, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignPool_AlignViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignPool_AlignViaIdentity.cs new file mode 100644 index 000000000000..7e83ee8b4a52 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignPool_AlignViaIdentity.cs @@ -0,0 +1,472 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Aligns all Dev Boxes in the pool with the current configuration. + /// + /// [OpenAPI] AlignPool=>POST:"/projects/{projectName}/pools/{poolName}:align" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterUserAlignPool_AlignViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Aligns all Dev Boxes in the pool with the current configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools/{poolName}:align", ApiVersion = "2025-04-01-preview")] + public partial class InvokeAzDevCenterUserAlignPool_AlignViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody _body; + + /// Indicates which pool properties to align on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Indicates which pool properties to align on.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Indicates which pool properties to align on.", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of InvokeAzDevCenterUserAlignPool_AlignViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.InvokeAzDevCenterUserAlignPool_AlignViaIdentity Clone() + { + var clone = new InvokeAzDevCenterUserAlignPool_AlignViaIdentity(); + 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.Endpoint = this.Endpoint; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzDevCenterUserAlignPool_AlignViaIdentity() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesAlignPool' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevBoxesAlignPoolViaIdentity(InputObject.Id, Endpoint, Body, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PoolName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PoolName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevBoxesAlignPool(Endpoint, InputObject.ProjectName ?? null, InputObject.PoolName ?? null, Body, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, body=Body }) + { + 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 { Endpoint=Endpoint, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignPool_AlignViaIdentityExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignPool_AlignViaIdentityExpanded.cs new file mode 100644 index 000000000000..efeb2de40cac --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserAlignPool_AlignViaIdentityExpanded.cs @@ -0,0 +1,475 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Aligns all Dev Boxes in the pool with the current configuration. + /// + /// [OpenAPI] AlignPool=>POST:"/projects/{projectName}/pools/{poolName}:align" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterUserAlignPool_AlignViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Aligns all Dev Boxes in the pool with the current configuration.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/pools/{poolName}:align", ApiVersion = "2025-04-01-preview")] + public partial class InvokeAzDevCenterUserAlignPool_AlignViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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; + + /// Indicates which pool properties to align on. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.PoolAlignBody(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The targets to align on. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The targets to align on.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The targets to align on.", + SerializedName = @"targets", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget))] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[] Target { get => _body.Target ?? null /* arrayOf */; set => _body.Target = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of InvokeAzDevCenterUserAlignPool_AlignViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.InvokeAzDevCenterUserAlignPool_AlignViaIdentityExpanded Clone() + { + var clone = new InvokeAzDevCenterUserAlignPool_AlignViaIdentityExpanded(); + 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._body = this._body; + clone.Endpoint = this.Endpoint; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzDevCenterUserAlignPool_AlignViaIdentityExpanded() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesAlignPool' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevBoxesAlignPoolViaIdentity(InputObject.Id, Endpoint, _body, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PoolName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PoolName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevBoxesAlignPool(Endpoint, InputObject.ProjectName ?? null, InputObject.PoolName ?? null, _body, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, body=_body }) + { + 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 { Endpoint=Endpoint, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_Delay.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_Delay.cs index 5ffd62f7b983..cdc7504e4982 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_Delay.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_Delay.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterUserDelayDevBoxAction_Delay", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Delays the occurrence of an action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}:delay", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}:delay", ApiVersion = "2025-04-01-preview")] public partial class InvokeAzDevCenterUserDelayDevBoxAction_Delay : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -56,12 +56,12 @@ public partial class InvokeAzDevCenterUserDelayDevBoxAction_Delay : global::Syst /// Backing field for property. private global::System.DateTime _delayUntil; - /// The time to delay the Dev Box action or actions until. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to delay the Dev Box action or actions until.")] + /// The time to delay the Dev Box action or actions until, in RFC3339 format. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to delay the Dev Box action or actions until, in RFC3339 format.")] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The time to delay the Dev Box action or actions until.", + Description = @"The time to delay the Dev Box action or actions until, in RFC3339 format.", SerializedName = @"until", PossibleTypes = new [] { typeof(global::System.DateTime) })] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Query)] @@ -193,24 +193,24 @@ public partial class InvokeAzDevCenterUserDelayDevBoxAction_Delay : global::Syst /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction /// 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); + 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) @@ -418,12 +418,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -440,7 +440,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, Name=Name, DelayUntil=DelayUntil }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -458,12 +458,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -475,7 +475,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_Delay1.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_Delay1.cs index e2db8a65a5f7..e3e70292d386 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_Delay1.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_Delay1.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterUserDelayDevBoxAction_Delay1", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Delays all actions.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions:delay", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions:delay", ApiVersion = "2025-04-01-preview")] public partial class InvokeAzDevCenterUserDelayDevBoxAction_Delay1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -62,12 +62,12 @@ public partial class InvokeAzDevCenterUserDelayDevBoxAction_Delay1 : global::Sys /// Backing field for property. private global::System.DateTime _delayUntil; - /// The time to delay the Dev Box action or actions until. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to delay the Dev Box action or actions until.")] + /// The time to delay the Dev Box action or actions until, in RFC3339 format. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to delay the Dev Box action or actions until, in RFC3339 format.")] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The time to delay the Dev Box action or actions until.", + Description = @"The time to delay the Dev Box action or actions until, in RFC3339 format.", SerializedName = @"until", PossibleTypes = new [] { typeof(global::System.DateTime) })] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Query)] @@ -184,24 +184,24 @@ public partial class InvokeAzDevCenterUserDelayDevBoxAction_Delay1 : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResult /// 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); + 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) @@ -409,12 +409,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -431,7 +431,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, DelayUntil=DelayUntil }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -449,12 +449,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_DelayViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_DelayViaIdentity.cs index 7787dbc1da06..1df8aa45e273 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_DelayViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_DelayViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterUserDelayDevBoxAction_DelayViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Delays the occurrence of an action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}:delay", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}:delay", ApiVersion = "2025-04-01-preview")] public partial class InvokeAzDevCenterUserDelayDevBoxAction_DelayViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -56,12 +56,12 @@ public partial class InvokeAzDevCenterUserDelayDevBoxAction_DelayViaIdentity : g /// Backing field for property. private global::System.DateTime _delayUntil; - /// The time to delay the Dev Box action or actions until. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to delay the Dev Box action or actions until.")] + /// The time to delay the Dev Box action or actions until, in RFC3339 format. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to delay the Dev Box action or actions until, in RFC3339 format.")] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The time to delay the Dev Box action or actions until.", + Description = @"The time to delay the Dev Box action or actions until, in RFC3339 format.", SerializedName = @"until", PossibleTypes = new [] { typeof(global::System.DateTime) })] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Query)] @@ -138,24 +138,24 @@ public partial class InvokeAzDevCenterUserDelayDevBoxAction_DelayViaIdentity : g /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction /// 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); + 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) @@ -387,12 +387,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -409,7 +409,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, DelayUntil=DelayUntil }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -427,12 +427,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -444,7 +444,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_DelayViaIdentity1.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_DelayViaIdentity1.cs index 50b02fcf6a0e..65688cdbb249 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_DelayViaIdentity1.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayDevBoxAction_DelayViaIdentity1.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterUserDelayDevBoxAction_DelayViaIdentity1", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Delays all actions.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions:delay", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions:delay", ApiVersion = "2025-04-01-preview")] public partial class InvokeAzDevCenterUserDelayDevBoxAction_DelayViaIdentity1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -62,12 +62,12 @@ public partial class InvokeAzDevCenterUserDelayDevBoxAction_DelayViaIdentity1 : /// Backing field for property. private global::System.DateTime _delayUntil; - /// The time to delay the Dev Box action or actions until. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to delay the Dev Box action or actions until.")] + /// The time to delay the Dev Box action or actions until, in RFC3339 format. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to delay the Dev Box action or actions until, in RFC3339 format.")] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The time to delay the Dev Box action or actions until.", + Description = @"The time to delay the Dev Box action or actions until, in RFC3339 format.", SerializedName = @"until", PossibleTypes = new [] { typeof(global::System.DateTime) })] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Query)] @@ -144,24 +144,24 @@ public partial class InvokeAzDevCenterUserDelayDevBoxAction_DelayViaIdentity1 : /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResult /// 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); + 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) @@ -389,12 +389,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -411,7 +411,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, DelayUntil=DelayUntil }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -429,12 +429,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPagedDevBoxActionDelayResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPagedDevBoxActionDelayResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayEnvironmentAction_Delay.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayEnvironmentAction_Delay.cs index 40804d447dae..fc9ca0e62433 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayEnvironmentAction_Delay.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayEnvironmentAction_Delay.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterUserDelayEnvironmentAction_Delay", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Delays the occurrence of an action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/actions/{actionName}:delay", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/actions/{actionName}:delay", ApiVersion = "2025-04-01-preview")] public partial class InvokeAzDevCenterUserDelayEnvironmentAction_Delay : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -157,12 +157,12 @@ public partial class InvokeAzDevCenterUserDelayEnvironmentAction_Delay : global: /// Backing field for property. private global::System.DateTime _until; - /// The time to delay the Environment action until. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to delay the Environment action until.")] + /// The time to delay the Environment action until, in RFC3339 format. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to delay the Environment action until, in RFC3339 format.")] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The time to delay the Environment action until.", + Description = @"The time to delay the Environment action until, in RFC3339 format.", SerializedName = @"until", PossibleTypes = new [] { typeof(global::System.DateTime) })] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Query)] @@ -193,24 +193,24 @@ public partial class InvokeAzDevCenterUserDelayEnvironmentAction_Delay : global: /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction /// 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); + 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) @@ -418,12 +418,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -440,7 +440,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, EnvironmentName=EnvironmentName, Name=Name, Until=Until }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -458,12 +458,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -475,7 +475,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayEnvironmentAction_DelayViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayEnvironmentAction_DelayViaIdentity.cs index a51701879f5b..467ca8680163 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayEnvironmentAction_DelayViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/InvokeAzDevCenterUserDelayEnvironmentAction_DelayViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDevCenterUserDelayEnvironmentAction_DelayViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Delays the occurrence of an action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/actions/{actionName}:delay", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/actions/{actionName}:delay", ApiVersion = "2025-04-01-preview")] public partial class InvokeAzDevCenterUserDelayEnvironmentAction_DelayViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -122,12 +122,12 @@ public partial class InvokeAzDevCenterUserDelayEnvironmentAction_DelayViaIdentit /// Backing field for property. private global::System.DateTime _until; - /// The time to delay the Environment action until. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to delay the Environment action until.")] + /// The time to delay the Environment action until, in RFC3339 format. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to delay the Environment action until, in RFC3339 format.")] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The time to delay the Environment action until.", + Description = @"The time to delay the Environment action until, in RFC3339 format.", SerializedName = @"until", PossibleTypes = new [] { typeof(global::System.DateTime) })] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Query)] @@ -138,24 +138,24 @@ public partial class InvokeAzDevCenterUserDelayEnvironmentAction_DelayViaIdentit /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction /// 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); + 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) @@ -387,12 +387,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -409,7 +409,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, Until=Until }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -427,12 +427,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -444,7 +444,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBoxAddOn_CreateExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBoxAddOn_CreateExpanded.cs new file mode 100644 index 000000000000..f8cf7f53ff60 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBoxAddOn_CreateExpanded.cs @@ -0,0 +1,540 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Creates a Dev Box addon. + /// + /// [OpenAPI] CreateOrReplaceDevBoxAddOn=>PUT:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterUserDevBoxAddOn_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Creates a Dev Box addon.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}", ApiVersion = "2025-04-01-preview")] + public partial class NewAzDevCenterUserDevBoxAddOn_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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; + + /// A Dev Box addon. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAddOn(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Backing field for property. + private string _addOnName; + + /// The name of the Dev Box addon. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Dev Box addon.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Dev Box addon.", + SerializedName = @"addOnName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string AddOnName { get => this._addOnName; set => this._addOnName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// The name of a Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of a Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of a Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The DevCenter Project upon which to execute operations. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter Project upon which to execute operations.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter Project upon which to execute operations.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzDevCenterUserDevBoxAddOn_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.NewAzDevCenterUserDevBoxAddOn_CreateExpanded Clone() + { + var clone = new NewAzDevCenterUserDevBoxAddOn_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._body = this._body; + clone.Endpoint = this.Endpoint; + clone.ProjectName = this.ProjectName; + clone.UserId = this.UserId; + clone.DevBoxName = this.DevBoxName; + clone.AddOnName = this.AddOnName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzDevCenterUserDevBoxAddOn_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesCreateOrReplaceDevBoxAddOn' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesCreateOrReplaceDevBoxAddOn(Endpoint, ProjectName, UserId, DevBoxName, AddOnName, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName,AddOnName=AddOnName,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, AddOnName=AddOnName, body=_body }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, AddOnName=AddOnName, body=_body }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBoxAddOn_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBoxAddOn_CreateViaIdentityExpanded.cs new file mode 100644 index 000000000000..711913fb9c15 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBoxAddOn_CreateViaIdentityExpanded.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Creates a Dev Box addon. + /// + /// [OpenAPI] CreateOrReplaceDevBoxAddOn=>PUT:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterUserDevBoxAddOn_CreateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Creates a Dev Box addon.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}", ApiVersion = "2025-04-01-preview")] + public partial class NewAzDevCenterUserDevBoxAddOn_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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; + + /// A Dev Box addon. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAddOn(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzDevCenterUserDevBoxAddOn_CreateViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.NewAzDevCenterUserDevBoxAddOn_CreateViaIdentityExpanded Clone() + { + var clone = new NewAzDevCenterUserDevBoxAddOn_CreateViaIdentityExpanded(); + 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._body = this._body; + clone.Endpoint = this.Endpoint; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzDevCenterUserDevBoxAddOn_CreateViaIdentityExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesCreateOrReplaceDevBoxAddOn' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevBoxesCreateOrReplaceDevBoxAddOnViaIdentity(InputObject.Id, Endpoint, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.UserId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.UserId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DevBoxName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevBoxName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.AddOnName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AddOnName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevBoxesCreateOrReplaceDevBoxAddOn(Endpoint, InputObject.ProjectName ?? null, InputObject.UserId ?? null, InputObject.DevBoxName ?? null, InputObject.AddOnName ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, body=_body }) + { + 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 { Endpoint=Endpoint, body=_body }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBoxCustomizationGroup_CreateExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBoxCustomizationGroup_CreateExpanded.cs index 63dd5f783092..02543a8be3bc 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBoxCustomizationGroup_CreateExpanded.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBoxCustomizationGroup_CreateExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterUserDevBoxCustomizationGroup_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Applies customizations to the Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterUserDevBoxCustomizationGroup_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -31,7 +31,7 @@ public partial class NewAzDevCenterUserDevBoxCustomizationGroup_CreateExpanded : private string __processRecordId; /// Represents a list of tasks to apply to a Dev Box. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationGroup(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationGroup(); /// /// The for this operation. @@ -168,22 +168,20 @@ public partial class NewAzDevCenterUserDevBoxCustomizationGroup_CreateExpanded : ReadOnly = false, Description = @"Tasks to apply. Note by default tasks are excluded from the response whenlisting customization groups. To include them, use the `include=tasks` queryparameter.", SerializedName = @"tasks", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[] Task { get => _body.Task ?? null /* arrayOf */; set => _body.Task = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[] Task { get => _body.Task ?? null /* arrayOf */; set => _body.Task = value; } /// Backing field for property. private string _userId; /// - /// The AAD object id of the user. If value is 'me', the identity is taken from the - /// authentication context. + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = " The AAD object id of the user. If value is 'me', the identity is taken from the \n authentication context.")] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, ReadOnly = false, - Description = @" The AAD object id of the user. If value is 'me', the identity is taken from the - authentication context.", + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", SerializedName = @"userId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( @@ -198,24 +196,24 @@ public partial class NewAzDevCenterUserDevBoxCustomizationGroup_CreateExpanded : /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup /// 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); + 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) @@ -423,12 +421,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,7 +443,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, CustomizationGroupName=CustomizationGroupName, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -463,12 +461,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -480,7 +478,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBoxCustomizationGroup_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBoxCustomizationGroup_CreateViaIdentityExpanded.cs index 988d0d88b09b..b6b0111f8c5b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBoxCustomizationGroup_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBoxCustomizationGroup_CreateViaIdentityExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterUserDevBoxCustomizationGroup_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Applies customizations to the Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/customizationGroups/{customizationGroupName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterUserDevBoxCustomizationGroup_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -31,7 +31,7 @@ public partial class NewAzDevCenterUserDevBoxCustomizationGroup_CreateViaIdentit private string __processRecordId; /// Represents a list of tasks to apply to a Dev Box. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationGroup(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationGroup(); /// /// The for this operation. @@ -134,32 +134,32 @@ public partial class NewAzDevCenterUserDevBoxCustomizationGroup_CreateViaIdentit ReadOnly = false, Description = @"Tasks to apply. Note by default tasks are excluded from the response whenlisting customization groups. To include them, use the `include=tasks` queryparameter.", SerializedName = @"tasks", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[] Task { get => _body.Task ?? null /* arrayOf */; set => _body.Task = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[] Task { get => _body.Task ?? null /* arrayOf */; set => _body.Task = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup /// 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); + 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) @@ -392,12 +392,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -414,7 +414,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -432,12 +432,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -449,7 +449,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBox_CreateExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBox_CreateExpanded.cs index cd5cdd18fd7c..e9b47dac7238 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBox_CreateExpanded.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBox_CreateExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterUserDevBox_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Creates or replaces a Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterUserDevBox_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -31,7 +31,7 @@ public partial class NewAzDevCenterUserDevBox_CreateExpanded : global::System.Ma private string __processRecordId; /// A Dev Box. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBox(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBox(); /// /// The for this operation. @@ -90,18 +90,6 @@ public partial class NewAzDevCenterUserDevBox_CreateExpanded : global::System.Ma /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - /// Indicates whether the owner of the Dev Box is a local administrator. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether the owner of the Dev Box is a local administrator.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether the owner of the Dev Box is a local administrator.", - SerializedName = @"localAdministrator", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus))] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus LocalAdministrator { get => _body.LocalAdministrator ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus)""); set => _body.LocalAdministrator = value; } - /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -152,12 +140,12 @@ public partial class NewAzDevCenterUserDevBox_CreateExpanded : global::System.Ma /// Backing field for property. private string _projectName; - /// The DevCenter Project upon which to execute the operation. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter Project upon which to execute the operation.")] + /// The DevCenter Project upon which to execute operations. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter Project upon which to execute operations.")] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The DevCenter Project upon which to execute the operation.", + Description = @"The DevCenter Project upon which to execute operations.", SerializedName = @"projectName", PossibleTypes = new [] { typeof(string) })] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] @@ -204,24 +192,24 @@ public partial class NewAzDevCenterUserDevBox_CreateExpanded : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox /// 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); + 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) @@ -484,12 +472,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -506,7 +494,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -524,12 +512,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -541,7 +529,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBox_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBox_CreateViaIdentityExpanded.cs index f0a76a225d64..77b6e80bfbe8 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBox_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserDevBox_CreateViaIdentityExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterUserDevBox_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Creates or replaces a Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterUserDevBox_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -31,7 +31,7 @@ public partial class NewAzDevCenterUserDevBox_CreateViaIdentityExpanded : global private string __processRecordId; /// A Dev Box. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.DevBox(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBox(); /// /// The for this operation. @@ -98,18 +98,6 @@ public partial class NewAzDevCenterUserDevBox_CreateViaIdentityExpanded : global /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - /// Indicates whether the owner of the Dev Box is a local administrator. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether the owner of the Dev Box is a local administrator.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates whether the owner of the Dev Box is a local administrator.", - SerializedName = @"localAdministrator", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus))] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus LocalAdministrator { get => _body.LocalAdministrator ?? ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus)""); set => _body.LocalAdministrator = value; } - /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -163,24 +151,24 @@ public partial class NewAzDevCenterUserDevBox_CreateViaIdentityExpanded : global /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox /// 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); + 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) @@ -460,12 +448,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -482,7 +470,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -500,12 +488,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -517,7 +505,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserEnvironment_CreateExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserEnvironment_CreateExpanded.cs index 86c16b57cf27..e95de7a12d43 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserEnvironment_CreateExpanded.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserEnvironment_CreateExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterUserEnvironment_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Creates or updates an environment.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterUserEnvironment_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -31,7 +31,7 @@ public partial class NewAzDevCenterUserEnvironment_CreateExpanded : global::Syst private string __processRecordId; /// Properties of an environment. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Environment(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Environment(); /// /// The for this operation. @@ -176,8 +176,8 @@ public partial class NewAzDevCenterUserEnvironment_CreateExpanded : global::Syst ReadOnly = false, Description = @"Parameters object for the environment.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters Parameter { get => _body.Parameter ?? null /* object */; set => _body.Parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters Parameter { get => _body.Parameter ?? null /* object */; set => _body.Parameter = value; } /// /// The instance of the that the remote call will use. @@ -239,24 +239,24 @@ public partial class NewAzDevCenterUserEnvironment_CreateExpanded : global::Syst /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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); + 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) @@ -519,12 +519,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -541,7 +541,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -559,12 +559,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -576,7 +576,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserEnvironment_CreateViaIdentityExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserEnvironment_CreateViaIdentityExpanded.cs index ec1ba9446bdd..f16adc252970 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserEnvironment_CreateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/NewAzDevCenterUserEnvironment_CreateViaIdentityExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDevCenterUserEnvironment_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Creates or updates an environment.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2025-04-01-preview")] public partial class NewAzDevCenterUserEnvironment_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -31,7 +31,7 @@ public partial class NewAzDevCenterUserEnvironment_CreateViaIdentityExpanded : g private string __processRecordId; /// Properties of an environment. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Environment(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Environment(); /// /// The for this operation. @@ -169,8 +169,8 @@ public partial class NewAzDevCenterUserEnvironment_CreateViaIdentityExpanded : g ReadOnly = false, Description = @"Parameters object for the environment.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters Parameter { get => _body.Parameter ?? null /* object */; set => _body.Parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters Parameter { get => _body.Parameter ?? null /* object */; set => _body.Parameter = value; } /// /// The instance of the that the remote call will use. @@ -198,24 +198,24 @@ public partial class NewAzDevCenterUserEnvironment_CreateViaIdentityExpanded : g /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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); + 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) @@ -495,12 +495,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -517,7 +517,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -535,12 +535,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -552,7 +552,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserDevBoxAddOn_Delete.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserDevBoxAddOn_Delete.cs new file mode 100644 index 000000000000..8e4e60d0b0d1 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserDevBoxAddOn_Delete.cs @@ -0,0 +1,577 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Deletes a Dev Box addon. + /// + /// [OpenAPI] DeleteDevBoxAddOn=>DELETE:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterUserDevBoxAddOn_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Deletes a Dev Box addon.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}", ApiVersion = "2025-04-01-preview")] + public partial class RemoveAzDevCenterUserDevBoxAddOn_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// Backing field for property. + private string _addOnName; + + /// The name of the Dev Box addon. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Dev Box addon.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Dev Box addon.", + SerializedName = @"addOnName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string AddOnName { get => this._addOnName; set => this._addOnName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// The name of a Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of a Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of a Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The DevCenter Project upon which to execute operations. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter Project upon which to execute operations.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter Project upon which to execute operations.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzDevCenterUserDevBoxAddOn_Delete + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.RemoveAzDevCenterUserDevBoxAddOn_Delete Clone() + { + var clone = new RemoveAzDevCenterUserDevBoxAddOn_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.Endpoint = this.Endpoint; + clone.ProjectName = this.ProjectName; + clone.UserId = this.UserId; + clone.DevBoxName = this.DevBoxName; + clone.AddOnName = this.AddOnName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesDeleteDevBoxAddOn' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesDeleteDevBoxAddOn(Endpoint, ProjectName, UserId, DevBoxName, AddOnName, onOk, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName,AddOnName=AddOnName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzDevCenterUserDevBoxAddOn_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, AddOnName=AddOnName }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, AddOnName=AddOnName }) + { + 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 == MyInvocation?.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. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserDevBoxAddOn_DeleteViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserDevBoxAddOn_DeleteViaIdentity.cs new file mode 100644 index 000000000000..07b1a8dcb9c9 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserDevBoxAddOn_DeleteViaIdentity.cs @@ -0,0 +1,543 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Deletes a Dev Box addon. + /// + /// [OpenAPI] DeleteDevBoxAddOn=>DELETE:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterUserDevBoxAddOn_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Deletes a Dev Box addon.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}", ApiVersion = "2025-04-01-preview")] + public partial class RemoveAzDevCenterUserDevBoxAddOn_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzDevCenterUserDevBoxAddOn_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.RemoveAzDevCenterUserDevBoxAddOn_DeleteViaIdentity Clone() + { + var clone = new RemoveAzDevCenterUserDevBoxAddOn_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; + clone.Endpoint = this.Endpoint; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesDeleteDevBoxAddOn' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevBoxesDeleteDevBoxAddOnViaIdentity(InputObject.Id, Endpoint, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.UserId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.UserId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DevBoxName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevBoxName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.AddOnName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AddOnName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevBoxesDeleteDevBoxAddOn(Endpoint, InputObject.ProjectName ?? null, InputObject.UserId ?? null, InputObject.DevBoxName ?? null, InputObject.AddOnName ?? null, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzDevCenterUserDevBoxAddOn_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) + { + 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 { Endpoint=Endpoint }) + { + 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 == MyInvocation?.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. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserDevBox_Delete.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserDevBox_Delete.cs index 6ba3084ffaf6..e11a519bceab 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserDevBox_Delete.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserDevBox_Delete.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterUserDevBox_Delete", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Deletes a Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterUserDevBox_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -185,12 +185,12 @@ public partial class RemoveAzDevCenterUserDevBox_Delete : global::System.Managem /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 @@ -207,12 +207,12 @@ public partial class RemoveAzDevCenterUserDevBox_Delete : global::System.Managem /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -474,12 +474,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -496,7 +496,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -538,12 +538,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -555,7 +555,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserDevBox_DeleteViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserDevBox_DeleteViaIdentity.cs index c41cde6b164c..6830462d9c1e 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserDevBox_DeleteViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserDevBox_DeleteViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterUserDevBox_DeleteViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Deletes a Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterUserDevBox_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -144,12 +144,12 @@ public partial class RemoveAzDevCenterUserDevBox_DeleteViaIdentity : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 @@ -166,12 +166,12 @@ public partial class RemoveAzDevCenterUserDevBox_DeleteViaIdentity : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -450,12 +450,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -472,7 +472,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -514,12 +514,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -531,7 +531,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserEnvironment_Delete.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserEnvironment_Delete.cs index 851f2fd5193c..7ab844d6f39f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserEnvironment_Delete.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserEnvironment_Delete.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterUserEnvironment_Delete", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Deletes an environment and all its associated resources")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterUserEnvironment_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -72,6 +72,23 @@ public partial class RemoveAzDevCenterUserEnvironment_Delete : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + /// Backing field for property. + private global::System.Management.Automation.SwitchParameter _force; + + /// + /// The query option to force environment deletion even if the environment definition does not exist. This is a best-effort + /// delete, and anything custom that forces resource creation beyond the associated resource group may not be deleted. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The query option to force environment deletion even if the environment definition does not exist. This is a best-effort delete, and anything custom that forces resource creation beyond the associated resource group may not be deleted.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The query option to force environment deletion even if the environment definition does not exist. This is a best-effort delete, and anything custom that forces resource creation beyond the associated resource group may not be deleted.", + SerializedName = @"force", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Query)] + public global::System.Management.Automation.SwitchParameter Force { get => this._force; set => this._force = value; } + /// 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] @@ -185,12 +202,12 @@ public partial class RemoveAzDevCenterUserEnvironment_Delete : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 @@ -207,12 +224,12 @@ public partial class RemoveAzDevCenterUserEnvironment_Delete : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -253,6 +270,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.RemoveAzDevCente clone.ProjectName = this.ProjectName; clone.UserId = this.UserId; clone.Name = this.Name; + clone.Force = this.Force; return clone; } @@ -423,12 +441,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EnvironmentsDeleteEnvironment(Endpoint, ProjectName, UserId, Name, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.EnvironmentsDeleteEnvironment(Endpoint, ProjectName, UserId, Name, this.InvocationInformation.BoundParameters.ContainsKey("Force") ? Force : default(global::System.Management.Automation.SwitchParameter?), onOk, onNoContent, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,Name=Name,Force=this.InvocationInformation.BoundParameters.ContainsKey("Force") ? Force : default(global::System.Management.Automation.SwitchParameter?)}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -474,12 +492,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -496,15 +514,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name, Force=this.InvocationInformation.BoundParameters.ContainsKey("Force") ? Force : default(global::System.Management.Automation.SwitchParameter?) }) { 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name, Force=this.InvocationInformation.BoundParameters.ContainsKey("Force") ? Force : default(global::System.Management.Automation.SwitchParameter?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -538,12 +556,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -555,7 +573,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserEnvironment_DeleteViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserEnvironment_DeleteViaIdentity.cs index 84ba6542f16b..e0c1ebbee936 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserEnvironment_DeleteViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RemoveAzDevCenterUserEnvironment_DeleteViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDevCenterUserEnvironment_DeleteViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Deletes an environment and all its associated resources")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2025-04-01-preview")] public partial class RemoveAzDevCenterUserEnvironment_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -72,6 +72,23 @@ public partial class RemoveAzDevCenterUserEnvironment_DeleteViaIdentity : global [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + /// Backing field for property. + private global::System.Management.Automation.SwitchParameter _force; + + /// + /// The query option to force environment deletion even if the environment definition does not exist. This is a best-effort + /// delete, and anything custom that forces resource creation beyond the associated resource group may not be deleted. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The query option to force environment deletion even if the environment definition does not exist. This is a best-effort delete, and anything custom that forces resource creation beyond the associated resource group may not be deleted.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The query option to force environment deletion even if the environment definition does not exist. This is a best-effort delete, and anything custom that forces resource creation beyond the associated resource group may not be deleted.", + SerializedName = @"force", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Query)] + public global::System.Management.Automation.SwitchParameter Force { get => this._force; set => this._force = value; } + /// 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] @@ -144,12 +161,12 @@ public partial class RemoveAzDevCenterUserEnvironment_DeleteViaIdentity : global /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 @@ -166,12 +183,12 @@ public partial class RemoveAzDevCenterUserEnvironment_DeleteViaIdentity : global /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -209,6 +226,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.RemoveAzDevCente clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; clone.Endpoint = this.Endpoint; + clone.Force = this.Force; return clone; } @@ -381,7 +399,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.EnvironmentsDeleteEnvironmentViaIdentity(InputObject.Id, Endpoint, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.EnvironmentsDeleteEnvironmentViaIdentity(InputObject.Id, Endpoint, this.InvocationInformation.BoundParameters.ContainsKey("Force") ? Force : default(global::System.Management.Automation.SwitchParameter?), onOk, onNoContent, onDefault, this, Pipeline); } else { @@ -398,13 +416,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EnvironmentName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.EnvironmentsDeleteEnvironment(Endpoint, InputObject.ProjectName ?? null, InputObject.UserId ?? null, InputObject.EnvironmentName ?? null, onOk, onNoContent, onDefault, this, Pipeline); + await this.Client.EnvironmentsDeleteEnvironment(Endpoint, InputObject.ProjectName ?? null, InputObject.UserId ?? null, InputObject.EnvironmentName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("Force") ? Force : default(global::System.Management.Automation.SwitchParameter?), onOk, onNoContent, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,Force=this.InvocationInformation.BoundParameters.ContainsKey("Force") ? Force : default(global::System.Management.Automation.SwitchParameter?)}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -450,12 +468,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -472,15 +490,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, Force=this.InvocationInformation.BoundParameters.ContainsKey("Force") ? Force : default(global::System.Management.Automation.SwitchParameter?) }) { 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 { Endpoint=Endpoint }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, Force=this.InvocationInformation.BoundParameters.ContainsKey("Force") ? Force : default(global::System.Management.Automation.SwitchParameter?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -514,12 +532,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -531,7 +549,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RepairAzDevCenterUserDevBox_Repair.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RepairAzDevCenterUserDevBox_Repair.cs index dcd236384ec9..114edb1b509f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RepairAzDevCenterUserDevBox_Repair.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RepairAzDevCenterUserDevBox_Repair.cs @@ -16,10 +16,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Repair, @"AzDevCenterUserDevBox_Repair", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Attempts automated repair steps to resolve common problems on a Dev Box. The Dev Box may restart during this operation.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:repair", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:repair", ApiVersion = "2025-04-01-preview")] public partial class RepairAzDevCenterUserDevBox_Repair : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -180,24 +180,24 @@ public partial class RepairAzDevCenterUserDevBox_Repair : global::System.Managem /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -459,12 +459,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -481,7 +481,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -499,12 +499,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -516,7 +516,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RepairAzDevCenterUserDevBox_RepairViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RepairAzDevCenterUserDevBox_RepairViaIdentity.cs index 1ea42db7969c..d806c0b984db 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RepairAzDevCenterUserDevBox_RepairViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RepairAzDevCenterUserDevBox_RepairViaIdentity.cs @@ -16,10 +16,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Repair, @"AzDevCenterUserDevBox_RepairViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Attempts automated repair steps to resolve common problems on a Dev Box. The Dev Box may restart during this operation.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:repair", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:repair", ApiVersion = "2025-04-01-preview")] public partial class RepairAzDevCenterUserDevBox_RepairViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -139,24 +139,24 @@ public partial class RepairAzDevCenterUserDevBox_RepairViaIdentity : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -435,12 +435,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -457,7 +457,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -475,12 +475,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -492,7 +492,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RestartAzDevCenterUserDevBox_Restart.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RestartAzDevCenterUserDevBox_Restart.cs index 91ac06d792da..818c1abe7221 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RestartAzDevCenterUserDevBox_Restart.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RestartAzDevCenterUserDevBox_Restart.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Restart, @"AzDevCenterUserDevBox_Restart", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Restarts a Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:restart", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:restart", ApiVersion = "2025-04-01-preview")] public partial class RestartAzDevCenterUserDevBox_Restart : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -178,24 +178,24 @@ public partial class RestartAzDevCenterUserDevBox_Restart : global::System.Manag /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -457,12 +457,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -479,7 +479,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -497,12 +497,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -514,7 +514,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RestartAzDevCenterUserDevBox_RestartViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RestartAzDevCenterUserDevBox_RestartViaIdentity.cs index 025064120691..be1d917880a4 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RestartAzDevCenterUserDevBox_RestartViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RestartAzDevCenterUserDevBox_RestartViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Restart, @"AzDevCenterUserDevBox_RestartViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Restarts a Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:restart", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:restart", ApiVersion = "2025-04-01-preview")] public partial class RestartAzDevCenterUserDevBox_RestartViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -137,24 +137,24 @@ public partial class RestartAzDevCenterUserDevBox_RestartViaIdentity : global::S /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -433,12 +433,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -455,7 +455,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -473,12 +473,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -490,7 +490,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RestoreAzDevCenterUserDevBoxSnapshot_Restore.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RestoreAzDevCenterUserDevBoxSnapshot_Restore.cs new file mode 100644 index 000000000000..6099d788b50f --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RestoreAzDevCenterUserDevBoxSnapshot_Restore.cs @@ -0,0 +1,538 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Restores a Dev Box to a specified snapshot. + /// + /// [OpenAPI] RestoreSnapshot=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:restoreSnapshot" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Restore, @"AzDevCenterUserDevBoxSnapshot_Restore", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Restores a Dev Box to a specified snapshot.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:restoreSnapshot", ApiVersion = "2025-04-01-preview")] + public partial class RestoreAzDevCenterUserDevBoxSnapshot_Restore : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// Display name for the Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Display name for the Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Display name for the Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _snapshotId; + + /// + /// Required parameter that specifies the snapshot id to use for the restore operation. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Required parameter that specifies the snapshot id to use for the restore operation.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Required parameter that specifies the snapshot id to use for the restore operation.", + SerializedName = @"snapshotId", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Query)] + public string SnapshotId { get => this._snapshotId; set => this._snapshotId = value; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RestoreAzDevCenterUserDevBoxSnapshot_Restore + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.RestoreAzDevCenterUserDevBoxSnapshot_Restore Clone() + { + var clone = new RestoreAzDevCenterUserDevBoxSnapshot_Restore(); + 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.Endpoint = this.Endpoint; + clone.ProjectName = this.ProjectName; + clone.UserId = this.UserId; + clone.DevBoxName = this.DevBoxName; + clone.SnapshotId = this.SnapshotId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesRestoreSnapshot' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesRestoreSnapshot(Endpoint, ProjectName, UserId, DevBoxName, SnapshotId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName,SnapshotId=SnapshotId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RestoreAzDevCenterUserDevBoxSnapshot_Restore() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, SnapshotId=SnapshotId }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, SnapshotId=SnapshotId }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RestoreAzDevCenterUserDevBoxSnapshot_RestoreViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RestoreAzDevCenterUserDevBoxSnapshot_RestoreViaIdentity.cs new file mode 100644 index 000000000000..adca67c6d627 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/RestoreAzDevCenterUserDevBoxSnapshot_RestoreViaIdentity.cs @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Restores a Dev Box to a specified snapshot. + /// + /// [OpenAPI] RestoreSnapshot=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:restoreSnapshot" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Restore, @"AzDevCenterUserDevBoxSnapshot_RestoreViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Restores a Dev Box to a specified snapshot.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:restoreSnapshot", ApiVersion = "2025-04-01-preview")] + public partial class RestoreAzDevCenterUserDevBoxSnapshot_RestoreViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _snapshotId; + + /// + /// Required parameter that specifies the snapshot id to use for the restore operation. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Required parameter that specifies the snapshot id to use for the restore operation.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Required parameter that specifies the snapshot id to use for the restore operation.", + SerializedName = @"snapshotId", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Query)] + public string SnapshotId { get => this._snapshotId; set => this._snapshotId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RestoreAzDevCenterUserDevBoxSnapshot_RestoreViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.RestoreAzDevCenterUserDevBoxSnapshot_RestoreViaIdentity Clone() + { + var clone = new RestoreAzDevCenterUserDevBoxSnapshot_RestoreViaIdentity(); + 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.Endpoint = this.Endpoint; + clone.SnapshotId = this.SnapshotId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesRestoreSnapshot' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DevBoxesRestoreSnapshotViaIdentity(InputObject.Id, Endpoint, SnapshotId, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.UserId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.UserId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.DevBoxName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.DevBoxName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DevBoxesRestoreSnapshot(Endpoint, InputObject.ProjectName ?? null, InputObject.UserId ?? null, InputObject.DevBoxName ?? null, SnapshotId, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,SnapshotId=SnapshotId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RestoreAzDevCenterUserDevBoxSnapshot_RestoreViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, SnapshotId=SnapshotId }) + { + 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 { Endpoint=Endpoint, SnapshotId=SnapshotId }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserDevBoxActiveHour_Set.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserDevBoxActiveHour_Set.cs new file mode 100644 index 000000000000..3fdb3f382ca4 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserDevBoxActiveHour_Set.cs @@ -0,0 +1,469 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// + /// Lets a user set their own active hours for their Dev Box, overriding the defaults set at the pool level. + /// + /// + /// [OpenAPI] SetActiveHours=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:setActiveHours" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzDevCenterUserDevBoxActiveHour_Set", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lets a user set their own active hours for their Dev Box, overriding the defaults set at the pool level.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:setActiveHours", ApiVersion = "2025-04-01-preview")] + public partial class SetAzDevCenterUserDevBoxActiveHour_Set : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration _body; + + /// Manual user set active hours configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Manual user set active hours configuration.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Manual user set active hours configuration.", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// Display name for the Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Display name for the Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Display name for the Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesSetActiveHours' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesSetActiveHours(Endpoint, ProjectName, UserId, DevBoxName, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public SetAzDevCenterUserDevBoxActiveHour_Set() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, body=Body }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, body=Body }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserDevBoxActiveHour_SetExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserDevBoxActiveHour_SetExpanded.cs new file mode 100644 index 000000000000..88beff6f14d1 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserDevBoxActiveHour_SetExpanded.cs @@ -0,0 +1,492 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// + /// Lets a user set their own active hours for their Dev Box, overriding the defaults set at the pool level. + /// + /// + /// [OpenAPI] SetActiveHours=>POST:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:setActiveHours" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzDevCenterUserDevBoxActiveHour_SetExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Lets a user set their own active hours for their Dev Box, overriding the defaults set at the pool level.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:setActiveHours", ApiVersion = "2025-04-01-preview")] + public partial class SetAzDevCenterUserDevBoxActiveHour_SetExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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; + + /// Manual user set active hours configuration. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.UserActiveHoursConfiguration(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// Display name for the Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Display name for the Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Display name for the Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// The end time of the active hours. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The end time of the active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The end time of the active hours.", + SerializedName = @"endTimeHour", + PossibleTypes = new [] { typeof(int) })] + public int EndTimeHour { get => _body.EndTimeHour ?? default(int); set => _body.EndTimeHour = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// Name of the project. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the project.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the project.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The start time of the active hours. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The start time of the active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start time of the active hours.", + SerializedName = @"startTimeHour", + PossibleTypes = new [] { typeof(int) })] + public int StartTimeHour { get => _body.StartTimeHour ?? default(int); set => _body.StartTimeHour = value; } + + /// The timezone of the active hours. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The timezone of the active hours.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timezone of the active hours.", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + public string TimeZone { get => _body.TimeZone ?? null; set => _body.TimeZone = value; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesSetActiveHours' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesSetActiveHours(Endpoint, ProjectName, UserId, DevBoxName, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public SetAzDevCenterUserDevBoxActiveHour_SetExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, body=_body }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, body=_body }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserDevBoxAddOn_Replace.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserDevBoxAddOn_Replace.cs new file mode 100644 index 000000000000..7c84c1262750 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserDevBoxAddOn_Replace.cs @@ -0,0 +1,550 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Creates a Dev Box addon. + /// + /// [OpenAPI] CreateOrReplaceDevBoxAddOn=>PUT:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzDevCenterUserDevBoxAddOn_Replace", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Creates a Dev Box addon.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}", ApiVersion = "2025-04-01-preview")] + public partial class SetAzDevCenterUserDevBoxAddOn_Replace : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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(); + + /// Backing field for property. + private string _addOnName; + + /// The name of the Dev Box addon. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Dev Box addon.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Dev Box addon.", + SerializedName = @"addOnName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string AddOnName { get => this._addOnName; set => this._addOnName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn _body; + + /// A Dev Box addon. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "A Dev Box addon.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A Dev Box addon.", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// The name of a Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of a Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of a Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The DevCenter Project upon which to execute operations. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter Project upon which to execute operations.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter Project upon which to execute operations.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzDevCenterUserDevBoxAddOn_Replace + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.SetAzDevCenterUserDevBoxAddOn_Replace Clone() + { + var clone = new SetAzDevCenterUserDevBoxAddOn_Replace(); + 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.Endpoint = this.Endpoint; + clone.ProjectName = this.ProjectName; + clone.UserId = this.UserId; + clone.DevBoxName = this.DevBoxName; + clone.AddOnName = this.AddOnName; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesCreateOrReplaceDevBoxAddOn' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesCreateOrReplaceDevBoxAddOn(Endpoint, ProjectName, UserId, DevBoxName, AddOnName, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName,AddOnName=AddOnName,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public SetAzDevCenterUserDevBoxAddOn_Replace() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, AddOnName=AddOnName, body=Body }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, AddOnName=AddOnName, body=Body }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserDevBoxAddOn_ReplaceExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserDevBoxAddOn_ReplaceExpanded.cs new file mode 100644 index 000000000000..47da0a33666e --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserDevBoxAddOn_ReplaceExpanded.cs @@ -0,0 +1,540 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Extensions; + using System; + + /// Creates a Dev Box addon. + /// + /// [OpenAPI] CreateOrReplaceDevBoxAddOn=>PUT:"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzDevCenterUserDevBoxAddOn_ReplaceExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn))] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Creates a Dev Box addon.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/addons/{addOnName}", ApiVersion = "2025-04-01-preview")] + public partial class SetAzDevCenterUserDevBoxAddOn_ReplaceExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener + { + /// 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; + + /// A Dev Box addon. + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.DevBoxAddOn(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Backing field for property. + private string _addOnName; + + /// The name of the Dev Box addon. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Dev Box addon.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Dev Box addon.", + SerializedName = @"addOnName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string AddOnName { get => this._addOnName; set => this._addOnName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.DevCenterdata Client => Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _devBoxName; + + /// The name of a Dev Box. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of a Dev Box.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of a Dev Box.", + SerializedName = @"devBoxName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string DevBoxName { get => this._devBoxName; set => this._devBoxName = value; } + + /// Backing field for property. + private string _endpoint; + + /// The DevCenter-specific URI to operate on. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter-specific URI to operate on.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter-specific URI to operate on.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Uri)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The DevCenter Project upon which to execute operations. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The DevCenter Project upon which to execute operations.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DevCenter Project upon which to execute operations.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _userId; + + /// + /// The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.")] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.", + SerializedName = @"userId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"""me""")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] + public string UserId { get => this._userId; set => this._userId = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of SetAzDevCenterUserDevBoxAddOn_ReplaceExpanded + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets.SetAzDevCenterUserDevBoxAddOn_ReplaceExpanded Clone() + { + var clone = new SetAzDevCenterUserDevBoxAddOn_ReplaceExpanded(); + 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._body = this._body; + clone.Endpoint = this.Endpoint; + clone.ProjectName = this.ProjectName; + clone.UserId = this.UserId; + clone.DevBoxName = this.DevBoxName; + clone.AddOnName = this.AddOnName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DevBoxesCreateOrReplaceDevBoxAddOn' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DevBoxesCreateOrReplaceDevBoxAddOn(Endpoint, ProjectName, UserId, DevBoxName, AddOnName, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint,ProjectName=ProjectName,UserId=UserId,DevBoxName=DevBoxName,AddOnName=AddOnName,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public SetAzDevCenterUserDevBoxAddOn_ReplaceExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, AddOnName=AddOnName, body=_body }) + { + 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 { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, AddOnName=AddOnName, body=_body }) + { + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserEnvironment_Replace.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserEnvironment_Replace.cs index f0a18a74ccd4..ca086a0a32ef 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserEnvironment_Replace.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserEnvironment_Replace.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzDevCenterUserEnvironment_Replace", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Creates or updates an environment.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2025-04-01-preview")] public partial class SetAzDevCenterUserEnvironment_Replace : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -41,7 +41,7 @@ public partial class SetAzDevCenterUserEnvironment_Replace : global::System.Mana public global::System.Management.Automation.SwitchParameter AsJob { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment _body; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment _body; /// Properties of an environment. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Properties of an environment.", ValueFromPipeline = true)] @@ -50,8 +50,8 @@ public partial class SetAzDevCenterUserEnvironment_Replace : global::System.Mana ReadOnly = false, Description = @"Properties of an environment.", SerializedName = @"body", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment Body { get => this._body; set => this._body = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment 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")] @@ -191,24 +191,24 @@ public partial class SetAzDevCenterUserEnvironment_Replace : global::System.Mana /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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); + 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) @@ -471,12 +471,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -493,7 +493,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name, body=Body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -511,12 +511,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -528,7 +528,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserEnvironment_ReplaceExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserEnvironment_ReplaceExpanded.cs index e65f33340b16..36aeb3a3e190 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserEnvironment_ReplaceExpanded.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SetAzDevCenterUserEnvironment_ReplaceExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"AzDevCenterUserEnvironment_ReplaceExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Creates or updates an environment.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2025-04-01-preview")] public partial class SetAzDevCenterUserEnvironment_ReplaceExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -31,7 +31,7 @@ public partial class SetAzDevCenterUserEnvironment_ReplaceExpanded : global::Sys private string __processRecordId; /// Properties of an environment. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.Environment(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.Environment(); /// /// The for this operation. @@ -176,8 +176,8 @@ public partial class SetAzDevCenterUserEnvironment_ReplaceExpanded : global::Sys ReadOnly = false, Description = @"Parameters object for the environment.", SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters Parameter { get => _body.Parameter ?? null /* object */; set => _body.Parameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters Parameter { get => _body.Parameter ?? null /* object */; set => _body.Parameter = value; } /// /// The instance of the that the remote call will use. @@ -239,24 +239,24 @@ public partial class SetAzDevCenterUserEnvironment_ReplaceExpanded : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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); + 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) @@ -519,12 +519,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -541,7 +541,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -559,12 +559,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -576,7 +576,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserDevBoxAction_Skip.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserDevBoxAction_Skip.cs index 5dac00c8e002..0159dc6181ee 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserDevBoxAction_Skip.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserDevBoxAction_Skip.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Skips an occurrence of an action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}:skip", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}:skip", ApiVersion = "2025-04-01-preview")] public partial class SkipAzDevCenterUserDevBoxAction_Skip : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -186,12 +186,12 @@ public partial class SkipAzDevCenterUserDevBoxAction_Skip : global::System.Manag /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 @@ -409,12 +409,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -431,7 +431,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, DevBoxName=DevBoxName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserDevBoxAction_SkipViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserDevBoxAction_SkipViaIdentity.cs index 0a5118a0adac..77d13711c043 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserDevBoxAction_SkipViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserDevBoxAction_SkipViaIdentity.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Skips an occurrence of an action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}:skip", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/actions/{actionName}:skip", ApiVersion = "2025-04-01-preview")] public partial class SkipAzDevCenterUserDevBoxAction_SkipViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -131,12 +131,12 @@ public partial class SkipAzDevCenterUserDevBoxAction_SkipViaIdentity : global::S /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 @@ -378,12 +378,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -400,7 +400,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserEnvironmentAction_Skip.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserEnvironmentAction_Skip.cs index 38c4757ffcce..58033c25e96d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserEnvironmentAction_Skip.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserEnvironmentAction_Skip.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Skips an occurrence of an action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/actions/{actionName}:skip", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/actions/{actionName}:skip", ApiVersion = "2025-04-01-preview")] public partial class SkipAzDevCenterUserEnvironmentAction_Skip : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -186,12 +186,12 @@ public partial class SkipAzDevCenterUserEnvironmentAction_Skip : global::System. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 @@ -409,12 +409,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -431,7 +431,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, EnvironmentName=EnvironmentName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserEnvironmentAction_SkipViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserEnvironmentAction_SkipViaIdentity.cs index 722c4cf10d6c..b8fe14b41c34 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserEnvironmentAction_SkipViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/SkipAzDevCenterUserEnvironmentAction_SkipViaIdentity.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Skips an occurrence of an action.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/actions/{actionName}:skip", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}/actions/{actionName}:skip", ApiVersion = "2025-04-01-preview")] public partial class SkipAzDevCenterUserEnvironmentAction_SkipViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -131,12 +131,12 @@ public partial class SkipAzDevCenterUserEnvironmentAction_SkipViaIdentity : glob /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 @@ -378,12 +378,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -400,7 +400,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StartAzDevCenterUserDevBox_Start.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StartAzDevCenterUserDevBox_Start.cs index 9c79bf7a638f..a02c52fecee6 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StartAzDevCenterUserDevBox_Start.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StartAzDevCenterUserDevBox_Start.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzDevCenterUserDevBox_Start", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Starts a Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:start", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:start", ApiVersion = "2025-04-01-preview")] public partial class StartAzDevCenterUserDevBox_Start : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -178,24 +178,24 @@ public partial class StartAzDevCenterUserDevBox_Start : global::System.Managemen /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -457,12 +457,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -479,7 +479,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -497,12 +497,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -514,7 +514,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StartAzDevCenterUserDevBox_StartViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StartAzDevCenterUserDevBox_StartViaIdentity.cs index 6cd9606928eb..c4a89a4cf878 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StartAzDevCenterUserDevBox_StartViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StartAzDevCenterUserDevBox_StartViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzDevCenterUserDevBox_StartViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Starts a Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:start", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:start", ApiVersion = "2025-04-01-preview")] public partial class StartAzDevCenterUserDevBox_StartViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -137,24 +137,24 @@ public partial class StartAzDevCenterUserDevBox_StartViaIdentity : global::Syste /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -433,12 +433,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -455,7 +455,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -473,12 +473,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -490,7 +490,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StopAzDevCenterUserDevBox_Stop.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StopAzDevCenterUserDevBox_Stop.cs index d91c226247b7..311083830b94 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StopAzDevCenterUserDevBox_Stop.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StopAzDevCenterUserDevBox_Stop.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Stop, @"AzDevCenterUserDevBox_Stop", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Stops a Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:stop", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:stop", ApiVersion = "2025-04-01-preview")] public partial class StopAzDevCenterUserDevBox_Stop : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -192,24 +192,24 @@ public partial class StopAzDevCenterUserDevBox_Stop : global::System.Management. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -472,12 +472,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -494,7 +494,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name, Hibernate=this.InvocationInformation.BoundParameters.ContainsKey("Hibernate") ? Hibernate : default(global::System.Management.Automation.SwitchParameter?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -512,12 +512,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -529,7 +529,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StopAzDevCenterUserDevBox_StopViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StopAzDevCenterUserDevBox_StopViaIdentity.cs index c7a957553349..6eb9ecceab81 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StopAzDevCenterUserDevBox_StopViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/StopAzDevCenterUserDevBox_StopViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Stop, @"AzDevCenterUserDevBox_StopViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Stops a Dev Box.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:stop", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:stop", ApiVersion = "2025-04-01-preview")] public partial class StopAzDevCenterUserDevBox_StopViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -151,24 +151,24 @@ public partial class StopAzDevCenterUserDevBox_StopViaIdentity : global::System. /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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); + 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) @@ -448,12 +448,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -470,7 +470,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, Hibernate=this.InvocationInformation.BoundParameters.ContainsKey("Hibernate") ? Hibernate : default(global::System.Management.Automation.SwitchParameter?) }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -488,12 +488,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -505,7 +505,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateExpanded.cs index 410f1957f774..b6461e2fe277 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateExpanded.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateExpanded.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Validates a list of customization tasks.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/customizationTasks:validateGroup", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/customizationTasks:validateGroup", ApiVersion = "2025-04-01-preview")] public partial class TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -31,7 +31,7 @@ public partial class TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateEx private string __processRecordId; /// Represents a list of tasks to apply to a Dev Box - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskList _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskList(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskList _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskList(); /// /// The for this operation. @@ -150,20 +150,20 @@ public partial class TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateEx ReadOnly = false, Description = @"Tasks to apply.", SerializedName = @"tasks", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[] Task { get => _body.Task ?? null /* arrayOf */; set => _body.Task = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[] Task { get => _body.Task ?? null /* arrayOf */; set => _body.Task = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + partial void overrideOnDefault(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) @@ -427,12 +427,12 @@ public TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -449,7 +449,7 @@ public TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateViaIdentityExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateViaIdentityExpanded.cs index 477060902a13..fcc2bd8ed9f8 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateViaIdentityExpanded.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Validates a list of customization tasks.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/customizationTasks:validateGroup", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/customizationTasks:validateGroup", ApiVersion = "2025-04-01-preview")] public partial class TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -31,7 +31,7 @@ public partial class TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateVi private string __processRecordId; /// Represents a list of tasks to apply to a Dev Box - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskList _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.CustomizationTaskList(); + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskList _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.CustomizationTaskList(); /// /// The for this operation. @@ -144,20 +144,20 @@ public partial class TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateVi ReadOnly = false, Description = @"Tasks to apply.", SerializedName = @"tasks", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[] Task { get => _body.Task ?? null /* arrayOf */; set => _body.Task = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[] Task { get => _body.Task ?? null /* arrayOf */; set => _body.Task = 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + partial void overrideOnDefault(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) @@ -432,12 +432,12 @@ public TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateViaIdentityExpan /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -454,7 +454,7 @@ public TestAzDevCenterUserDevBoxCustomizationTaskAction_ValidateViaIdentityExpan if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_Patch.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_Patch.cs index 33ea8e7406db..9a9fe0ce495c 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_Patch.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_Patch.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterUserEnvironment_Patch", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Partially updates an environment.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterUserEnvironment_Patch : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -36,17 +36,19 @@ public partial class UpdateAzDevCenterUserEnvironment_Patch : global::System.Man private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate _body; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties _body; - /// Properties of an environment. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Properties of an environment.", ValueFromPipeline = true)] + /// + /// Properties of an environment. These properties can be updated via PATCH after the resource has been created. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Properties of an environment. These properties can be updated via PATCH after the resource has been created.", ValueFromPipeline = true)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, ReadOnly = false, - Description = @"Properties of an environment.", + Description = @"Properties of an environment. These properties can be updated via PATCH after the resource has been created.", SerializedName = @"body", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate Body { get => this._body; set => this._body = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties 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")] @@ -178,24 +180,24 @@ public partial class UpdateAzDevCenterUserEnvironment_Patch : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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); + 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) @@ -403,12 +405,12 @@ public UpdateAzDevCenterUserEnvironment_Patch() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -425,7 +427,7 @@ public UpdateAzDevCenterUserEnvironment_Patch() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name, body=Body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -443,12 +445,12 @@ public UpdateAzDevCenterUserEnvironment_Patch() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -460,7 +462,7 @@ public UpdateAzDevCenterUserEnvironment_Patch() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_PatchExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_PatchExpanded.cs index 048245db5222..3685ef143c4f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_PatchExpanded.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_PatchExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterUserEnvironment_PatchExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Partially updates an environment.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterUserEnvironment_PatchExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -30,8 +30,10 @@ public partial class UpdateAzDevCenterUserEnvironment_PatchExpanded : global::Sy /// A unique id generatd for the this cmdlet when ProcessRecord() is called. private string __processRecordId; - /// Properties of an environment. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentUpdate(); + /// + /// Properties of an environment. These properties can be updated via PATCH after the resource has been created. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentPatchProperties(); /// /// The for this operation. @@ -121,18 +123,6 @@ public partial class UpdateAzDevCenterUserEnvironment_PatchExpanded : global::Sy [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Path)] public string Name { get => this._name; set => this._name = value; } - /// Parameters object for the environment. - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Parameters object for the environment.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Parameters object for the environment.", - SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters Parameter { get => _body.Parameter ?? null /* object */; set => _body.Parameter = value; } - /// /// The instance of the that the remote call will use. /// @@ -193,24 +183,24 @@ public partial class UpdateAzDevCenterUserEnvironment_PatchExpanded : global::Sy /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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); + 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) @@ -418,12 +408,12 @@ public UpdateAzDevCenterUserEnvironment_PatchExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -440,7 +430,7 @@ public UpdateAzDevCenterUserEnvironment_PatchExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, ProjectName=ProjectName, UserId=UserId, Name=Name, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -458,12 +448,12 @@ public UpdateAzDevCenterUserEnvironment_PatchExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -475,7 +465,7 @@ public UpdateAzDevCenterUserEnvironment_PatchExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_PatchViaIdentity.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_PatchViaIdentity.cs index ab463ae9cebc..9638f91506b6 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_PatchViaIdentity.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_PatchViaIdentity.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterUserEnvironment_PatchViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Partially updates an environment.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterUserEnvironment_PatchViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -36,17 +36,19 @@ public partial class UpdateAzDevCenterUserEnvironment_PatchViaIdentity : global: private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate _body; + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties _body; - /// Properties of an environment. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Properties of an environment.", ValueFromPipeline = true)] + /// + /// Properties of an environment. These properties can be updated via PATCH after the resource has been created. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Properties of an environment. These properties can be updated via PATCH after the resource has been created.", ValueFromPipeline = true)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( Required = true, ReadOnly = false, - Description = @"Properties of an environment.", + Description = @"Properties of an environment. These properties can be updated via PATCH after the resource has been created.", SerializedName = @"body", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate Body { get => this._body; set => this._body = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties 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")] @@ -137,24 +139,24 @@ public partial class UpdateAzDevCenterUserEnvironment_PatchViaIdentity : global: /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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); + 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) @@ -382,12 +384,12 @@ public UpdateAzDevCenterUserEnvironment_PatchViaIdentity() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -404,7 +406,7 @@ public UpdateAzDevCenterUserEnvironment_PatchViaIdentity() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, body=Body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -422,12 +424,12 @@ public UpdateAzDevCenterUserEnvironment_PatchViaIdentity() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -439,7 +441,7 @@ public UpdateAzDevCenterUserEnvironment_PatchViaIdentity() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_PatchViaIdentityExpanded.cs b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_PatchViaIdentityExpanded.cs index 68c0d526d52b..13f009383cec 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_PatchViaIdentityExpanded.cs +++ b/generated/DevCenter/DevCenterData.AutoRest/generated/cmdlets/UpdateAzDevCenterUserEnvironment_PatchViaIdentityExpanded.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDevCenterUserEnvironment_PatchViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment))] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Description(@"Partially updates an environment.")] [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2024-05-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.HttpPath(Path = "/projects/{projectName}/users/{userId}/environments/{environmentName}", ApiVersion = "2025-04-01-preview")] public partial class UpdateAzDevCenterUserEnvironment_PatchViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener { @@ -30,8 +30,10 @@ public partial class UpdateAzDevCenterUserEnvironment_PatchViaIdentityExpanded : /// A unique id generatd for the this cmdlet when ProcessRecord() is called. private string __processRecordId; - /// Properties of an environment. - private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.EnvironmentUpdate(); + /// + /// Properties of an environment. These properties can be updated via PATCH after the resource has been created. + /// + private Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties _body = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.EnvironmentPatchProperties(); /// /// The for this operation. @@ -114,18 +116,6 @@ public partial class UpdateAzDevCenterUserEnvironment_PatchViaIdentityExpanded : /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - /// Parameters object for the environment. - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Parameters object for the environment.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category(global::Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Parameters object for the environment.", - SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters Parameter { get => _body.Parameter ?? null /* object */; set => _body.Parameter = value; } - /// /// The instance of the that the remote call will use. /// @@ -152,24 +142,24 @@ public partial class UpdateAzDevCenterUserEnvironment_PatchViaIdentityExpanded : /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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); + 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) @@ -397,12 +387,12 @@ public UpdateAzDevCenterUserEnvironment_PatchViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IAzureCoreFoundationsErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IAzureCoreFoundationsErrorResponse /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -419,7 +409,7 @@ public UpdateAzDevCenterUserEnvironment_PatchViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.RestException(responseMessage, await response); WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Endpoint=Endpoint, body=_body }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -437,12 +427,12 @@ public UpdateAzDevCenterUserEnvironment_PatchViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -454,7 +444,7 @@ public UpdateAzDevCenterUserEnvironment_PatchViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment WriteObject((await response)); } } diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Approve-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Approve-AzDevCenterUserDevBox.ps1 new file mode 100644 index 000000000000..cd4f4fd7c0f4 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Approve-AzDevCenterUserDevBox.ps1 @@ -0,0 +1,203 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Approves the creation of a Dev Box. +.Description +Approves the creation of a Dev Box. +.Example +Approve-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox +.Example +Approve-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" -Name myDevBox +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +Approve-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +Approve-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/approve-azdevcenteruserdevbox +#> +function Approve-AzDevCenterUserDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Approve', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Approve', Mandatory)] + [Alias('DevBoxName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${Name}, + + [Parameter(ParameterSetName='Approve', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Approve', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='ApproveViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Approve = 'Az.DevCenterdata.private\Approve-AzDevCenterUserDevBox_Approve'; + ApproveViaIdentity = 'Az.DevCenterdata.private\Approve-AzDevCenterUserDevBox_ApproveViaIdentity'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/DevCenter/DevCenterData.AutoRest/internal/Disable-AzDevCenterUserDevBoxAddOn.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Disable-AzDevCenterUserDevBoxAddOn.ps1 new file mode 100644 index 000000000000..d06186e4a93a --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Disable-AzDevCenterUserDevBoxAddOn.ps1 @@ -0,0 +1,236 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Disable a Dev Box addon. +.Description +Disable a Dev Box addon. +.Example +Disable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +Disable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Disable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Disable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/disable-azdevcenteruserdevboxaddon +#> +function Disable-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Disable', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Disable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the dev box addon. + ${AddOnName}, + + [Parameter(ParameterSetName='Disable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Disable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Disable')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='DisableViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Disable = 'Az.DevCenterdata.private\Disable-AzDevCenterUserDevBoxAddOn_Disable'; + DisableViaIdentity = 'Az.DevCenterdata.private\Disable-AzDevCenterUserDevBoxAddOn_DisableViaIdentity'; + } + if (('Disable') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/DevCenter/DevCenterData.AutoRest/internal/Enable-AzDevCenterUserDevBoxAddOn.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Enable-AzDevCenterUserDevBoxAddOn.ps1 new file mode 100644 index 000000000000..df7d9215b5e3 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Enable-AzDevCenterUserDevBoxAddOn.ps1 @@ -0,0 +1,236 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Enable a Dev Box addon. +.Description +Enable a Dev Box addon. +.Example +Enable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +Enable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Enable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Enable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/enable-azdevcenteruserdevboxaddon +#> +function Enable-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Enable', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Enable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the dev box addon. + ${AddOnName}, + + [Parameter(ParameterSetName='Enable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Enable', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Enable')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='EnableViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Enable = 'Az.DevCenterdata.private\Enable-AzDevCenterUserDevBoxAddOn_Enable'; + EnableViaIdentity = 'Az.DevCenterdata.private\Enable-AzDevCenterUserDevBoxAddOn_EnableViaIdentity'; + } + if (('Enable') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/DevCenter/DevCenterData.AutoRest/internal/Export-AzDevCenterUserDevBoxSnapshot.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Export-AzDevCenterUserDevBoxSnapshot.ps1 new file mode 100644 index 000000000000..0aea7ef175f9 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Export-AzDevCenterUserDevBoxSnapshot.ps1 @@ -0,0 +1,200 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Captures a manual snapshot of the Dev Box.\nUpon completion, a snapshotId will be generated.\nTo retrieve all snapshots and their corresponding IDs, use the list snapshots endpoint. +.Description +Captures a manual snapshot of the Dev Box.\nUpon completion, a snapshotId will be generated.\nTo retrieve all snapshots and their corresponding IDs, use the list snapshots endpoint. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/export-azdevcenteruserdevboxsnapshot +#> +function Export-AzDevCenterUserDevBoxSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Capture', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Capture', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Capture', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Capture')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='CaptureViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Capture = 'Az.DevCenterdata.private\Export-AzDevCenterUserDevBoxSnapshot_Capture'; + CaptureViaIdentity = 'Az.DevCenterdata.private\Export-AzDevCenterUserDevBoxSnapshot_CaptureViaIdentity'; + } + if (('Capture') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserCatalog.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserCatalog.ps1 index 786f97c61be8..3aa72621be5b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserCatalog.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserCatalog.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserCatalog -DevCenterName Contoso -InputObject $catalogInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenterusercatalog #> function Get-AzDevCenterUserCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBox.ps1 index 83bea9a3a574..61523c4578cb 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBox.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBox.ps1 @@ -45,7 +45,7 @@ Get-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox .Notes COMPLEX PARAMETER PROPERTIES @@ -53,6 +53,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -61,17 +62,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevbox #> function Get-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxAction.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxAction.ps1 index d04e7e7f12e0..3980524f8c31 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxAction.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxAction.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserDevBoxAction -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxaction #> function Get-AzDevCenterUserDevBoxAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxAddon.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxAddon.ps1 new file mode 100644 index 000000000000..1104d8b4edb4 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxAddon.ps1 @@ -0,0 +1,230 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets a Dev Box addon by Dev Box addon id. +.Description +Gets a Dev Box addon by Dev Box addon id. +.Example +Get-AzDevCenterUserDevBoxAddon ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +Get-AzDevCenterUserDevBoxAddon ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" +.Example +Get-AzDevCenterUserDevBoxAddon ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -AddOnName "devboxtunnel-sys-default" +.Example +Get-AzDevCenterUserDevBoxAddon ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -AddOnName "devboxtunnel-sys-default" +.Example +$addonInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Get-AzDevCenterUserDevBoxAddon ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addonInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxaddon +#> +function Get-AzDevCenterUserDevBoxAddon { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the dev box addon. + ${AddOnName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxAddon_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxAddon_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxAddon_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxCustomizationGroup.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxCustomizationGroup.ps1 index cf8c33f29514..905306067cf6 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxCustomizationGroup.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxCustomizationGroup.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -InputObject .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationgroup #> function Get-AzDevCenterUserDevBoxCustomizationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxCustomizationTaskDefinition.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxCustomizationTaskDefinition.ps1 index 9c548a9e758b..c66134f5272b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxCustomizationTaskDefinition.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxCustomizationTaskDefinition.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -DevCenterName Contoso -Inp .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationtaskdefinition #> function Get-AzDevCenterUserDevBoxCustomizationTaskDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxCustomizationTaskLog.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxCustomizationTaskLog.ps1 index 41411d159e73..0a476f547c39 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxCustomizationTaskLog.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxCustomizationTaskLog.ps1 @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,10 +50,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link @@ -97,8 +100,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] # The AAD object id of the user. - # If value is 'me', the identity is taken from the - # authentication context. + # If value is 'me', the identity is taken from the authentication context. ${UserId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxImagingTaskLog.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxImagingTaskLog.ps1 new file mode 100644 index 000000000000..1a8f2c4410d9 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxImagingTaskLog.ps1 @@ -0,0 +1,199 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets the log for an imaging build task. +.Description +Gets the log for an imaging build task. +.Example +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -ImageBuildLogId "12345678-aaaa-bbbb-cccc-1234567890ab" +.Example +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -ImageBuildLogId "12345678-aaaa-bbbb-cccc-1234567890ab" +.Example +$logInput = @{ + ProjectName = "DevProject" + ImageBuildLogId = "12345678-aaaa-bbbb-cccc-1234567890ab" +} +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $logInput +.Example +$logInput = @{ + ProjectName = "DevProject" + ImageBuildLogId = "12345678-aaaa-bbbb-cccc-1234567890ab" +} +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $logInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +System.String +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboximagingtasklog +#> +function Get-AzDevCenterUserDevBoxImagingTaskLog { +[OutputType([System.String])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # An imaging build log id. + ${ImageBuildLogId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxImagingTaskLog_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxImagingTaskLog_GetViaIdentity'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxOperation.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxOperation.ps1 index 98063d4d0783..aa9c8cee186f 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxOperation.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxOperation.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserDevBoxOperation -DevCenterName Contoso -InputObject $devBoxIn .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxoperation #> function Get-AzDevCenterUserDevBoxOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxRemoteConnection.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxRemoteConnection.ps1 index f9e034dfa00d..4d400db7947c 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxRemoteConnection.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxRemoteConnection.ps1 @@ -33,7 +33,7 @@ Get-AzDevCenterUserDevBoxRemoteConnection -DevCenterName Contoso -InputObject $d .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxremoteconnection #> function Get-AzDevCenterUserDevBoxRemoteConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxSnapshot.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxSnapshot.ps1 new file mode 100644 index 000000000000..801ede2d608d --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevBoxSnapshot.ps1 @@ -0,0 +1,231 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets a snapshot by snapshot id. +.Description +Gets a snapshot by snapshot id. +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -SnapshotId "snapshot-1234" +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -SnapshotId "snapshot-1234" +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + SnapshotId = "snapshot-1234" +} +Get-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $snapshotInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxsnapshot +#> +function Get-AzDevCenterUserDevBoxSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The id of the snapshot. + # Should be treated as opaque string. + ${SnapshotId}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxSnapshot_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxSnapshot_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxSnapshot_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevCenterApproval.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevCenterApproval.ps1 new file mode 100644 index 000000000000..f3b3eba8d0a7 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserDevCenterApproval.ps1 @@ -0,0 +1,160 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Gets a list of Dev Box creations that are pending approval. +.Description +Gets a list of Dev Box creations that are pending approval. +.Example +Get-AzDevCenterUserDevCenterApproval ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" +.Example +Get-AzDevCenterUserDevCenterApproval ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevcenterapproval +#> +function Get-AzDevCenterUserDevCenterApproval { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.String[]] + # Select the specified fields to be included in the response. + ${Select}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevCenterApproval_List'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironment.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironment.ps1 index 40b5be953cc8..24f88271250b 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironment.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironment.ps1 @@ -41,7 +41,7 @@ Get-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .Notes COMPLEX PARAMETER PROPERTIES @@ -49,6 +49,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -57,17 +58,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironment #> function Get-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentAction.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentAction.ps1 index 3c212cd8f560..212d55a8f252 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentAction.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentAction.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserEnvironmentAction -DevCenterName Contoso -InputObject $enviro .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentaction #> function Get-AzDevCenterUserEnvironmentAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentDefinition.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentDefinition.ps1 index 8d026c336e87..b79894640cfe 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentDefinition.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentDefinition.ps1 @@ -41,7 +41,7 @@ Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -InputObject $en .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -49,6 +49,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -57,17 +58,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentdefinition #> function Get-AzDevCenterUserEnvironmentDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentLog.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentLog.ps1 index f1be8e925a0a..1de7ad2430bd 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentLog.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentLog.ps1 @@ -35,6 +35,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -43,10 +44,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentOperation.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentOperation.ps1 index c1e8ac97cb9f..ae2f399bf5c5 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentOperation.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentOperation.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserEnvironmentOperation -DevCenterName Contoso -InputObject $env .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentoperation #> function Get-AzDevCenterUserEnvironmentOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentOutput.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentOutput.ps1 index 62dac17a25e2..100f5503bc42 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentOutput.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentOutput.ps1 @@ -33,7 +33,7 @@ Get-AzDevCenterUserEnvironmentOutput -DevCenterName Contoso -InputObject $enviro .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentoutput #> function Get-AzDevCenterUserEnvironmentOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentType.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentType.ps1 index 3ebe67f15fd0..4c05b705f315 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentType.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentType.ps1 @@ -27,7 +27,7 @@ Get-AzDevCenterUserEnvironmentType -DevCenterName Contoso -ProjectName DevProjec .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -35,6 +35,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -43,17 +44,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmenttype #> function Get-AzDevCenterUserEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentTypeAbility.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentTypeAbility.ps1 index 49e94d4b2fca..571cee303394 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentTypeAbility.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserEnvironmentTypeAbility.ps1 @@ -20,14 +20,37 @@ Gets the signed-in user's permitted abilities in an environment type. .Description Gets the signed-in user's permitted abilities in an environment type. .Example -{{ Add code here }} +Get-AzDevCenterUserEnvironmentTypeAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -EnvironmentTypeName "DevTest" .Example -{{ Add code here }} +Get-AzDevCenterUserEnvironmentTypeAbility ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -EnvironmentTypeName "DevTest" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +$envTypeInput = @{ + ProjectName = "DevProject" + EnvironmentTypeName = "DevTest" +} +Get-AzDevCenterUserEnvironmentTypeAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $envTypeInput +.Example +$envTypeInput = @{ + ProjectName = "DevProject" + EnvironmentTypeName = "DevTest" +} +Get-AzDevCenterUserEnvironmentTypeAbility ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $envTypeInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities .Notes COMPLEX PARAMETER PROPERTIES @@ -35,6 +58,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -43,17 +67,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmenttypeability #> function Get-AzDevCenterUserEnvironmentTypeAbility { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -79,8 +105,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] # The AAD object id of the user. - # If value is 'me', the identity is taken from the - # authentication context. + # If value is 'me', the identity is taken from the authentication context. ${UserId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserOperationStatuses.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserOperationStatuses.ps1 index f07a1ebc0f87..8c6aa908fd70 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserOperationStatuses.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserOperationStatuses.ps1 @@ -27,7 +27,7 @@ Get the status of an operation. .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -35,6 +35,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -43,17 +44,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruseroperationstatuses #> function Get-AzDevCenterUserOperationStatuses { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserPool.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserPool.ps1 index 69a8440513e4..004e0a848ec6 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserPool.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserPool.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserPool -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserpool #> function Get-AzDevCenterUserPool { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserProject.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserProject.ps1 index e080ae42564c..76fa18172d2d 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserProject.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserProject.ps1 @@ -37,7 +37,7 @@ Get-AzDevCenterUserProject -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +45,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,17 +54,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserproject #> function Get-AzDevCenterUserProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserProjectAbility.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserProjectAbility.ps1 index 27eb7d5d8ae9..39ebeb8ac4ce 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserProjectAbility.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserProjectAbility.ps1 @@ -20,14 +20,33 @@ Gets the signed-in user's permitted abilities in a project. .Description Gets the signed-in user's permitted abilities in a project. .Example -{{ Add code here }} +Get-AzDevCenterUserProjectAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" .Example -{{ Add code here }} +Get-AzDevCenterUserProjectAbility ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +$projectInput = @{ + ProjectName = "DevProject" +} +Get-AzDevCenterUserProjectAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $projectInput +.Example +$projectInput = @{ + ProjectName = "DevProject" +} +Get-AzDevCenterUserProjectAbility ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $projectInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities .Notes COMPLEX PARAMETER PROPERTIES @@ -35,6 +54,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -43,17 +63,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserprojectability #> function Get-AzDevCenterUserProjectAbility { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -73,8 +95,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] # The AAD object id of the user. - # If value is 'me', the identity is taken from the - # authentication context. + # If value is 'me', the identity is taken from the authentication context. ${UserId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserSchedule.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserSchedule.ps1 index 773a38fc7e92..0830e20be1fd 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserSchedule.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Get-AzDevCenterUserSchedule.ps1 @@ -41,7 +41,7 @@ Get-AzDevCenterUserSchedule -DevCenterName Contoso -ProjectName DevProject -Pool .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule .Notes COMPLEX PARAMETER PROPERTIES @@ -49,6 +49,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -57,17 +58,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserschedule #> function Get-AzDevCenterUserSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Invoke-AzDevCenterUserAlignDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Invoke-AzDevCenterUserAlignDevBox.ps1 new file mode 100644 index 000000000000..d2373f9b1117 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Invoke-AzDevCenterUserAlignDevBox.ps1 @@ -0,0 +1,228 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Aligns a Dev Box to the pools current pool configuration. +.Description +Aligns a Dev Box to the pools current pool configuration. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 : Indicates which pool properties to align on. + Target : The targets to align on. + +INPUTOBJECT : Identity Parameter + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruseraligndevbox +#> +function Invoke-AzDevCenterUserAlignDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='AlignExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Align', Mandatory)] + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Align', Mandatory)] + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Align')] + [Parameter(ParameterSetName='AlignExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='AlignViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Align', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody] + # Indicates which pool properties to align on. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Parameter(ParameterSetName='AlignViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[]] + # The targets to align on. + ${Target}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Align = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignDevBox_Align'; + AlignExpanded = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignDevBox_AlignExpanded'; + AlignViaIdentity = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignDevBox_AlignViaIdentity'; + AlignViaIdentityExpanded = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignDevBox_AlignViaIdentityExpanded'; + } + if (('Align', 'AlignExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/DevCenter/DevCenterData.AutoRest/internal/Invoke-AzDevCenterUserAlignPool.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Invoke-AzDevCenterUserAlignPool.ps1 new file mode 100644 index 000000000000..1688f71d99ed --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Invoke-AzDevCenterUserAlignPool.ps1 @@ -0,0 +1,242 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Aligns all Dev Boxes in the pool with the current configuration. +.Description +Aligns all Dev Boxes in the pool with the current configuration. +.Example +Invoke-AzDevCenterUserAlignPool ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -PoolName "DevPool01" ` + -Target "NetworkProperties" +.Example +Invoke-AzDevCenterUserAlignPool ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -PoolName "DevPool01" ` + -Target "NetworkProperties" +.Example +$poolInput = @{ + ProjectName = "DevProject" + PoolName = "DevPool01" +} +Invoke-AzDevCenterUserAlignPool ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $poolInput ` + -Target "NetworkProperties" +.Example +$body = @{ + Target = @("NetworkProperties") +} +Invoke-AzDevCenterUserAlignPool ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -PoolName "DevPool01" ` + -Body $body + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.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. + +BODY : Indicates which pool properties to align on. + Target : The targets to align on. + +INPUTOBJECT : Identity Parameter + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruseralignpool +#> +function Invoke-AzDevCenterUserAlignPool { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='AlignExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Align', Mandatory)] + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Pool name. + ${PoolName}, + + [Parameter(ParameterSetName='Align', Mandatory)] + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='AlignViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Align', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody] + # Indicates which pool properties to align on. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Parameter(ParameterSetName='AlignViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[]] + # The targets to align on. + ${Target}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Align = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignPool_Align'; + AlignExpanded = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignPool_AlignExpanded'; + AlignViaIdentity = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignPool_AlignViaIdentity'; + AlignViaIdentityExpanded = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignPool_AlignViaIdentityExpanded'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/DevCenter/DevCenterData.AutoRest/internal/Invoke-AzDevCenterUserDelayDevBoxAction.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Invoke-AzDevCenterUserDelayDevBoxAction.ps1 index 6a5aa3a0ba38..bc9f5d2e3d6a 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Invoke-AzDevCenterUserDelayDevBoxAction.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Invoke-AzDevCenterUserDelayDevBoxAction.ps1 @@ -31,9 +31,9 @@ Invoke-AzDevCenterUserDelayDevBoxAction -DevCenterName Contoso -DevBoxName myDev .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruserdelaydevboxaction #> function Invoke-AzDevCenterUserDelayDevBoxAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction], [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction], [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult])] [CmdletBinding(DefaultParameterSetName='Delay1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -109,7 +112,7 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] [System.DateTime] - # The time to delay the Dev Box action or actions until. + # The time to delay the Dev Box action or actions until, in RFC3339 format. ${DelayUntil}, [Parameter()] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Invoke-AzDevCenterUserDelayEnvironmentAction.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Invoke-AzDevCenterUserDelayEnvironmentAction.ps1 index b4a9f45ec8a9..e2faf190b4c9 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Invoke-AzDevCenterUserDelayEnvironmentAction.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Invoke-AzDevCenterUserDelayEnvironmentAction.ps1 @@ -27,7 +27,7 @@ Invoke-AzDevCenterUserDelayEnvironmentAction -DevCenterName Contoso -Environment .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction .Notes COMPLEX PARAMETER PROPERTIES @@ -35,6 +35,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -43,17 +44,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruserdelayenvironmentaction #> function Invoke-AzDevCenterUserDelayEnvironmentAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction])] [CmdletBinding(DefaultParameterSetName='Delay', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -99,7 +102,7 @@ param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] [System.DateTime] - # The time to delay the Environment action until. + # The time to delay the Environment action until, in RFC3339 format. ${Until}, [Parameter()] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/New-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/New-AzDevCenterUserDevBox.ps1 index f936ce8a55aa..c6db166fa2e3 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/New-AzDevCenterUserDevBox.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/New-AzDevCenterUserDevBox.ps1 @@ -33,7 +33,7 @@ New-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput -Pool .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevbox #> function New-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -78,7 +81,7 @@ param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute the operation. + # The DevCenter Project upon which to execute operations. ${ProjectName}, [Parameter(ParameterSetName='CreateExpanded')] @@ -102,13 +105,6 @@ param( # The name of the Dev Box pool this machine belongs to. ${PoolName}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus] - # Indicates whether the owner of the Dev Box is a local administrator. - ${LocalAdministrator}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/New-AzDevCenterUserDevBoxAddOn.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/New-AzDevCenterUserDevBoxAddOn.ps1 new file mode 100644 index 000000000000..82d2b152bac4 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/New-AzDevCenterUserDevBoxAddOn.ps1 @@ -0,0 +1,236 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a Dev Box addon. +.Description +Creates a Dev Box addon. +.Example +New-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +New-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "me" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +New-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "me" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +New-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevboxaddon +#> +function New-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the Dev Box addon. + ${AddOnName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of a Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + CreateExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserDevBoxAddOn_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserDevBoxAddOn_CreateViaIdentityExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/DevCenter/DevCenterData.AutoRest/internal/New-AzDevCenterUserDevBoxCustomizationGroup.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/New-AzDevCenterUserDevBoxCustomizationGroup.ps1 index 3340cfb9204b..094dca6524fd 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/New-AzDevCenterUserDevBoxCustomizationGroup.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/New-AzDevCenterUserDevBoxCustomizationGroup.ps1 @@ -44,7 +44,7 @@ New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -InputObject .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -52,6 +52,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -60,10 +61,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. @@ -78,7 +81,7 @@ TASK : Tasks to apply. Note by default tasks are excluded https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevboxcustomizationgroup #> function New-AzDevCenterUserDevBoxCustomizationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -110,8 +113,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] # The AAD object id of the user. - # If value is 'me', the identity is taken from the - # authentication context. + # If value is 'me', the identity is taken from the authentication context. ${UserId}, [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] @@ -124,7 +126,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[]] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[]] # Tasks to apply. # Note by default tasks are excluded from the response whenlisting customization groups. # To include them, use the `include=tasks` queryparameter. diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/New-AzDevCenterUserEnvironment.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/New-AzDevCenterUserEnvironment.ps1 index 27878e99b82c..6b299272e006 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/New-AzDevCenterUserEnvironment.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/New-AzDevCenterUserEnvironment.ps1 @@ -47,7 +47,7 @@ New-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput -Ca .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .Notes COMPLEX PARAMETER PROPERTIES @@ -55,6 +55,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -63,17 +64,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserenvironment #> function New-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -136,7 +139,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters]))] [System.Collections.Hashtable] # Parameters object for the environment. ${Parameter}, diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/ProxyCmdletDefinitions.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/ProxyCmdletDefinitions.ps1 index 7159eda92def..441bf129a7dc 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/ProxyCmdletDefinitions.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/ProxyCmdletDefinitions.ps1 @@ -16,28 +16,24 @@ <# .Synopsis -Gets the specified catalog within the project. +Approves the creation of a Dev Box. .Description -Gets the specified catalog within the project. -.Example -Get-AzDevCenterUserCatalog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +Approves the creation of a Dev Box. .Example -Get-AzDevCenterUserCatalog -DevCenterName Contoso -ProjectName DevProject -.Example -Get-AzDevCenterUserCatalog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CatalogName CentralCatalog +Approve-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox .Example -Get-AzDevCenterUserCatalog -DevCenterName Contoso -ProjectName DevProject -CatalogName CentralCatalog +Approve-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" -Name myDevBox .Example -$catalogInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" =" DevProject" } -Get-AzDevCenterUserCatalog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $catalogInput +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +Approve-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput .Example -$catalogInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" = "DevProject" } -Get-AzDevCenterUserCatalog -DevCenterName Contoso -InputObject $catalogInput +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +Approve-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -45,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -53,18 +50,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenterusercatalog +https://learn.microsoft.com/powershell/module/az.devcenter/approve-azdevcenteruserdevbox #> -function Get-AzDevCenterUserCatalog { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICatalog])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Approve-AzDevCenterUserDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Approve', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -72,20 +71,27 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Approve', Mandatory)] + [Alias('DevBoxName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the catalog. - ${CatalogName}, + # Display name for the Dev Box. + ${Name}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Approve', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='Approve', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='ApproveViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter @@ -101,6 +107,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -121,6 +133,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -150,9 +168,8 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserCatalog_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserCatalog_GetViaIdentity'; - List = 'Az.DevCenterdata.private\Get-AzDevCenterUserCatalog_List'; + Approve = 'Az.DevCenterdata.private\Approve-AzDevCenterUserDevBox_Approve'; + ApproveViaIdentity = 'Az.DevCenterdata.private\Approve-AzDevCenterUserDevBox_ApproveViaIdentity'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -187,28 +204,48 @@ end { <# .Synopsis -Gets an action. +Disable a Dev Box addon. .Description -Gets an action. -.Example -Get-AzDevCenterUserDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -.Example -Get-AzDevCenterUserDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -.Example -Get-AzDevCenterUserDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -Name "schedule-default" -.Example -Get-AzDevCenterUserDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -Name "schedule-default" -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "schedule-default"} -Get-AzDevCenterUserDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "schedule-default"} -Get-AzDevCenterUserDevBoxAction -DevCenterName Contoso -InputObject $devBoxInput +Disable a Dev Box addon. +.Example +Disable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +Disable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Disable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Disable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -216,6 +253,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -224,18 +262,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxaction +https://learn.microsoft.com/powershell/module/az.devcenter/disable-azdevcenteruserdevboxaddon #> -function Get-AzDevCenterUserDevBoxAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Disable-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Disable', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -243,29 +283,25 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Disable', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Display name for the Dev Box. - ${DevBoxName}, + # Name of the dev box addon. + ${AddOnName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('ActionName')] + [Parameter(ParameterSetName='Disable', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of the action. - ${Name}, + # Display name for the Dev Box. + ${DevBoxName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Disable', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Disable')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -273,7 +309,7 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DisableViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter @@ -289,6 +325,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -309,6 +351,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -338,11 +386,10 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxAction_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxAction_GetViaIdentity'; - List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxAction_List'; + Disable = 'Az.DevCenterdata.private\Disable-AzDevCenterUserDevBoxAddOn_Disable'; + DisableViaIdentity = 'Az.DevCenterdata.private\Disable-AzDevCenterUserDevBoxAddOn_DisableViaIdentity'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Disable') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } @@ -378,28 +425,48 @@ end { <# .Synopsis -Gets a customization group. +Enable a Dev Box addon. .Description -Gets a customization group. -.Example -Get-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -DevBoxName MyDevBox -.Example -Get-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -ProjectName DevProject -DevBoxName MyDevBox -Include tasks -.Example -Get-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CustomizationGroupName Provisioning -DevBoxName MyDevBox -.Example -Get-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -ProjectName DevProject -CustomizationGroupName Provisioning -DevBoxName MyDevBox -.Example -$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" ="DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "me" } -Get-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationGroupInput -.Example -$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" = "DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0" } -Get-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -InputObject $customizationGroupInput +Enable a Dev Box addon. +.Example +Enable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +Enable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Enable-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Enable-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -407,6 +474,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -415,18 +483,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationgroup +https://learn.microsoft.com/powershell/module/az.devcenter/enable-azdevcenteruserdevboxaddon #> -function Get-AzDevCenterUserDevBoxCustomizationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Enable-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Enable', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -434,28 +504,25 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Enable', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the customization group. - ${CustomizationGroupName}, + # Name of the dev box addon. + ${AddOnName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Enable', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Display name for the Dev Box. ${DevBoxName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Enable', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Enable')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -463,20 +530,13 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='EnableViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='List')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ListCustomizationGroupsIncludeProperty])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ListCustomizationGroupsIncludeProperty] - # Optional query parameter to specify what properties should be included in the response. - ${Include}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -486,6 +546,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -506,6 +572,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -535,11 +607,10 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationGroup_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationGroup_GetViaIdentity'; - List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationGroup_List'; + Enable = 'Az.DevCenterdata.private\Enable-AzDevCenterUserDevBoxAddOn_Enable'; + EnableViaIdentity = 'Az.DevCenterdata.private\Enable-AzDevCenterUserDevBoxAddOn_EnableViaIdentity'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Enable') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } @@ -575,28 +646,18 @@ end { <# .Synopsis -Gets a customization task. +Captures a manual snapshot of the Dev Box.\nUpon completion, a snapshotId will be generated.\nTo retrieve all snapshots and their corresponding IDs, use the list snapshots endpoint. .Description -Gets a customization task. -.Example -Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -.Example -Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -DevCenterName Contoso -ProjectName DevProject -.Example -Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -TaskName choco -CatalogName MyCatalog -.Example -Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -DevCenterName Contoso -ProjectName DevProject -TaskName choco -CatalogName MyCatalog +Captures a manual snapshot of the Dev Box.\nUpon completion, a snapshotId will be generated.\nTo retrieve all snapshots and their corresponding IDs, use the list snapshots endpoint. .Example -$customizationTaskInput = @{"TaskName" = "choco"; "ProjectName" ="DevProject"; "CatalogName" = "MyCatalog" } -Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationTaskInput +{{ Add code here }} .Example -$customizationTaskInput = @{"TaskName" = "choco"; "ProjectName" = "DevProject"; "CatalogName" = "MyCatalog" } -Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -DevCenterName Contoso -InputObject $customizationTaskInput +{{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -604,6 +665,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -612,18 +674,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationtaskdefinition +https://learn.microsoft.com/powershell/module/az.devcenter/export-azdevcenteruserdevboxsnapshot #> -function Get-AzDevCenterUserDevBoxCustomizationTaskDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTaskDefinition])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Export-AzDevCenterUserDevBoxSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Capture', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -631,26 +695,27 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Capture', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the catalog. - ${CatalogName}, + # Display name for the Dev Box. + ${DevBoxName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='Capture', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Capture')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] - # Full name of the task: {catalogName}/{taskName}. - ${TaskName}, + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CaptureViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter @@ -666,6 +731,12 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -686,6 +757,12 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -715,9 +792,11 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition_GetViaIdentity'; - List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition_List'; + Capture = 'Az.DevCenterdata.private\Export-AzDevCenterUserDevBoxSnapshot_Capture'; + CaptureViaIdentity = 'Az.DevCenterdata.private\Export-AzDevCenterUserDevBoxSnapshot_CaptureViaIdentity'; + } + if (('Capture') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -752,24 +831,28 @@ end { <# .Synopsis -Gets the log for a customization task. +Gets the specified catalog within the project. .Description -Gets the log for a customization task. +Gets the specified catalog within the project. .Example -Get-AzDevCenterUserDevBoxCustomizationTaskLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -DevBoxName MyDevBox -CustomizationGroupName Provisioning -CustomizationTaskId "91835dc0-ef5a-4f58-9e3a-099aea8481f4" +Get-AzDevCenterUserCatalog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject .Example -Get-AzDevCenterUserDevBoxCustomizationTaskLog -DevCenterName Contoso -ProjectName DevProject -DevBoxName MyDevBox -CustomizationGroupName Provisioning -CustomizationTaskId "91835dc0-ef5a-4f58-9e3a-099aea8481f4" +Get-AzDevCenterUserCatalog -DevCenterName Contoso -ProjectName DevProject .Example -$customizationTaskLogInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" ="DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "me"; "CustomizationTaskId" = "91835dc0-ef5a-4f58-9e3a-099aea8481f4" } -Get-AzDevCenterUserDevBoxCustomizationTaskLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationTaskInput +Get-AzDevCenterUserCatalog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CatalogName CentralCatalog .Example -$customizationTaskLogInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" = "DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "CustomizationTaskId" = "91835dc0-ef5a-4f58-9e3a-099aea8481f4" } -Get-AzDevCenterUserDevBoxCustomizationTaskLog -DevCenterName Contoso -InputObject $customizationTaskInput +Get-AzDevCenterUserCatalog -DevCenterName Contoso -ProjectName DevProject -CatalogName CentralCatalog +.Example +$catalogInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" =" DevProject" } +Get-AzDevCenterUserCatalog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $catalogInput +.Example +$catalogInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" = "DevProject" } +Get-AzDevCenterUserCatalog -DevCenterName Contoso -InputObject $catalogInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -System.String +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog .Notes COMPLEX PARAMETER PROPERTIES @@ -777,6 +860,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -785,18 +869,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationtasklog +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenterusercatalog #> -function Get-AzDevCenterUserDevBoxCustomizationTaskLog { -[OutputType([System.String])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +function Get-AzDevCenterUserCatalog { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICatalog])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -807,37 +893,17 @@ param( [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # A customization group name. - ${CustomizationGroupName}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # A customization task ID. - ${CustomizationTaskId}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # The name of a Dev Box. - ${DevBoxName}, + # Name of the catalog. + ${CatalogName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute operations. + # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Get')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] - [System.String] - # The AAD object id of the user. - # If value is 'me', the identity is taken from the - # authentication context. - ${UserId}, - - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter @@ -902,11 +968,9 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationTaskLog_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationTaskLog_GetViaIdentity'; - } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { - $PSBoundParameters['UserId'] = "me" + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserCatalog_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserCatalog_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserCatalog_List'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -941,28 +1005,28 @@ end { <# .Synopsis -Gets an operation on a Dev Box. +Gets an action. .Description -Gets an operation on a Dev Box. +Gets an action. .Example -Get-AzDevCenterUserDevBoxOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject +Get-AzDevCenterUserDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject .Example -Get-AzDevCenterUserDevBoxOperation -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject +Get-AzDevCenterUserDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject .Example -Get-AzDevCenterUserDevBoxOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" +Get-AzDevCenterUserDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -Name "schedule-default" .Example -Get-AzDevCenterUserDevBoxOperation -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" +Get-AzDevCenterUserDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -Name "schedule-default" .Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} -Get-AzDevCenterUserDevBoxOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "schedule-default"} +Get-AzDevCenterUserDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput .Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} -Get-AzDevCenterUserDevBoxOperation -DevCenterName Contoso -InputObject $devBoxInput +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "schedule-default"} +Get-AzDevCenterUserDevBoxAction -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction .Notes COMPLEX PARAMETER PROPERTIES @@ -970,6 +1034,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -978,17 +1043,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxoperation +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxaction #> -function Get-AzDevCenterUserDevBoxOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxOperation])] +function Get-AzDevCenterUserDevBoxAction { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -1005,10 +1072,11 @@ param( ${DevBoxName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ActionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Unique identifier for the Dev Box operation. - ${OperationId}, + # The name of the action. + ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] @@ -1091,9 +1159,9 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxOperation_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxOperation_GetViaIdentity'; - List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxOperation_List'; + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxAction_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxAction_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxAction_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" @@ -1131,24 +1199,50 @@ end { <# .Synopsis -Gets RDP Connection info. +Gets a Dev Box addon by Dev Box addon id. .Description -Gets RDP Connection info. -.Example -Get-AzDevCenterUserDevBoxRemoteConnection -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -.Example -Get-AzDevCenterUserDevBoxRemoteConnection -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } -Get-AzDevCenterUserDevBoxRemoteConnection -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } -Get-AzDevCenterUserDevBoxRemoteConnection -DevCenterName Contoso -InputObject $devBoxInput +Gets a Dev Box addon by Dev Box addon id. +.Example +Get-AzDevCenterUserDevBoxAddon ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +Get-AzDevCenterUserDevBoxAddon ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" +.Example +Get-AzDevCenterUserDevBoxAddon ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -AddOnName "devboxtunnel-sys-default" +.Example +Get-AzDevCenterUserDevBoxAddon ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -AddOnName "devboxtunnel-sys-default" +.Example +$addonInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Get-AzDevCenterUserDevBoxAddon ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addonInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn .Notes COMPLEX PARAMETER PROPERTIES @@ -1156,6 +1250,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -1164,18 +1259,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxremoteconnection +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxaddon #> -function Get-AzDevCenterUserDevBoxRemoteConnection { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IRemoteConnection])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +function Get-AzDevCenterUserDevBoxAddon { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -1186,16 +1283,25 @@ param( [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of a Dev Box. + # Name of the dev box addon. + ${AddOnName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. ${DevBoxName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute operations. + # Name of the project. ${ProjectName}, [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -1268,10 +1374,11 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxRemoteConnection_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxRemoteConnection_GetViaIdentity'; + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxAddon_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxAddon_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxAddon_List'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } @@ -1307,36 +1414,28 @@ end { <# .Synopsis -Gets a Dev Box. +Gets a customization group. .Description -Gets a Dev Box. -.Example -Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -.Example -Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -.Example -Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" -.Example -Get-AzDevCenterUserDevBox -DevCenterName Contoso +Gets a customization group. .Example -Get-AzDevCenterUserDevBox -DevCenterName Contoso -UserId "me" +Get-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -DevBoxName MyDevBox .Example -Get-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 +Get-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -ProjectName DevProject -DevBoxName MyDevBox -Include tasks .Example -Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox +Get-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CustomizationGroupName Provisioning -DevBoxName MyDevBox .Example -Get-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox +Get-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -ProjectName DevProject -CustomizationGroupName Provisioning -DevBoxName MyDevBox .Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } -Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" ="DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "me" } +Get-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationGroupInput .Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } -Get-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput +$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" = "DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0" } +Get-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -InputObject $customizationGroupInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup .Notes COMPLEX PARAMETER PROPERTIES @@ -1344,6 +1443,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -1352,17 +1452,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevbox +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationgroup #> -function Get-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox])] +function Get-AzDevCenterUserDevBoxCustomizationGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -1372,23 +1474,29 @@ param( ${Endpoint}, [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('DevBoxName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the customization group. + ${CustomizationGroupName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Display name for the Dev Box. - ${Name}, + ${DevBoxName}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] - [Parameter(ParameterSetName='List2', Mandatory)] + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] # The AAD object id of the user. # If value is 'me', the identity is taken from the authentication context. @@ -1401,6 +1509,13 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='List')] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ListCustomizationGroupsIncludeProperty])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.ListCustomizationGroupsIncludeProperty] + # Optional query parameter to specify what properties should be included in the response. + ${Include}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1459,11 +1574,12 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBox_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBox_GetViaIdentity'; - List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBox_List'; - List1 = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBox_List1'; - List2 = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBox_List2'; + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationGroup_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationGroup_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationGroup_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -1498,28 +1614,28 @@ end { <# .Synopsis -Retrieve a specific environment action. +Gets a customization task. .Description -Retrieve a specific environment action. +Gets a customization task. .Example -Get-AzDevCenterUserEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject +Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject .Example -Get-AzDevCenterUserEnvironmentAction -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject +Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -DevCenterName Contoso -ProjectName DevProject .Example -Get-AzDevCenterUserEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -Name "myEnvironment-Delete" +Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -TaskName choco -CatalogName MyCatalog .Example -Get-AzDevCenterUserEnvironmentAction -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject -Name "myEnvironment-Delete" +Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -DevCenterName Contoso -ProjectName DevProject -TaskName choco -CatalogName MyCatalog .Example -$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "myEnvironment-Delete"} -Get-AzDevCenterUserEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $environmentInput +$customizationTaskInput = @{"TaskName" = "choco"; "ProjectName" ="DevProject"; "CatalogName" = "MyCatalog" } +Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationTaskInput .Example -$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "myEnvironment-Delete"} -Get-AzDevCenterUserEnvironmentAction -DevCenterName Contoso -InputObject $environmentInput +$customizationTaskInput = @{"TaskName" = "choco"; "ProjectName" = "DevProject"; "CatalogName" = "MyCatalog" } +Get-AzDevCenterUserDevBoxCustomizationTaskDefinition -DevCenterName Contoso -InputObject $customizationTaskInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -1527,6 +1643,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -1535,17 +1652,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentaction +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationtaskdefinition #> -function Get-AzDevCenterUserEnvironmentAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction])] +function Get-AzDevCenterUserDevBoxCustomizationTaskDefinition { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTaskDefinition])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -1555,18 +1674,10 @@ param( ${Endpoint}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # Environment name. - ${EnvironmentName}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('ActionName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Uniquely identifies the action. - ${Name}, + # Name of the catalog. + ${CatalogName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] @@ -1575,14 +1686,11 @@ param( # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Get')] - [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] - # The AAD object id of the user. - # If value is 'me', the identity is taken from the authentication context. - ${UserId}, + # Full name of the task: {catalogName}/{taskName}. + ${TaskName}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] @@ -1649,12 +1757,9 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentAction_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentAction_GetViaIdentity'; - List = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentAction_List'; - } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { - $PSBoundParameters['UserId'] = "me" + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationTaskDefinition_List'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -1689,32 +1794,24 @@ end { <# .Synopsis -Get an environment definition from a catalog. +Gets the log for a customization task. .Description -Get an environment definition from a catalog. -.Example - -.Example -Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -ProjectName DevProject -.Example -Get-AzDevCenterUserEnvironmentDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CatalogName CentralCatalog -.Example -Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -ProjectName DevProject -CatalogName CentralCatalog +Gets the log for a customization task. .Example -Get-AzDevCenterUserEnvironmentDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CatalogName CentralCatalog -DefinitionName Sandbox +Get-AzDevCenterUserDevBoxCustomizationTaskLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -DevBoxName MyDevBox -CustomizationGroupName Provisioning -CustomizationTaskId "91835dc0-ef5a-4f58-9e3a-099aea8481f4" .Example -Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -ProjectName DevProject -CatalogName CentralCatalog -DefinitionName Sandbox +Get-AzDevCenterUserDevBoxCustomizationTaskLog -DevCenterName Contoso -ProjectName DevProject -DevBoxName MyDevBox -CustomizationGroupName Provisioning -CustomizationTaskId "91835dc0-ef5a-4f58-9e3a-099aea8481f4" .Example -$envInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" = "DevProject"; "DefinitionName" = "Sandbox" } -Get-AzDevCenterUserEnvironmentDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput +$customizationTaskLogInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" ="DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "me"; "CustomizationTaskId" = "91835dc0-ef5a-4f58-9e3a-099aea8481f4" } +Get-AzDevCenterUserDevBoxCustomizationTaskLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationTaskInput .Example -$envInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" = "DevProject"; "DefinitionName" = "Sandbox" } -Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -InputObject $envInput +$customizationTaskLogInput = @{"CustomizationGroupName" = "Provisioning"; "ProjectName" = "DevProject"; "DevBoxName" = "MyDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "CustomizationTaskId" = "91835dc0-ef5a-4f58-9e3a-099aea8481f4" } +Get-AzDevCenterUserDevBoxCustomizationTaskLog -DevCenterName Contoso -InputObject $customizationTaskInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition +System.String .Notes COMPLEX PARAMETER PROPERTIES @@ -1722,6 +1819,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -1730,18 +1828,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentdefinition +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxcustomizationtasklog #> -function Get-AzDevCenterUserEnvironmentDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentDefinition])] -[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] +function Get-AzDevCenterUserDevBoxCustomizationTaskLog { +[OutputType([System.String])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -1750,30 +1850,41 @@ param( ${Endpoint}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the catalog. - ${CatalogName}, + # A customization group name. + ${CustomizationGroupName}, [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the environment definition. - ${DefinitionName}, + # A customization task ID. + ${CustomizationTaskId}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the project. + # The name of a Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. ${ProjectName}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] - # Identity Parameter + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, @@ -1835,10 +1946,11 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentDefinition_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentDefinition_GetViaIdentity'; - List = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentDefinition_List'; - List1 = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentDefinition_List1'; + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationTaskLog_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxCustomizationTaskLog_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -1873,13 +1985,35 @@ end { <# .Synopsis -Gets the logs for an operation on an environment. +Gets the log for an imaging build task. .Description -Gets the logs for an operation on an environment. +Gets the log for an imaging build task. .Example -Get-AzDevCenterUserEnvironmentLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -ImageBuildLogId "12345678-aaaa-bbbb-cccc-1234567890ab" .Example -Get-AzDevCenterUserEnvironmentLog -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -ImageBuildLogId "12345678-aaaa-bbbb-cccc-1234567890ab" +.Example +$logInput = @{ + ProjectName = "DevProject" + ImageBuildLogId = "12345678-aaaa-bbbb-cccc-1234567890ab" +} +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $logInput +.Example +$logInput = @{ + ProjectName = "DevProject" + ImageBuildLogId = "12345678-aaaa-bbbb-cccc-1234567890ab" +} +Get-AzDevCenterUserDevBoxImagingTaskLog ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $logInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity @@ -1892,6 +2026,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -1900,16 +2035,18 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentlog +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboximagingtasklog #> -function Get-AzDevCenterUserEnvironmentLog { +function Get-AzDevCenterUserDevBoxImagingTaskLog { [OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( @@ -1922,14 +2059,8 @@ param( [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of the environment. - ${EnvironmentName}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # The id of the operation on an environment. - ${OperationId}, + # An imaging build log id. + ${ImageBuildLogId}, [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] @@ -1937,14 +2068,6 @@ param( # The DevCenter Project upon which to execute operations. ${ProjectName}, - [Parameter(ParameterSetName='Get')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] - [System.String] - # The AAD object id of the user. - # If value is 'me', the identity is taken from the authentication context. - ${UserId}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] @@ -2010,11 +2133,8 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentLog_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentLog_GetViaIdentity'; - } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { - $PSBoundParameters['UserId'] = "me" + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxImagingTaskLog_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxImagingTaskLog_GetViaIdentity'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -2049,28 +2169,28 @@ end { <# .Synopsis -Gets an environment action result. +Gets an operation on a Dev Box. .Description -Gets an environment action result. +Gets an operation on a Dev Box. .Example -Get-AzDevCenterUserEnvironmentOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject +Get-AzDevCenterUserDevBoxOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject .Example -Get-AzDevCenterUserEnvironmentOperation -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject +Get-AzDevCenterUserDevBoxOperation -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject .Example -Get-AzDevCenterUserEnvironmentOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" +Get-AzDevCenterUserDevBoxOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" .Example -Get-AzDevCenterUserEnvironmentOperation -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" +Get-AzDevCenterUserDevBoxOperation -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" .Example -$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} -Get-AzDevCenterUserEnvironmentOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $environmentInput +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} +Get-AzDevCenterUserDevBoxOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput .Example -$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} -Get-AzDevCenterUserEnvironmentOperation -DevCenterName Contoso -InputObject $environmentInput +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} +Get-AzDevCenterUserDevBoxOperation -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation .Notes COMPLEX PARAMETER PROPERTIES @@ -2078,6 +2198,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -2086,17 +2207,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentoperation +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxoperation #> -function Get-AzDevCenterUserEnvironmentOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOperation])] +function Get-AzDevCenterUserDevBoxOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -2109,13 +2232,13 @@ param( [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Environment name. - ${EnvironmentName}, + # Display name for the Dev Box. + ${DevBoxName}, [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Unique identifier for the environment operation. + # Unique identifier for the Dev Box operation. ${OperationId}, [Parameter(ParameterSetName='Get', Mandatory)] @@ -2199,9 +2322,9 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentOperation_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentOperation_GetViaIdentity'; - List = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentOperation_List'; + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxOperation_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxOperation_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxOperation_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" @@ -2239,24 +2362,24 @@ end { <# .Synopsis -Gets Outputs from the environment. +Gets RDP Connection info. .Description -Gets Outputs from the environment. +Gets RDP Connection info. .Example -Get-AzDevCenterUserEnvironmentOutput -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject +Get-AzDevCenterUserDevBoxRemoteConnection -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject .Example -Get-AzDevCenterUserEnvironmentOutput -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject +Get-AzDevCenterUserDevBoxRemoteConnection -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject .Example -$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject";} -Get-AzDevCenterUserEnvironmentOutput -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $environmentInput +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } +Get-AzDevCenterUserDevBoxRemoteConnection -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput .Example -$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject";} -Get-AzDevCenterUserEnvironmentOutput -DevCenterName Contoso -InputObject $environmentInput +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } +Get-AzDevCenterUserDevBoxRemoteConnection -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection .Notes COMPLEX PARAMETER PROPERTIES @@ -2264,6 +2387,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -2272,17 +2396,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentoutput +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxremoteconnection #> -function Get-AzDevCenterUserEnvironmentOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentOutputs])] +function Get-AzDevCenterUserDevBoxRemoteConnection { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IRemoteConnection])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -2294,8 +2420,8 @@ param( [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of the environment. - ${EnvironmentName}, + # The name of a Dev Box. + ${DevBoxName}, [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] @@ -2376,8 +2502,8 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentOutput_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentOutput_GetViaIdentity'; + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxRemoteConnection_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxRemoteConnection_GetViaIdentity'; } if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" @@ -2415,18 +2541,50 @@ end { <# .Synopsis -Gets the signed-in user's permitted abilities in an environment type. +Gets a snapshot by snapshot id. .Description -Gets the signed-in user's permitted abilities in an environment type. -.Example -{{ Add code here }} -.Example -{{ Add code here }} +Gets a snapshot by snapshot id. +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -SnapshotId "snapshot-1234" +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" +.Example +Get-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -SnapshotId "snapshot-1234" +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + SnapshotId = "snapshot-1234" +} +Get-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $snapshotInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot .Notes COMPLEX PARAMETER PROPERTIES @@ -2434,6 +2592,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -2442,18 +2601,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmenttypeability +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevboxsnapshot #> -function Get-AzDevCenterUserEnvironmentTypeAbility { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentTypeAbilities])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +function Get-AzDevCenterUserDevBoxSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxSnapshot])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -2462,24 +2623,33 @@ param( ${Endpoint}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of the environment type - ${EnvironmentTypeName}, + # Display name for the Dev Box. + ${DevBoxName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute operations. + # Name of the project. ${ProjectName}, + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The id of the snapshot. + # Should be treated as opaque string. + ${SnapshotId}, + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] # The AAD object id of the user. - # If value is 'me', the identity is taken from the - # authentication context. + # If value is 'me', the identity is taken from the authentication context. ${UserId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -2547,10 +2717,11 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentTypeAbility_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentTypeAbility_GetViaIdentity'; + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxSnapshot_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxSnapshot_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBoxSnapshot_List'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } @@ -2586,18 +2757,36 @@ end { <# .Synopsis -Get an environment type configured for a project. +Gets a Dev Box. .Description -Get an environment type configured for a project. +Gets a Dev Box. .Example -Get-AzDevCenterUserEnvironmentType -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" .Example -Get-AzDevCenterUserEnvironmentType -DevCenterName Contoso -ProjectName DevProject +Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -UserId 786a823c-8037-48ab-89b8-8599901e67d0 +.Example +Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" +.Example +Get-AzDevCenterUserDevBox -DevCenterName Contoso +.Example +Get-AzDevCenterUserDevBox -DevCenterName Contoso -UserId "me" +.Example +Get-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 +.Example +Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox +.Example +Get-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } +Get-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +Get-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox .Notes COMPLEX PARAMETER PROPERTIES @@ -2605,6 +2794,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -2613,17 +2803,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmenttype +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevbox #> -function Get-AzDevCenterUserEnvironmentType { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentType])] +function Get-AzDevCenterUserDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -2633,19 +2825,28 @@ param( ${Endpoint}, [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('EnvironmentTypeName')] + [Alias('DevBoxName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the environment type. + # Display name for the Dev Box. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Parameter(ParameterSetName='List2', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] @@ -2711,9 +2912,11 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentType_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentType_GetViaIdentity'; - List = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentType_List'; + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBox_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBox_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBox_List'; + List1 = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBox_List1'; + List2 = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevBox_List2'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -2748,58 +2951,25 @@ end { <# .Synopsis -Gets an environment. +Gets a list of Dev Box creations that are pending approval. .Description -Gets an environment. -.Example - -.Example -Get-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject -.Example -Get-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" -.Example -Get-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" -.Example -Get-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" -Name myEnv +Gets a list of Dev Box creations that are pending approval. .Example -Get-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" -Name myEnv -.Example -$envInput = @{"UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } -Get-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput +Get-AzDevCenterUserDevCenterApproval ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" .Example -$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } -Get-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput +Get-AzDevCenterUserDevCenterApproval ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment -.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 - [ActionName ]: The name of the action. - [CatalogName ]: Name of the catalog. - [CustomizationGroupName ]: Name of the customization group. - [CustomizationTaskId ]: A customization task ID. - [DefinitionName ]: Name of the environment definition. - [DevBoxName ]: Display name for the Dev Box. - [EnvironmentName ]: Environment name. - [EnvironmentTypeName ]: Name of the environment type. - [Id ]: Resource identity path - [OperationId ]: Unique identifier for the Dev Box operation. - [PoolName ]: Pool name. - [ProjectName ]: Name of the project. - [ScheduleName ]: Display name for the Schedule. - [TaskName ]: Full name of the task: {catalogName}/{taskName}. - [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironment +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserdevcenterapproval #> -function Get-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] +function Get-AzDevCenterUserDevCenterApproval { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IApproval])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -2808,35 +2978,30 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('EnvironmentName')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # Environment name. - ${Name}, - - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # The AAD object id of the user. - # If value is 'me', the identity is taken from the authentication context. - ${UserId}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.Int32] + # The maximum number of result items per page. + ${Maxpagesize}, - [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.String[]] + # Select the specified fields to be included in the response. + ${Select}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.Int32] + # The number of result items to skip. + ${Skip}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -2896,10 +3061,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironment_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironment_GetViaIdentity'; - List = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironment_List'; - List1 = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironment_List1'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserDevCenterApproval_List'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -2934,18 +3096,28 @@ end { <# .Synopsis -Get the status of an operation. +Retrieve a specific environment action. .Description -Get the status of an operation. +Retrieve a specific environment action. .Example -{{ Add code here }} +Get-AzDevCenterUserEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject .Example -{{ Add code here }} +Get-AzDevCenterUserEnvironmentAction -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject +.Example +Get-AzDevCenterUserEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -Name "myEnvironment-Delete" +.Example +Get-AzDevCenterUserEnvironmentAction -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject -Name "myEnvironment-Delete" +.Example +$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "myEnvironment-Delete"} +Get-AzDevCenterUserEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $environmentInput +.Example +$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "ActionName" = "myEnvironment-Delete"} +Get-AzDevCenterUserEnvironmentAction -DevCenterName Contoso -InputObject $environmentInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction .Notes COMPLEX PARAMETER PROPERTIES @@ -2953,6 +3125,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -2961,18 +3134,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruseroperationstatuses +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentaction #> -function Get-AzDevCenterUserOperationStatuses { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +function Get-AzDevCenterUserEnvironmentAction { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -2981,17 +3156,35 @@ param( ${Endpoint}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The operation id name. - ${OperationId}, + # Environment name. + ${EnvironmentName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ActionName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Uniquely identifies the action. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] @@ -3057,8 +3250,12 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserOperationStatuses_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserOperationStatuses_GetViaIdentity'; + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentAction_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentAction_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentAction_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -3093,28 +3290,32 @@ end { <# .Synopsis -Gets a pool. +Get an environment definition from a catalog. .Description -Gets a pool. +Get an environment definition from a catalog. .Example -Get-AzDevCenterUserPool -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject + .Example -Get-AzDevCenterUserPool -DevCenterName Contoso -ProjectName DevProject +Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -ProjectName DevProject .Example -Get-AzDevCenterUserPool -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -PoolName DevPool +Get-AzDevCenterUserEnvironmentDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CatalogName CentralCatalog .Example -Get-AzDevCenterUserPool -DevCenterName Contoso -ProjectName DevProject -PoolName DevPool +Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -ProjectName DevProject -CatalogName CentralCatalog .Example -$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool" } -Get-AzDevCenterUserPool -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +Get-AzDevCenterUserEnvironmentDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -CatalogName CentralCatalog -DefinitionName Sandbox .Example -$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool" } -Get-AzDevCenterUserPool -DevCenterName Contoso -InputObject $devBoxInput +Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -ProjectName DevProject -CatalogName CentralCatalog -DefinitionName Sandbox +.Example +$envInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" = "DevProject"; "DefinitionName" = "Sandbox" } +Get-AzDevCenterUserEnvironmentDefinition -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput +.Example +$envInput = @{"CatalogName" = "CentralCatalog"; "ProjectName" = "DevProject"; "DefinitionName" = "Sandbox" } +Get-AzDevCenterUserEnvironmentDefinition -DevCenterName Contoso -InputObject $envInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -3122,6 +3323,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -3130,18 +3332,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserpool +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentdefinition #> -function Get-AzDevCenterUserPool { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IPool])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Get-AzDevCenterUserEnvironmentDefinition { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentDefinition])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -3149,14 +3353,22 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the catalog. + ${CatalogName}, + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Pool name. - ${PoolName}, + # Name of the environment definition. + ${DefinitionName}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. @@ -3227,9 +3439,10 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserPool_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserPool_GetViaIdentity'; - List = 'Az.DevCenterdata.private\Get-AzDevCenterUserPool_List'; + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentDefinition_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentDefinition_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentDefinition_List'; + List1 = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentDefinition_List1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -3264,18 +3477,18 @@ end { <# .Synopsis -Gets the signed-in user's permitted abilities in a project. +Gets the logs for an operation on an environment. .Description -Gets the signed-in user's permitted abilities in a project. +Gets the logs for an operation on an environment. .Example -{{ Add code here }} +Get-AzDevCenterUserEnvironmentLog -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" .Example -{{ Add code here }} +Get-AzDevCenterUserEnvironmentLog -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities +System.String .Notes COMPLEX PARAMETER PROPERTIES @@ -3283,6 +3496,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -3291,17 +3505,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserprojectability +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentlog #> -function Get-AzDevCenterUserProjectAbility { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProjectAbilities])] +function Get-AzDevCenterUserEnvironmentLog { +[OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -3310,6 +3526,18 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the environment. + ${EnvironmentName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The id of the operation on an environment. + ${OperationId}, + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] @@ -3321,8 +3549,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] # The AAD object id of the user. - # If value is 'me', the identity is taken from the - # authentication context. + # If value is 'me', the identity is taken from the authentication context. ${UserId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -3390,8 +3617,8 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserProjectAbility_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserProjectAbility_GetViaIdentity'; + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentLog_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentLog_GetViaIdentity'; } if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" @@ -3429,28 +3656,28 @@ end { <# .Synopsis -Gets a project. +Gets an environment action result. .Description -Gets a project. +Gets an environment action result. .Example -Get-AzDevCenterUserProject -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +Get-AzDevCenterUserEnvironmentOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject .Example -Get-AzDevCenterUserProject -DevCenterName Contoso -ProjectName DevProject +Get-AzDevCenterUserEnvironmentOperation -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject .Example -Get-AzDevCenterUserProject -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +Get-AzDevCenterUserEnvironmentOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" .Example -Get-AzDevCenterUserProject -DevCenterName Contoso -ProjectName DevProject +Get-AzDevCenterUserEnvironmentOperation -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject -OperationId "d0954a94-3550-4919-bcbe-1c94ed79e0cd" .Example -$devBoxInput = @{"ProjectName" = "DevProject";} -Get-AzDevCenterUserProject -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} +Get-AzDevCenterUserEnvironmentOperation -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $environmentInput .Example -$devBoxInput = @{"ProjectName" = "DevProject";} -Get-AzDevCenterUserProject -DevCenterName Contoso -InputObject $devBoxInput +$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject"; "OperationId" = "d0954a94-3550-4919-bcbe-1c94ed79e0cd"} +Get-AzDevCenterUserEnvironmentOperation -DevCenterName Contoso -InputObject $environmentInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation .Notes COMPLEX PARAMETER PROPERTIES @@ -3458,6 +3685,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -3466,17 +3694,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserproject +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentoperation #> -function Get-AzDevCenterUserProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IProject])] +function Get-AzDevCenterUserEnvironmentOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -3486,11 +3716,33 @@ param( ${Endpoint}, [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('ProjectName')] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Environment name. + ${EnvironmentName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Unique identifier for the environment operation. + ${OperationId}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. - ${Name}, + ${ProjectName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] @@ -3557,9 +3809,12 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserProject_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserProject_GetViaIdentity'; - List = 'Az.DevCenterdata.private\Get-AzDevCenterUserProject_List'; + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentOperation_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentOperation_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentOperation_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -3594,32 +3849,24 @@ end { <# .Synopsis -Gets a schedule. +Gets Outputs from the environment. .Description -Gets a schedule. -.Example -Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -PoolName DevPool -ScheduleName default -.Example -Get-AzDevCenterUserSchedule -DevCenterName Contoso -ProjectName DevProject -PoolName DevPool -ScheduleName default -.Example -$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool"; "ScheduleName" = "default" } -Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput -.Example -$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool"; "ScheduleName" = "default" } -Get-AzDevCenterUserSchedule -DevCenterName Contoso -InputObject $devBoxInput +Gets Outputs from the environment. .Example -Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +Get-AzDevCenterUserEnvironmentOutput -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject .Example -Get-AzDevCenterUserSchedule -DevCenterName Contoso -ProjectName DevProject +Get-AzDevCenterUserEnvironmentOutput -DevCenterName Contoso -EnvironmentName myEnvironment -ProjectName DevProject .Example -Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -PoolName DevPool +$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject";} +Get-AzDevCenterUserEnvironmentOutput -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $environmentInput .Example -Get-AzDevCenterUserSchedule -DevCenterName Contoso -ProjectName DevProject -PoolName DevPool +$environmentInput = @{"EnvironmentName" = "myEnvironment"; "UserId" = "me"; "ProjectName" = "DevProject";} +Get-AzDevCenterUserEnvironmentOutput -DevCenterName Contoso -InputObject $environmentInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs .Notes COMPLEX PARAMETER PROPERTIES @@ -3627,6 +3874,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -3635,18 +3883,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserschedule +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmentoutput #> -function Get-AzDevCenterUserSchedule { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ISchedule])] -[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] +function Get-AzDevCenterUserEnvironmentOutput { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentOutputs])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -3655,25 +3905,24 @@ param( ${Endpoint}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Pool name. - ${PoolName}, + # The name of the environment. + ${EnvironmentName}, [Parameter(ParameterSetName='Get', Mandatory)] - [Parameter(ParameterSetName='List', Mandatory)] - [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the project. + # The DevCenter Project upon which to execute operations. ${ProjectName}, - [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] - # Display name for the Schedule. - ${ScheduleName}, + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] @@ -3740,10 +3989,11 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserSchedule_Get'; - GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserSchedule_GetViaIdentity'; - List = 'Az.DevCenterdata.private\Get-AzDevCenterUserSchedule_List'; - List1 = 'Az.DevCenterdata.private\Get-AzDevCenterUserSchedule_List1'; + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentOutput_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentOutput_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -3778,24 +4028,41 @@ end { <# .Synopsis -Delays the occurrence of an action. +Gets the signed-in user's permitted abilities in an environment type. .Description -Delays the occurrence of an action. +Gets the signed-in user's permitted abilities in an environment type. .Example -Invoke-AzDevCenterUserDelayDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -UserId "me" -ProjectName DevProject -DelayTime "01:30" +Get-AzDevCenterUserEnvironmentTypeAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -EnvironmentTypeName "DevTest" .Example -Invoke-AzDevCenterUserDelayDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -DelayTime "02:00" +Get-AzDevCenterUserEnvironmentTypeAbility ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -EnvironmentTypeName "DevTest" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" .Example -Invoke-AzDevCenterUserDelayDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -Name "schedule-default" -DelayTime "00:30" +$envTypeInput = @{ + ProjectName = "DevProject" + EnvironmentTypeName = "DevTest" +} +Get-AzDevCenterUserEnvironmentTypeAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $envTypeInput .Example -Invoke-AzDevCenterUserDelayDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -UserId "me" -ProjectName DevProject -Name "schedule-default" -DelayTime "05:15" +$envTypeInput = @{ + ProjectName = "DevProject" + EnvironmentTypeName = "DevTest" +} +Get-AzDevCenterUserEnvironmentTypeAbility ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $envTypeInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities .Notes COMPLEX PARAMETER PROPERTIES @@ -3803,6 +4070,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -3811,18 +4079,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruserdelaydevboxaction +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmenttypeability #> -function Invoke-AzDevCenterUserDelayDevBoxAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxAction], [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBoxActionDelayResult])] -[CmdletBinding(DefaultParameterSetName='Delay1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzDevCenterUserEnvironmentTypeAbility { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentTypeAbilities])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -3830,29 +4100,19 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='Delay', Mandatory)] - [Parameter(ParameterSetName='Delay1', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # Display name for the Dev Box. - ${DevBoxName}, - - [Parameter(ParameterSetName='Delay', Mandatory)] - [Alias('ActionName')] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of the action. - ${Name}, + # The name of the environment type + ${EnvironmentTypeName}, - [Parameter(ParameterSetName='Delay', Mandatory)] - [Parameter(ParameterSetName='Delay1', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the project. + # The DevCenter Project upon which to execute operations. ${ProjectName}, - [Parameter(ParameterSetName='Delay')] - [Parameter(ParameterSetName='Delay1')] + [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -3860,20 +4120,13 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='DelayViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='DelayViaIdentity1', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] - [System.DateTime] - # The time to delay the Dev Box action or actions until. - ${DelayUntil}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3932,12 +4185,10 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Delay = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserDelayDevBoxAction_Delay'; - Delay1 = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserDelayDevBoxAction_Delay1'; - DelayViaIdentity = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserDelayDevBoxAction_DelayViaIdentity'; - DelayViaIdentity1 = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserDelayDevBoxAction_DelayViaIdentity1'; + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentTypeAbility_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentTypeAbility_GetViaIdentity'; } - if (('Delay', 'Delay1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } @@ -3973,18 +4224,18 @@ end { <# .Synopsis -Delays the occurrence of an action. +Get an environment type configured for a project. .Description -Delays the occurrence of an action. +Get an environment type configured for a project. .Example -Invoke-AzDevCenterUserDelayEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -Name "myEnvironment-Delete" -DelayTime "00:30" +Get-AzDevCenterUserEnvironmentType -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject .Example -Invoke-AzDevCenterUserDelayEnvironmentAction -DevCenterName Contoso -EnvironmentName myEnvironment -UserId "me" -ProjectName DevProject -Name "myEnvironment-Delete" -DelayTime "05:15" +Get-AzDevCenterUserEnvironmentType -DevCenterName Contoso -ProjectName DevProject .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType .Notes COMPLEX PARAMETER PROPERTIES @@ -3992,6 +4243,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -4000,18 +4252,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruserdelayenvironmentaction +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironmenttype #> -function Invoke-AzDevCenterUserDelayEnvironmentAction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentAction])] -[CmdletBinding(DefaultParameterSetName='Delay', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzDevCenterUserEnvironmentType { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentType])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -4019,46 +4273,27 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='Delay', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # Environment name. - ${EnvironmentName}, - - [Parameter(ParameterSetName='Delay', Mandatory)] - [Alias('ActionName')] + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('EnvironmentTypeName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Uniquely identifies the action. + # Name of the environment type. ${Name}, - [Parameter(ParameterSetName='Delay', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Delay')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] - [System.String] - # The AAD object id of the user. - # If value is 'me', the identity is taken from the authentication context. - ${UserId}, - - [Parameter(ParameterSetName='DelayViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] - [System.DateTime] - # The time to delay the Environment action until. - ${Until}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4117,11 +4352,9 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Delay = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserDelayEnvironmentAction_Delay'; - DelayViaIdentity = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserDelayEnvironmentAction_DelayViaIdentity'; - } - if (('Delay') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { - $PSBoundParameters['UserId'] = "me" + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentType_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentType_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironmentType_List'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -4156,35 +4389,32 @@ end { <# .Synopsis -Applies customizations to the Dev Box. +Gets an environment. .Description -Applies customizations to the Dev Box. +Gets an environment. .Example -$task = @{ - Name = "catalogName/choco" - DisplayName = "choco" - Parameter = @{ - PackageName = "vscode" - PackageVersion = "1.0.0" - } - RunAs = "System" - TimeoutInSecond = 120 -} -$tasks = @($task) -New-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -DevBoxName myDevBox -CustomizationGroupName Provisioning -Task $tasks + .Example -New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -ProjectName DevProject -UserId "me" -DevBoxName myDevBox -CustomizationGroupName Provisioning -Task $tasks +Get-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject .Example -$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } -New-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationGroupInput -Task $tasks +Get-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" .Example -$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } -New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -InputObject $customizationGroupInput -Task $tasks +Get-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +Get-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" -Name myEnv +.Example +Get-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" -Name myEnv +.Example +$envInput = @{"UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } +Get-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput +.Example +$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } +Get-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .Notes COMPLEX PARAMETER PROPERTIES @@ -4192,6 +4422,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -4200,26 +4431,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. - -TASK : Tasks to apply. Note by default tasks are excluded from the response whenlisting customization groups. To include them, use the `include=tasks` queryparameter. - Name : Name of the task. - [DisplayName ]: Display name to help differentiate multiple instances of the same task. - [Parameter ]: Parameters for the task. - [(Any) ]: This indicates any property can be added to this object. - [RunAs ]: What account to run the task as. - [TimeoutInSecond ]: Timeout, in seconds. Overrides any timeout provided on the task definition. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevboxcustomizationgroup +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserenvironment #> -function New-AzDevCenterUserDevBoxCustomizationGroup { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationGroup])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzDevCenterUserEnvironment { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -4227,50 +4452,36 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [System.String] - # A customization group name. - ${CustomizationGroupName}, - - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('EnvironmentName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of a Dev Box. - ${DevBoxName}, + # Environment name. + ${Name}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute operations. + # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] # The AAD object id of the user. - # If value is 'me', the identity is taken from the - # authentication context. + # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] - [AllowEmptyCollection()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[]] - # Tasks to apply. - # Note by default tasks are excluded from the response whenlisting customization groups. - # To include them, use the `include=tasks` queryparameter. - # To construct, see NOTES section for TASK properties and create a hash table. - ${Task}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4329,11 +4540,10 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - CreateExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserDevBoxCustomizationGroup_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserDevBoxCustomizationGroup_CreateViaIdentityExpanded'; - } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { - $PSBoundParameters['UserId'] = "me" + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironment_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironment_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironment_List'; + List1 = 'Az.DevCenterdata.private\Get-AzDevCenterUserEnvironment_List1'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -4368,24 +4578,18 @@ end { <# .Synopsis -Creates or replaces a Dev Box. +Get the status of an operation. .Description -Creates or replaces a Dev Box. -.Example -New-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox -PoolName DevPool -.Example -New-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox -PoolName DevPool +Get the status of an operation. .Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } -New-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput -PoolName DevPool +{{ Add code here }} .Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } -New-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput -PoolName DevPool +{{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -4393,6 +4597,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -4401,18 +4606,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevbox +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruseroperationstatuses #> -function New-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IDevBox])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzDevCenterUserOperationStatuses { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -4420,46 +4627,3042 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('DevBoxName')] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of a Dev Box. - ${Name}, + # The operation id name. + ${OperationId}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute the operation. + # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='CreateExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] - [System.String] - # The AAD object id of the user. - # If value is 'me', the identity is taken from the authentication context. - ${UserId}, - - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [System.String] - # The name of the Dev Box pool this machine belongs to. + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserOperationStatuses_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserOperationStatuses_GetViaIdentity'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Gets a pool. +.Description +Gets a pool. +.Example +Get-AzDevCenterUserPool -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +.Example +Get-AzDevCenterUserPool -DevCenterName Contoso -ProjectName DevProject +.Example +Get-AzDevCenterUserPool -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -PoolName DevPool +.Example +Get-AzDevCenterUserPool -DevCenterName Contoso -ProjectName DevProject -PoolName DevPool +.Example +$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool" } +Get-AzDevCenterUserPool -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +.Example +$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool" } +Get-AzDevCenterUserPool -DevCenterName Contoso -InputObject $devBoxInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserpool +#> +function Get-AzDevCenterUserPool { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPool])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Pool name. ${PoolName}, + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserPool_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserPool_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserPool_List'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Gets the signed-in user's permitted abilities in a project. +.Description +Gets the signed-in user's permitted abilities in a project. +.Example +Get-AzDevCenterUserProjectAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" +.Example +Get-AzDevCenterUserProjectAbility ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +$projectInput = @{ + ProjectName = "DevProject" +} +Get-AzDevCenterUserProjectAbility ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $projectInput +.Example +$projectInput = @{ + ProjectName = "DevProject" +} +Get-AzDevCenterUserProjectAbility ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $projectInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserprojectability +#> +function Get-AzDevCenterUserProjectAbility { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProjectAbilities])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserProjectAbility_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserProjectAbility_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Gets a project. +.Description +Gets a project. +.Example +Get-AzDevCenterUserProject -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +.Example +Get-AzDevCenterUserProject -DevCenterName Contoso -ProjectName DevProject +.Example +Get-AzDevCenterUserProject -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +.Example +Get-AzDevCenterUserProject -DevCenterName Contoso -ProjectName DevProject +.Example +$devBoxInput = @{"ProjectName" = "DevProject";} +Get-AzDevCenterUserProject -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +.Example +$devBoxInput = @{"ProjectName" = "DevProject";} +Get-AzDevCenterUserProject -DevCenterName Contoso -InputObject $devBoxInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserproject +#> +function Get-AzDevCenterUserProject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IProject])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ProjectName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${Name}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserProject_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserProject_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserProject_List'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Gets a schedule. +.Description +Gets a schedule. +.Example +Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -PoolName DevPool -ScheduleName default +.Example +Get-AzDevCenterUserSchedule -DevCenterName Contoso -ProjectName DevProject -PoolName DevPool -ScheduleName default +.Example +$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool"; "ScheduleName" = "default" } +Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +.Example +$devBoxInput = @{"ProjectName" = "DevProject"; "PoolName" = "DevPool"; "ScheduleName" = "default" } +Get-AzDevCenterUserSchedule -DevCenterName Contoso -InputObject $devBoxInput +.Example +Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject +.Example +Get-AzDevCenterUserSchedule -DevCenterName Contoso -ProjectName DevProject +.Example +Get-AzDevCenterUserSchedule -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -PoolName DevPool +.Example +Get-AzDevCenterUserSchedule -DevCenterName Contoso -ProjectName DevProject -PoolName DevPool + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/get-azdevcenteruserschedule +#> +function Get-AzDevCenterUserSchedule { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ISchedule])] +[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Pool name. + ${PoolName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Schedule. + ${ScheduleName}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Get = 'Az.DevCenterdata.private\Get-AzDevCenterUserSchedule_Get'; + GetViaIdentity = 'Az.DevCenterdata.private\Get-AzDevCenterUserSchedule_GetViaIdentity'; + List = 'Az.DevCenterdata.private\Get-AzDevCenterUserSchedule_List'; + List1 = 'Az.DevCenterdata.private\Get-AzDevCenterUserSchedule_List1'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Aligns a Dev Box to the pools current pool configuration. +.Description +Aligns a Dev Box to the pools current pool configuration. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 : Indicates which pool properties to align on. + Target : The targets to align on. + +INPUTOBJECT : Identity Parameter + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruseraligndevbox +#> +function Invoke-AzDevCenterUserAlignDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='AlignExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Align', Mandatory)] + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Align', Mandatory)] + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Align')] + [Parameter(ParameterSetName='AlignExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='AlignViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Align', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody] + # Indicates which pool properties to align on. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Parameter(ParameterSetName='AlignViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[]] + # The targets to align on. + ${Target}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Align = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignDevBox_Align'; + AlignExpanded = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignDevBox_AlignExpanded'; + AlignViaIdentity = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignDevBox_AlignViaIdentity'; + AlignViaIdentityExpanded = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignDevBox_AlignViaIdentityExpanded'; + } + if (('Align', 'AlignExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Aligns all Dev Boxes in the pool with the current configuration. +.Description +Aligns all Dev Boxes in the pool with the current configuration. +.Example +Invoke-AzDevCenterUserAlignPool ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -PoolName "DevPool01" ` + -Target "NetworkProperties" +.Example +Invoke-AzDevCenterUserAlignPool ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -PoolName "DevPool01" ` + -Target "NetworkProperties" +.Example +$poolInput = @{ + ProjectName = "DevProject" + PoolName = "DevPool01" +} +Invoke-AzDevCenterUserAlignPool ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $poolInput ` + -Target "NetworkProperties" +.Example +$body = @{ + Target = @("NetworkProperties") +} +Invoke-AzDevCenterUserAlignPool ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -PoolName "DevPool01" ` + -Body $body + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.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. + +BODY : Indicates which pool properties to align on. + Target : The targets to align on. + +INPUTOBJECT : Identity Parameter + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruseralignpool +#> +function Invoke-AzDevCenterUserAlignPool { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='AlignExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Align', Mandatory)] + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Pool name. + ${PoolName}, + + [Parameter(ParameterSetName='Align', Mandatory)] + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='AlignViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Align', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AlignViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IPoolAlignBody] + # Indicates which pool properties to align on. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='AlignExpanded', Mandatory)] + [Parameter(ParameterSetName='AlignViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget])] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.PoolAlignTarget[]] + # The targets to align on. + ${Target}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Align = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignPool_Align'; + AlignExpanded = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignPool_AlignExpanded'; + AlignViaIdentity = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignPool_AlignViaIdentity'; + AlignViaIdentityExpanded = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserAlignPool_AlignViaIdentityExpanded'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Delays the occurrence of an action. +.Description +Delays the occurrence of an action. +.Example +Invoke-AzDevCenterUserDelayDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -UserId "me" -ProjectName DevProject -DelayTime "01:30" +.Example +Invoke-AzDevCenterUserDelayDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -ProjectName DevProject -DelayTime "02:00" +.Example +Invoke-AzDevCenterUserDelayDevBoxAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -DevBoxName myDevBox -ProjectName DevProject -Name "schedule-default" -DelayTime "00:30" +.Example +Invoke-AzDevCenterUserDelayDevBoxAction -DevCenterName Contoso -DevBoxName myDevBox -UserId "me" -ProjectName DevProject -Name "schedule-default" -DelayTime "05:15" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruserdelaydevboxaction +#> +function Invoke-AzDevCenterUserDelayDevBoxAction { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAction], [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxActionDelayResult])] +[CmdletBinding(DefaultParameterSetName='Delay1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Delay', Mandatory)] + [Parameter(ParameterSetName='Delay1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Delay', Mandatory)] + [Alias('ActionName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the action. + ${Name}, + + [Parameter(ParameterSetName='Delay', Mandatory)] + [Parameter(ParameterSetName='Delay1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Delay')] + [Parameter(ParameterSetName='Delay1')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='DelayViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='DelayViaIdentity1', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.DateTime] + # The time to delay the Dev Box action or actions until, in RFC3339 format. + ${DelayUntil}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Delay = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserDelayDevBoxAction_Delay'; + Delay1 = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserDelayDevBoxAction_Delay1'; + DelayViaIdentity = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserDelayDevBoxAction_DelayViaIdentity'; + DelayViaIdentity1 = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserDelayDevBoxAction_DelayViaIdentity1'; + } + if (('Delay', 'Delay1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Delays the occurrence of an action. +.Description +Delays the occurrence of an action. +.Example +Invoke-AzDevCenterUserDelayEnvironmentAction -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -EnvironmentName myEnvironment -ProjectName DevProject -Name "myEnvironment-Delete" -DelayTime "00:30" +.Example +Invoke-AzDevCenterUserDelayEnvironmentAction -DevCenterName Contoso -EnvironmentName myEnvironment -UserId "me" -ProjectName DevProject -Name "myEnvironment-Delete" -DelayTime "05:15" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/invoke-azdevcenteruserdelayenvironmentaction +#> +function Invoke-AzDevCenterUserDelayEnvironmentAction { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentAction])] +[CmdletBinding(DefaultParameterSetName='Delay', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Delay', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Environment name. + ${EnvironmentName}, + + [Parameter(ParameterSetName='Delay', Mandatory)] + [Alias('ActionName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Uniquely identifies the action. + ${Name}, + + [Parameter(ParameterSetName='Delay', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Delay')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='DelayViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.DateTime] + # The time to delay the Environment action until, in RFC3339 format. + ${Until}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Delay = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserDelayEnvironmentAction_Delay'; + DelayViaIdentity = 'Az.DevCenterdata.private\Invoke-AzDevCenterUserDelayEnvironmentAction_DelayViaIdentity'; + } + if (('Delay') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Creates a Dev Box addon. +.Description +Creates a Dev Box addon. +.Example +New-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +New-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "me" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +New-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "me" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +New-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevboxaddon +#> +function New-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the Dev Box addon. + ${AddOnName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of a Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + CreateExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserDevBoxAddOn_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserDevBoxAddOn_CreateViaIdentityExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Applies customizations to the Dev Box. +.Description +Applies customizations to the Dev Box. +.Example +$task = @{ + Name = "catalogName/choco" + DisplayName = "choco" + Parameter = @{ + PackageName = "vscode" + PackageVersion = "1.0.0" + } + RunAs = "System" + TimeoutInSecond = 120 +} +$tasks = @($task) +New-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -DevBoxName myDevBox -CustomizationGroupName Provisioning -Task $tasks +.Example +New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -ProjectName DevProject -UserId "me" -DevBoxName myDevBox -CustomizationGroupName Provisioning -Task $tasks +.Example +$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } +New-AzDevCenterUserDevBoxCustomizationGroup -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $customizationGroupInput -Task $tasks +.Example +$customizationGroupInput = @{"CustomizationGroupName" = "Provisioning"; "DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +New-AzDevCenterUserDevBoxCustomizationGroup -DevCenterName Contoso -InputObject $customizationGroupInput -Task $tasks + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. + +TASK : Tasks to apply. Note by default tasks are excluded from the response whenlisting customization groups. To include them, use the `include=tasks` queryparameter. + Name : Name of the task. + [DisplayName ]: Display name to help differentiate multiple instances of the same task. + [Parameter ]: Parameters for the task. + [(Any) ]: This indicates any property can be added to this object. + [RunAs ]: What account to run the task as. + [TimeoutInSecond ]: Timeout, in seconds. Overrides any timeout provided on the task definition. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevboxcustomizationgroup +#> +function New-AzDevCenterUserDevBoxCustomizationGroup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationGroup])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # A customization group name. + ${CustomizationGroupName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of a Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[]] + # Tasks to apply. + # Note by default tasks are excluded from the response whenlisting customization groups. + # To include them, use the `include=tasks` queryparameter. + # To construct, see NOTES section for TASK properties and create a hash table. + ${Task}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + CreateExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserDevBoxCustomizationGroup_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserDevBoxCustomizationGroup_CreateViaIdentityExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Creates or replaces a Dev Box. +.Description +Creates or replaces a Dev Box. +.Example +New-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox -PoolName DevPool +.Example +New-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox -PoolName DevPool +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } +New-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput -PoolName DevPool +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +New-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput -PoolName DevPool + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserdevbox +#> +function New-AzDevCenterUserDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Alias('DevBoxName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of a Dev Box. + ${Name}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.String] + # The name of the Dev Box pool this machine belongs to. + ${PoolName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + CreateExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserDevBox_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserDevBox_CreateViaIdentityExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Creates or updates an environment. +.Description +Creates or updates an environment. +.Example +$functionAppParameters = @{"name" = "testfuncApp" } +$currentDate = Get-Date +$dateIn8Months = $currentDate.AddMonths(8) + +New-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -Name "envtest" -ProjectName DevProject -CatalogName CentralCatalog -EnvironmentDefinitionName FunctionApp -EnvironmentType DevTest -Parameter $functionAppParameters -ExpirationDate $dateIn8Months +.Example +$currentDate = Get-Date +$dateIn8Months = $currentDate.AddMonths(8) + +New-AzDevCenterUserEnvironment -DevCenterName Contoso -Name "envtest" -ProjectName DevProject -CatalogName CentralCatalog -EnvironmentDefinitionName Sandbox -EnvironmentType DevTest -ExpirationDate $dateIn8Months +.Example +$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "envtest" } +$currentDate = Get-Date +$dateIn8Months = $currentDate.AddMonths(8) + +New-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput -CatalogName CentralCatalog -EnvironmentDefinitionName Sandbox -EnvironmentType DevTest -ExpirationDate $dateIn8Months +.Example +$functionAppParameters = @{"name" = "testfuncApp" } +$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "envtest" } +$currentDate = Get-Date +$dateIn8Months = $currentDate.AddMonths(8) + +New-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput -CatalogName CentralCatalog -EnvironmentDefinitionName FunctionApp -EnvironmentType DevTest -Parameter $functionAppParameters -ExpirationDate $dateIn8Months + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserenvironment +#> +function New-AzDevCenterUserEnvironment { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Alias('EnvironmentName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the environment. + ${Name}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.String] + # Name of the catalog. + ${CatalogName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.String] + # Name of the environment definition. + ${EnvironmentDefinitionName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.String] + # Environment type. + ${EnvironmentType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.DateTime] + # The time the expiration date will be triggered (UTC), after which theenvironment and associated resources will be deleted. + ${ExpirationDate}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters]))] + [System.Collections.Hashtable] + # Parameters object for the environment. + ${Parameter}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + CreateExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserEnvironment_CreateExpanded'; + CreateViaIdentityExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserEnvironment_CreateViaIdentityExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Deletes a Dev Box addon. +.Description +Deletes a Dev Box addon. +.Example +Remove-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +Remove-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "me" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Remove-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "me" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Remove-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserdevboxaddon +#> +function Remove-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the Dev Box addon. + ${AddOnName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of a Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Delete = 'Az.DevCenterdata.private\Remove-AzDevCenterUserDevBoxAddOn_Delete'; + DeleteViaIdentity = 'Az.DevCenterdata.private\Remove-AzDevCenterUserDevBoxAddOn_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Deletes a Dev Box. +.Description +Deletes a Dev Box. +.Example +Remove-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox +.Example +Remove-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } +Remove-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +.Example +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } +Remove-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserdevbox +#> +function Remove-AzDevCenterUserDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('DevBoxName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of a Dev Box. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus])] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Support.LocalAdminStatus] - # Indicates whether the owner of the Dev Box is a local administrator. - ${LocalAdministrator}, + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Delete = 'Az.DevCenterdata.private\Remove-AzDevCenterUserDevBox_Delete'; + DeleteViaIdentity = 'Az.DevCenterdata.private\Remove-AzDevCenterUserDevBox_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 + } +} +} + +<# +.Synopsis +Deletes an environment and all its associated resources +.Description +Deletes an environment and all its associated resources +.Example +Remove-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" -Name myEnv +.Example +Remove-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" -Name myEnv +.Example +$envInput = @{"UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } +Remove-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput +.Example +$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } +Remove-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserenvironment +#> +function Remove-AzDevCenterUserEnvironment { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('EnvironmentName')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the environment. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.Management.Automation.SwitchParameter] + # The query option to force environment deletion even if the environment definition does not exist. + # This is a best-effort delete, and anything custom that forces resource creation beyond the associated resource group may not be deleted. + ${Force}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -4502,6 +7705,12 @@ param( # Run the command asynchronously ${NoWait}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -4531,10 +7740,10 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - CreateExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserDevBox_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserDevBox_CreateViaIdentityExpanded'; + Delete = 'Az.DevCenterdata.private\Remove-AzDevCenterUserEnvironment_Delete'; + DeleteViaIdentity = 'Az.DevCenterdata.private\Remove-AzDevCenterUserEnvironment_DeleteViaIdentity'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } @@ -4570,38 +7779,26 @@ end { <# .Synopsis -Creates or updates an environment. +Attempts automated repair steps to resolve common problems on a Dev Box. +The Dev Box may restart during this operation. .Description -Creates or updates an environment. +Attempts automated repair steps to resolve common problems on a Dev Box. +The Dev Box may restart during this operation. .Example -$functionAppParameters = @{"name" = "testfuncApp" } -$currentDate = Get-Date -$dateIn8Months = $currentDate.AddMonths(8) - -New-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -Name "envtest" -ProjectName DevProject -CatalogName CentralCatalog -EnvironmentDefinitionName FunctionApp -EnvironmentType DevTest -Parameter $functionAppParameters -ExpirationDate $dateIn8Months +Repair-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -Name myDevBox -ProjectName DevProject .Example -$currentDate = Get-Date -$dateIn8Months = $currentDate.AddMonths(8) - -New-AzDevCenterUserEnvironment -DevCenterName Contoso -Name "envtest" -ProjectName DevProject -CatalogName CentralCatalog -EnvironmentDefinitionName Sandbox -EnvironmentType DevTest -ExpirationDate $dateIn8Months +Repair-AzDevCenterUserDevBox -DevCenterName Contoso -Name myDevBox -ProjectName DevProject .Example -$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "envtest" } -$currentDate = Get-Date -$dateIn8Months = $currentDate.AddMonths(8) - -New-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput -CatalogName CentralCatalog -EnvironmentDefinitionName Sandbox -EnvironmentType DevTest -ExpirationDate $dateIn8Months +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject";} +Repair-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput .Example -$functionAppParameters = @{"name" = "testfuncApp" } -$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "envtest" } -$currentDate = Get-Date -$dateIn8Months = $currentDate.AddMonths(8) - -New-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput -CatalogName CentralCatalog -EnvironmentDefinitionName FunctionApp -EnvironmentType DevTest -Parameter $functionAppParameters -ExpirationDate $dateIn8Months +$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject";} +Repair-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -4609,6 +7806,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -4617,18 +7815,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/new-azdevcenteruserenvironment +https://learn.microsoft.com/powershell/module/az.devcenter/repair-azdevcenteruserdevbox #> -function New-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Repair-AzDevCenterUserDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Repair', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -4636,20 +7836,20 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [Alias('EnvironmentName')] + [Parameter(ParameterSetName='Repair', Mandatory)] + [Alias('DevBoxName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of the environment. + # Display name for the Dev Box. ${Name}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='Repair', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute operations. + # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='Repair')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -4657,43 +7857,12 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [System.String] - # Name of the catalog. - ${CatalogName}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [System.String] - # Name of the environment definition. - ${EnvironmentDefinitionName}, - - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [System.String] - # Environment type. - ${EnvironmentType}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [System.DateTime] - # The time the expiration date will be triggered (UTC), after which theenvironment and associated resources will be deleted. - ${ExpirationDate}, - - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters]))] - [System.Collections.Hashtable] - # Parameters object for the environment. - ${Parameter}, + [Parameter(ParameterSetName='RepairViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -4765,10 +7934,10 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - CreateExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserEnvironment_CreateExpanded'; - CreateViaIdentityExpanded = 'Az.DevCenterdata.private\New-AzDevCenterUserEnvironment_CreateViaIdentityExpanded'; + Repair = 'Az.DevCenterdata.private\Repair-AzDevCenterUserDevBox_Repair'; + RepairViaIdentity = 'Az.DevCenterdata.private\Repair-AzDevCenterUserDevBox_RepairViaIdentity'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Repair') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } @@ -4804,24 +7973,24 @@ end { <# .Synopsis -Deletes a Dev Box. +Restarts a Dev Box. .Description -Deletes a Dev Box. +Restarts a Dev Box. .Example -Remove-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox +Restart-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox .Example -Remove-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox +Restart-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox .Example $devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } -Remove-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +Restart-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput .Example $devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } -Remove-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput +Restart-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -4829,6 +7998,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -4837,18 +8007,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserdevbox +https://learn.microsoft.com/powershell/module/az.devcenter/restart-azdevcenteruserdevbox #> -function Remove-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Restart-AzDevCenterUserDevBox { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Restart', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -4856,20 +8028,20 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='Restart', Mandatory)] [Alias('DevBoxName')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of a Dev Box. + # Display name for the Dev Box. ${Name}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='Restart', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute operations. + # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='Restart')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -4877,7 +8049,7 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RestartViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter @@ -4925,12 +8097,6 @@ param( # Run the command asynchronously ${NoWait}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -4960,10 +8126,10 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Delete = 'Az.DevCenterdata.private\Remove-AzDevCenterUserDevBox_Delete'; - DeleteViaIdentity = 'Az.DevCenterdata.private\Remove-AzDevCenterUserDevBox_DeleteViaIdentity'; + Restart = 'Az.DevCenterdata.private\Restart-AzDevCenterUserDevBox_Restart'; + RestartViaIdentity = 'Az.DevCenterdata.private\Restart-AzDevCenterUserDevBox_RestartViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Restart') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } @@ -4999,24 +8165,48 @@ end { <# .Synopsis -Deletes an environment and all its associated resources +Restores a Dev Box to a specified snapshot. .Description -Deletes an environment and all its associated resources -.Example -Remove-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId "me" -Name myEnv -.Example -Remove-AzDevCenterUserEnvironment -DevCenterName Contoso -ProjectName DevProject -UserId "786a823c-8037-48ab-89b8-8599901e67d0" -Name myEnv -.Example -$envInput = @{"UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } -Remove-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput -.Example -$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "myEnv" } -Remove-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput +Restores a Dev Box to a specified snapshot. +.Example +Restore-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -SnapshotId "snapshot-1234" +.Example +Restore-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -SnapshotId "snapshot-1234" +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" +} +Restore-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $snapshotInput ` + -SnapshotId "snapshot-1234" +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "me" + ProjectName = "DevProject" +} +Restore-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $snapshotInput ` + -SnapshotId "snapshot-1234" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -5024,6 +8214,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -5032,18 +8223,20 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserenvironment +https://learn.microsoft.com/powershell/module/az.devcenter/restore-azdevcenteruserdevboxsnapshot #> -function Remove-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Restore-AzDevCenterUserDevBoxSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Restore', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -5051,20 +8244,19 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('EnvironmentName')] + [Parameter(ParameterSetName='Restore', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The name of the environment. - ${Name}, + # Display name for the Dev Box. + ${DevBoxName}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='Restore', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # The DevCenter Project upon which to execute operations. + # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='Restore')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -5072,13 +8264,19 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RestoreViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.String] + # Required parameter that specifies the snapshot id to use for the restore operation. + ${SnapshotId}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -5120,12 +8318,6 @@ param( # Run the command asynchronously ${NoWait}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -5155,10 +8347,10 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Delete = 'Az.DevCenterdata.private\Remove-AzDevCenterUserEnvironment_Delete'; - DeleteViaIdentity = 'Az.DevCenterdata.private\Remove-AzDevCenterUserEnvironment_DeleteViaIdentity'; + Restore = 'Az.DevCenterdata.private\Restore-AzDevCenterUserDevBoxSnapshot_Restore'; + RestoreViaIdentity = 'Az.DevCenterdata.private\Restore-AzDevCenterUserDevBoxSnapshot_RestoreViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Restore') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } @@ -5194,53 +8386,71 @@ end { <# .Synopsis -Attempts automated repair steps to resolve common problems on a Dev Box. -The Dev Box may restart during this operation. +Lets a user set their own active hours for their Dev Box, overriding the defaults set at the pool level. .Description -Attempts automated repair steps to resolve common problems on a Dev Box. -The Dev Box may restart during this operation. -.Example -Repair-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -Name myDevBox -ProjectName DevProject -.Example -Repair-AzDevCenterUserDevBox -DevCenterName Contoso -Name myDevBox -ProjectName DevProject -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject";} -Repair-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput -.Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject";} -Repair-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput +Lets a user set their own active hours for their Dev Box, overriding the defaults set at the pool level. +.Example +Set-AzDevCenterUserDevBoxActiveHour ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -StartTimeHour 9 ` + -EndTimeHour 17 ` + -TimeZone "America/Los_Angeles" +.Example +Set-AzDevCenterUserDevBoxActiveHour ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -StartTimeHour 8 ` + -EndTimeHour 16 ` + -TimeZone "America/New_York" +.Example +$activeHours = @{ + StartTimeHour = 10 + EndTimeHour = 18 + TimeZone = "America/Chicago" +} +Set-AzDevCenterUserDevBoxActiveHour ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -Body $activeHours +.Example +$activeHours = @{ + StartTimeHour = 7 + EndTimeHour = 15 + TimeZone = "America/Los_Angeles" +} +Set-AzDevCenterUserDevBoxActiveHour ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -Body $activeHours .Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox .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 - [ActionName ]: The name of the action. - [CatalogName ]: Name of the catalog. - [CustomizationGroupName ]: Name of the customization group. - [CustomizationTaskId ]: A customization task ID. - [DefinitionName ]: Name of the environment definition. - [DevBoxName ]: Display name for the Dev Box. - [EnvironmentName ]: Environment name. - [EnvironmentTypeName ]: Name of the environment type. - [Id ]: Resource identity path - [OperationId ]: Unique identifier for the Dev Box operation. - [PoolName ]: Pool name. - [ProjectName ]: Name of the project. - [ScheduleName ]: Display name for the Schedule. - [TaskName ]: Full name of the task: {catalogName}/{taskName}. - [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +BODY : Manual user set active hours configuration. + [EndTimeHour ]: The end time of the active hours. + [StartTimeHour ]: The start time of the active hours. + [TimeZone ]: The timezone of the active hours. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/repair-azdevcenteruserdevbox +https://learn.microsoft.com/powershell/module/az.devcenter/set-azdevcenteruserdevboxactivehour #> -function Repair-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] -[CmdletBinding(DefaultParameterSetName='Repair', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Set-AzDevCenterUserDevBoxActiveHour { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox])] +[CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -5248,20 +8458,19 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='Repair', Mandatory)] - [Alias('DevBoxName')] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Display name for the Dev Box. - ${Name}, + ${DevBoxName}, - [Parameter(ParameterSetName='Repair', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] # Name of the project. ${ProjectName}, - [Parameter(ParameterSetName='Repair')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -5269,12 +8478,30 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='RepairViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, + [Parameter(ParameterSetName='Set', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration] + # Manual user set active hours configuration. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='SetExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.Int32] + # The end time of the active hours. + ${EndTimeHour}, + + [Parameter(ParameterSetName='SetExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.Int32] + # The start time of the active hours. + ${StartTimeHour}, + + [Parameter(ParameterSetName='SetExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.String] + # The timezone of the active hours. + ${TimeZone}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -5285,12 +8512,6 @@ param( # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command as a job - ${AsJob}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Management.Automation.SwitchParameter] @@ -5311,12 +8532,6 @@ param( # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Run the command asynchronously - ${NoWait}, - [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] [System.Uri] @@ -5346,10 +8561,10 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Repair = 'Az.DevCenterdata.private\Repair-AzDevCenterUserDevBox_Repair'; - RepairViaIdentity = 'Az.DevCenterdata.private\Repair-AzDevCenterUserDevBox_RepairViaIdentity'; + Set = 'Az.DevCenterdata.private\Set-AzDevCenterUserDevBoxActiveHour_Set'; + SetExpanded = 'Az.DevCenterdata.private\Set-AzDevCenterUserDevBoxActiveHour_SetExpanded'; } - if (('Repair') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Set', 'SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } @@ -5385,51 +8600,43 @@ end { <# .Synopsis -Restarts a Dev Box. +Creates a Dev Box addon. .Description -Restarts a Dev Box. -.Example -Restart-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -ProjectName DevProject -UserId 786a823c-8037-48ab-89b8-8599901e67d0 -Name myDevBox -.Example -Restart-AzDevCenterUserDevBox -DevCenterName Contoso -ProjectName DevProject -UserId "me" -Name myDevBox +Creates a Dev Box addon. .Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "me"; "ProjectName" = "DevProject" } -Restart-AzDevCenterUserDevBox -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $devBoxInput +{{ Add code here }} .Example -$devBoxInput = @{"DevBoxName" = "myDevBox"; "UserId" = "786a823c-8037-48ab-89b8-8599901e67d0"; "ProjectName" = "DevProject" } -Restart-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput +{{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn .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 - [ActionName ]: The name of the action. - [CatalogName ]: Name of the catalog. - [CustomizationGroupName ]: Name of the customization group. - [CustomizationTaskId ]: A customization task ID. - [DefinitionName ]: Name of the environment definition. - [DevBoxName ]: Display name for the Dev Box. - [EnvironmentName ]: Environment name. - [EnvironmentTypeName ]: Name of the environment type. - [Id ]: Resource identity path - [OperationId ]: Unique identifier for the Dev Box operation. - [PoolName ]: Pool name. - [ProjectName ]: Name of the project. - [ScheduleName ]: Display name for the Schedule. - [TaskName ]: Full name of the task: {catalogName}/{taskName}. - [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +BODY : A Dev Box addon. + [Code ]: One of a server-defined set of error codes. + [Detail ]: An array of details about specific errors that led to this reported error. + Code : One of a server-defined set of error codes. + Message : A human-readable representation of the error. + [Detail ]: An array of details about specific errors that led to this reported error. + [Innererror ]: An object containing more specific information than the current object about the error. + [Code ]: One of a server-defined set of error codes. + [Innererror ]: Inner error. + [Target ]: The target of the error. + [Innererror ]: An object containing more specific information than the current object about the error. + [Message ]: A human-readable representation of the error. + [OperationLocation ]: + [Target ]: The target of the error. .Link -https://learn.microsoft.com/powershell/module/az.devcenter/restart-azdevcenteruserdevbox +https://learn.microsoft.com/powershell/module/az.devcenter/set-azdevcenteruserdevboxaddon #> -function Restart-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] -[CmdletBinding(DefaultParameterSetName='Restart', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Set-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn])] +[CmdletBinding(DefaultParameterSetName='ReplaceExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] @@ -5437,20 +8644,25 @@ param( # The DevCenter-specific URI to operate on. ${Endpoint}, - [Parameter(ParameterSetName='Restart', Mandatory)] - [Alias('DevBoxName')] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Display name for the Dev Box. - ${Name}, + # The name of the Dev Box addon. + ${AddOnName}, - [Parameter(ParameterSetName='Restart', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [System.String] - # Name of the project. + # The name of a Dev Box. + ${DevBoxName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. ${ProjectName}, - [Parameter(ParameterSetName='Restart')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] [System.String] @@ -5458,12 +8670,12 @@ param( # If value is 'me', the identity is taken from the authentication context. ${UserId}, - [Parameter(ParameterSetName='RestartViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, + [Parameter(ParameterSetName='Replace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn] + # A Dev Box addon. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -5535,10 +8747,10 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ - Restart = 'Az.DevCenterdata.private\Restart-AzDevCenterUserDevBox_Restart'; - RestartViaIdentity = 'Az.DevCenterdata.private\Restart-AzDevCenterUserDevBox_RestartViaIdentity'; + Replace = 'Az.DevCenterdata.private\Set-AzDevCenterUserDevBoxAddOn_Replace'; + ReplaceExpanded = 'Az.DevCenterdata.private\Set-AzDevCenterUserDevBoxAddOn_ReplaceExpanded'; } - if (('Restart') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + if (('Replace', 'ReplaceExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { $PSBoundParameters['UserId'] = "me" } @@ -5583,9 +8795,9 @@ Creates or updates an environment. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .Notes COMPLEX PARAMETER PROPERTIES @@ -5615,7 +8827,7 @@ BODY : Properties of an environment. https://learn.microsoft.com/powershell/module/az.devcenter/set-azdevcenteruserenvironment #> function Set-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] [CmdletBinding(DefaultParameterSetName='ReplaceExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -5647,7 +8859,7 @@ param( [Parameter(ParameterSetName='Replace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment] # Properties of an environment. # To construct, see NOTES section for BODY properties and create a hash table. ${Body}, @@ -5678,7 +8890,7 @@ param( [Parameter(ParameterSetName='ReplaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters]))] [System.Collections.Hashtable] # Parameters object for the environment. ${Parameter}, @@ -5817,6 +9029,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -5825,10 +9038,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link @@ -6006,6 +9221,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -6014,10 +9230,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link @@ -6187,7 +9405,7 @@ Start-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -6195,6 +9413,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -6203,17 +9422,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/start-azdevcenteruserdevbox #> function Start-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -6376,7 +9597,7 @@ Stop-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -6384,6 +9605,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -6392,17 +9614,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/stop-azdevcenteruserdevbox #> function Stop-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -6623,6 +9847,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -6631,10 +9856,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. @@ -6674,7 +9901,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[]] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[]] # Tasks to apply. # To construct, see NOTES section for TASK properties and create a hash table. ${Task}, @@ -6814,23 +10041,22 @@ $envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = Update-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput -ExpirationDate $dateIn8Months .Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .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 : Properties of an environment. +BODY : Properties of an environment. These properties can be updated via PATCH after the resource has been created. [ExpirationDate ]: The time the expiration date will be triggered (UTC), after which the environment and associated resources will be deleted. - [Parameter ]: Parameters object for the environment. - [(Any) ]: This indicates any property can be added to this object. INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -6839,17 +10065,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteruserenvironment #> function Update-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] [CmdletBinding(DefaultParameterSetName='PatchExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -6893,8 +10121,9 @@ param( [Parameter(ParameterSetName='Patch', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='PatchViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties] # Properties of an environment. + # These properties can be updated via PATCH after the resource has been created. # To construct, see NOTES section for BODY properties and create a hash table. ${Body}, @@ -6905,14 +10134,6 @@ param( # The time the expiration date will be triggered (UTC), after which theenvironment and associated resources will be deleted. ${ExpirationDate}, - [Parameter(ParameterSetName='PatchExpanded')] - [Parameter(ParameterSetName='PatchViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters]))] - [System.Collections.Hashtable] - # Parameters object for the environment. - ${Parameter}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Remove-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Remove-AzDevCenterUserDevBox.ps1 index b7a8c7c17a55..8639b2eac668 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Remove-AzDevCenterUserDevBox.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Remove-AzDevCenterUserDevBox.ps1 @@ -33,7 +33,7 @@ Remove-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserdevbox #> function Remove-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Remove-AzDevCenterUserDevBoxAddOn.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Remove-AzDevCenterUserDevBoxAddOn.ps1 new file mode 100644 index 000000000000..05d8c39a211f --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Remove-AzDevCenterUserDevBoxAddOn.ps1 @@ -0,0 +1,242 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Deletes a Dev Box addon. +.Description +Deletes a Dev Box addon. +.Example +Remove-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" +.Example +Remove-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -AddOnName "devboxtunnel-sys-default" ` + -UserId "me" +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Remove-AzDevCenterUserDevBoxAddOn ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $addOnInput +.Example +$addOnInput = @{ + DevBoxName = "myDevBox" + UserId = "me" + ProjectName = "DevProject" + AddOnName = "devboxtunnel-sys-default" +} +Remove-AzDevCenterUserDevBoxAddOn ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $addOnInput + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserdevboxaddon +#> +function Remove-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the Dev Box addon. + ${AddOnName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of a Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Delete = 'Az.DevCenterdata.private\Remove-AzDevCenterUserDevBoxAddOn_Delete'; + DeleteViaIdentity = 'Az.DevCenterdata.private\Remove-AzDevCenterUserDevBoxAddOn_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/DevCenter/DevCenterData.AutoRest/internal/Remove-AzDevCenterUserEnvironment.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Remove-AzDevCenterUserEnvironment.ps1 index 6e18643940c6..b050631736fa 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Remove-AzDevCenterUserEnvironment.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Remove-AzDevCenterUserEnvironment.ps1 @@ -33,7 +33,7 @@ Remove-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/remove-azdevcenteruserenvironment #> function Remove-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -96,6 +99,13 @@ param( # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.Management.Automation.SwitchParameter] + # The query option to force environment deletion even if the environment definition does not exist. + # This is a best-effort delete, and anything custom that forces resource creation beyond the associated resource group may not be deleted. + ${Force}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Repair-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Repair-AzDevCenterUserDevBox.ps1 index ca955ef7dd5c..24bf5e4417e4 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Repair-AzDevCenterUserDevBox.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Repair-AzDevCenterUserDevBox.ps1 @@ -35,7 +35,7 @@ Repair-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -43,6 +43,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -51,17 +52,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/repair-azdevcenteruserdevbox #> function Repair-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Repair', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Restart-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Restart-AzDevCenterUserDevBox.ps1 index a3023864642d..bbb3a57cffc8 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Restart-AzDevCenterUserDevBox.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Restart-AzDevCenterUserDevBox.ps1 @@ -33,7 +33,7 @@ Restart-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/restart-azdevcenteruserdevbox #> function Restart-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Restart', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Restore-AzDevCenterUserDevBoxSnapshot.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Restore-AzDevCenterUserDevBoxSnapshot.ps1 new file mode 100644 index 000000000000..47f5be2c2156 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Restore-AzDevCenterUserDevBoxSnapshot.ps1 @@ -0,0 +1,236 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Restores a Dev Box to a specified snapshot. +.Description +Restores a Dev Box to a specified snapshot. +.Example +Restore-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -SnapshotId "snapshot-1234" +.Example +Restore-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -SnapshotId "snapshot-1234" +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "786a823c-8037-48ab-89b8-8599901e67d0" + ProjectName = "DevProject" +} +Restore-AzDevCenterUserDevBoxSnapshot ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -InputObject $snapshotInput ` + -SnapshotId "snapshot-1234" +.Example +$snapshotInput = @{ + DevBoxName = "myDevBox" + UserId = "me" + ProjectName = "DevProject" +} +Restore-AzDevCenterUserDevBoxSnapshot ` + -DevCenterName "ContosoDevCenter" ` + -InputObject $snapshotInput ` + -SnapshotId "snapshot-1234" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus +.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 + [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. + [CatalogName ]: Name of the catalog. + [CustomizationGroupName ]: Name of the customization group. + [CustomizationTaskId ]: A customization task ID. + [DefinitionName ]: Name of the environment definition. + [DevBoxName ]: Display name for the Dev Box. + [EnvironmentName ]: Environment name. + [EnvironmentTypeName ]: Name of the environment type. + [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. + [OperationId ]: Unique identifier for the Dev Box operation. + [PoolName ]: Pool name. + [ProjectName ]: Name of the project. + [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. + [TaskName ]: Full name of the task: {catalogName}/{taskName}. + [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/restore-azdevcenteruserdevboxsnapshot +#> +function Restore-AzDevCenterUserDevBoxSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] +[CmdletBinding(DefaultParameterSetName='Restore', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(ParameterSetName='Restore', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(ParameterSetName='Restore', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter(ParameterSetName='Restore')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='RestoreViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Query')] + [System.String] + # Required parameter that specifies the snapshot id to use for the restore operation. + ${SnapshotId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Restore = 'Az.DevCenterdata.private\Restore-AzDevCenterUserDevBoxSnapshot_Restore'; + RestoreViaIdentity = 'Az.DevCenterdata.private\Restore-AzDevCenterUserDevBoxSnapshot_RestoreViaIdentity'; + } + if (('Restore') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/DevCenter/DevCenterData.AutoRest/internal/Set-AzDevCenterUserDevBoxActiveHour.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Set-AzDevCenterUserDevBoxActiveHour.ps1 new file mode 100644 index 000000000000..ba790f6b6999 --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Set-AzDevCenterUserDevBoxActiveHour.ps1 @@ -0,0 +1,229 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Lets a user set their own active hours for their Dev Box, overriding the defaults set at the pool level. +.Description +Lets a user set their own active hours for their Dev Box, overriding the defaults set at the pool level. +.Example +Set-AzDevCenterUserDevBoxActiveHour ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -StartTimeHour 9 ` + -EndTimeHour 17 ` + -TimeZone "America/Los_Angeles" +.Example +Set-AzDevCenterUserDevBoxActiveHour ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -StartTimeHour 8 ` + -EndTimeHour 16 ` + -TimeZone "America/New_York" +.Example +$activeHours = @{ + StartTimeHour = 10 + EndTimeHour = 18 + TimeZone = "America/Chicago" +} +Set-AzDevCenterUserDevBoxActiveHour ` + -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "me" ` + -Body $activeHours +.Example +$activeHours = @{ + StartTimeHour = 7 + EndTimeHour = 15 + TimeZone = "America/Los_Angeles" +} +Set-AzDevCenterUserDevBoxActiveHour ` + -DevCenterName "ContosoDevCenter" ` + -ProjectName "DevProject" ` + -DevBoxName "myDevBox" ` + -UserId "786a823c-8037-48ab-89b8-8599901e67d0" ` + -Body $activeHours + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox +.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 : Manual user set active hours configuration. + [EndTimeHour ]: The end time of the active hours. + [StartTimeHour ]: The start time of the active hours. + [TimeZone ]: The timezone of the active hours. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/set-azdevcenteruserdevboxactivehour +#> +function Set-AzDevCenterUserDevBoxActiveHour { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBox])] +[CmdletBinding(DefaultParameterSetName='SetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Display name for the Dev Box. + ${DevBoxName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # Name of the project. + ${ProjectName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='Set', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IUserActiveHoursConfiguration] + # Manual user set active hours configuration. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='SetExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.Int32] + # The end time of the active hours. + ${EndTimeHour}, + + [Parameter(ParameterSetName='SetExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.Int32] + # The start time of the active hours. + ${StartTimeHour}, + + [Parameter(ParameterSetName='SetExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [System.String] + # The timezone of the active hours. + ${TimeZone}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Set = 'Az.DevCenterdata.private\Set-AzDevCenterUserDevBoxActiveHour_Set'; + SetExpanded = 'Az.DevCenterdata.private\Set-AzDevCenterUserDevBoxActiveHour_SetExpanded'; + } + if (('Set', 'SetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/DevCenter/DevCenterData.AutoRest/internal/Set-AzDevCenterUserDevBoxAddOn.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Set-AzDevCenterUserDevBoxAddOn.ps1 new file mode 100644 index 000000000000..bd183ebab8ca --- /dev/null +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Set-AzDevCenterUserDevBoxAddOn.ps1 @@ -0,0 +1,201 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Creates a Dev Box addon. +.Description +Creates a Dev Box addon. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn +.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 : A Dev Box addon. + [Code ]: One of a server-defined set of error codes. + [Detail ]: An array of details about specific errors that led to this reported error. + Code : One of a server-defined set of error codes. + Message : A human-readable representation of the error. + [Detail ]: An array of details about specific errors that led to this reported error. + [Innererror ]: An object containing more specific information than the current object about the error. + [Code ]: One of a server-defined set of error codes. + [Innererror ]: Inner error. + [Target ]: The target of the error. + [Innererror ]: An object containing more specific information than the current object about the error. + [Message ]: A human-readable representation of the error. + [OperationLocation ]: + [Target ]: The target of the error. +.Link +https://learn.microsoft.com/powershell/module/az.devcenter/set-azdevcenteruserdevboxaddon +#> +function Set-AzDevCenterUserDevBoxAddOn { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn])] +[CmdletBinding(DefaultParameterSetName='ReplaceExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Uri')] + [System.String] + # The DevCenter-specific URI to operate on. + ${Endpoint}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of the Dev Box addon. + ${AddOnName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The name of a Dev Box. + ${DevBoxName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [System.String] + # The DevCenter Project upon which to execute operations. + ${ProjectName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.DefaultInfo(Script='"me"')] + [System.String] + # The AAD object id of the user. + # If value is 'me', the identity is taken from the authentication context. + ${UserId}, + + [Parameter(ParameterSetName='Replace', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IDevBoxAddOn] + # A Dev Box addon. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.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 + + $mapping = @{ + Replace = 'Az.DevCenterdata.private\Set-AzDevCenterUserDevBoxAddOn_Replace'; + ReplaceExpanded = 'Az.DevCenterdata.private\Set-AzDevCenterUserDevBoxAddOn_ReplaceExpanded'; + } + if (('Replace', 'ReplaceExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('UserId')) { + $PSBoundParameters['UserId'] = "me" + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/DevCenter/DevCenterData.AutoRest/internal/Set-AzDevCenterUserEnvironment.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Set-AzDevCenterUserEnvironment.ps1 index d873f815f0f3..dcbb21bf1646 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Set-AzDevCenterUserEnvironment.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Set-AzDevCenterUserEnvironment.ps1 @@ -25,9 +25,9 @@ Creates or updates an environment. {{ Add code here }} .Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .Notes COMPLEX PARAMETER PROPERTIES @@ -57,7 +57,7 @@ BODY : Properties of an environment. https://learn.microsoft.com/powershell/module/az.devcenter/set-azdevcenteruserenvironment #> function Set-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] [CmdletBinding(DefaultParameterSetName='ReplaceExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -89,7 +89,7 @@ param( [Parameter(ParameterSetName='Replace', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment] # Properties of an environment. # To construct, see NOTES section for BODY properties and create a hash table. ${Body}, @@ -120,7 +120,7 @@ param( [Parameter(ParameterSetName='ReplaceExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentParameters]))] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentParameters]))] [System.Collections.Hashtable] # Parameters object for the environment. ${Parameter}, diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Skip-AzDevCenterUserDevBoxAction.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Skip-AzDevCenterUserDevBoxAction.ps1 index 873cd616866a..578e702941cd 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Skip-AzDevCenterUserDevBoxAction.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Skip-AzDevCenterUserDevBoxAction.ps1 @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,10 +50,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Skip-AzDevCenterUserEnvironmentAction.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Skip-AzDevCenterUserEnvironmentAction.ps1 index 198226117b28..caf6ac26f7df 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Skip-AzDevCenterUserEnvironmentAction.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Skip-AzDevCenterUserEnvironmentAction.ps1 @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,10 +50,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Start-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Start-AzDevCenterUserDevBox.ps1 index 70c865548082..4807144161d5 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Start-AzDevCenterUserDevBox.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Start-AzDevCenterUserDevBox.ps1 @@ -33,7 +33,7 @@ Start-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/start-azdevcenteruserdevbox #> function Start-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Stop-AzDevCenterUserDevBox.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Stop-AzDevCenterUserDevBox.ps1 index f1127c96429b..5548c16c896a 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Stop-AzDevCenterUserDevBox.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Stop-AzDevCenterUserDevBox.ps1 @@ -33,7 +33,7 @@ Stop-AzDevCenterUserDevBox -DevCenterName Contoso -InputObject $devBoxInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -41,6 +41,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -49,17 +50,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/stop-azdevcenteruserdevbox #> function Stop-AzDevCenterUserDevBox { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IOperationStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IOperationStatus])] [CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Test-AzDevCenterUserDevBoxCustomizationTaskAction.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Test-AzDevCenterUserDevBoxCustomizationTaskAction.ps1 index 26b23904594f..c1eaa403ed90 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Test-AzDevCenterUserDevBoxCustomizationTaskAction.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Test-AzDevCenterUserDevBoxCustomizationTaskAction.ps1 @@ -85,6 +85,7 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -93,10 +94,12 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. @@ -136,7 +139,7 @@ param( [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.ICustomizationTask[]] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.ICustomizationTask[]] # Tasks to apply. # To construct, see NOTES section for TASK properties and create a hash table. ${Task}, diff --git a/generated/DevCenter/DevCenterData.AutoRest/internal/Update-AzDevCenterUserEnvironment.ps1 b/generated/DevCenter/DevCenterData.AutoRest/internal/Update-AzDevCenterUserEnvironment.ps1 index ddc97e34c57b..c1bb0e0cc220 100644 --- a/generated/DevCenter/DevCenterData.AutoRest/internal/Update-AzDevCenterUserEnvironment.ps1 +++ b/generated/DevCenter/DevCenterData.AutoRest/internal/Update-AzDevCenterUserEnvironment.ps1 @@ -45,23 +45,22 @@ $envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = Update-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput -ExpirationDate $dateIn8Months .Inputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties .Inputs Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.IDevCenterdataIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment +Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment .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 : Properties of an environment. +BODY : Properties of an environment. These properties can be updated via PATCH after the resource has been created. [ExpirationDate ]: The time the expiration date will be triggered (UTC), after which the environment and associated resources will be deleted. - [Parameter ]: Parameters object for the environment. - [(Any) ]: This indicates any property can be added to this object. INPUTOBJECT : Identity Parameter [ActionName ]: The name of the action. + [AddOnName ]: Name of the dev box addon. [CatalogName ]: Name of the catalog. [CustomizationGroupName ]: Name of the customization group. [CustomizationTaskId ]: A customization task ID. @@ -70,17 +69,19 @@ INPUTOBJECT : Identity Parameter [EnvironmentName ]: Environment name. [EnvironmentTypeName ]: Name of the environment type. [Id ]: Resource identity path + [ImageBuildLogId ]: An imaging build log id. [OperationId ]: Unique identifier for the Dev Box operation. [PoolName ]: Pool name. [ProjectName ]: Name of the project. [ScheduleName ]: Display name for the Schedule. + [SnapshotId ]: The id of the snapshot. Should be treated as opaque string. [TaskName ]: Full name of the task: {catalogName}/{taskName}. [UserId ]: The AAD object id of the user. If value is 'me', the identity is taken from the authentication context. .Link https://learn.microsoft.com/powershell/module/az.devcenter/update-azdevcenteruserenvironment #> function Update-AzDevCenterUserEnvironment { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironment])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironment])] [CmdletBinding(DefaultParameterSetName='PatchExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -124,8 +125,9 @@ param( [Parameter(ParameterSetName='Patch', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='PatchViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdate] + [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20250401Preview.IEnvironmentPatchProperties] # Properties of an environment. + # These properties can be updated via PATCH after the resource has been created. # To construct, see NOTES section for BODY properties and create a hash table. ${Body}, @@ -136,14 +138,6 @@ param( # The time the expiration date will be triggered (UTC), after which theenvironment and associated resources will be deleted. ${ExpirationDate}, - [Parameter(ParameterSetName='PatchExpanded')] - [Parameter(ParameterSetName='PatchViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DevCenterdata.Models.Api20240501Preview.IEnvironmentUpdateParameters]))] - [System.Collections.Hashtable] - # Parameters object for the environment. - ${Parameter}, - [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] diff --git a/generated/StorageMover/StorageMover.Autorest/Az.StorageMover.format.ps1xml b/generated/StorageMover/StorageMover.Autorest/Az.StorageMover.format.ps1xml index c22328398035..ff10f505c99a 100644 --- a/generated/StorageMover/StorageMover.Autorest/Az.StorageMover.format.ps1xml +++ b/generated/StorageMover/StorageMover.Autorest/Az.StorageMover.format.ps1xml @@ -2,9 +2,37 @@ - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureKeyVaultSmbCredentials - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureKeyVaultSmbCredentials#Multiple + + + + + + + + + + + + + + + PasswordUri + + + UsernameUri + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorDetail + + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorDetail#Multiple @@ -36,9 +64,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ManagedServiceIdentity + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ManagedServiceIdentity - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ManagedServiceIdentity + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ManagedServiceIdentity#Multiple @@ -64,9 +92,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Operation + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Operation - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Operation + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Operation#Multiple @@ -104,9 +132,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.OperationDisplay + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.OperationDisplay - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.OperationDisplay + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.OperationDisplay#Multiple @@ -144,9 +172,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.OperationListResult + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.OperationListResult - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.OperationListResult + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.OperationListResult#Multiple @@ -166,9 +194,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ProxyResource + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProxyResource - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ProxyResource + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProxyResource#Multiple @@ -224,9 +252,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Resource - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Resource#Multiple @@ -246,9 +274,31 @@ - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemData + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverUpdateParametersTags + + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverUpdateParametersTags#Multiple + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemData - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemData + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemData#Multiple @@ -298,9 +348,37 @@ - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.TrackedResource + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Time - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.TrackedResource + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Time#Multiple + + + + + + + + + + + + + + + Hour + + + Minute + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TrackedResource + + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TrackedResource#Multiple @@ -362,9 +440,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.TrackedResourceTags + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TrackedResourceTags - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.TrackedResourceTags + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TrackedResourceTags#Multiple @@ -384,105 +462,45 @@ - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.UserAssignedIdentity + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrence - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.UserAssignedIdentity + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrence#Multiple - + - + - - - - - - ClientId - - - PrincipalId - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureKeyVaultSmbCredentials - - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureKeyVaultSmbCredentials - - - - + - + + + + - PasswordUri + EndTimeHour - UsernameUri + EndTimeMinute - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverUpdateParametersTags - - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverUpdateParametersTags - - - - - - - - - - - Item + StartTimeHour - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Time - - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Time - - - - - - - - - - - - - - Hour + StartTimeMinute - Minute + LimitInMbps @@ -490,51 +508,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrence + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentity - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrence + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentity#Multiple - - - - - - - - - - - - - + - + - Day - - - EndTimeHour - - - EndTimeMinute - - - StartTimeHour - - - StartTimeMinute + ClientId - LimitInMbps + PrincipalId @@ -542,9 +536,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.WeeklyRecurrence + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.WeeklyRecurrence - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.WeeklyRecurrence + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.WeeklyRecurrence#Multiple @@ -560,9 +554,6 @@ - - - @@ -579,9 +570,6 @@ StartTimeMinute - - Day - diff --git a/generated/StorageMover/StorageMover.Autorest/Az.StorageMover.psd1 b/generated/StorageMover/StorageMover.Autorest/Az.StorageMover.psd1 index aed282bdfe07..2bdfe17a0bc7 100644 --- a/generated/StorageMover/StorageMover.Autorest/Az.StorageMover.psd1 +++ b/generated/StorageMover/StorageMover.Autorest/Az.StorageMover.psd1 @@ -11,8 +11,8 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.StorageMover.private.dll' FormatsToProcess = './Az.StorageMover.format.ps1xml' - FunctionsToExport = 'Get-AzStorageMover', 'Get-AzStorageMoverAgent', 'Get-AzStorageMoverEndpoint', 'Get-AzStorageMoverJobDefinition', 'Get-AzStorageMoverJobRun', 'Get-AzStorageMoverProject', 'New-AzStorageMover', 'New-AzStorageMoverAzNfsFileShareEndpoint', 'New-AzStorageMoverAzSmbFileShareEndpoint', 'New-AzStorageMoverAzStorageContainerEndpoint', 'New-AzStorageMoverJobDefinition', 'New-AzStorageMoverMultiCloudConnectorEndpoint', 'New-AzStorageMoverNfsEndpoint', 'New-AzStorageMoverProject', 'New-AzStorageMoverSmbEndpoint', 'New-AzStorageMoverUploadLimitWeeklyRecurrenceObject', 'Remove-AzStorageMover', 'Remove-AzStorageMoverEndpoint', 'Remove-AzStorageMoverJobDefinition', 'Remove-AzStorageMoverProject', 'Start-AzStorageMoverJobDefinition', 'Stop-AzStorageMoverJobDefinition', 'Unregister-AzStorageMoverAgent', 'Update-AzStorageMover', 'Update-AzStorageMoverAgent', 'Update-AzStorageMoverAzNfsFileShareEndpoint', 'Update-AzStorageMoverAzSmbFileShareEndpoint', 'Update-AzStorageMoverAzStorageContainerEndpoint', 'Update-AzStorageMoverJobDefinition', 'Update-AzStorageMoverMultiCloudConnectorEndpoint', 'Update-AzStorageMoverNfsEndpoint', 'Update-AzStorageMoverProject', 'Update-AzStorageMoverSmbEndpoint', '*' - AliasesToExport = 'New-AzStorageMoverSmbFileShareEndpoint', 'Update-AzStorageMoverSmbFileShareEndpoint', '*' + FunctionsToExport = 'Get-AzStorageMover', 'Get-AzStorageMoverAgent', 'Get-AzStorageMoverEndpoint', 'Get-AzStorageMoverJobDefinition', 'Get-AzStorageMoverJobRun', 'Get-AzStorageMoverProject', 'New-AzStorageMover', 'New-AzStorageMoverAzNfsFileShareEndpoint', 'New-AzStorageMoverAzSmbFileShareEndpoint', 'New-AzStorageMoverAzStorageContainerEndpoint', 'New-AzStorageMoverJobDefinition', 'New-AzStorageMoverMultiCloudConnectorEndpoint', 'New-AzStorageMoverNfsEndpoint', 'New-AzStorageMoverProject', 'New-AzStorageMoverSmbEndpoint', 'New-AzStorageMoverUploadLimitWeeklyRecurrenceObject', 'Remove-AzStorageMover', 'Remove-AzStorageMoverEndpoint', 'Remove-AzStorageMoverJobDefinition', 'Remove-AzStorageMoverProject', 'Start-AzStorageMoverJobDefinition', 'Stop-AzStorageMoverJobDefinition', 'Unregister-AzStorageMoverAgent', 'Update-AzStorageMover', 'Update-AzStorageMoverAgent', 'Update-AzStorageMoverAzNfsFileShareEndpoint', 'Update-AzStorageMoverAzSmbFileShareEndpoint', 'Update-AzStorageMoverAzStorageContainerEndpoint', 'Update-AzStorageMoverJobDefinition', 'Update-AzStorageMoverMultiCloudConnectorEndpoint', 'Update-AzStorageMoverNfsEndpoint', 'Update-AzStorageMoverProject', 'Update-AzStorageMoverSmbEndpoint' + AliasesToExport = 'New-AzStorageMoverSmbFileShareEndpoint', 'Update-AzStorageMoverSmbFileShareEndpoint' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'StorageMover' diff --git a/generated/StorageMover/StorageMover.Autorest/Properties/AssemblyInfo.cs b/generated/StorageMover/StorageMover.Autorest/Properties/AssemblyInfo.cs index 2c0d2504e98e..b4d355ed2a19 100644 --- a/generated/StorageMover/StorageMover.Autorest/Properties/AssemblyInfo.cs +++ b/generated/StorageMover/StorageMover.Autorest/Properties/AssemblyInfo.cs @@ -20,9 +20,8 @@ [assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")] [assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")] [assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - StorageMover")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("1.5.1")] -[assembly: System.Reflection.AssemblyVersionAttribute("1.5.1")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.6.0")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.6.0")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] - diff --git a/generated/StorageMover/StorageMover.Autorest/check-dependencies.ps1 b/generated/StorageMover/StorageMover.Autorest/check-dependencies.ps1 index c29591c7bfe1..90ca9867ae40 100644 --- a/generated/StorageMover/StorageMover.Autorest/check-dependencies.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/check-dependencies.ps1 @@ -12,13 +12,13 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources) +param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources) $ErrorActionPreference = 'Stop' -if(-not $Isolated) { +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path - & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMover.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMover.ps1 index bdffbe4e9046..6533842d3be2 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMover.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMover.ps1 @@ -29,7 +29,7 @@ Get-AzStorageMover -ResourceGroupName myResourceGroup -Name myStorageMover1 .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover .Notes COMPLEX PARAMETER PROPERTIES @@ -49,7 +49,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.storagemover/get-azstoragemover #> function Get-AzStorageMover { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -80,7 +80,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -139,6 +138,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -163,9 +171,7 @@ begin { List = 'Az.StorageMover.private\Get-AzStorageMover_List'; List1 = 'Az.StorageMover.private\Get-AzStorageMover_List1'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -179,6 +185,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverAgent.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverAgent.ps1 index c40c96d74f35..0b637c33e187 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverAgent.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverAgent.ps1 @@ -27,7 +27,7 @@ Get-AzStorageMoverAgent -ResourceGroupName myResourceGroup -StorageMoverName myS .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent .Notes COMPLEX PARAMETER PROPERTIES @@ -43,14 +43,26 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/get-azstoragemoveragent #> function Get-AzStorageMoverAgent { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Alias('AgentName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -84,9 +96,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -143,6 +160,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -164,11 +190,10 @@ begin { $mapping = @{ Get = 'Az.StorageMover.private\Get-AzStorageMoverAgent_Get'; GetViaIdentity = 'Az.StorageMover.private\Get-AzStorageMoverAgent_GetViaIdentity'; + GetViaIdentityStorageMover = 'Az.StorageMover.private\Get-AzStorageMoverAgent_GetViaIdentityStorageMover'; List = 'Az.StorageMover.private\Get-AzStorageMoverAgent_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -182,6 +207,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverEndpoint.ps1 index 89e4899aa8b0..60200f99cdaa 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverEndpoint.ps1 @@ -27,7 +27,7 @@ Get-AzStorageMoverEndpoint -ResourceGroupName myResourceGroupName -StorageMoverN .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Notes COMPLEX PARAMETER PROPERTIES @@ -43,14 +43,26 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/get-azstoragemoverendpoint #> function Get-AzStorageMoverEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Alias('EndpointName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -84,9 +96,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -143,6 +160,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -164,11 +190,10 @@ begin { $mapping = @{ Get = 'Az.StorageMover.private\Get-AzStorageMoverEndpoint_Get'; GetViaIdentity = 'Az.StorageMover.private\Get-AzStorageMoverEndpoint_GetViaIdentity'; + GetViaIdentityStorageMover = 'Az.StorageMover.private\Get-AzStorageMoverEndpoint_GetViaIdentityStorageMover'; List = 'Az.StorageMover.private\Get-AzStorageMoverEndpoint_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -182,6 +207,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverJobDefinition.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverJobDefinition.ps1 index efe334b0c87c..6cf548f02fff 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverJobDefinition.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverJobDefinition.ps1 @@ -27,7 +27,7 @@ Get-AzStorageMoverJobDefinition -ProjectName myProject -ResourceGroupName myReso .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -43,14 +43,38 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +PROJECTINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/get-azstoragemoverjobdefinition #> function Get-AzStorageMoverJobDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProject', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Alias('JobDefinitionName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -58,6 +82,7 @@ param( ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -91,9 +116,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityProject', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${ProjectInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -150,6 +186,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -171,11 +216,11 @@ begin { $mapping = @{ Get = 'Az.StorageMover.private\Get-AzStorageMoverJobDefinition_Get'; GetViaIdentity = 'Az.StorageMover.private\Get-AzStorageMoverJobDefinition_GetViaIdentity'; + GetViaIdentityProject = 'Az.StorageMover.private\Get-AzStorageMoverJobDefinition_GetViaIdentityProject'; + GetViaIdentityStorageMover = 'Az.StorageMover.private\Get-AzStorageMoverJobDefinition_GetViaIdentityStorageMover'; List = 'Az.StorageMover.private\Get-AzStorageMoverJobDefinition_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -189,6 +234,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverJobRun.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverJobRun.ps1 index 53a6ea06e622..8801ddb7973d 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverJobRun.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverJobRun.ps1 @@ -27,7 +27,7 @@ Get-AzStorageMoverJobRun -Name myJobRun -JobDefinitionName myJobDefinition -Reso .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun .Notes COMPLEX PARAMETER PROPERTIES @@ -43,14 +43,49 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +JOBDEFINITIONINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +PROJECTINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/get-azstoragemoverjobrun #> function Get-AzStorageMoverJobRun { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProject', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -58,6 +93,9 @@ param( ${JobDefinitionName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityJobDefinition', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProject', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Alias('JobRunName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -65,6 +103,7 @@ param( ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -98,9 +137,26 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityJobDefinition', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${JobDefinitionInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityProject', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${ProjectInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -157,6 +213,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -178,11 +243,12 @@ begin { $mapping = @{ Get = 'Az.StorageMover.private\Get-AzStorageMoverJobRun_Get'; GetViaIdentity = 'Az.StorageMover.private\Get-AzStorageMoverJobRun_GetViaIdentity'; + GetViaIdentityJobDefinition = 'Az.StorageMover.private\Get-AzStorageMoverJobRun_GetViaIdentityJobDefinition'; + GetViaIdentityProject = 'Az.StorageMover.private\Get-AzStorageMoverJobRun_GetViaIdentityProject'; + GetViaIdentityStorageMover = 'Az.StorageMover.private\Get-AzStorageMoverJobRun_GetViaIdentityStorageMover'; List = 'Az.StorageMover.private\Get-AzStorageMoverJobRun_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -196,6 +262,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverProject.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverProject.ps1 index 982a54fb1c3f..a313cbc16c7f 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverProject.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Get-AzStorageMoverProject.ps1 @@ -27,7 +27,7 @@ $projectList = Get-AzStorageMoverProject -ResourceGroupName myResourceGroup -Sto .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject .Notes COMPLEX PARAMETER PROPERTIES @@ -43,14 +43,26 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/get-azstoragemoverproject #> function Get-AzStorageMoverProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Alias('ProjectName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -84,9 +96,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -143,6 +160,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -164,11 +190,10 @@ begin { $mapping = @{ Get = 'Az.StorageMover.private\Get-AzStorageMoverProject_Get'; GetViaIdentity = 'Az.StorageMover.private\Get-AzStorageMoverProject_GetViaIdentity'; + GetViaIdentityStorageMover = 'Az.StorageMover.private\Get-AzStorageMoverProject_GetViaIdentityStorageMover'; List = 'Az.StorageMover.private\Get-AzStorageMoverProject_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -182,6 +207,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMover.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMover.ps1 index 04b021225222..0d6c0161bd52 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMover.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMover.ps1 @@ -16,37 +16,19 @@ <# .Synopsis -Creates or updates a top-level Storage Mover resource. +Create a top-level Storage Mover resource. .Description -Creates or updates a top-level Storage Mover resource. +Create a top-level Storage Mover resource. .Example New-AzStorageMover -ResourceGroupName myResourceGroup -Name myStorageMover -Location eastus -Description "Description" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover -.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. - -STORAGEMOVER : The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. - Location : The geo-location where the resource lives - [Tag ]: Resource tags. - [(Any) ]: This indicates any property can be added to this object. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The timestamp of resource last modification (UTC) - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. - [Description ]: A description for the Storage Mover. +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemover #> function New-AzStorageMover { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -70,13 +52,6 @@ param( # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover] - # The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. - # To construct, see NOTES section for STORAGEMOVER properties and create a hash table. - ${StorageMover}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] @@ -91,11 +66,23 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -152,6 +139,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -171,12 +167,11 @@ begin { } $mapping = @{ - Create = 'Az.StorageMover.private\New-AzStorageMover_Create'; CreateExpanded = 'Az.StorageMover.private\New-AzStorageMover_CreateExpanded'; + CreateViaJsonFilePath = 'Az.StorageMover.private\New-AzStorageMover_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StorageMover.private\New-AzStorageMover_CreateViaJsonString'; } - if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -190,6 +185,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverAzNfsFileShareEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverAzNfsFileShareEndpoint.ps1 index f4099eecc3dd..8fe4062c431b 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverAzNfsFileShareEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverAzNfsFileShareEndpoint.ps1 @@ -23,16 +23,16 @@ Creates a Nfs file share endpoint resource, which represents a data transfer sou New-AzStorageMoverAzNfsFileShareEndpoint -Name "my-nfs-endpoint" -ResourceGroupName "my-resource-group" -StorageMoverName "my-storage-mover" -FileShareName "10.0.0.1" -Description "My NFS endpoint" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoveraznfsfileshareendpoint #> function New-AzStorageMoverAzNfsFileShareEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -135,6 +135,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -156,9 +165,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.StorageMover.custom\New-AzStorageMoverAzNfsFileShareEndpoint'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -172,6 +179,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverAzSmbFileShareEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverAzSmbFileShareEndpoint.ps1 index 80338cda1c75..baa67d6d44d3 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverAzSmbFileShareEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverAzSmbFileShareEndpoint.ps1 @@ -23,17 +23,17 @@ Creates a Smb file share endpoint resource, which represents a data transfer sou New-AzStorageMoverAzSmbFileShareEndpoint -Name "myendpoint" -ResourceGroupName "myresourcegroup" -StorageMoverName "mystoragemover" -StorageAccountResourceId $accountresourceid -FileShareName testfs -Description "New smb file share endpoint" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoverazsmbfileshareendpoint #> function New-AzStorageMoverAzSmbFileShareEndpoint { [Alias('New-AzStorageMoverSmbFileShareEndpoint')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -136,6 +136,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -157,9 +166,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.StorageMover.custom\New-AzStorageMoverAzSmbFileShareEndpoint'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -173,6 +180,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverAzStorageContainerEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverAzStorageContainerEndpoint.ps1 index f00b6d1ede60..a7c51312bcef 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverAzStorageContainerEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverAzStorageContainerEndpoint.ps1 @@ -23,16 +23,16 @@ Creates an AzStorageContainer endpoint resource, which represents a data transfe New-AzStorageMoverAzStorageContainerEndpoint -Name myEndpoint -ResourceGroupName myResourceGroup -BlobContainerName myContainer -StorageMoverName myStorageMover -StorageAccountResourceId myAccountResourceId .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoverazstoragecontainerendpoint #> function New-AzStorageMoverAzStorageContainerEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -135,6 +135,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -156,9 +165,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.StorageMover.custom\New-AzStorageMoverAzStorageContainerEndpoint'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -172,6 +179,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverJobDefinition.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverJobDefinition.ps1 index 6c9bca4bc33d..a931a917a625 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverJobDefinition.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverJobDefinition.ps1 @@ -16,41 +16,47 @@ <# .Synopsis -Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer. +Create a Job Definition resource, which contains configuration for a single unit of managed data transfer. .Description -Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer. +Create a Job Definition resource, which contains configuration for a single unit of managed data transfer. .Example New-AzStorageMoverJobDefinition -Name myJob -ProjectName myProject -ResourceGroupName myResourceGroup -StorageMoverName myStorageMover -AgentName myAgent -SourceName myNfsEndpoint -TargetName myContainerEndpoint -CopyMode "Additive" -Description "job definition" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition .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. -JOBDEFINITION : The Job Definition resource. - CopyMode : Strategy to use for copy. - SourceName : The name of the source Endpoint. - TargetName : The name of the target Endpoint. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The timestamp of resource last modification (UTC) - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. - [AgentName ]: Name of the Agent to assign for new Job Runs of this Job Definition. - [Description ]: A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud. - [JobType ]: The type of the Job. - [SourceSubpath ]: The subpath to use when reading from the source Endpoint. - [TargetSubpath ]: The subpath to use when writing to the target Endpoint. +PROJECTINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoverjobdefinition #> function New-AzStorageMoverJobDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -60,65 +66,89 @@ param( # The name of the Job Definition resource. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Project resource. ${ProjectName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${StorageMoverName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition] - # The Job Definition resource. - # To construct, see NOTES section for JOBDEFINITION properties and create a hash table. - ${JobDefinition}, + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${ProjectInputObject}, + + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode])] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode] + [System.String] # Strategy to use for copy. ${CopyMode}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # The name of the source Endpoint. ${SourceName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # The name of the target Endpoint. ${TargetName}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # Name of the Agent to assign for new Job Runs of this Job Definition. ${AgentName}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # A description for the Job Definition. @@ -127,24 +157,42 @@ param( ${Description}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType])] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("OnPremToCloud", "CloudToCloud")] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType] + [System.String] # The type of the Job. ${JobType}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # The subpath to use when reading from the source Endpoint. ${SourceSubpath}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # The subpath to use when writing to the target Endpoint. ${TargetSubpath}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -201,6 +249,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -220,12 +277,13 @@ begin { } $mapping = @{ - Create = 'Az.StorageMover.private\New-AzStorageMoverJobDefinition_Create'; CreateExpanded = 'Az.StorageMover.private\New-AzStorageMoverJobDefinition_CreateExpanded'; + CreateViaIdentityProjectExpanded = 'Az.StorageMover.private\New-AzStorageMoverJobDefinition_CreateViaIdentityProjectExpanded'; + CreateViaIdentityStorageMoverExpanded = 'Az.StorageMover.private\New-AzStorageMoverJobDefinition_CreateViaIdentityStorageMoverExpanded'; + CreateViaJsonFilePath = 'Az.StorageMover.private\New-AzStorageMoverJobDefinition_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StorageMover.private\New-AzStorageMoverJobDefinition_CreateViaJsonString'; } - if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -239,6 +297,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverMultiCloudConnectorEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverMultiCloudConnectorEndpoint.ps1 index 2adb2a4555cd..7eb9218558a0 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverMultiCloudConnectorEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverMultiCloudConnectorEndpoint.ps1 @@ -23,16 +23,16 @@ Creates a Multi-Cloud Connector endpoint resource, which represents a data trans New-AzStorageMoverMultiCloudConnectorEndpoint -Name "my-mc-endpoint" -ResourceGroupName "my-resource-group" -StorageMoverName "my-storage-mover" -AWSS3BucketId "my-s3-bucket" -Description "My Multi-Cloud endpoint" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemovermulticloudconnectorendpoint #> function New-AzStorageMoverMultiCloudConnectorEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -135,6 +135,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -156,9 +165,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.StorageMover.custom\New-AzStorageMoverMultiCloudConnectorEndpoint'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -172,6 +179,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverNfsEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverNfsEndpoint.ps1 index d21c9012e4e1..35f50f97bc7f 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverNfsEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverNfsEndpoint.ps1 @@ -23,16 +23,16 @@ Creates a Nfs endpoint resource, which represents a data transfer source or dest New-AzStorageMoverNfsEndpoint -Name myEndpoint -ResourceGroupName myResourceGroup -StorageMoverName myStorageMover -Host "10.0.0.1" -Export "/" -NfsVersion NFSv3 -Description "Description" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemovernfsendpoint #> function New-AzStorageMoverNfsEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -75,9 +75,9 @@ param( ${Export}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion])] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("NFSauto", "NFSv3", "NFSv4")] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion] + [System.String] # The NFS protocol version. ${NfsVersion}, @@ -142,6 +142,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -163,9 +172,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.StorageMover.custom\New-AzStorageMoverNfsEndpoint'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -179,6 +186,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverProject.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverProject.ps1 index 620b6eea7245..a6edcb744200 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverProject.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverProject.ps1 @@ -16,34 +16,36 @@ <# .Synopsis -Creates or updates a Project resource, which is a logical grouping of related jobs. +Create a Project resource, which is a logical grouping of related jobs. .Description -Creates or updates a Project resource, which is a logical grouping of related jobs. +Create a Project resource, which is a logical grouping of related jobs. .Example New-AzStorageMoverProject -ResourceGroupName myResourceGroup -StorageMoverName myStorageMover -Name myProject -Description "description" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject .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. -PROJECT : The Project resource. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The timestamp of resource last modification (UTC) - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. - [Description ]: A description for the Project. +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoverproject #> function New-AzStorageMoverProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -53,39 +55,57 @@ param( # The name of the Project resource. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${StorageMoverName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject] - # The Project resource. - # To construct, see NOTES section for PROJECT properties and create a hash table. - ${Project}, + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # A description for the Project. ${Description}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -142,6 +162,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -161,12 +190,12 @@ begin { } $mapping = @{ - Create = 'Az.StorageMover.private\New-AzStorageMoverProject_Create'; CreateExpanded = 'Az.StorageMover.private\New-AzStorageMoverProject_CreateExpanded'; + CreateViaIdentityStorageMoverExpanded = 'Az.StorageMover.private\New-AzStorageMoverProject_CreateViaIdentityStorageMoverExpanded'; + CreateViaJsonFilePath = 'Az.StorageMover.private\New-AzStorageMoverProject_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StorageMover.private\New-AzStorageMoverProject_CreateViaJsonString'; } - if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -180,6 +209,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverSmbEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverSmbEndpoint.ps1 index fc332e5eb6d0..7f72c5a62852 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverSmbEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverSmbEndpoint.ps1 @@ -23,16 +23,16 @@ Creates an SMB endpoint resource, which represents a data transfer source or des New-AzStorageMoverSmbEndpoint -Name "myendpoint" -ResourceGroupName "myresourcegroup" -StorageMoverName "mystoragemover" -Host "10.0.0.1" -ShareName "testshare" -CredentialsUsernameUri "https://examples-azureKeyVault.vault.azure.net/secrets/username1" -CredentialsPasswordUri "https://examples-azureKeyVault.vault.azure.net/secrets/password1" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoversmbendpoint #> function New-AzStorageMoverSmbEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -149,6 +149,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -170,9 +179,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.StorageMover.custom\New-AzStorageMoverSmbEndpoint'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -186,6 +193,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverUploadLimitWeeklyRecurrenceObject.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverUploadLimitWeeklyRecurrenceObject.ps1 index 9f0bf9b599a9..e20b42ad705e 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverUploadLimitWeeklyRecurrenceObject.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/New-AzStorageMoverUploadLimitWeeklyRecurrenceObject.ps1 @@ -23,18 +23,18 @@ Create an in-memory object for UploadLimitWeeklyRecurrence. New-AzStorageMoverUploadLimitWeeklyRecurrenceObject -Day 'Monday','Tuesday','Friday' -LimitInMbps 100 -EndTimeHour 5 -StartTimeHour 1 -StartTimeMinute 30 -EndTimeMinute 0 .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrence +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrence .Link https://learn.microsoft.com/powershell/module/Az.StorageMover/new-AzStorageMoverUploadLimitWeeklyRecurrenceObject #> function New-AzStorageMoverUploadLimitWeeklyRecurrenceObject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrence])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrence])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek])] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek[]] + [System.String[]] # The set of days of week for the schedule recurrence. # A day must not be specified more than once in a recurrence. ${Day}, @@ -91,6 +91,9 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -119,6 +122,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/ProxyCmdletDefinitions.ps1 index fdbdbf716b9d..c35eaab855f2 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -27,7 +27,7 @@ Get-AzStorageMoverAgent -ResourceGroupName myResourceGroup -StorageMoverName myS .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent .Notes COMPLEX PARAMETER PROPERTIES @@ -43,14 +43,26 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/get-azstoragemoveragent #> function Get-AzStorageMoverAgent { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Alias('AgentName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -84,9 +96,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -143,6 +160,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -164,11 +190,10 @@ begin { $mapping = @{ Get = 'Az.StorageMover.private\Get-AzStorageMoverAgent_Get'; GetViaIdentity = 'Az.StorageMover.private\Get-AzStorageMoverAgent_GetViaIdentity'; + GetViaIdentityStorageMover = 'Az.StorageMover.private\Get-AzStorageMoverAgent_GetViaIdentityStorageMover'; List = 'Az.StorageMover.private\Get-AzStorageMoverAgent_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -182,6 +207,9 @@ begin { [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) @@ -238,7 +266,7 @@ Get-AzStorageMoverEndpoint -ResourceGroupName myResourceGroupName -StorageMoverN .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Notes COMPLEX PARAMETER PROPERTIES @@ -254,14 +282,26 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/get-azstoragemoverendpoint #> function Get-AzStorageMoverEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Alias('EndpointName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -295,9 +335,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -354,6 +399,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -375,11 +429,10 @@ begin { $mapping = @{ Get = 'Az.StorageMover.private\Get-AzStorageMoverEndpoint_Get'; GetViaIdentity = 'Az.StorageMover.private\Get-AzStorageMoverEndpoint_GetViaIdentity'; + GetViaIdentityStorageMover = 'Az.StorageMover.private\Get-AzStorageMoverEndpoint_GetViaIdentityStorageMover'; List = 'Az.StorageMover.private\Get-AzStorageMoverEndpoint_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -393,6 +446,9 @@ begin { [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) @@ -449,7 +505,7 @@ Get-AzStorageMoverJobDefinition -ProjectName myProject -ResourceGroupName myReso .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -465,14 +521,38 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +PROJECTINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/get-azstoragemoverjobdefinition #> function Get-AzStorageMoverJobDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProject', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Alias('JobDefinitionName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -480,6 +560,7 @@ param( ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -513,9 +594,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityProject', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${ProjectInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -572,6 +664,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -593,11 +694,11 @@ begin { $mapping = @{ Get = 'Az.StorageMover.private\Get-AzStorageMoverJobDefinition_Get'; GetViaIdentity = 'Az.StorageMover.private\Get-AzStorageMoverJobDefinition_GetViaIdentity'; + GetViaIdentityProject = 'Az.StorageMover.private\Get-AzStorageMoverJobDefinition_GetViaIdentityProject'; + GetViaIdentityStorageMover = 'Az.StorageMover.private\Get-AzStorageMoverJobDefinition_GetViaIdentityStorageMover'; List = 'Az.StorageMover.private\Get-AzStorageMoverJobDefinition_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -611,6 +712,9 @@ begin { [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) @@ -667,7 +771,7 @@ Get-AzStorageMoverJobRun -Name myJobRun -JobDefinitionName myJobDefinition -Reso .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun .Notes COMPLEX PARAMETER PROPERTIES @@ -683,14 +787,49 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +JOBDEFINITIONINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +PROJECTINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/get-azstoragemoverjobrun #> function Get-AzStorageMoverJobRun { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProject', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -698,6 +837,9 @@ param( ${JobDefinitionName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityJobDefinition', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityProject', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Alias('JobRunName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -705,6 +847,7 @@ param( ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -738,9 +881,26 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityJobDefinition', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${JobDefinitionInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityProject', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${ProjectInputObject}, + + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -797,6 +957,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -818,11 +987,12 @@ begin { $mapping = @{ Get = 'Az.StorageMover.private\Get-AzStorageMoverJobRun_Get'; GetViaIdentity = 'Az.StorageMover.private\Get-AzStorageMoverJobRun_GetViaIdentity'; + GetViaIdentityJobDefinition = 'Az.StorageMover.private\Get-AzStorageMoverJobRun_GetViaIdentityJobDefinition'; + GetViaIdentityProject = 'Az.StorageMover.private\Get-AzStorageMoverJobRun_GetViaIdentityProject'; + GetViaIdentityStorageMover = 'Az.StorageMover.private\Get-AzStorageMoverJobRun_GetViaIdentityStorageMover'; List = 'Az.StorageMover.private\Get-AzStorageMoverJobRun_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -836,6 +1006,9 @@ begin { [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) @@ -892,7 +1065,7 @@ $projectList = Get-AzStorageMoverProject -ResourceGroupName myResourceGroup -Sto .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject .Notes COMPLEX PARAMETER PROPERTIES @@ -908,14 +1081,26 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/get-azstoragemoverproject #> function Get-AzStorageMoverProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory)] [Alias('ProjectName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -949,9 +1134,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1008,6 +1198,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -1029,11 +1228,10 @@ begin { $mapping = @{ Get = 'Az.StorageMover.private\Get-AzStorageMoverProject_Get'; GetViaIdentity = 'Az.StorageMover.private\Get-AzStorageMoverProject_GetViaIdentity'; + GetViaIdentityStorageMover = 'Az.StorageMover.private\Get-AzStorageMoverProject_GetViaIdentityStorageMover'; List = 'Az.StorageMover.private\Get-AzStorageMoverProject_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1047,6 +1245,9 @@ begin { [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) @@ -1105,7 +1306,7 @@ Get-AzStorageMover -ResourceGroupName myResourceGroup -Name myStorageMover1 .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover .Notes COMPLEX PARAMETER PROPERTIES @@ -1125,7 +1326,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.storagemover/get-azstoragemover #> function Get-AzStorageMover { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -1156,7 +1357,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -1215,6 +1415,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -1239,9 +1448,7 @@ begin { List = 'Az.StorageMover.private\Get-AzStorageMover_List'; List1 = 'Az.StorageMover.private\Get-AzStorageMover_List1'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1255,6 +1462,9 @@ begin { [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) @@ -1300,41 +1510,47 @@ end { <# .Synopsis -Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer. +Create a Job Definition resource, which contains configuration for a single unit of managed data transfer. .Description -Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer. +Create a Job Definition resource, which contains configuration for a single unit of managed data transfer. .Example New-AzStorageMoverJobDefinition -Name myJob -ProjectName myProject -ResourceGroupName myResourceGroup -StorageMoverName myStorageMover -AgentName myAgent -SourceName myNfsEndpoint -TargetName myContainerEndpoint -CopyMode "Additive" -Description "job definition" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition .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. -JOBDEFINITION : The Job Definition resource. - CopyMode : Strategy to use for copy. - SourceName : The name of the source Endpoint. - TargetName : The name of the target Endpoint. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The timestamp of resource last modification (UTC) - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. - [AgentName ]: Name of the Agent to assign for new Job Runs of this Job Definition. - [Description ]: A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud. - [JobType ]: The type of the Job. - [SourceSubpath ]: The subpath to use when reading from the source Endpoint. - [TargetSubpath ]: The subpath to use when writing to the target Endpoint. +PROJECTINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoverjobdefinition #> function New-AzStorageMoverJobDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1344,65 +1560,89 @@ param( # The name of the Job Definition resource. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Project resource. ${ProjectName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${StorageMoverName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition] - # The Job Definition resource. - # To construct, see NOTES section for JOBDEFINITION properties and create a hash table. - ${JobDefinition}, + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${ProjectInputObject}, + + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode])] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode] + [System.String] # Strategy to use for copy. ${CopyMode}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # The name of the source Endpoint. ${SourceName}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # The name of the target Endpoint. ${TargetName}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # Name of the Agent to assign for new Job Runs of this Job Definition. ${AgentName}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # A description for the Job Definition. @@ -1411,24 +1651,42 @@ param( ${Description}, [Parameter(ParameterSetName='CreateExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType])] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("OnPremToCloud", "CloudToCloud")] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType] + [System.String] # The type of the Job. ${JobType}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # The subpath to use when reading from the source Endpoint. ${SourceSubpath}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # The subpath to use when writing to the target Endpoint. ${TargetSubpath}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1485,6 +1743,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -1504,12 +1771,13 @@ begin { } $mapping = @{ - Create = 'Az.StorageMover.private\New-AzStorageMoverJobDefinition_Create'; CreateExpanded = 'Az.StorageMover.private\New-AzStorageMoverJobDefinition_CreateExpanded'; + CreateViaIdentityProjectExpanded = 'Az.StorageMover.private\New-AzStorageMoverJobDefinition_CreateViaIdentityProjectExpanded'; + CreateViaIdentityStorageMoverExpanded = 'Az.StorageMover.private\New-AzStorageMoverJobDefinition_CreateViaIdentityStorageMoverExpanded'; + CreateViaJsonFilePath = 'Az.StorageMover.private\New-AzStorageMoverJobDefinition_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StorageMover.private\New-AzStorageMoverJobDefinition_CreateViaJsonString'; } - if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1523,6 +1791,9 @@ begin { [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) @@ -1568,34 +1839,36 @@ end { <# .Synopsis -Creates or updates a Project resource, which is a logical grouping of related jobs. +Create a Project resource, which is a logical grouping of related jobs. .Description -Creates or updates a Project resource, which is a logical grouping of related jobs. +Create a Project resource, which is a logical grouping of related jobs. .Example New-AzStorageMoverProject -ResourceGroupName myResourceGroup -StorageMoverName myStorageMover -Name myProject -Description "description" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject .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. -PROJECT : The Project resource. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The timestamp of resource last modification (UTC) - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. - [Description ]: A description for the Project. +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoverproject #> function New-AzStorageMoverProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1605,39 +1878,57 @@ param( # The name of the Project resource. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${StorageMoverName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject] - # The Project resource. - # To construct, see NOTES section for PROJECT properties and create a hash table. - ${Project}, + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # A description for the Project. ${Description}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1694,6 +1985,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -1713,12 +2013,12 @@ begin { } $mapping = @{ - Create = 'Az.StorageMover.private\New-AzStorageMoverProject_Create'; CreateExpanded = 'Az.StorageMover.private\New-AzStorageMoverProject_CreateExpanded'; + CreateViaIdentityStorageMoverExpanded = 'Az.StorageMover.private\New-AzStorageMoverProject_CreateViaIdentityStorageMoverExpanded'; + CreateViaJsonFilePath = 'Az.StorageMover.private\New-AzStorageMoverProject_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StorageMover.private\New-AzStorageMoverProject_CreateViaJsonString'; } - if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1732,6 +2032,9 @@ begin { [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) @@ -1777,37 +2080,19 @@ end { <# .Synopsis -Creates or updates a top-level Storage Mover resource. +Create a top-level Storage Mover resource. .Description -Creates or updates a top-level Storage Mover resource. +Create a top-level Storage Mover resource. .Example New-AzStorageMover -ResourceGroupName myResourceGroup -Name myStorageMover -Location eastus -Description "Description" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover -.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. - -STORAGEMOVER : The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. - Location : The geo-location where the resource lives - [Tag ]: Resource tags. - [(Any) ]: This indicates any property can be added to this object. - [SystemDataCreatedAt ]: The timestamp of resource creation (UTC). - [SystemDataCreatedBy ]: The identity that created the resource. - [SystemDataCreatedByType ]: The type of identity that created the resource. - [SystemDataLastModifiedAt ]: The timestamp of resource last modification (UTC) - [SystemDataLastModifiedBy ]: The identity that last modified the resource. - [SystemDataLastModifiedByType ]: The type of identity that last modified the resource. - [Description ]: A description for the Storage Mover. +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemover #> function New-AzStorageMover { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1831,13 +2116,6 @@ param( # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover] - # The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. - # To construct, see NOTES section for STORAGEMOVER properties and create a hash table. - ${StorageMover}, - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] @@ -1852,11 +2130,23 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1913,6 +2203,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -1932,12 +2231,11 @@ begin { } $mapping = @{ - Create = 'Az.StorageMover.private\New-AzStorageMover_Create'; CreateExpanded = 'Az.StorageMover.private\New-AzStorageMover_CreateExpanded'; + CreateViaJsonFilePath = 'Az.StorageMover.private\New-AzStorageMover_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StorageMover.private\New-AzStorageMover_CreateViaJsonString'; } - if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1951,6 +2249,9 @@ begin { [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) @@ -2021,6 +2322,17 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/remove-azstoragemoverendpoint #> @@ -2029,6 +2341,7 @@ function Remove-AzStorageMoverEndpoint { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory)] [Alias('EndpointName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -2059,9 +2372,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2136,6 +2454,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -2157,10 +2484,9 @@ begin { $mapping = @{ Delete = 'Az.StorageMover.private\Remove-AzStorageMoverEndpoint_Delete'; DeleteViaIdentity = 'Az.StorageMover.private\Remove-AzStorageMoverEndpoint_DeleteViaIdentity'; + DeleteViaIdentityStorageMover = 'Az.StorageMover.private\Remove-AzStorageMoverEndpoint_DeleteViaIdentityStorageMover'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2174,6 +2500,9 @@ begin { [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) @@ -2234,7 +2563,29 @@ 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 +INPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +PROJECTINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -2252,6 +2603,8 @@ function Remove-AzStorageMoverJobDefinition { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityProject', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory)] [Alias('JobDefinitionName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -2259,6 +2612,7 @@ param( ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Project resource. @@ -2288,9 +2642,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityProject', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${ProjectInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2365,6 +2730,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -2386,10 +2760,10 @@ begin { $mapping = @{ Delete = 'Az.StorageMover.private\Remove-AzStorageMoverJobDefinition_Delete'; DeleteViaIdentity = 'Az.StorageMover.private\Remove-AzStorageMoverJobDefinition_DeleteViaIdentity'; + DeleteViaIdentityProject = 'Az.StorageMover.private\Remove-AzStorageMoverJobDefinition_DeleteViaIdentityProject'; + DeleteViaIdentityStorageMover = 'Az.StorageMover.private\Remove-AzStorageMoverJobDefinition_DeleteViaIdentityStorageMover'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2403,6 +2777,9 @@ begin { [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) @@ -2473,6 +2850,17 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/remove-azstoragemoverproject #> @@ -2481,6 +2869,7 @@ function Remove-AzStorageMoverProject { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory)] [Alias('ProjectName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -2511,9 +2900,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2588,6 +2982,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -2609,10 +3012,9 @@ begin { $mapping = @{ Delete = 'Az.StorageMover.private\Remove-AzStorageMoverProject_Delete'; DeleteViaIdentity = 'Az.StorageMover.private\Remove-AzStorageMoverProject_DeleteViaIdentity'; + DeleteViaIdentityStorageMover = 'Az.StorageMover.private\Remove-AzStorageMoverProject_DeleteViaIdentityStorageMover'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2626,6 +3028,9 @@ begin { [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) @@ -2671,9 +3076,9 @@ end { <# .Synopsis -Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. +Start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. .Description -Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. +Start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. .Example New-AzStorageMoverProject -ResourceGroupName myResourceGroup -StorageMoverName myStorageMover -Name myProject -Description "description" @@ -2686,7 +3091,7 @@ Start-AzStorageMoverJobDefinition -JobDefinitionName myJobDefinition -ProjectNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -System.String +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId .Notes COMPLEX PARAMETER PROPERTIES @@ -2702,20 +3107,45 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +PROJECTINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/start-azstoragemoverjobdefinition #> function Start-AzStorageMoverJobDefinition { -[OutputType([System.String])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId])] [CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Start', Mandatory)] + [Parameter(ParameterSetName='StartViaIdentityProject', Mandatory)] + [Parameter(ParameterSetName='StartViaIdentityStorageMover', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Job Definition resource. ${JobDefinitionName}, [Parameter(ParameterSetName='Start', Mandatory)] + [Parameter(ParameterSetName='StartViaIdentityStorageMover', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Project resource. @@ -2745,9 +3175,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='StartViaIdentityProject', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${ProjectInputObject}, + + [Parameter(ParameterSetName='StartViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2804,6 +3245,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -2825,10 +3275,10 @@ begin { $mapping = @{ Start = 'Az.StorageMover.private\Start-AzStorageMoverJobDefinition_Start'; StartViaIdentity = 'Az.StorageMover.private\Start-AzStorageMoverJobDefinition_StartViaIdentity'; + StartViaIdentityProject = 'Az.StorageMover.private\Start-AzStorageMoverJobDefinition_StartViaIdentityProject'; + StartViaIdentityStorageMover = 'Az.StorageMover.private\Start-AzStorageMoverJobDefinition_StartViaIdentityStorageMover'; } - if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2842,6 +3292,9 @@ begin { [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) @@ -2896,7 +3349,7 @@ Stop-AzStorageMoverJobDefinition -JobDefinitionName myJobDefinition -ProjectName .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -System.String +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId .Notes COMPLEX PARAMETER PROPERTIES @@ -2912,20 +3365,45 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +PROJECTINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/stop-azstoragemoverjobdefinition #> function Stop-AzStorageMoverJobDefinition { -[OutputType([System.String])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId])] [CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Stop', Mandatory)] + [Parameter(ParameterSetName='StopViaIdentityProject', Mandatory)] + [Parameter(ParameterSetName='StopViaIdentityStorageMover', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Job Definition resource. ${JobDefinitionName}, [Parameter(ParameterSetName='Stop', Mandatory)] + [Parameter(ParameterSetName='StopViaIdentityStorageMover', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Project resource. @@ -2955,9 +3433,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='StopViaIdentityProject', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${ProjectInputObject}, + + [Parameter(ParameterSetName='StopViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3014,6 +3503,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -3035,10 +3533,10 @@ begin { $mapping = @{ Stop = 'Az.StorageMover.private\Stop-AzStorageMoverJobDefinition_Stop'; StopViaIdentity = 'Az.StorageMover.private\Stop-AzStorageMoverJobDefinition_StopViaIdentity'; + StopViaIdentityProject = 'Az.StorageMover.private\Stop-AzStorageMoverJobDefinition_StopViaIdentityProject'; + StopViaIdentityStorageMover = 'Az.StorageMover.private\Stop-AzStorageMoverJobDefinition_StopViaIdentityStorageMover'; } - if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3052,6 +3550,9 @@ begin { [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) @@ -3097,34 +3598,22 @@ end { <# .Synopsis -Creates or updates an Agent resource. +Update an Agent resource. .Description -Creates or updates an Agent resource. +Update an Agent resource. .Example $recurrence = New-AzStorageMoverUploadLimitWeeklyRecurrenceObject -Day 'Monday','Tuesday','Friday' -LimitInMbps 100 -EndTimeHour 5 -StartTimeHour 1 -StartTimeMinute 30 -EndTimeMinute 0 Update-AzStorageMoverAgent -ResourceGroupName myresourcegroup -StorageMoverName mystoragemover -Name myagent -Description "Update description" -UploadLimitScheduleWeeklyRecurrence $recurrence -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent .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. -AGENT : The Agent resource. - [Description ]: A description for the Agent. - [UploadLimitScheduleWeeklyRecurrence ]: The set of weekly repeating recurrences of the WAN-link upload limit schedule. - Day : The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence. - EndTimeHour : The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). Hour value 24 cannot be combined with any other minute value but 0. - StartTimeHour : The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). Hour value 24 cannot be combined with any other minute value but 0. - LimitInMbps : The WAN-link upload bandwidth (maximum data transfer rate) in megabits per second. Value of 0 indicates no throughput is allowed and any running migration job is effectively paused for the duration of this recurrence. Only data plane operations are governed by this limit. Control plane operations ensure seamless functionality. The agent may exceed this limit with control messages, if necessary. - [EndTimeMinute ]: The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. - [StartTimeMinute ]: The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. - INPUTOBJECT : Identity Parameter [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. @@ -3136,8 +3625,19 @@ INPUTOBJECT : Identity Parameter [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + UPLOADLIMITSCHEDULEWEEKLYRECURRENCE : The set of weekly repeating recurrences of the WAN-link upload limit schedule. - Day : The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence. + Day >: The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence. EndTimeHour : The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). Hour value 24 cannot be combined with any other minute value but 0. StartTimeHour : The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). Hour value 24 cannot be combined with any other minute value but 0. LimitInMbps : The WAN-link upload bandwidth (maximum data transfer rate) in megabits per second. Value of 0 indicates no throughput is allowed and any running migration job is effectively paused for the duration of this recurrence. Only data plane operations are governed by this limit. Control plane operations ensure seamless functionality. The agent may exceed this limit with control messages, if necessary. @@ -3147,58 +3647,60 @@ UPLOADLIMITSCHEDULEWEEKLYRECURRENCE : The set of https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemoveragent #> function Update-AzStorageMoverAgent { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('AgentName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Agent resource. ${Name}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${StorageMoverName}, - [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters] - # The Agent resource. - # To construct, see NOTES section for AGENT properties and create a hash table. - ${Agent}, + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # A description for the Agent. @@ -3206,13 +3708,25 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[]] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence[]] # The set of weekly repeating recurrences of the WAN-link upload limit schedule. - # To construct, see NOTES section for UPLOADLIMITSCHEDULEWEEKLYRECURRENCE properties and create a hash table. ${UploadLimitScheduleWeeklyRecurrence}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3269,6 +3783,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -3288,14 +3811,13 @@ begin { } $mapping = @{ - Update = 'Az.StorageMover.private\Update-AzStorageMoverAgent_Update'; UpdateExpanded = 'Az.StorageMover.private\Update-AzStorageMoverAgent_UpdateExpanded'; - UpdateViaIdentity = 'Az.StorageMover.private\Update-AzStorageMoverAgent_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StorageMover.private\Update-AzStorageMoverAgent_UpdateViaIdentityExpanded'; + UpdateViaIdentityStorageMoverExpanded = 'Az.StorageMover.private\Update-AzStorageMoverAgent_UpdateViaIdentityStorageMoverExpanded'; + UpdateViaJsonFilePath = 'Az.StorageMover.private\Update-AzStorageMoverAgent_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StorageMover.private\Update-AzStorageMoverAgent_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3309,6 +3831,9 @@ begin { [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) @@ -3354,20 +3879,18 @@ end { <# .Synopsis -Updates properties for a Job Definition resource. +Update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. .Description -Updates properties for a Job Definition resource. +Update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. .Example Update-AzStorageMoverJobDefinition -Name myJob -ProjectName myProject -ResourceGroupName myResourceGroup -StorageMoverName myStorageMover -Description "Update Description" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -3384,73 +3907,102 @@ INPUTOBJECT : Identity Parameter [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. -JOBDEFINITION : The Job Definition resource. - [AgentName ]: Name of the Agent to assign for new Job Runs of this Job Definition. - [CopyMode ]: Strategy to use for copy. - [Description ]: A description for the Job Definition. +PROJECTINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemoverjobdefinition #> function Update-AzStorageMoverJobDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityProjectExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('JobDefinitionName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Job Definition resource. ${Name}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Project resource. ${ProjectName}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${StorageMoverName}, - [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters] - # The Job Definition resource. - # To construct, see NOTES section for JOBDEFINITION properties and create a hash table. - ${JobDefinition}, + [Parameter(ParameterSetName='UpdateViaIdentityProjectExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${ProjectInputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # Name of the Agent to assign for new Job Runs of this Job Definition. @@ -3458,19 +4010,35 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode])] + [Parameter(ParameterSetName='UpdateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode] + [System.String] # Strategy to use for copy. ${CopyMode}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # A description for the Job Definition. ${Description}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3527,6 +4095,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -3546,14 +4123,14 @@ begin { } $mapping = @{ - Update = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_Update'; UpdateExpanded = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_UpdateExpanded'; - UpdateViaIdentity = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_UpdateViaIdentityExpanded'; + UpdateViaIdentityProjectExpanded = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_UpdateViaIdentityProjectExpanded'; + UpdateViaIdentityStorageMoverExpanded = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_UpdateViaIdentityStorageMoverExpanded'; + UpdateViaJsonFilePath = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3567,6 +4144,9 @@ begin { [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) @@ -3612,20 +4192,18 @@ end { <# .Synopsis -Updates properties for a Project resource. +Update properties for a Project resource. Properties not specified in the request body will be unchanged. .Description -Updates properties for a Project resource. +Update properties for a Project resource. Properties not specified in the request body will be unchanged. .Example Update-AzStorageMoverProject -ResourceGroupName myResourceGroup -StorageMoverName myStorageMover -Name myProject -Description "Update Description" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject .Notes COMPLEX PARAMETER PROPERTIES @@ -3642,69 +4220,91 @@ INPUTOBJECT : Identity Parameter [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. -PROJECT : The Project resource. - [Description ]: A description for the Project. +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemoverproject #> function Update-AzStorageMoverProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('ProjectName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Project resource. ${Name}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${StorageMoverName}, - [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters] - # The Project resource. - # To construct, see NOTES section for PROJECT properties and create a hash table. - ${Project}, + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # A description for the Project. ${Description}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3761,6 +4361,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -3780,14 +4389,13 @@ begin { } $mapping = @{ - Update = 'Az.StorageMover.private\Update-AzStorageMoverProject_Update'; UpdateExpanded = 'Az.StorageMover.private\Update-AzStorageMoverProject_UpdateExpanded'; - UpdateViaIdentity = 'Az.StorageMover.private\Update-AzStorageMoverProject_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StorageMover.private\Update-AzStorageMoverProject_UpdateViaIdentityExpanded'; + UpdateViaIdentityStorageMoverExpanded = 'Az.StorageMover.private\Update-AzStorageMoverProject_UpdateViaIdentityStorageMoverExpanded'; + UpdateViaJsonFilePath = 'Az.StorageMover.private\Update-AzStorageMoverProject_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StorageMover.private\Update-AzStorageMoverProject_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3801,6 +4409,9 @@ begin { [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) @@ -3846,20 +4457,18 @@ end { <# .Synopsis -Updates properties for a Storage Mover resource. +Update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. .Description -Updates properties for a Storage Mover resource. +Update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. .Example Update-AzStorageMover -ResourceGroupName myResourceGroup -Name myStorageMover -Description "Update description" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover .Notes COMPLEX PARAMETER PROPERTIES @@ -3875,58 +4484,46 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. - -STORAGEMOVER : The Storage Mover resource. - [Description ]: A description for the Storage Mover. - [Tag ]: Resource tags. - [(Any) ]: This indicates any property can be added to this object. .Link https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemover #> function Update-AzStorageMover { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('StorageMoverName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${Name}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters] - # The Storage Mover resource. - # To construct, see NOTES section for STORAGEMOVER properties and create a hash table. - ${StorageMover}, - [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] @@ -3937,11 +4534,23 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3998,6 +4607,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -4017,14 +4635,12 @@ begin { } $mapping = @{ - Update = 'Az.StorageMover.private\Update-AzStorageMover_Update'; UpdateExpanded = 'Az.StorageMover.private\Update-AzStorageMover_UpdateExpanded'; - UpdateViaIdentity = 'Az.StorageMover.private\Update-AzStorageMover_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StorageMover.private\Update-AzStorageMover_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.StorageMover.private\Update-AzStorageMover_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StorageMover.private\Update-AzStorageMover_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -4038,6 +4654,9 @@ begin { [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) @@ -4090,16 +4709,16 @@ Creates a Nfs file share endpoint resource, which represents a data transfer sou New-AzStorageMoverAzNfsFileShareEndpoint -Name "my-nfs-endpoint" -ResourceGroupName "my-resource-group" -StorageMoverName "my-storage-mover" -FileShareName "10.0.0.1" -Description "My NFS endpoint" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoveraznfsfileshareendpoint #> function New-AzStorageMoverAzNfsFileShareEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -4202,6 +4821,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -4223,9 +4851,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.StorageMover.custom\New-AzStorageMoverAzNfsFileShareEndpoint'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -4239,6 +4865,9 @@ begin { [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) @@ -4291,17 +4920,17 @@ Creates a Smb file share endpoint resource, which represents a data transfer sou New-AzStorageMoverAzSmbFileShareEndpoint -Name "myendpoint" -ResourceGroupName "myresourcegroup" -StorageMoverName "mystoragemover" -StorageAccountResourceId $accountresourceid -FileShareName testfs -Description "New smb file share endpoint" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoverazsmbfileshareendpoint #> function New-AzStorageMoverAzSmbFileShareEndpoint { [Alias('New-AzStorageMoverSmbFileShareEndpoint')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -4404,6 +5033,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -4425,9 +5063,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.StorageMover.custom\New-AzStorageMoverAzSmbFileShareEndpoint'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -4441,6 +5077,9 @@ begin { [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) @@ -4493,16 +5132,16 @@ Creates an AzStorageContainer endpoint resource, which represents a data transfe New-AzStorageMoverAzStorageContainerEndpoint -Name myEndpoint -ResourceGroupName myResourceGroup -BlobContainerName myContainer -StorageMoverName myStorageMover -StorageAccountResourceId myAccountResourceId .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoverazstoragecontainerendpoint #> function New-AzStorageMoverAzStorageContainerEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -4605,6 +5244,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -4626,9 +5274,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.StorageMover.custom\New-AzStorageMoverAzStorageContainerEndpoint'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -4642,6 +5288,9 @@ begin { [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) @@ -4694,16 +5343,16 @@ Creates a Multi-Cloud Connector endpoint resource, which represents a data trans New-AzStorageMoverMultiCloudConnectorEndpoint -Name "my-mc-endpoint" -ResourceGroupName "my-resource-group" -StorageMoverName "my-storage-mover" -AWSS3BucketId "my-s3-bucket" -Description "My Multi-Cloud endpoint" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemovermulticloudconnectorendpoint #> function New-AzStorageMoverMultiCloudConnectorEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -4806,6 +5455,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -4827,9 +5485,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.StorageMover.custom\New-AzStorageMoverMultiCloudConnectorEndpoint'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -4843,6 +5499,9 @@ begin { [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) @@ -4895,16 +5554,16 @@ Creates a Nfs endpoint resource, which represents a data transfer source or dest New-AzStorageMoverNfsEndpoint -Name myEndpoint -ResourceGroupName myResourceGroup -StorageMoverName myStorageMover -Host "10.0.0.1" -Export "/" -NfsVersion NFSv3 -Description "Description" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemovernfsendpoint #> function New-AzStorageMoverNfsEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -4947,9 +5606,9 @@ param( ${Export}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion])] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("NFSauto", "NFSv3", "NFSv4")] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion] + [System.String] # The NFS protocol version. ${NfsVersion}, @@ -5014,6 +5673,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -5035,9 +5703,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.StorageMover.custom\New-AzStorageMoverNfsEndpoint'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -5051,6 +5717,9 @@ begin { [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) @@ -5103,16 +5772,16 @@ Creates an SMB endpoint resource, which represents a data transfer source or des New-AzStorageMoverSmbEndpoint -Name "myendpoint" -ResourceGroupName "myresourcegroup" -StorageMoverName "mystoragemover" -Host "10.0.0.1" -ShareName "testshare" -CredentialsUsernameUri "https://examples-azureKeyVault.vault.azure.net/secrets/username1" -CredentialsPasswordUri "https://examples-azureKeyVault.vault.azure.net/secrets/password1" .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoversmbendpoint #> function New-AzStorageMoverSmbEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -5229,6 +5898,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -5250,9 +5928,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.StorageMover.custom\New-AzStorageMoverSmbEndpoint'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -5266,6 +5942,9 @@ begin { [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) @@ -5318,18 +5997,18 @@ Create an in-memory object for UploadLimitWeeklyRecurrence. New-AzStorageMoverUploadLimitWeeklyRecurrenceObject -Day 'Monday','Tuesday','Friday' -LimitInMbps 100 -EndTimeHour 5 -StartTimeHour 1 -StartTimeMinute 30 -EndTimeMinute 0 .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrence +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrence .Link https://learn.microsoft.com/powershell/module/Az.StorageMover/new-AzStorageMoverUploadLimitWeeklyRecurrenceObject #> function New-AzStorageMoverUploadLimitWeeklyRecurrenceObject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrence])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrence])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek])] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek[]] + [System.String[]] # The set of days of week for the schedule recurrence. # A day must not be specified more than once in a recurrence. ${Day}, @@ -5386,6 +6065,9 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() @@ -5414,6 +6096,9 @@ begin { [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) @@ -5474,7 +6159,7 @@ 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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -5597,6 +6282,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -5619,9 +6313,7 @@ begin { Delete = 'Az.StorageMover.custom\Remove-AzStorageMover'; DeleteViaIdentity = 'Az.StorageMover.custom\Remove-AzStorageMover'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -5635,6 +6327,9 @@ begin { [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) @@ -5695,7 +6390,7 @@ 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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -5824,6 +6519,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -5846,9 +6550,7 @@ begin { Delete = 'Az.StorageMover.custom\Unregister-AzStorageMoverAgent'; DeleteViaIdentity = 'Az.StorageMover.custom\Unregister-AzStorageMoverAgent'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -5862,6 +6564,9 @@ begin { [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) @@ -5918,13 +6623,13 @@ Update-AzStorageMoverAzNfsFileShareEndpoint -Name "my-nfs-endpoint" -ResourceGro .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -5935,10 +6640,10 @@ INPUTOBJECT : Identity Parameter [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. .Link -https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemovernfsfileshareendpoint +https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemoveraznfsfileshareendpoint #> function Update-AzStorageMoverAzNfsFileShareEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -6036,6 +6741,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -6058,9 +6772,7 @@ begin { UpdateExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverAzNfsFileShareEndpoint'; UpdateViaIdentityExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverAzNfsFileShareEndpoint'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -6074,6 +6786,9 @@ begin { [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) @@ -6132,13 +6847,13 @@ Get-AzStorageMoverEndpoint -ResourceGroupName "myresourcegroup" -StorageMoverNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -6153,7 +6868,7 @@ https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemo #> function Update-AzStorageMoverAzSmbFileShareEndpoint { [Alias('Update-AzStorageMoverSmbFileShareEndpoint')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -6251,6 +6966,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -6273,9 +6997,7 @@ begin { UpdateExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverAzSmbFileShareEndpoint'; UpdateViaIdentityExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverAzSmbFileShareEndpoint'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -6289,6 +7011,9 @@ begin { [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) @@ -6345,13 +7070,13 @@ Update-AzStorageMoverAzStorageContainerEndpoint -Name myEndpoint -ResourceGroupN .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -6365,7 +7090,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemoverazstoragecontainerendpoint #> function Update-AzStorageMoverAzStorageContainerEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -6463,6 +7188,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -6485,9 +7219,7 @@ begin { UpdateExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverAzStorageContainerEndpoint'; UpdateViaIdentityExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverAzStorageContainerEndpoint'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -6501,6 +7233,9 @@ begin { [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) @@ -6557,13 +7292,13 @@ Update-AzStorageMoverMultiCloudConnectorEndpoint -Name "my-mc-endpoint" -Resourc .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -6577,7 +7312,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemovermulticloudconnectorendpoint #> function Update-AzStorageMoverMultiCloudConnectorEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -6675,6 +7410,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -6697,9 +7441,7 @@ begin { UpdateExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverMultiCloudConnectorEndpoint'; UpdateViaIdentityExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverMultiCloudConnectorEndpoint'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -6713,6 +7455,9 @@ begin { [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) @@ -6769,13 +7514,13 @@ Update-AzStorageMoverNfsEndpoint -Name myEndpoint -ResourceGroupName myResourceG .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -6789,7 +7534,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemovernfsendpoint #> function Update-AzStorageMoverNfsEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -6887,6 +7632,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -6909,9 +7663,7 @@ begin { UpdateExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverNfsEndpoint'; UpdateViaIdentityExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverNfsEndpoint'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -6925,6 +7677,9 @@ begin { [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) @@ -6983,13 +7738,13 @@ Get-AzStorageMoverEndpoint -ResourceGroupName "myresourcegroup" -StorageMoverNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -7003,7 +7758,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemoversmbendpoint #> function Update-AzStorageMoverSmbEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -7115,6 +7870,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -7137,9 +7901,7 @@ begin { UpdateExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverSmbEndpoint'; UpdateViaIdentityExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverSmbEndpoint'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -7153,6 +7915,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMover.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMover.ps1 index 273c374b93f5..08272ddc5d44 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMover.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMover.ps1 @@ -31,7 +31,7 @@ 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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -154,6 +154,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -176,9 +185,7 @@ begin { Delete = 'Az.StorageMover.custom\Remove-AzStorageMover'; DeleteViaIdentity = 'Az.StorageMover.custom\Remove-AzStorageMover'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -192,6 +199,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMoverEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMoverEndpoint.ps1 index ac084ae10dac..03ef2f28fd3f 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMoverEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMoverEndpoint.ps1 @@ -41,6 +41,17 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/remove-azstoragemoverendpoint #> @@ -49,6 +60,7 @@ function Remove-AzStorageMoverEndpoint { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory)] [Alias('EndpointName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -79,9 +91,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -156,6 +173,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -177,10 +203,9 @@ begin { $mapping = @{ Delete = 'Az.StorageMover.private\Remove-AzStorageMoverEndpoint_Delete'; DeleteViaIdentity = 'Az.StorageMover.private\Remove-AzStorageMoverEndpoint_DeleteViaIdentity'; + DeleteViaIdentityStorageMover = 'Az.StorageMover.private\Remove-AzStorageMoverEndpoint_DeleteViaIdentityStorageMover'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -194,6 +219,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMoverJobDefinition.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMoverJobDefinition.ps1 index 0e7d6317307f..2f9c7e9fbfef 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMoverJobDefinition.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMoverJobDefinition.ps1 @@ -41,6 +41,28 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +PROJECTINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/remove-azstoragemoverjobdefinition #> @@ -49,6 +71,8 @@ function Remove-AzStorageMoverJobDefinition { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityProject', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory)] [Alias('JobDefinitionName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -56,6 +80,7 @@ param( ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Project resource. @@ -85,9 +110,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityProject', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${ProjectInputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -162,6 +198,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -183,10 +228,10 @@ begin { $mapping = @{ Delete = 'Az.StorageMover.private\Remove-AzStorageMoverJobDefinition_Delete'; DeleteViaIdentity = 'Az.StorageMover.private\Remove-AzStorageMoverJobDefinition_DeleteViaIdentity'; + DeleteViaIdentityProject = 'Az.StorageMover.private\Remove-AzStorageMoverJobDefinition_DeleteViaIdentityProject'; + DeleteViaIdentityStorageMover = 'Az.StorageMover.private\Remove-AzStorageMoverJobDefinition_DeleteViaIdentityStorageMover'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -200,6 +245,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMoverProject.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMoverProject.ps1 index e712de645990..bc3ea6e76cb2 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMoverProject.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Remove-AzStorageMoverProject.ps1 @@ -41,6 +41,17 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/remove-azstoragemoverproject #> @@ -49,6 +60,7 @@ function Remove-AzStorageMoverProject { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory)] [Alias('ProjectName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -79,9 +91,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -156,6 +173,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -177,10 +203,9 @@ begin { $mapping = @{ Delete = 'Az.StorageMover.private\Remove-AzStorageMoverProject_Delete'; DeleteViaIdentity = 'Az.StorageMover.private\Remove-AzStorageMoverProject_DeleteViaIdentity'; + DeleteViaIdentityStorageMover = 'Az.StorageMover.private\Remove-AzStorageMoverProject_DeleteViaIdentityStorageMover'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -194,6 +219,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Start-AzStorageMoverJobDefinition.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Start-AzStorageMoverJobDefinition.ps1 index bc8ed84d4683..ef86aad0f17b 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Start-AzStorageMoverJobDefinition.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Start-AzStorageMoverJobDefinition.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. +Start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. .Description -Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. +Start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. .Example New-AzStorageMoverProject -ResourceGroupName myResourceGroup -StorageMoverName myStorageMover -Name myProject -Description "description" @@ -31,7 +31,7 @@ Start-AzStorageMoverJobDefinition -JobDefinitionName myJobDefinition -ProjectNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -System.String +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId .Notes COMPLEX PARAMETER PROPERTIES @@ -47,20 +47,45 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +PROJECTINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/start-azstoragemoverjobdefinition #> function Start-AzStorageMoverJobDefinition { -[OutputType([System.String])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId])] [CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Start', Mandatory)] + [Parameter(ParameterSetName='StartViaIdentityProject', Mandatory)] + [Parameter(ParameterSetName='StartViaIdentityStorageMover', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Job Definition resource. ${JobDefinitionName}, [Parameter(ParameterSetName='Start', Mandatory)] + [Parameter(ParameterSetName='StartViaIdentityStorageMover', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Project resource. @@ -90,9 +115,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='StartViaIdentityProject', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${ProjectInputObject}, + + [Parameter(ParameterSetName='StartViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -149,6 +185,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -170,10 +215,10 @@ begin { $mapping = @{ Start = 'Az.StorageMover.private\Start-AzStorageMoverJobDefinition_Start'; StartViaIdentity = 'Az.StorageMover.private\Start-AzStorageMoverJobDefinition_StartViaIdentity'; + StartViaIdentityProject = 'Az.StorageMover.private\Start-AzStorageMoverJobDefinition_StartViaIdentityProject'; + StartViaIdentityStorageMover = 'Az.StorageMover.private\Start-AzStorageMoverJobDefinition_StartViaIdentityStorageMover'; } - if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -187,6 +232,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Stop-AzStorageMoverJobDefinition.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Stop-AzStorageMoverJobDefinition.ps1 index a0e49ab610e3..08a078134666 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Stop-AzStorageMoverJobDefinition.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Stop-AzStorageMoverJobDefinition.ps1 @@ -25,7 +25,7 @@ Stop-AzStorageMoverJobDefinition -JobDefinitionName myJobDefinition -ProjectName .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -System.String +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId .Notes COMPLEX PARAMETER PROPERTIES @@ -41,20 +41,45 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +PROJECTINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/stop-azstoragemoverjobdefinition #> function Stop-AzStorageMoverJobDefinition { -[OutputType([System.String])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId])] [CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Stop', Mandatory)] + [Parameter(ParameterSetName='StopViaIdentityProject', Mandatory)] + [Parameter(ParameterSetName='StopViaIdentityStorageMover', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Job Definition resource. ${JobDefinitionName}, [Parameter(ParameterSetName='Stop', Mandatory)] + [Parameter(ParameterSetName='StopViaIdentityStorageMover', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Project resource. @@ -84,9 +109,20 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='StopViaIdentityProject', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${ProjectInputObject}, + + [Parameter(ParameterSetName='StopViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -143,6 +179,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -164,10 +209,10 @@ begin { $mapping = @{ Stop = 'Az.StorageMover.private\Stop-AzStorageMoverJobDefinition_Stop'; StopViaIdentity = 'Az.StorageMover.private\Stop-AzStorageMoverJobDefinition_StopViaIdentity'; + StopViaIdentityProject = 'Az.StorageMover.private\Stop-AzStorageMoverJobDefinition_StopViaIdentityProject'; + StopViaIdentityStorageMover = 'Az.StorageMover.private\Stop-AzStorageMoverJobDefinition_StopViaIdentityStorageMover'; } - if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -181,6 +226,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Unregister-AzStorageMoverAgent.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Unregister-AzStorageMoverAgent.ps1 index 839a9c91c98d..61e8602befcb 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Unregister-AzStorageMoverAgent.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Unregister-AzStorageMoverAgent.ps1 @@ -31,7 +31,7 @@ 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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -160,6 +160,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -182,9 +191,7 @@ begin { Delete = 'Az.StorageMover.custom\Unregister-AzStorageMoverAgent'; DeleteViaIdentity = 'Az.StorageMover.custom\Unregister-AzStorageMoverAgent'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -198,6 +205,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMover.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMover.ps1 index e5c5dd713b95..2a00943239bd 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMover.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMover.ps1 @@ -16,20 +16,18 @@ <# .Synopsis -Updates properties for a Storage Mover resource. +Update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. .Description -Updates properties for a Storage Mover resource. +Update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. .Example Update-AzStorageMover -ResourceGroupName myResourceGroup -Name myStorageMover -Description "Update description" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover .Notes COMPLEX PARAMETER PROPERTIES @@ -45,58 +43,46 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. - -STORAGEMOVER : The Storage Mover resource. - [Description ]: A description for the Storage Mover. - [Tag ]: Resource tags. - [(Any) ]: This indicates any property can be added to this object. .Link https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemover #> function Update-AzStorageMover { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('StorageMoverName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${Name}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters] - # The Storage Mover resource. - # To construct, see NOTES section for STORAGEMOVER properties and create a hash table. - ${StorageMover}, - [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] @@ -107,11 +93,23 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -168,6 +166,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -187,14 +194,12 @@ begin { } $mapping = @{ - Update = 'Az.StorageMover.private\Update-AzStorageMover_Update'; UpdateExpanded = 'Az.StorageMover.private\Update-AzStorageMover_UpdateExpanded'; - UpdateViaIdentity = 'Az.StorageMover.private\Update-AzStorageMover_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StorageMover.private\Update-AzStorageMover_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.StorageMover.private\Update-AzStorageMover_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StorageMover.private\Update-AzStorageMover_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -208,6 +213,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAgent.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAgent.ps1 index ddd99715464b..f1ba3c3923a2 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAgent.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAgent.ps1 @@ -16,34 +16,22 @@ <# .Synopsis -Creates or updates an Agent resource. +Update an Agent resource. .Description -Creates or updates an Agent resource. +Update an Agent resource. .Example $recurrence = New-AzStorageMoverUploadLimitWeeklyRecurrenceObject -Day 'Monday','Tuesday','Friday' -LimitInMbps 100 -EndTimeHour 5 -StartTimeHour 1 -StartTimeMinute 30 -EndTimeMinute 0 Update-AzStorageMoverAgent -ResourceGroupName myresourcegroup -StorageMoverName mystoragemover -Name myagent -Description "Update description" -UploadLimitScheduleWeeklyRecurrence $recurrence -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent .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. -AGENT : The Agent resource. - [Description ]: A description for the Agent. - [UploadLimitScheduleWeeklyRecurrence ]: The set of weekly repeating recurrences of the WAN-link upload limit schedule. - Day : The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence. - EndTimeHour : The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). Hour value 24 cannot be combined with any other minute value but 0. - StartTimeHour : The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). Hour value 24 cannot be combined with any other minute value but 0. - LimitInMbps : The WAN-link upload bandwidth (maximum data transfer rate) in megabits per second. Value of 0 indicates no throughput is allowed and any running migration job is effectively paused for the duration of this recurrence. Only data plane operations are governed by this limit. Control plane operations ensure seamless functionality. The agent may exceed this limit with control messages, if necessary. - [EndTimeMinute ]: The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. - [StartTimeMinute ]: The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. - INPUTOBJECT : Identity Parameter [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. @@ -55,8 +43,19 @@ INPUTOBJECT : Identity Parameter [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + UPLOADLIMITSCHEDULEWEEKLYRECURRENCE : The set of weekly repeating recurrences of the WAN-link upload limit schedule. - Day : The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence. + Day >: The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence. EndTimeHour : The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). Hour value 24 cannot be combined with any other minute value but 0. StartTimeHour : The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). Hour value 24 cannot be combined with any other minute value but 0. LimitInMbps : The WAN-link upload bandwidth (maximum data transfer rate) in megabits per second. Value of 0 indicates no throughput is allowed and any running migration job is effectively paused for the duration of this recurrence. Only data plane operations are governed by this limit. Control plane operations ensure seamless functionality. The agent may exceed this limit with control messages, if necessary. @@ -66,58 +65,60 @@ UPLOADLIMITSCHEDULEWEEKLYRECURRENCE : The set of https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemoveragent #> function Update-AzStorageMoverAgent { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('AgentName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Agent resource. ${Name}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${StorageMoverName}, - [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters] - # The Agent resource. - # To construct, see NOTES section for AGENT properties and create a hash table. - ${Agent}, + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # A description for the Agent. @@ -125,13 +126,25 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[]] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence[]] # The set of weekly repeating recurrences of the WAN-link upload limit schedule. - # To construct, see NOTES section for UPLOADLIMITSCHEDULEWEEKLYRECURRENCE properties and create a hash table. ${UploadLimitScheduleWeeklyRecurrence}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -188,6 +201,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -207,14 +229,13 @@ begin { } $mapping = @{ - Update = 'Az.StorageMover.private\Update-AzStorageMoverAgent_Update'; UpdateExpanded = 'Az.StorageMover.private\Update-AzStorageMoverAgent_UpdateExpanded'; - UpdateViaIdentity = 'Az.StorageMover.private\Update-AzStorageMoverAgent_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StorageMover.private\Update-AzStorageMoverAgent_UpdateViaIdentityExpanded'; + UpdateViaIdentityStorageMoverExpanded = 'Az.StorageMover.private\Update-AzStorageMoverAgent_UpdateViaIdentityStorageMoverExpanded'; + UpdateViaJsonFilePath = 'Az.StorageMover.private\Update-AzStorageMoverAgent_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StorageMover.private\Update-AzStorageMoverAgent_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -228,6 +249,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAzNfsFileShareEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAzNfsFileShareEndpoint.ps1 index d3a2a8ecc5e7..63697ef579d8 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAzNfsFileShareEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAzNfsFileShareEndpoint.ps1 @@ -27,13 +27,13 @@ Update-AzStorageMoverAzNfsFileShareEndpoint -Name "my-nfs-endpoint" -ResourceGro .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -44,10 +44,10 @@ INPUTOBJECT : Identity Parameter [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. .Link -https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemovernfsfileshareendpoint +https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemoveraznfsfileshareendpoint #> function Update-AzStorageMoverAzNfsFileShareEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -145,6 +145,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -167,9 +176,7 @@ begin { UpdateExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverAzNfsFileShareEndpoint'; UpdateViaIdentityExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverAzNfsFileShareEndpoint'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -183,6 +190,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAzSmbFileShareEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAzSmbFileShareEndpoint.ps1 index c1dbe807e8d0..c0fe4ea5bde7 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAzSmbFileShareEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAzSmbFileShareEndpoint.ps1 @@ -29,13 +29,13 @@ Get-AzStorageMoverEndpoint -ResourceGroupName "myresourcegroup" -StorageMoverNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -50,7 +50,7 @@ https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemo #> function Update-AzStorageMoverAzSmbFileShareEndpoint { [Alias('Update-AzStorageMoverSmbFileShareEndpoint')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -148,6 +148,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -170,9 +179,7 @@ begin { UpdateExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverAzSmbFileShareEndpoint'; UpdateViaIdentityExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverAzSmbFileShareEndpoint'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -186,6 +193,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAzStorageContainerEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAzStorageContainerEndpoint.ps1 index 0383f37bc018..8f419ef2b297 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAzStorageContainerEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverAzStorageContainerEndpoint.ps1 @@ -27,13 +27,13 @@ Update-AzStorageMoverAzStorageContainerEndpoint -Name myEndpoint -ResourceGroupN .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -47,7 +47,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemoverazstoragecontainerendpoint #> function Update-AzStorageMoverAzStorageContainerEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -145,6 +145,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -167,9 +176,7 @@ begin { UpdateExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverAzStorageContainerEndpoint'; UpdateViaIdentityExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverAzStorageContainerEndpoint'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -183,6 +190,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverJobDefinition.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverJobDefinition.ps1 index bda73cb1a2c8..10cbd2419eaf 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverJobDefinition.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverJobDefinition.ps1 @@ -16,20 +16,18 @@ <# .Synopsis -Updates properties for a Job Definition resource. +Update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. .Description -Updates properties for a Job Definition resource. +Update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. .Example Update-AzStorageMoverJobDefinition -Name myJob -ProjectName myProject -ResourceGroupName myResourceGroup -StorageMoverName myStorageMover -Description "Update Description" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition .Notes COMPLEX PARAMETER PROPERTIES @@ -46,73 +44,102 @@ INPUTOBJECT : Identity Parameter [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. -JOBDEFINITION : The Job Definition resource. - [AgentName ]: Name of the Agent to assign for new Job Runs of this Job Definition. - [CopyMode ]: Strategy to use for copy. - [Description ]: A description for the Job Definition. +PROJECTINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemoverjobdefinition #> function Update-AzStorageMoverJobDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityProjectExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('JobDefinitionName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Job Definition resource. ${Name}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Project resource. ${ProjectName}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${StorageMoverName}, - [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters] - # The Job Definition resource. - # To construct, see NOTES section for JOBDEFINITION properties and create a hash table. - ${JobDefinition}, + [Parameter(ParameterSetName='UpdateViaIdentityProjectExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${ProjectInputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # Name of the Agent to assign for new Job Runs of this Job Definition. @@ -120,19 +147,35 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode])] + [Parameter(ParameterSetName='UpdateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode] + [System.String] # Strategy to use for copy. ${CopyMode}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityProjectExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # A description for the Job Definition. ${Description}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -189,6 +232,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -208,14 +260,14 @@ begin { } $mapping = @{ - Update = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_Update'; UpdateExpanded = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_UpdateExpanded'; - UpdateViaIdentity = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_UpdateViaIdentityExpanded'; + UpdateViaIdentityProjectExpanded = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_UpdateViaIdentityProjectExpanded'; + UpdateViaIdentityStorageMoverExpanded = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_UpdateViaIdentityStorageMoverExpanded'; + UpdateViaJsonFilePath = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StorageMover.private\Update-AzStorageMoverJobDefinition_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -229,6 +281,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverMultiCloudConnectorEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverMultiCloudConnectorEndpoint.ps1 index 96c5403e5a2b..7f038bbb7266 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverMultiCloudConnectorEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverMultiCloudConnectorEndpoint.ps1 @@ -27,13 +27,13 @@ Update-AzStorageMoverMultiCloudConnectorEndpoint -Name "my-mc-endpoint" -Resourc .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -47,7 +47,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemovermulticloudconnectorendpoint #> function Update-AzStorageMoverMultiCloudConnectorEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -145,6 +145,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -167,9 +176,7 @@ begin { UpdateExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverMultiCloudConnectorEndpoint'; UpdateViaIdentityExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverMultiCloudConnectorEndpoint'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -183,6 +190,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverNfsEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverNfsEndpoint.ps1 index 2b1607343b7b..a8e009a37deb 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverNfsEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverNfsEndpoint.ps1 @@ -27,13 +27,13 @@ Update-AzStorageMoverNfsEndpoint -Name myEndpoint -ResourceGroupName myResourceG .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -47,7 +47,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemovernfsendpoint #> function Update-AzStorageMoverNfsEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -145,6 +145,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -167,9 +176,7 @@ begin { UpdateExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverNfsEndpoint'; UpdateViaIdentityExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverNfsEndpoint'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -183,6 +190,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverProject.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverProject.ps1 index 46084f3a5d69..6227e29563b1 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverProject.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverProject.ps1 @@ -16,20 +16,18 @@ <# .Synopsis -Updates properties for a Project resource. +Update properties for a Project resource. Properties not specified in the request body will be unchanged. .Description -Updates properties for a Project resource. +Update properties for a Project resource. Properties not specified in the request body will be unchanged. .Example Update-AzStorageMoverProject -ResourceGroupName myResourceGroup -StorageMoverName myStorageMover -Name myProject -Description "Update Description" -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject .Notes COMPLEX PARAMETER PROPERTIES @@ -46,69 +44,91 @@ INPUTOBJECT : Identity Parameter [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. -PROJECT : The Project resource. - [Description ]: A description for the Project. +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemoverproject #> function Update-AzStorageMoverProject { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('ProjectName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Project resource. ${Name}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${StorageMoverName}, - [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters] - # The Project resource. - # To construct, see NOTES section for PROJECT properties and create a hash table. - ${Project}, + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] [System.String] # A description for the Project. ${Description}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -165,6 +185,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -184,14 +213,13 @@ begin { } $mapping = @{ - Update = 'Az.StorageMover.private\Update-AzStorageMoverProject_Update'; UpdateExpanded = 'Az.StorageMover.private\Update-AzStorageMoverProject_UpdateExpanded'; - UpdateViaIdentity = 'Az.StorageMover.private\Update-AzStorageMoverProject_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StorageMover.private\Update-AzStorageMoverProject_UpdateViaIdentityExpanded'; + UpdateViaIdentityStorageMoverExpanded = 'Az.StorageMover.private\Update-AzStorageMoverProject_UpdateViaIdentityStorageMoverExpanded'; + UpdateViaJsonFilePath = 'Az.StorageMover.private\Update-AzStorageMoverProject_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StorageMover.private\Update-AzStorageMoverProject_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -205,6 +233,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverSmbEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverSmbEndpoint.ps1 index 29b581fa7a62..5aa90d60a5a0 100644 --- a/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverSmbEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/exports/Update-AzStorageMoverSmbEndpoint.ps1 @@ -29,13 +29,13 @@ Get-AzStorageMoverEndpoint -ResourceGroupName "myresourcegroup" -StorageMoverNam .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [AgentName ]: The name of the Agent resource. [EndpointName ]: The name of the Endpoint resource. [Id ]: Resource identity path @@ -49,7 +49,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemoversmbendpoint #> function Update-AzStorageMoverSmbEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -161,6 +161,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() @@ -183,9 +192,7 @@ begin { UpdateExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverSmbEndpoint'; UpdateViaIdentityExpanded = 'Az.StorageMover.custom\Update-AzStorageMoverSmbEndpoint'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -199,6 +206,9 @@ begin { [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) diff --git a/generated/StorageMover/StorageMover.Autorest/generate-info.json b/generated/StorageMover/StorageMover.Autorest/generate-info.json index 90ff8eba63e4..1c772a0a6c00 100644 --- a/generated/StorageMover/StorageMover.Autorest/generate-info.json +++ b/generated/StorageMover/StorageMover.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "ac688c3d-c559-46b1-b104-1c05b303230c" + "generate_Id": "bd332996-d77d-4b77-963b-50e01c8786c6" } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/Module.cs b/generated/StorageMover/StorageMover.Autorest/generated/Module.cs index c3705f21823f..e53da13346aa 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/Module.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/Module.cs @@ -28,12 +28,20 @@ public partial class Module public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler(); + private static bool _init = false; + + private static readonly global::System.Object _initLock = new global::System.Object(); + + private static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module _instance; + /// the ISendAsync pipeline instance private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline _pipeline; /// the ISendAsync pipeline instance (when proxy is enabled) private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline _pipelineWithProxy; + private static readonly global::System.Object _singletonLock = new global::System.Object(); + public bool _useProxy = false; public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy(); @@ -56,11 +64,8 @@ public partial class Module /// The delegate to get the telemetry info. public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } - /// Backing field for property. - private static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module _instance; - /// the singleton of this module class - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module()); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } } /// The Name of this module public string Name => @"Az.StorageMover"; @@ -125,9 +130,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Crea /// Initialization steps performed after the module is loaded. public void Init() { - OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); - OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); - CustomInit(); + if (_init == false) + { + lock (_initLock) { + if (_init == false) { + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); + CustomInit(); + _init = true; + } + } + } } /// Creates the module instance. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Agent.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Agent.PowerShell.cs new file mode 100644 index 000000000000..b1e1cca75db8 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Agent.PowerShell.cs @@ -0,0 +1,380 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The Agent resource. + [System.ComponentModel.TypeConverter(typeof(AgentTypeConverter))] + public partial class Agent + { + + /// + /// 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 Agent(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AgentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).AgentStatus = (string) content.GetValueForProperty("AgentStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).AgentStatus, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("UploadLimitSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentPropertiesErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ArcResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ArcResourceId = (string) content.GetValueForProperty("ArcResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ArcResourceId, global::System.Convert.ToString); + } + if (content.Contains("ArcVMUuid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ArcVMUuid = (string) content.GetValueForProperty("ArcVMUuid",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ArcVMUuid, global::System.Convert.ToString); + } + if (content.Contains("LastStatusUpdate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LocalIPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).LocalIPAddress = (string) content.GetValueForProperty("LocalIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).LocalIPAddress, global::System.Convert.ToString); + } + if (content.Contains("MemoryInMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).MemoryInMb = (long?) content.GetValueForProperty("MemoryInMb",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).MemoryInMb, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("NumberOfCores")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).NumberOfCores = (long?) content.GetValueForProperty("NumberOfCores",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).NumberOfCores, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("UptimeInSeconds")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).UptimeInSeconds = (long?) content.GetValueForProperty("UptimeInSeconds",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).UptimeInSeconds, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).UploadLimitScheduleWeeklyRecurrence = (System.Collections.Generic.List) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); + } + if (content.Contains("ErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ErrorDetailMessage, 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 Agent(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AgentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).AgentStatus = (string) content.GetValueForProperty("AgentStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).AgentStatus, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("UploadLimitSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentPropertiesErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ArcResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ArcResourceId = (string) content.GetValueForProperty("ArcResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ArcResourceId, global::System.Convert.ToString); + } + if (content.Contains("ArcVMUuid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ArcVMUuid = (string) content.GetValueForProperty("ArcVMUuid",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ArcVMUuid, global::System.Convert.ToString); + } + if (content.Contains("LastStatusUpdate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LocalIPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).LocalIPAddress = (string) content.GetValueForProperty("LocalIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).LocalIPAddress, global::System.Convert.ToString); + } + if (content.Contains("MemoryInMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).MemoryInMb = (long?) content.GetValueForProperty("MemoryInMb",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).MemoryInMb, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("NumberOfCores")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).NumberOfCores = (long?) content.GetValueForProperty("NumberOfCores",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).NumberOfCores, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("UptimeInSeconds")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).UptimeInSeconds = (long?) content.GetValueForProperty("UptimeInSeconds",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).UptimeInSeconds, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).UploadLimitScheduleWeeklyRecurrence = (System.Collections.Generic.List) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); + } + if (content.Contains("ErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal)this).ErrorDetailMessage, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Agent(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Agent(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Agent resource. + [System.ComponentModel.TypeConverter(typeof(AgentTypeConverter))] + public partial interface IAgent + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Agent.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Agent.TypeConverter.cs similarity index 98% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Agent.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/Agent.TypeConverter.cs index 2a081b8f1edf..c292c0e959e3 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Agent.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Agent.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Agent.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Agent.cs new file mode 100644 index 000000000000..bab4bacf0063 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Agent.cs @@ -0,0 +1,450 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The Agent resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class Agent : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProxyResource(); + + /// The Agent status. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string AgentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).AgentStatus; } + + /// The fully qualified resource ID of the Hybrid Compute resource for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ArcResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).ArcResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).ArcResourceId = value ?? null; } + + /// The VM UUID of the Hybrid Compute resource for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ArcVMUuid { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).ArcVMUuid; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).ArcVMUuid = value ?? null; } + + /// A description for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).Description = value ?? null; } + + /// Error code reported by Agent + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).ErrorDetailCode; } + + /// Expanded description of reported error code + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).ErrorDetailMessage; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Id; } + + /// The last updated time of the Agent status. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public global::System.DateTime? LastStatusUpdate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).LastStatusUpdate; } + + /// Local IP address reported by the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string LocalIPAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).LocalIPAddress; } + + /// Available memory reported by the Agent, in MB. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public long? MemoryInMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).MemoryInMb; } + + /// Internal Acessors for AgentStatus + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal.AgentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).AgentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).AgentStatus = value ?? null; } + + /// Internal Acessors for ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal.ErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).ErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).ErrorDetail = value ?? null /* model class */; } + + /// Internal Acessors for ErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal.ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).ErrorDetailCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).ErrorDetailCode = value ?? null; } + + /// Internal Acessors for ErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal.ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).ErrorDetailMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).ErrorDetailMessage = value ?? null; } + + /// Internal Acessors for LastStatusUpdate + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal.LastStatusUpdate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).LastStatusUpdate; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).LastStatusUpdate = value ?? default(global::System.DateTime); } + + /// Internal Acessors for LocalIPAddress + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal.LocalIPAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).LocalIPAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).LocalIPAddress = value ?? null; } + + /// Internal Acessors for MemoryInMb + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal.MemoryInMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).MemoryInMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).MemoryInMb = value ?? default(long); } + + /// Internal Acessors for NumberOfCores + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal.NumberOfCores { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).NumberOfCore; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).NumberOfCore = value ?? default(long); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for TimeZone + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal.TimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).TimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).TimeZone = value ?? null; } + + /// Internal Acessors for UploadLimitSchedule + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal.UploadLimitSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).UploadLimitSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).UploadLimitSchedule = value ?? null /* model class */; } + + /// Internal Acessors for UptimeInSeconds + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal.UptimeInSeconds { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).UptimeInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).UptimeInSecond = value ?? default(long); } + + /// Internal Acessors for Version + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentInternal.Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).AgentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).AgentVersion = value ?? null; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Name; } + + /// Available compute cores reported by the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public long? NumberOfCores { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).NumberOfCore; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentProperties _property; + + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentProperties()); set => this._property = value; } + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } + + /// The agent's local time zone represented in Windows format. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string TimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).TimeZone; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Type; } + + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public System.Collections.Generic.List UploadLimitScheduleWeeklyRecurrence { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).UploadLimitScheduleWeeklyRecurrence; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).UploadLimitScheduleWeeklyRecurrence = value ?? null /* arrayOf */; } + + /// Uptime of the Agent in seconds. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public long? UptimeInSeconds { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).UptimeInSecond; } + + /// The Agent version. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)Property).AgentVersion; } + + /// Creates an new instance. + public Agent() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// The Agent resource. + public partial interface IAgent : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource + { + /// The Agent status. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Agent status.", + SerializedName = @"agentStatus", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Registering", "Offline", "Online", "Executing", "RequiresAttention", "Unregistering")] + string AgentStatus { get; } + /// The fully qualified resource ID of the Hybrid Compute resource for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The fully qualified resource ID of the Hybrid Compute resource for the Agent.", + SerializedName = @"arcResourceId", + PossibleTypes = new [] { typeof(string) })] + string ArcResourceId { get; set; } + /// The VM UUID of the Hybrid Compute resource for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The VM UUID of the Hybrid Compute resource for the Agent.", + SerializedName = @"arcVmUuid", + PossibleTypes = new [] { typeof(string) })] + string ArcVMUuid { get; set; } + /// A description for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Agent.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Error code reported by Agent + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Error code reported by Agent", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailCode { get; } + /// Expanded description of reported error code + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Expanded description of reported error code", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailMessage { get; } + /// The last updated time of the Agent status. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The last updated time of the Agent status.", + SerializedName = @"lastStatusUpdate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastStatusUpdate { get; } + /// Local IP address reported by the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Local IP address reported by the Agent.", + SerializedName = @"localIPAddress", + PossibleTypes = new [] { typeof(string) })] + string LocalIPAddress { get; } + /// Available memory reported by the Agent, in MB. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Available memory reported by the Agent, in MB.", + SerializedName = @"memoryInMB", + PossibleTypes = new [] { typeof(long) })] + long? MemoryInMb { get; } + /// Available compute cores reported by the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Available compute cores reported by the Agent.", + SerializedName = @"numberOfCores", + PossibleTypes = new [] { typeof(long) })] + long? NumberOfCores { get; } + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The provisioning state of this resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; } + /// The agent's local time zone represented in Windows format. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The agent's local time zone represented in Windows format.", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; } + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The set of weekly repeating recurrences of the WAN-link upload limit schedule.", + SerializedName = @"weeklyRecurrences", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence) })] + System.Collections.Generic.List UploadLimitScheduleWeeklyRecurrence { get; set; } + /// Uptime of the Agent in seconds. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Uptime of the Agent in seconds.", + SerializedName = @"uptimeInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? UptimeInSeconds { get; } + /// The Agent version. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Agent version.", + SerializedName = @"agentVersion", + PossibleTypes = new [] { typeof(string) })] + string Version { get; } + + } + /// The Agent resource. + internal partial interface IAgentInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResourceInternal + { + /// The Agent status. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Registering", "Offline", "Online", "Executing", "RequiresAttention", "Unregistering")] + string AgentStatus { get; set; } + /// The fully qualified resource ID of the Hybrid Compute resource for the Agent. + string ArcResourceId { get; set; } + /// The VM UUID of the Hybrid Compute resource for the Agent. + string ArcVMUuid { get; set; } + /// A description for the Agent. + string Description { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails ErrorDetail { get; set; } + /// Error code reported by Agent + string ErrorDetailCode { get; set; } + /// Expanded description of reported error code + string ErrorDetailMessage { get; set; } + /// The last updated time of the Agent status. + global::System.DateTime? LastStatusUpdate { get; set; } + /// Local IP address reported by the Agent. + string LocalIPAddress { get; set; } + /// Available memory reported by the Agent, in MB. + long? MemoryInMb { get; set; } + /// Available compute cores reported by the Agent. + long? NumberOfCores { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentProperties Property { get; set; } + /// The provisioning state of this resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; set; } + /// The agent's local time zone represented in Windows format. + string TimeZone { get; set; } + /// + /// The WAN-link upload limit schedule that applies to any Job Run the agent executes. Data plane operations (migrating files) + /// are affected. Control plane operations ensure seamless migration functionality and are not limited by this schedule. The + /// schedule is interpreted with the agent's local time. + /// + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule UploadLimitSchedule { get; set; } + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + System.Collections.Generic.List UploadLimitScheduleWeeklyRecurrence { get; set; } + /// Uptime of the Agent in seconds. + long? UptimeInSeconds { get; set; } + /// The Agent version. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Agent.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Agent.json.cs similarity index 91% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Agent.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/Agent.json.cs index 54a9cee32bb4..877a68834e71 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Agent.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Agent.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -65,19 +65,17 @@ internal Agent(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.Json { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentProperties.FromJson(__jsonProperties) : Property;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new Agent(json) : null; } @@ -101,7 +99,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentList.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentList.PowerShell.cs similarity index 78% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentList.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentList.PowerShell.cs index 42536d304644..262a47b1bb68 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentList.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AgentList partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal AgentList(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentListInternal)this).NextLink, 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. @@ -103,37 +103,37 @@ internal AgentList(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AgentList(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AgentList(content); } @@ -143,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentList.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentList.TypeConverter.cs similarity index 98% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentList.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentList.TypeConverter.cs index 35bcf0db9a21..12406cc4f021 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentList.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentList.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentList.cs new file mode 100644 index 000000000000..1e02becd08bf --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentList.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// List of Agents. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class AgentList : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentList, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentListInternal + { + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentListInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The Agent items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public AgentList() + { + + } + } + /// List of Agents. + public partial interface IAgentList : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Agent items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Agent items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent) })] + System.Collections.Generic.List Value { get; } + + } + /// List of Agents. + internal partial interface IAgentListInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The Agent items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentList.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentList.json.cs similarity index 90% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentList.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentList.json.cs index ea1ad4372965..b06b2e881009 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentList.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AgentList(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json. { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Agent.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Agent.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentList FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentList FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new AgentList(json) : null; } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentProperties.PowerShell.cs new file mode 100644 index 000000000000..9db79973ed50 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentProperties.PowerShell.cs @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(AgentPropertiesTypeConverter))] + public partial class AgentProperties + { + + /// + /// 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 AgentProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("UploadLimitSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentPropertiesErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("AgentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).AgentVersion, global::System.Convert.ToString); + } + if (content.Contains("ArcResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ArcResourceId = (string) content.GetValueForProperty("ArcResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ArcResourceId, global::System.Convert.ToString); + } + if (content.Contains("ArcVMUuid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ArcVMUuid = (string) content.GetValueForProperty("ArcVMUuid",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ArcVMUuid, global::System.Convert.ToString); + } + if (content.Contains("AgentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).AgentStatus = (string) content.GetValueForProperty("AgentStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).AgentStatus, global::System.Convert.ToString); + } + if (content.Contains("LastStatusUpdate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LocalIPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).LocalIPAddress = (string) content.GetValueForProperty("LocalIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).LocalIPAddress, global::System.Convert.ToString); + } + if (content.Contains("MemoryInMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).MemoryInMb = (long?) content.GetValueForProperty("MemoryInMb",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).MemoryInMb, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("NumberOfCore")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).NumberOfCore = (long?) content.GetValueForProperty("NumberOfCore",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).NumberOfCore, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("UptimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).UptimeInSecond = (long?) content.GetValueForProperty("UptimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).UptimeInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence = (System.Collections.Generic.List) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); + } + if (content.Contains("ErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ErrorDetailMessage, 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 AgentProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("UploadLimitSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentPropertiesErrorDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("AgentVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).AgentVersion, global::System.Convert.ToString); + } + if (content.Contains("ArcResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ArcResourceId = (string) content.GetValueForProperty("ArcResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ArcResourceId, global::System.Convert.ToString); + } + if (content.Contains("ArcVMUuid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ArcVMUuid = (string) content.GetValueForProperty("ArcVMUuid",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ArcVMUuid, global::System.Convert.ToString); + } + if (content.Contains("AgentStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).AgentStatus = (string) content.GetValueForProperty("AgentStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).AgentStatus, global::System.Convert.ToString); + } + if (content.Contains("LastStatusUpdate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LocalIPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).LocalIPAddress = (string) content.GetValueForProperty("LocalIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).LocalIPAddress, global::System.Convert.ToString); + } + if (content.Contains("MemoryInMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).MemoryInMb = (long?) content.GetValueForProperty("MemoryInMb",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).MemoryInMb, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("NumberOfCore")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).NumberOfCore = (long?) content.GetValueForProperty("NumberOfCore",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).NumberOfCore, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("UptimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).UptimeInSecond = (long?) content.GetValueForProperty("UptimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).UptimeInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence = (System.Collections.Generic.List) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); + } + if (content.Contains("ErrorDetailCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ErrorDetailCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorDetailMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal)this).ErrorDetailMessage, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AgentProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AgentProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); + } + } + [System.ComponentModel.TypeConverter(typeof(AgentPropertiesTypeConverter))] + public partial interface IAgentProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentProperties.TypeConverter.cs index b2fc1af80d29..7f4c004b7076 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentProperties.cs new file mode 100644 index 000000000000..fd41d2a1e069 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentProperties.cs @@ -0,0 +1,391 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class AgentProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal + { + + /// Backing field for property. + private string _agentStatus; + + /// The Agent status. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string AgentStatus { get => this._agentStatus; } + + /// Backing field for property. + private string _agentVersion; + + /// The Agent version. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string AgentVersion { get => this._agentVersion; } + + /// Backing field for property. + private string _arcResourceId; + + /// The fully qualified resource ID of the Hybrid Compute resource for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string ArcResourceId { get => this._arcResourceId; set => this._arcResourceId = value; } + + /// Backing field for property. + private string _arcVMUuid; + + /// The VM UUID of the Hybrid Compute resource for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string ArcVMUuid { get => this._arcVMUuid; set => this._arcVMUuid = value; } + + /// Backing field for property. + private string _description; + + /// A description for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails _errorDetail; + + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentPropertiesErrorDetails()); } + + /// Error code reported by Agent + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetailsInternal)ErrorDetail).Code; } + + /// Expanded description of reported error code + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetailsInternal)ErrorDetail).Message; } + + /// Backing field for property. + private global::System.DateTime? _lastStatusUpdate; + + /// The last updated time of the Agent status. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public global::System.DateTime? LastStatusUpdate { get => this._lastStatusUpdate; } + + /// Backing field for property. + private string _localIPAddress; + + /// Local IP address reported by the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string LocalIPAddress { get => this._localIPAddress; } + + /// Backing field for property. + private long? _memoryInMb; + + /// Available memory reported by the Agent, in MB. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public long? MemoryInMb { get => this._memoryInMb; } + + /// Internal Acessors for AgentStatus + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal.AgentStatus { get => this._agentStatus; set { {_agentStatus = value;} } } + + /// Internal Acessors for AgentVersion + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal.AgentVersion { get => this._agentVersion; set { {_agentVersion = value;} } } + + /// Internal Acessors for ErrorDetail + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal.ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentPropertiesErrorDetails()); set { {_errorDetail = value;} } } + + /// Internal Acessors for ErrorDetailCode + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal.ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetailsInternal)ErrorDetail).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetailsInternal)ErrorDetail).Code = value ?? null; } + + /// Internal Acessors for ErrorDetailMessage + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal.ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetailsInternal)ErrorDetail).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetailsInternal)ErrorDetail).Message = value ?? null; } + + /// Internal Acessors for LastStatusUpdate + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal.LastStatusUpdate { get => this._lastStatusUpdate; set { {_lastStatusUpdate = value;} } } + + /// Internal Acessors for LocalIPAddress + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal.LocalIPAddress { get => this._localIPAddress; set { {_localIPAddress = value;} } } + + /// Internal Acessors for MemoryInMb + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal.MemoryInMb { get => this._memoryInMb; set { {_memoryInMb = value;} } } + + /// Internal Acessors for NumberOfCore + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal.NumberOfCore { get => this._numberOfCore; set { {_numberOfCore = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for TimeZone + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal.TimeZone { get => this._timeZone; set { {_timeZone = value;} } } + + /// Internal Acessors for UploadLimitSchedule + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal.UploadLimitSchedule { get => (this._uploadLimitSchedule = this._uploadLimitSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitSchedule()); set { {_uploadLimitSchedule = value;} } } + + /// Internal Acessors for UptimeInSecond + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesInternal.UptimeInSecond { get => this._uptimeInSecond; set { {_uptimeInSecond = value;} } } + + /// Backing field for property. + private long? _numberOfCore; + + /// Available compute cores reported by the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public long? NumberOfCore { get => this._numberOfCore; } + + /// Backing field for property. + private string _provisioningState; + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _timeZone; + + /// The agent's local time zone represented in Windows format. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string TimeZone { get => this._timeZone; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule _uploadLimitSchedule; + + /// + /// The WAN-link upload limit schedule that applies to any Job Run the agent executes. Data plane operations (migrating files) + /// are affected. Control plane operations ensure seamless migration functionality and are not limited by this schedule. The + /// schedule is interpreted with the agent's local time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule UploadLimitSchedule { get => (this._uploadLimitSchedule = this._uploadLimitSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitSchedule()); set => this._uploadLimitSchedule = value; } + + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public System.Collections.Generic.List UploadLimitScheduleWeeklyRecurrence { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitScheduleInternal)UploadLimitSchedule).WeeklyRecurrence; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitScheduleInternal)UploadLimitSchedule).WeeklyRecurrence = value ?? null /* arrayOf */; } + + /// Backing field for property. + private long? _uptimeInSecond; + + /// Uptime of the Agent in seconds. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public long? UptimeInSecond { get => this._uptimeInSecond; } + + /// Creates an new instance. + public AgentProperties() + { + + } + } + public partial interface IAgentProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// The Agent status. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Agent status.", + SerializedName = @"agentStatus", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Registering", "Offline", "Online", "Executing", "RequiresAttention", "Unregistering")] + string AgentStatus { get; } + /// The Agent version. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Agent version.", + SerializedName = @"agentVersion", + PossibleTypes = new [] { typeof(string) })] + string AgentVersion { get; } + /// The fully qualified resource ID of the Hybrid Compute resource for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The fully qualified resource ID of the Hybrid Compute resource for the Agent.", + SerializedName = @"arcResourceId", + PossibleTypes = new [] { typeof(string) })] + string ArcResourceId { get; set; } + /// The VM UUID of the Hybrid Compute resource for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The VM UUID of the Hybrid Compute resource for the Agent.", + SerializedName = @"arcVmUuid", + PossibleTypes = new [] { typeof(string) })] + string ArcVMUuid { get; set; } + /// A description for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Agent.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Error code reported by Agent + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Error code reported by Agent", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailCode { get; } + /// Expanded description of reported error code + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Expanded description of reported error code", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ErrorDetailMessage { get; } + /// The last updated time of the Agent status. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The last updated time of the Agent status.", + SerializedName = @"lastStatusUpdate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastStatusUpdate { get; } + /// Local IP address reported by the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Local IP address reported by the Agent.", + SerializedName = @"localIPAddress", + PossibleTypes = new [] { typeof(string) })] + string LocalIPAddress { get; } + /// Available memory reported by the Agent, in MB. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Available memory reported by the Agent, in MB.", + SerializedName = @"memoryInMB", + PossibleTypes = new [] { typeof(long) })] + long? MemoryInMb { get; } + /// Available compute cores reported by the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Available compute cores reported by the Agent.", + SerializedName = @"numberOfCores", + PossibleTypes = new [] { typeof(long) })] + long? NumberOfCore { get; } + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The provisioning state of this resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; } + /// The agent's local time zone represented in Windows format. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The agent's local time zone represented in Windows format.", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; } + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The set of weekly repeating recurrences of the WAN-link upload limit schedule.", + SerializedName = @"weeklyRecurrences", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence) })] + System.Collections.Generic.List UploadLimitScheduleWeeklyRecurrence { get; set; } + /// Uptime of the Agent in seconds. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Uptime of the Agent in seconds.", + SerializedName = @"uptimeInSeconds", + PossibleTypes = new [] { typeof(long) })] + long? UptimeInSecond { get; } + + } + internal partial interface IAgentPropertiesInternal + + { + /// The Agent status. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Registering", "Offline", "Online", "Executing", "RequiresAttention", "Unregistering")] + string AgentStatus { get; set; } + /// The Agent version. + string AgentVersion { get; set; } + /// The fully qualified resource ID of the Hybrid Compute resource for the Agent. + string ArcResourceId { get; set; } + /// The VM UUID of the Hybrid Compute resource for the Agent. + string ArcVMUuid { get; set; } + /// A description for the Agent. + string Description { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails ErrorDetail { get; set; } + /// Error code reported by Agent + string ErrorDetailCode { get; set; } + /// Expanded description of reported error code + string ErrorDetailMessage { get; set; } + /// The last updated time of the Agent status. + global::System.DateTime? LastStatusUpdate { get; set; } + /// Local IP address reported by the Agent. + string LocalIPAddress { get; set; } + /// Available memory reported by the Agent, in MB. + long? MemoryInMb { get; set; } + /// Available compute cores reported by the Agent. + long? NumberOfCore { get; set; } + /// The provisioning state of this resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; set; } + /// The agent's local time zone represented in Windows format. + string TimeZone { get; set; } + /// + /// The WAN-link upload limit schedule that applies to any Job Run the agent executes. Data plane operations (migrating files) + /// are affected. Control plane operations ensure seamless migration functionality and are not limited by this schedule. The + /// schedule is interpreted with the agent's local time. + /// + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule UploadLimitSchedule { get; set; } + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + System.Collections.Generic.List UploadLimitScheduleWeeklyRecurrence { get; set; } + /// Uptime of the Agent in seconds. + long? UptimeInSecond { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentProperties.json.cs similarity index 83% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentProperties.json.cs index 5bdbd01f4b28..d06045de653f 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -64,31 +64,31 @@ internal AgentProperties(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime { return; } - {_uploadLimitSchedule = If( json?.PropertyT("uploadLimitSchedule"), out var __jsonUploadLimitSchedule) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitSchedule.FromJson(__jsonUploadLimitSchedule) : UploadLimitSchedule;} - {_errorDetail = If( json?.PropertyT("errorDetails"), out var __jsonErrorDetails) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentPropertiesErrorDetails.FromJson(__jsonErrorDetails) : ErrorDetail;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_agentVersion = If( json?.PropertyT("agentVersion"), out var __jsonAgentVersion) ? (string)__jsonAgentVersion : (string)AgentVersion;} - {_arcResourceId = If( json?.PropertyT("arcResourceId"), out var __jsonArcResourceId) ? (string)__jsonArcResourceId : (string)ArcResourceId;} - {_arcVMUuid = If( json?.PropertyT("arcVmUuid"), out var __jsonArcVMUuid) ? (string)__jsonArcVMUuid : (string)ArcVMUuid;} - {_agentStatus = If( json?.PropertyT("agentStatus"), out var __jsonAgentStatus) ? (string)__jsonAgentStatus : (string)AgentStatus;} - {_lastStatusUpdate = If( json?.PropertyT("lastStatusUpdate"), out var __jsonLastStatusUpdate) ? global::System.DateTime.TryParse((string)__jsonLastStatusUpdate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastStatusUpdateValue) ? __jsonLastStatusUpdateValue : LastStatusUpdate : LastStatusUpdate;} - {_localIPAddress = If( json?.PropertyT("localIPAddress"), out var __jsonLocalIPAddress) ? (string)__jsonLocalIPAddress : (string)LocalIPAddress;} - {_memoryInMb = If( json?.PropertyT("memoryInMB"), out var __jsonMemoryInMb) ? (long?)__jsonMemoryInMb : MemoryInMb;} - {_numberOfCore = If( json?.PropertyT("numberOfCores"), out var __jsonNumberOfCores) ? (long?)__jsonNumberOfCores : NumberOfCore;} - {_uptimeInSecond = If( json?.PropertyT("uptimeInSeconds"), out var __jsonUptimeInSeconds) ? (long?)__jsonUptimeInSeconds : UptimeInSecond;} - {_timeZone = If( json?.PropertyT("timeZone"), out var __jsonTimeZone) ? (string)__jsonTimeZone : (string)TimeZone;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_uploadLimitSchedule = If( json?.PropertyT("uploadLimitSchedule"), out var __jsonUploadLimitSchedule) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitSchedule.FromJson(__jsonUploadLimitSchedule) : _uploadLimitSchedule;} + {_errorDetail = If( json?.PropertyT("errorDetails"), out var __jsonErrorDetails) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentPropertiesErrorDetails.FromJson(__jsonErrorDetails) : _errorDetail;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_agentVersion = If( json?.PropertyT("agentVersion"), out var __jsonAgentVersion) ? (string)__jsonAgentVersion : (string)_agentVersion;} + {_arcResourceId = If( json?.PropertyT("arcResourceId"), out var __jsonArcResourceId) ? (string)__jsonArcResourceId : (string)_arcResourceId;} + {_arcVMUuid = If( json?.PropertyT("arcVmUuid"), out var __jsonArcVMUuid) ? (string)__jsonArcVMUuid : (string)_arcVMUuid;} + {_agentStatus = If( json?.PropertyT("agentStatus"), out var __jsonAgentStatus) ? (string)__jsonAgentStatus : (string)_agentStatus;} + {_lastStatusUpdate = If( json?.PropertyT("lastStatusUpdate"), out var __jsonLastStatusUpdate) ? global::System.DateTime.TryParse((string)__jsonLastStatusUpdate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastStatusUpdateValue) ? __jsonLastStatusUpdateValue : _lastStatusUpdate : _lastStatusUpdate;} + {_localIPAddress = If( json?.PropertyT("localIPAddress"), out var __jsonLocalIPAddress) ? (string)__jsonLocalIPAddress : (string)_localIPAddress;} + {_memoryInMb = If( json?.PropertyT("memoryInMB"), out var __jsonMemoryInMb) ? (long?)__jsonMemoryInMb : _memoryInMb;} + {_numberOfCore = If( json?.PropertyT("numberOfCores"), out var __jsonNumberOfCores) ? (long?)__jsonNumberOfCores : _numberOfCore;} + {_uptimeInSecond = If( json?.PropertyT("uptimeInSeconds"), out var __jsonUptimeInSeconds) ? (long?)__jsonUptimeInSeconds : _uptimeInSecond;} + {_timeZone = If( json?.PropertyT("timeZone"), out var __jsonTimeZone) ? (string)__jsonTimeZone : (string)_timeZone;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new AgentProperties(json) : null; } @@ -113,46 +113,52 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ return container; } AddIf( null != this._uploadLimitSchedule ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._uploadLimitSchedule.ToJson(null,serializationMode) : null, "uploadLimitSchedule" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._errorDetail ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._errorDetail.ToJson(null,serializationMode) : null, "errorDetails" ,container.Add ); } AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._agentVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._agentVersion.ToString()) : null, "agentVersion" ,container.Add ); } - AddIf( null != (((object)this._arcResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._arcResourceId.ToString()) : null, "arcResourceId" ,container.Add ); - AddIf( null != (((object)this._arcVMUuid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._arcVMUuid.ToString()) : null, "arcVmUuid" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._arcResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._arcResourceId.ToString()) : null, "arcResourceId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._arcVMUuid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._arcVMUuid.ToString()) : null, "arcVmUuid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._agentStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._agentStatus.ToString()) : null, "agentStatus" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._lastStatusUpdate ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._lastStatusUpdate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastStatusUpdate" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._localIPAddress)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._localIPAddress.ToString()) : null, "localIPAddress" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._memoryInMb ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNumber((long)this._memoryInMb) : null, "memoryInMB" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._numberOfCore ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNumber((long)this._numberOfCore) : null, "numberOfCores" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._uptimeInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNumber((long)this._uptimeInSecond) : null, "uptimeInSeconds" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._timeZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._timeZone.ToString()) : null, "timeZone" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentPropertiesErrorDetails.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentPropertiesErrorDetails.PowerShell.cs similarity index 79% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentPropertiesErrorDetails.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentPropertiesErrorDetails.PowerShell.cs index 5b8c21d0ac02..6178aa379610 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentPropertiesErrorDetails.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentPropertiesErrorDetails.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -62,7 +62,7 @@ public partial class AgentPropertiesErrorDetails partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -77,17 +77,17 @@ internal AgentPropertiesErrorDetails(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetailsInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetailsInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetailsInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetailsInternal)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. @@ -102,39 +102,37 @@ internal AgentPropertiesErrorDetails(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetailsInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetailsInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetailsInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetailsInternal)this).Message, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AgentPropertiesErrorDetails(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AgentPropertiesErrorDetails(content); } @@ -144,7 +142,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentPropertiesErrorDetails.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentPropertiesErrorDetails.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentPropertiesErrorDetails.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentPropertiesErrorDetails.TypeConverter.cs index d5ed8d5ef976..6072460e3dd3 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentPropertiesErrorDetails.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentPropertiesErrorDetails.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentPropertiesErrorDetails.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentPropertiesErrorDetails.cs similarity index 89% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentPropertiesErrorDetails.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentPropertiesErrorDetails.cs index ed1773b7df3b..ebc5005ad885 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentPropertiesErrorDetails.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentPropertiesErrorDetails.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] public partial class AgentPropertiesErrorDetails : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetailsInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetailsInternal { /// Backing field for property. @@ -40,6 +40,9 @@ public partial interface IAgentPropertiesErrorDetails : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Error code reported by Agent", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -48,6 +51,9 @@ public partial interface IAgentPropertiesErrorDetails : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Expanded description of reported error code", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentPropertiesErrorDetails.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentPropertiesErrorDetails.json.cs similarity index 94% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentPropertiesErrorDetails.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentPropertiesErrorDetails.json.cs index 4c978f2dcf84..b327a9b99801 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentPropertiesErrorDetails.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentPropertiesErrorDetails.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -64,19 +64,19 @@ internal AgentPropertiesErrorDetails(Microsoft.Azure.PowerShell.Cmdlets.StorageM { return; } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentPropertiesErrorDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new AgentPropertiesErrorDetails(json) : null; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateParameters.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..4091f914b896 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateParameters.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The Agent resource. + [System.ComponentModel.TypeConverter(typeof(AgentUpdateParametersTypeConverter))] + public partial class AgentUpdateParameters + { + + /// + /// 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 AgentUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("UploadLimitSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).UploadLimitScheduleWeeklyRecurrence = (System.Collections.Generic.List) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AgentUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("UploadLimitSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).UploadLimitScheduleWeeklyRecurrence = (System.Collections.Generic.List) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AgentUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AgentUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Agent resource. + [System.ComponentModel.TypeConverter(typeof(AgentUpdateParametersTypeConverter))] + public partial interface IAgentUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateParameters.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateParameters.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateParameters.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateParameters.TypeConverter.cs index fa39601f936d..943908903300 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateParameters.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateParameters.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateParameters.cs new file mode 100644 index 000000000000..5b0a6da3da7e --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateParameters.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The Agent resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class AgentUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal + { + + /// A description for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)Property).Description = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentUpdateProperties()); set { {_property = value;} } } + + /// Internal Acessors for UploadLimitSchedule + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParametersInternal.UploadLimitSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)Property).UploadLimitSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)Property).UploadLimitSchedule = value ?? null /* model class */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateProperties _property; + + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentUpdateProperties()); set => this._property = value; } + + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public System.Collections.Generic.List UploadLimitScheduleWeeklyRecurrence { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)Property).UploadLimitScheduleWeeklyRecurrence; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)Property).UploadLimitScheduleWeeklyRecurrence = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public AgentUpdateParameters() + { + + } + } + /// The Agent resource. + public partial interface IAgentUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// A description for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Agent.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The set of weekly repeating recurrences of the WAN-link upload limit schedule.", + SerializedName = @"weeklyRecurrences", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence) })] + System.Collections.Generic.List UploadLimitScheduleWeeklyRecurrence { get; set; } + + } + /// The Agent resource. + internal partial interface IAgentUpdateParametersInternal + + { + /// A description for the Agent. + string Description { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateProperties Property { get; set; } + /// + /// The WAN-link upload limit schedule that applies to any Job Run the agent executes. Data plane operations (migrating files) + /// are affected. Control plane operations ensure seamless migration functionality and are not limited by this schedule. The + /// schedule is interpreted with the agent's local time. + /// + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule UploadLimitSchedule { get; set; } + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + System.Collections.Generic.List UploadLimitScheduleWeeklyRecurrence { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateParameters.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateParameters.json.cs similarity index 94% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateParameters.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateParameters.json.cs index c535361c95db..60fbb4c938f1 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateParameters.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -65,18 +65,18 @@ internal AgentUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.R { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentUpdateProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentUpdateProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new AgentUpdateParameters(json) : null; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..3dc6ebb00a55 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateProperties.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(AgentUpdatePropertiesTypeConverter))] + public partial class AgentUpdateProperties + { + + /// + /// 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 AgentUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("UploadLimitSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence = (System.Collections.Generic.List) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AgentUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("UploadLimitSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitScheduleTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence = (System.Collections.Generic.List) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AgentUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AgentUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); + } + } + [System.ComponentModel.TypeConverter(typeof(AgentUpdatePropertiesTypeConverter))] + public partial interface IAgentUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateProperties.TypeConverter.cs index fcade16b2c00..1c878d5630ae 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateProperties.cs new file mode 100644 index 000000000000..6727cb0bbc67 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateProperties.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class AgentUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal + { + + /// Backing field for property. + private string _description; + + /// A description for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Internal Acessors for UploadLimitSchedule + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdatePropertiesInternal.UploadLimitSchedule { get => (this._uploadLimitSchedule = this._uploadLimitSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitSchedule()); set { {_uploadLimitSchedule = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule _uploadLimitSchedule; + + /// + /// The WAN-link upload limit schedule that applies to any Job Run the agent executes. Data plane operations (migrating files) + /// are affected. Control plane operations ensure seamless migration functionality and are not limited by this schedule. The + /// schedule is interpreted with the agent's local time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule UploadLimitSchedule { get => (this._uploadLimitSchedule = this._uploadLimitSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitSchedule()); set => this._uploadLimitSchedule = value; } + + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public System.Collections.Generic.List UploadLimitScheduleWeeklyRecurrence { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitScheduleInternal)UploadLimitSchedule).WeeklyRecurrence; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitScheduleInternal)UploadLimitSchedule).WeeklyRecurrence = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public AgentUpdateProperties() + { + + } + } + public partial interface IAgentUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// A description for the Agent. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Agent.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The set of weekly repeating recurrences of the WAN-link upload limit schedule.", + SerializedName = @"weeklyRecurrences", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence) })] + System.Collections.Generic.List UploadLimitScheduleWeeklyRecurrence { get; set; } + + } + internal partial interface IAgentUpdatePropertiesInternal + + { + /// A description for the Agent. + string Description { get; set; } + /// + /// The WAN-link upload limit schedule that applies to any Job Run the agent executes. Data plane operations (migrating files) + /// are affected. Control plane operations ensure seamless migration functionality and are not limited by this schedule. The + /// schedule is interpreted with the agent's local time. + /// + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule UploadLimitSchedule { get; set; } + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + System.Collections.Generic.List UploadLimitScheduleWeeklyRecurrence { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateProperties.json.cs similarity index 93% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateProperties.json.cs index fb7abbe16e7b..91a0f262c289 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AgentUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -64,19 +64,19 @@ internal AgentUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.R { return; } - {_uploadLimitSchedule = If( json?.PropertyT("uploadLimitSchedule"), out var __jsonUploadLimitSchedule) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitSchedule.FromJson(__jsonUploadLimitSchedule) : UploadLimitSchedule;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_uploadLimitSchedule = If( json?.PropertyT("uploadLimitSchedule"), out var __jsonUploadLimitSchedule) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitSchedule.FromJson(__jsonUploadLimitSchedule) : _uploadLimitSchedule;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new AgentUpdateProperties(json) : null; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Any.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Any.PowerShell.cs index eafc56faea9a..dcc5b89d6868 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Any.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Any.PowerShell.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - /// Any object + /// Anything [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] public partial class Any { @@ -146,7 +146,7 @@ public override string ToString() return ToJsonString(); } } - /// Any object + /// Anything [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] public partial interface IAny diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Any.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Any.cs index 2c421fbd2588..04563232596e 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Any.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Any.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - /// Any object + /// Anything public partial class Any : Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAnyInternal @@ -19,13 +19,13 @@ public Any() } } - /// Any object + /// Anything public partial interface IAny : Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable { } - /// Any object + /// Anything internal partial interface IAnyInternal { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Any.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Any.json.cs index edfd8654bbb1..7168452f8a00 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Any.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Any.json.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - /// Any object + /// Anything public partial class Any { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Agent.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Agent.PowerShell.cs deleted file mode 100644 index 43b9ee54d515..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Agent.PowerShell.cs +++ /dev/null @@ -1,380 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The Agent resource. - [System.ComponentModel.TypeConverter(typeof(AgentTypeConverter))] - public partial class Agent - { - - /// - /// 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 Agent(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AgentStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).AgentStatus = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus?) content.GetValueForProperty("AgentStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).AgentStatus, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("UploadLimitSchedule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitScheduleTypeConverter.ConvertFrom); - } - if (content.Contains("ErrorDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentPropertiesErrorDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("Version")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).Version, global::System.Convert.ToString); - } - if (content.Contains("ArcResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ArcResourceId = (string) content.GetValueForProperty("ArcResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ArcResourceId, global::System.Convert.ToString); - } - if (content.Contains("ArcVMUuid")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ArcVMUuid = (string) content.GetValueForProperty("ArcVMUuid",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ArcVMUuid, global::System.Convert.ToString); - } - if (content.Contains("LastStatusUpdate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LocalIPAddress")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).LocalIPAddress = (string) content.GetValueForProperty("LocalIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).LocalIPAddress, global::System.Convert.ToString); - } - if (content.Contains("MemoryInMb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).MemoryInMb = (long?) content.GetValueForProperty("MemoryInMb",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).MemoryInMb, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("NumberOfCores")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).NumberOfCores = (long?) content.GetValueForProperty("NumberOfCores",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).NumberOfCores, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("UptimeInSeconds")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).UptimeInSeconds = (long?) content.GetValueForProperty("UptimeInSeconds",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).UptimeInSeconds, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("TimeZone")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).TimeZone, global::System.Convert.ToString); - } - if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).UploadLimitScheduleWeeklyRecurrence = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[]) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); - } - if (content.Contains("ErrorDetailCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ErrorDetailCode, global::System.Convert.ToString); - } - if (content.Contains("ErrorDetailMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ErrorDetailMessage, 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 Agent(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AgentStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).AgentStatus = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus?) content.GetValueForProperty("AgentStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).AgentStatus, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("UploadLimitSchedule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitScheduleTypeConverter.ConvertFrom); - } - if (content.Contains("ErrorDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentPropertiesErrorDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("Version")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).Version, global::System.Convert.ToString); - } - if (content.Contains("ArcResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ArcResourceId = (string) content.GetValueForProperty("ArcResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ArcResourceId, global::System.Convert.ToString); - } - if (content.Contains("ArcVMUuid")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ArcVMUuid = (string) content.GetValueForProperty("ArcVMUuid",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ArcVMUuid, global::System.Convert.ToString); - } - if (content.Contains("LastStatusUpdate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LocalIPAddress")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).LocalIPAddress = (string) content.GetValueForProperty("LocalIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).LocalIPAddress, global::System.Convert.ToString); - } - if (content.Contains("MemoryInMb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).MemoryInMb = (long?) content.GetValueForProperty("MemoryInMb",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).MemoryInMb, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("NumberOfCores")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).NumberOfCores = (long?) content.GetValueForProperty("NumberOfCores",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).NumberOfCores, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("UptimeInSeconds")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).UptimeInSeconds = (long?) content.GetValueForProperty("UptimeInSeconds",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).UptimeInSeconds, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("TimeZone")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).TimeZone, global::System.Convert.ToString); - } - if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).UploadLimitScheduleWeeklyRecurrence = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[]) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); - } - if (content.Contains("ErrorDetailCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ErrorDetailCode, global::System.Convert.ToString); - } - if (content.Contains("ErrorDetailMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal)this).ErrorDetailMessage, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Agent(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Agent(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Agent resource. - [System.ComponentModel.TypeConverter(typeof(AgentTypeConverter))] - public partial interface IAgent - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Agent.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Agent.cs deleted file mode 100644 index 1d7b37b2a0d7..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Agent.cs +++ /dev/null @@ -1,374 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The Agent resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class Agent : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource(); - - /// The Agent status. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus? AgentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).AgentStatus; } - - /// The fully qualified resource ID of the Hybrid Compute resource for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string ArcResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).ArcResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).ArcResourceId = value ; } - - /// The VM UUID of the Hybrid Compute resource for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string ArcVMUuid { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).ArcVMUuid; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).ArcVMUuid = value ; } - - /// A description for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).Description = value ?? null; } - - /// Error code reported by Agent - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).ErrorDetailCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).ErrorDetailCode = value ?? null; } - - /// Expanded description of reported error code - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).ErrorDetailMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).ErrorDetailMessage = value ?? null; } - - /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id; } - - /// The last updated time of the Agent status. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public global::System.DateTime? LastStatusUpdate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).LastStatusUpdate; } - - /// Local IP address reported by the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string LocalIPAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).LocalIPAddress; } - - /// Available memory reported by the Agent, in MB. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public long? MemoryInMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).MemoryInMb; } - - /// Internal Acessors for AgentStatus - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal.AgentStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).AgentStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).AgentStatus = value; } - - /// Internal Acessors for ErrorDetail - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal.ErrorDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).ErrorDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).ErrorDetail = value; } - - /// Internal Acessors for LastStatusUpdate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal.LastStatusUpdate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).LastStatusUpdate; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).LastStatusUpdate = value; } - - /// Internal Acessors for LocalIPAddress - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal.LocalIPAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).LocalIPAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).LocalIPAddress = value; } - - /// Internal Acessors for MemoryInMb - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal.MemoryInMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).MemoryInMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).MemoryInMb = value; } - - /// Internal Acessors for NumberOfCores - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal.NumberOfCores { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).NumberOfCore; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).NumberOfCore = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for TimeZone - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal.TimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).TimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).TimeZone = value; } - - /// Internal Acessors for UploadLimitSchedule - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal.UploadLimitSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).UploadLimitSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).UploadLimitSchedule = value; } - - /// Internal Acessors for UptimeInSeconds - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal.UptimeInSeconds { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).UptimeInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).UptimeInSecond = value; } - - /// Internal Acessors for Version - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentInternal.Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).AgentVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).AgentVersion = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name; } - - /// Available compute cores reported by the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public long? NumberOfCores { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).NumberOfCore; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentProperties _property; - - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentProperties()); set => this._property = value; } - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).ProvisioningState; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// The agent's local time zone represented in Windows format. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string TimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).TimeZone; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type; } - - /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).UploadLimitScheduleWeeklyRecurrence; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).UploadLimitScheduleWeeklyRecurrence = value ?? null /* arrayOf */; } - - /// Uptime of the Agent in seconds. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public long? UptimeInSeconds { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).UptimeInSecond; } - - /// The Agent version. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)Property).AgentVersion; } - - /// Creates an new instance. - public Agent() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// The Agent resource. - public partial interface IAgent : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource - { - /// The Agent status. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The Agent status.", - SerializedName = @"agentStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus? AgentStatus { get; } - /// The fully qualified resource ID of the Hybrid Compute resource for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The fully qualified resource ID of the Hybrid Compute resource for the Agent.", - SerializedName = @"arcResourceId", - PossibleTypes = new [] { typeof(string) })] - string ArcResourceId { get; set; } - /// The VM UUID of the Hybrid Compute resource for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The VM UUID of the Hybrid Compute resource for the Agent.", - SerializedName = @"arcVmUuid", - PossibleTypes = new [] { typeof(string) })] - string ArcVMUuid { get; set; } - /// A description for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Agent.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// Error code reported by Agent - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Error code reported by Agent", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string ErrorDetailCode { get; set; } - /// Expanded description of reported error code - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Expanded description of reported error code", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string ErrorDetailMessage { get; set; } - /// The last updated time of the Agent status. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The last updated time of the Agent status.", - SerializedName = @"lastStatusUpdate", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? LastStatusUpdate { get; } - /// Local IP address reported by the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Local IP address reported by the Agent.", - SerializedName = @"localIPAddress", - PossibleTypes = new [] { typeof(string) })] - string LocalIPAddress { get; } - /// Available memory reported by the Agent, in MB. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Available memory reported by the Agent, in MB.", - SerializedName = @"memoryInMB", - PossibleTypes = new [] { typeof(long) })] - long? MemoryInMb { get; } - /// Available compute cores reported by the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Available compute cores reported by the Agent.", - SerializedName = @"numberOfCores", - PossibleTypes = new [] { typeof(long) })] - long? NumberOfCores { get; } - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of this resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; } - /// The agent's local time zone represented in Windows format. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The agent's local time zone represented in Windows format.", - SerializedName = @"timeZone", - PossibleTypes = new [] { typeof(string) })] - string TimeZone { get; } - /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The set of weekly repeating recurrences of the WAN-link upload limit schedule.", - SerializedName = @"weeklyRecurrences", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get; set; } - /// Uptime of the Agent in seconds. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Uptime of the Agent in seconds.", - SerializedName = @"uptimeInSeconds", - PossibleTypes = new [] { typeof(long) })] - long? UptimeInSeconds { get; } - /// The Agent version. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The Agent version.", - SerializedName = @"agentVersion", - PossibleTypes = new [] { typeof(string) })] - string Version { get; } - - } - /// The Agent resource. - internal partial interface IAgentInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal - { - /// The Agent status. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus? AgentStatus { get; set; } - /// The fully qualified resource ID of the Hybrid Compute resource for the Agent. - string ArcResourceId { get; set; } - /// The VM UUID of the Hybrid Compute resource for the Agent. - string ArcVMUuid { get; set; } - /// A description for the Agent. - string Description { get; set; } - - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails ErrorDetail { get; set; } - /// Error code reported by Agent - string ErrorDetailCode { get; set; } - /// Expanded description of reported error code - string ErrorDetailMessage { get; set; } - /// The last updated time of the Agent status. - global::System.DateTime? LastStatusUpdate { get; set; } - /// Local IP address reported by the Agent. - string LocalIPAddress { get; set; } - /// Available memory reported by the Agent, in MB. - long? MemoryInMb { get; set; } - /// Available compute cores reported by the Agent. - long? NumberOfCores { get; set; } - - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentProperties Property { get; set; } - /// The provisioning state of this resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; set; } - /// The agent's local time zone represented in Windows format. - string TimeZone { get; set; } - /// - /// The WAN-link upload limit schedule that applies to any Job Run the agent executes. Data plane operations (migrating files) - /// are affected. Control plane operations ensure seamless migration functionality and are not limited by this schedule. The - /// schedule is interpreted with the agent's local time. - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule UploadLimitSchedule { get; set; } - /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get; set; } - /// Uptime of the Agent in seconds. - long? UptimeInSeconds { get; set; } - /// The Agent version. - string Version { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentList.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentList.cs deleted file mode 100644 index d69f32e252db..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentList.cs +++ /dev/null @@ -1,72 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// List of Agents. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class AgentList : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentList, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentListInternal - { - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent[] Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentListInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// The link to the next page of items - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; set => this._nextLink = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent[] _value; - - /// The Agent items on this page - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent[] Value { get => this._value; } - - /// Creates an new instance. - public AgentList() - { - - } - } - /// List of Agents. - public partial interface IAgentList : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// The link to the next page of items - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The link to the next page of items", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; set; } - /// The Agent items on this page - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"The Agent items on this page", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent[] Value { get; } - - } - /// List of Agents. - internal partial interface IAgentListInternal - - { - /// The link to the next page of items - string NextLink { get; set; } - /// The Agent items on this page - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentProperties.PowerShell.cs deleted file mode 100644 index 9b185c718c99..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentProperties.PowerShell.cs +++ /dev/null @@ -1,290 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - [System.ComponentModel.TypeConverter(typeof(AgentPropertiesTypeConverter))] - public partial class AgentProperties - { - - /// - /// 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 AgentProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("UploadLimitSchedule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitScheduleTypeConverter.ConvertFrom); - } - if (content.Contains("ErrorDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentPropertiesErrorDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("AgentVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).AgentVersion, global::System.Convert.ToString); - } - if (content.Contains("ArcResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ArcResourceId = (string) content.GetValueForProperty("ArcResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ArcResourceId, global::System.Convert.ToString); - } - if (content.Contains("ArcVMUuid")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ArcVMUuid = (string) content.GetValueForProperty("ArcVMUuid",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ArcVMUuid, global::System.Convert.ToString); - } - if (content.Contains("AgentStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).AgentStatus = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus?) content.GetValueForProperty("AgentStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).AgentStatus, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus.CreateFrom); - } - if (content.Contains("LastStatusUpdate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LocalIPAddress")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).LocalIPAddress = (string) content.GetValueForProperty("LocalIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).LocalIPAddress, global::System.Convert.ToString); - } - if (content.Contains("MemoryInMb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).MemoryInMb = (long?) content.GetValueForProperty("MemoryInMb",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).MemoryInMb, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("NumberOfCore")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).NumberOfCore = (long?) content.GetValueForProperty("NumberOfCore",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).NumberOfCore, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("UptimeInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).UptimeInSecond = (long?) content.GetValueForProperty("UptimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).UptimeInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("TimeZone")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).TimeZone, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[]) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); - } - if (content.Contains("ErrorDetailCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ErrorDetailCode, global::System.Convert.ToString); - } - if (content.Contains("ErrorDetailMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ErrorDetailMessage, 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 AgentProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("UploadLimitSchedule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitScheduleTypeConverter.ConvertFrom); - } - if (content.Contains("ErrorDetail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ErrorDetail = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails) content.GetValueForProperty("ErrorDetail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ErrorDetail, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentPropertiesErrorDetailsTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("AgentVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).AgentVersion = (string) content.GetValueForProperty("AgentVersion",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).AgentVersion, global::System.Convert.ToString); - } - if (content.Contains("ArcResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ArcResourceId = (string) content.GetValueForProperty("ArcResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ArcResourceId, global::System.Convert.ToString); - } - if (content.Contains("ArcVMUuid")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ArcVMUuid = (string) content.GetValueForProperty("ArcVMUuid",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ArcVMUuid, global::System.Convert.ToString); - } - if (content.Contains("AgentStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).AgentStatus = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus?) content.GetValueForProperty("AgentStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).AgentStatus, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus.CreateFrom); - } - if (content.Contains("LastStatusUpdate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LocalIPAddress")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).LocalIPAddress = (string) content.GetValueForProperty("LocalIPAddress",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).LocalIPAddress, global::System.Convert.ToString); - } - if (content.Contains("MemoryInMb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).MemoryInMb = (long?) content.GetValueForProperty("MemoryInMb",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).MemoryInMb, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("NumberOfCore")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).NumberOfCore = (long?) content.GetValueForProperty("NumberOfCore",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).NumberOfCore, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("UptimeInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).UptimeInSecond = (long?) content.GetValueForProperty("UptimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).UptimeInSecond, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("TimeZone")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).TimeZone, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[]) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); - } - if (content.Contains("ErrorDetailCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ErrorDetailCode = (string) content.GetValueForProperty("ErrorDetailCode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ErrorDetailCode, global::System.Convert.ToString); - } - if (content.Contains("ErrorDetailMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ErrorDetailMessage = (string) content.GetValueForProperty("ErrorDetailMessage",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal)this).ErrorDetailMessage, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AgentProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AgentProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - } - } - [System.ComponentModel.TypeConverter(typeof(AgentPropertiesTypeConverter))] - public partial interface IAgentProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentProperties.cs deleted file mode 100644 index 299cfaed027c..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentProperties.cs +++ /dev/null @@ -1,336 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class AgentProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus? _agentStatus; - - /// The Agent status. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus? AgentStatus { get => this._agentStatus; } - - /// Backing field for property. - private string _agentVersion; - - /// The Agent version. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string AgentVersion { get => this._agentVersion; } - - /// Backing field for property. - private string _arcResourceId; - - /// The fully qualified resource ID of the Hybrid Compute resource for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string ArcResourceId { get => this._arcResourceId; set => this._arcResourceId = value; } - - /// Backing field for property. - private string _arcVMUuid; - - /// The VM UUID of the Hybrid Compute resource for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string ArcVMUuid { get => this._arcVMUuid; set => this._arcVMUuid = value; } - - /// Backing field for property. - private string _description; - - /// A description for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Description { get => this._description; set => this._description = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails _errorDetail; - - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentPropertiesErrorDetails()); } - - /// Error code reported by Agent - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string ErrorDetailCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetailsInternal)ErrorDetail).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetailsInternal)ErrorDetail).Code = value ?? null; } - - /// Expanded description of reported error code - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string ErrorDetailMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetailsInternal)ErrorDetail).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetailsInternal)ErrorDetail).Message = value ?? null; } - - /// Backing field for property. - private global::System.DateTime? _lastStatusUpdate; - - /// The last updated time of the Agent status. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public global::System.DateTime? LastStatusUpdate { get => this._lastStatusUpdate; } - - /// Backing field for property. - private string _localIPAddress; - - /// Local IP address reported by the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string LocalIPAddress { get => this._localIPAddress; } - - /// Backing field for property. - private long? _memoryInMb; - - /// Available memory reported by the Agent, in MB. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public long? MemoryInMb { get => this._memoryInMb; } - - /// Internal Acessors for AgentStatus - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal.AgentStatus { get => this._agentStatus; set { {_agentStatus = value;} } } - - /// Internal Acessors for AgentVersion - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal.AgentVersion { get => this._agentVersion; set { {_agentVersion = value;} } } - - /// Internal Acessors for ErrorDetail - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal.ErrorDetail { get => (this._errorDetail = this._errorDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentPropertiesErrorDetails()); set { {_errorDetail = value;} } } - - /// Internal Acessors for LastStatusUpdate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal.LastStatusUpdate { get => this._lastStatusUpdate; set { {_lastStatusUpdate = value;} } } - - /// Internal Acessors for LocalIPAddress - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal.LocalIPAddress { get => this._localIPAddress; set { {_localIPAddress = value;} } } - - /// Internal Acessors for MemoryInMb - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal.MemoryInMb { get => this._memoryInMb; set { {_memoryInMb = value;} } } - - /// Internal Acessors for NumberOfCore - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal.NumberOfCore { get => this._numberOfCore; set { {_numberOfCore = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Internal Acessors for TimeZone - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal.TimeZone { get => this._timeZone; set { {_timeZone = value;} } } - - /// Internal Acessors for UploadLimitSchedule - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal.UploadLimitSchedule { get => (this._uploadLimitSchedule = this._uploadLimitSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitSchedule()); set { {_uploadLimitSchedule = value;} } } - - /// Internal Acessors for UptimeInSecond - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesInternal.UptimeInSecond { get => this._uptimeInSecond; set { {_uptimeInSecond = value;} } } - - /// Backing field for property. - private long? _numberOfCore; - - /// Available compute cores reported by the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public long? NumberOfCore { get => this._numberOfCore; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? _provisioningState; - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } - - /// Backing field for property. - private string _timeZone; - - /// The agent's local time zone represented in Windows format. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string TimeZone { get => this._timeZone; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule _uploadLimitSchedule; - - /// - /// The WAN-link upload limit schedule that applies to any Job Run the agent executes. Data plane operations (migrating files) - /// are affected. Control plane operations ensure seamless migration functionality and are not limited by this schedule. The - /// schedule is interpreted with the agent's local time. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule UploadLimitSchedule { get => (this._uploadLimitSchedule = this._uploadLimitSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitSchedule()); set => this._uploadLimitSchedule = value; } - - /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitScheduleInternal)UploadLimitSchedule).WeeklyRecurrence; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitScheduleInternal)UploadLimitSchedule).WeeklyRecurrence = value ?? null /* arrayOf */; } - - /// Backing field for property. - private long? _uptimeInSecond; - - /// Uptime of the Agent in seconds. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public long? UptimeInSecond { get => this._uptimeInSecond; } - - /// Creates an new instance. - public AgentProperties() - { - - } - } - public partial interface IAgentProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// The Agent status. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The Agent status.", - SerializedName = @"agentStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus? AgentStatus { get; } - /// The Agent version. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The Agent version.", - SerializedName = @"agentVersion", - PossibleTypes = new [] { typeof(string) })] - string AgentVersion { get; } - /// The fully qualified resource ID of the Hybrid Compute resource for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The fully qualified resource ID of the Hybrid Compute resource for the Agent.", - SerializedName = @"arcResourceId", - PossibleTypes = new [] { typeof(string) })] - string ArcResourceId { get; set; } - /// The VM UUID of the Hybrid Compute resource for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The VM UUID of the Hybrid Compute resource for the Agent.", - SerializedName = @"arcVmUuid", - PossibleTypes = new [] { typeof(string) })] - string ArcVMUuid { get; set; } - /// A description for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Agent.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// Error code reported by Agent - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Error code reported by Agent", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string ErrorDetailCode { get; set; } - /// Expanded description of reported error code - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Expanded description of reported error code", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string ErrorDetailMessage { get; set; } - /// The last updated time of the Agent status. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The last updated time of the Agent status.", - SerializedName = @"lastStatusUpdate", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? LastStatusUpdate { get; } - /// Local IP address reported by the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Local IP address reported by the Agent.", - SerializedName = @"localIPAddress", - PossibleTypes = new [] { typeof(string) })] - string LocalIPAddress { get; } - /// Available memory reported by the Agent, in MB. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Available memory reported by the Agent, in MB.", - SerializedName = @"memoryInMB", - PossibleTypes = new [] { typeof(long) })] - long? MemoryInMb { get; } - /// Available compute cores reported by the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Available compute cores reported by the Agent.", - SerializedName = @"numberOfCores", - PossibleTypes = new [] { typeof(long) })] - long? NumberOfCore { get; } - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of this resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; } - /// The agent's local time zone represented in Windows format. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The agent's local time zone represented in Windows format.", - SerializedName = @"timeZone", - PossibleTypes = new [] { typeof(string) })] - string TimeZone { get; } - /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The set of weekly repeating recurrences of the WAN-link upload limit schedule.", - SerializedName = @"weeklyRecurrences", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get; set; } - /// Uptime of the Agent in seconds. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Uptime of the Agent in seconds.", - SerializedName = @"uptimeInSeconds", - PossibleTypes = new [] { typeof(long) })] - long? UptimeInSecond { get; } - - } - internal partial interface IAgentPropertiesInternal - - { - /// The Agent status. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus? AgentStatus { get; set; } - /// The Agent version. - string AgentVersion { get; set; } - /// The fully qualified resource ID of the Hybrid Compute resource for the Agent. - string ArcResourceId { get; set; } - /// The VM UUID of the Hybrid Compute resource for the Agent. - string ArcVMUuid { get; set; } - /// A description for the Agent. - string Description { get; set; } - - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentPropertiesErrorDetails ErrorDetail { get; set; } - /// Error code reported by Agent - string ErrorDetailCode { get; set; } - /// Expanded description of reported error code - string ErrorDetailMessage { get; set; } - /// The last updated time of the Agent status. - global::System.DateTime? LastStatusUpdate { get; set; } - /// Local IP address reported by the Agent. - string LocalIPAddress { get; set; } - /// Available memory reported by the Agent, in MB. - long? MemoryInMb { get; set; } - /// Available compute cores reported by the Agent. - long? NumberOfCore { get; set; } - /// The provisioning state of this resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; set; } - /// The agent's local time zone represented in Windows format. - string TimeZone { get; set; } - /// - /// The WAN-link upload limit schedule that applies to any Job Run the agent executes. Data plane operations (migrating files) - /// are affected. Control plane operations ensure seamless migration functionality and are not limited by this schedule. The - /// schedule is interpreted with the agent's local time. - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule UploadLimitSchedule { get; set; } - /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get; set; } - /// Uptime of the Agent in seconds. - long? UptimeInSecond { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateParameters.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateParameters.PowerShell.cs deleted file mode 100644 index eea306096d5c..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateParameters.PowerShell.cs +++ /dev/null @@ -1,188 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The Agent resource. - [System.ComponentModel.TypeConverter(typeof(AgentUpdateParametersTypeConverter))] - public partial class AgentUpdateParameters - { - - /// - /// 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 AgentUpdateParameters(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("UploadLimitSchedule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitScheduleTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).UploadLimitScheduleWeeklyRecurrence = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[]) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AgentUpdateParameters(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("UploadLimitSchedule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitScheduleTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).UploadLimitScheduleWeeklyRecurrence = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[]) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AgentUpdateParameters(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AgentUpdateParameters(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Agent resource. - [System.ComponentModel.TypeConverter(typeof(AgentUpdateParametersTypeConverter))] - public partial interface IAgentUpdateParameters - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateParameters.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateParameters.cs deleted file mode 100644 index 5580ea5ca506..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateParameters.cs +++ /dev/null @@ -1,83 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The Agent resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class AgentUpdateParameters : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal - { - - /// A description for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)Property).Description = value ?? null; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentUpdateProperties()); set { {_property = value;} } } - - /// Internal Acessors for UploadLimitSchedule - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParametersInternal.UploadLimitSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)Property).UploadLimitSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)Property).UploadLimitSchedule = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateProperties _property; - - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentUpdateProperties()); set => this._property = value; } - - /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)Property).UploadLimitScheduleWeeklyRecurrence; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)Property).UploadLimitScheduleWeeklyRecurrence = value ?? null /* arrayOf */; } - - /// Creates an new instance. - public AgentUpdateParameters() - { - - } - } - /// The Agent resource. - public partial interface IAgentUpdateParameters : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// A description for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Agent.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The set of weekly repeating recurrences of the WAN-link upload limit schedule.", - SerializedName = @"weeklyRecurrences", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get; set; } - - } - /// The Agent resource. - internal partial interface IAgentUpdateParametersInternal - - { - /// A description for the Agent. - string Description { get; set; } - - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateProperties Property { get; set; } - /// - /// The WAN-link upload limit schedule that applies to any Job Run the agent executes. Data plane operations (migrating files) - /// are affected. Control plane operations ensure seamless migration functionality and are not limited by this schedule. The - /// schedule is interpreted with the agent's local time. - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule UploadLimitSchedule { get; set; } - /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateProperties.PowerShell.cs deleted file mode 100644 index 648e083e56af..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateProperties.PowerShell.cs +++ /dev/null @@ -1,178 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - [System.ComponentModel.TypeConverter(typeof(AgentUpdatePropertiesTypeConverter))] - public partial class AgentUpdateProperties - { - - /// - /// 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 AgentUpdateProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("UploadLimitSchedule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitScheduleTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[]) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AgentUpdateProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("UploadLimitSchedule")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)this).UploadLimitSchedule = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule) content.GetValueForProperty("UploadLimitSchedule",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)this).UploadLimitSchedule, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitScheduleTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("UploadLimitScheduleWeeklyRecurrence")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[]) content.GetValueForProperty("UploadLimitScheduleWeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal)this).UploadLimitScheduleWeeklyRecurrence, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AgentUpdateProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AgentUpdateProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - } - } - [System.ComponentModel.TypeConverter(typeof(AgentUpdatePropertiesTypeConverter))] - public partial interface IAgentUpdateProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateProperties.cs deleted file mode 100644 index e89afeb9fce0..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AgentUpdateProperties.cs +++ /dev/null @@ -1,83 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class AgentUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal - { - - /// Backing field for property. - private string _description; - - /// A description for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Description { get => this._description; set => this._description = value; } - - /// Internal Acessors for UploadLimitSchedule - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdatePropertiesInternal.UploadLimitSchedule { get => (this._uploadLimitSchedule = this._uploadLimitSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitSchedule()); set { {_uploadLimitSchedule = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule _uploadLimitSchedule; - - /// - /// The WAN-link upload limit schedule that applies to any Job Run the agent executes. Data plane operations (migrating files) - /// are affected. Control plane operations ensure seamless migration functionality and are not limited by this schedule. The - /// schedule is interpreted with the agent's local time. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule UploadLimitSchedule { get => (this._uploadLimitSchedule = this._uploadLimitSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitSchedule()); set => this._uploadLimitSchedule = value; } - - /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitScheduleInternal)UploadLimitSchedule).WeeklyRecurrence; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitScheduleInternal)UploadLimitSchedule).WeeklyRecurrence = value ?? null /* arrayOf */; } - - /// Creates an new instance. - public AgentUpdateProperties() - { - - } - } - public partial interface IAgentUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// A description for the Agent. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Agent.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The set of weekly repeating recurrences of the WAN-link upload limit schedule.", - SerializedName = @"weeklyRecurrences", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get; set; } - - } - internal partial interface IAgentUpdatePropertiesInternal - - { - /// A description for the Agent. - string Description { get; set; } - /// - /// The WAN-link upload limit schedule that applies to any Job Run the agent executes. Data plane operations (migrating files) - /// are affected. Control plane operations ensure seamless migration functionality and are not limited by this schedule. The - /// schedule is interpreted with the agent's local time. - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule UploadLimitSchedule { get; set; } - /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointProperties.PowerShell.cs deleted file mode 100644 index a12cc17fe766..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointProperties.PowerShell.cs +++ /dev/null @@ -1,201 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The properties of Azure MultiCloudConnector endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureMultiCloudConnectorEndpointPropertiesTypeConverter))] - public partial class AzureMultiCloudConnectorEndpointProperties - { - - /// - /// 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 AzureMultiCloudConnectorEndpointProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("MultiCloudConnectorId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).MultiCloudConnectorId = (string) content.GetValueForProperty("MultiCloudConnectorId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).MultiCloudConnectorId, global::System.Convert.ToString); - } - if (content.Contains("AwsS3BucketId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).AwsS3BucketId, global::System.Convert.ToString); - } - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureMultiCloudConnectorEndpointProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("MultiCloudConnectorId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).MultiCloudConnectorId = (string) content.GetValueForProperty("MultiCloudConnectorId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).MultiCloudConnectorId, global::System.Convert.ToString); - } - if (content.Contains("AwsS3BucketId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).AwsS3BucketId, global::System.Convert.ToString); - } - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMultiCloudConnectorEndpointProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMultiCloudConnectorEndpointProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a - /// json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of Azure MultiCloudConnector endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureMultiCloudConnectorEndpointPropertiesTypeConverter))] - public partial interface IAzureMultiCloudConnectorEndpointProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointProperties.cs deleted file mode 100644 index 0514db30dd2d..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointProperties.cs +++ /dev/null @@ -1,105 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The properties of Azure MultiCloudConnector endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class AzureMultiCloudConnectorEndpointProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointPropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseProperties(); - - /// Backing field for property. - private string _awsS3BucketId; - - /// The AWS S3 bucket ARM resource Id. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string AwsS3BucketId { get => this._awsS3BucketId; set => this._awsS3BucketId = value; } - - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description = value ?? null; } - - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType = value ; } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState = value; } - - /// Backing field for property. - private string _multiCloudConnectorId; - - /// The Azure Resource ID of the MultiCloud Connector resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string MultiCloudConnectorId { get => this._multiCloudConnectorId; set => this._multiCloudConnectorId = value; } - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; } - - /// - /// Creates an new instance. - /// - public AzureMultiCloudConnectorEndpointProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__endpointBaseProperties), __endpointBaseProperties); - await eventListener.AssertObjectIsValid(nameof(__endpointBaseProperties), __endpointBaseProperties); - } - } - /// The properties of Azure MultiCloudConnector endpoint. - public partial interface IAzureMultiCloudConnectorEndpointProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties - { - /// The AWS S3 bucket ARM resource Id. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The AWS S3 bucket ARM resource Id.", - SerializedName = @"awsS3BucketId", - PossibleTypes = new [] { typeof(string) })] - string AwsS3BucketId { get; set; } - /// The Azure Resource ID of the MultiCloud Connector resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Azure Resource ID of the MultiCloud Connector resource.", - SerializedName = @"multiCloudConnectorId", - PossibleTypes = new [] { typeof(string) })] - string MultiCloudConnectorId { get; set; } - - } - /// The properties of Azure MultiCloudConnector endpoint. - internal partial interface IAzureMultiCloudConnectorEndpointPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal - { - /// The AWS S3 bucket ARM resource Id. - string AwsS3BucketId { get; set; } - /// The Azure Resource ID of the MultiCloud Connector resource. - string MultiCloudConnectorId { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointUpdateProperties.cs deleted file mode 100644 index 09fd471132e6..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointUpdateProperties.cs +++ /dev/null @@ -1,64 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The properties of Azure Storage NFS file share endpoint to update. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class AzureMultiCloudConnectorEndpointUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointUpdatePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateProperties(); - - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description = value ?? null; } - - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType = value ; } - - /// - /// Creates an new instance. - /// - public AzureMultiCloudConnectorEndpointUpdateProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); - await eventListener.AssertObjectIsValid(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); - } - } - /// The properties of Azure Storage NFS file share endpoint to update. - public partial interface IAzureMultiCloudConnectorEndpointUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties - { - - } - /// The properties of Azure Storage NFS file share endpoint to update. - internal partial interface IAzureMultiCloudConnectorEndpointUpdatePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointProperties.PowerShell.cs deleted file mode 100644 index e49265fac967..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointProperties.PowerShell.cs +++ /dev/null @@ -1,201 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The properties of Azure Storage blob container endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureStorageBlobContainerEndpointPropertiesTypeConverter))] - public partial class AzureStorageBlobContainerEndpointProperties - { - - /// - /// 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 AzureStorageBlobContainerEndpointProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("BlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointPropertiesInternal)this).BlobContainerName = (string) content.GetValueForProperty("BlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointPropertiesInternal)this).BlobContainerName, global::System.Convert.ToString); - } - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureStorageBlobContainerEndpointProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("BlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointPropertiesInternal)this).BlobContainerName = (string) content.GetValueForProperty("BlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointPropertiesInternal)this).BlobContainerName, global::System.Convert.ToString); - } - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureStorageBlobContainerEndpointProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureStorageBlobContainerEndpointProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a - /// json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of Azure Storage blob container endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureStorageBlobContainerEndpointPropertiesTypeConverter))] - public partial interface IAzureStorageBlobContainerEndpointProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointProperties.cs deleted file mode 100644 index c34764af6ac7..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointProperties.cs +++ /dev/null @@ -1,105 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The properties of Azure Storage blob container endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class AzureStorageBlobContainerEndpointProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointPropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseProperties(); - - /// Backing field for property. - private string _blobContainerName; - - /// The name of the Storage blob container that is the target destination. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string BlobContainerName { get => this._blobContainerName; set => this._blobContainerName = value; } - - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description = value ?? null; } - - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType = value ; } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState = value; } - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; } - - /// Backing field for property. - private string _storageAccountResourceId; - - /// The Azure Resource ID of the storage account that is the target destination. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string StorageAccountResourceId { get => this._storageAccountResourceId; set => this._storageAccountResourceId = value; } - - /// - /// Creates an new instance. - /// - public AzureStorageBlobContainerEndpointProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__endpointBaseProperties), __endpointBaseProperties); - await eventListener.AssertObjectIsValid(nameof(__endpointBaseProperties), __endpointBaseProperties); - } - } - /// The properties of Azure Storage blob container endpoint. - public partial interface IAzureStorageBlobContainerEndpointProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties - { - /// The name of the Storage blob container that is the target destination. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Storage blob container that is the target destination.", - SerializedName = @"blobContainerName", - PossibleTypes = new [] { typeof(string) })] - string BlobContainerName { get; set; } - /// The Azure Resource ID of the storage account that is the target destination. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Azure Resource ID of the storage account that is the target destination.", - SerializedName = @"storageAccountResourceId", - PossibleTypes = new [] { typeof(string) })] - string StorageAccountResourceId { get; set; } - - } - /// The properties of Azure Storage blob container endpoint. - internal partial interface IAzureStorageBlobContainerEndpointPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal - { - /// The name of the Storage blob container that is the target destination. - string BlobContainerName { get; set; } - /// The Azure Resource ID of the storage account that is the target destination. - string StorageAccountResourceId { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointUpdateProperties.cs deleted file mode 100644 index 56e416df10ce..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointUpdateProperties.cs +++ /dev/null @@ -1,61 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class AzureStorageBlobContainerEndpointUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointUpdatePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateProperties(); - - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description = value ?? null; } - - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType = value ; } - - /// - /// Creates an new instance. - /// - public AzureStorageBlobContainerEndpointUpdateProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); - await eventListener.AssertObjectIsValid(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); - } - } - public partial interface IAzureStorageBlobContainerEndpointUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties - { - - } - internal partial interface IAzureStorageBlobContainerEndpointUpdatePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointProperties.PowerShell.cs deleted file mode 100644 index 20657dcb56ba..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointProperties.PowerShell.cs +++ /dev/null @@ -1,201 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The properties of Azure Storage NFS file share endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureStorageNfsFileShareEndpointPropertiesTypeConverter))] - public partial class AzureStorageNfsFileShareEndpointProperties - { - - /// - /// 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 AzureStorageNfsFileShareEndpointProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("FileShareName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).FileShareName = (string) content.GetValueForProperty("FileShareName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).FileShareName, global::System.Convert.ToString); - } - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureStorageNfsFileShareEndpointProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("FileShareName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).FileShareName = (string) content.GetValueForProperty("FileShareName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).FileShareName, global::System.Convert.ToString); - } - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureStorageNfsFileShareEndpointProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureStorageNfsFileShareEndpointProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a - /// json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of Azure Storage NFS file share endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureStorageNfsFileShareEndpointPropertiesTypeConverter))] - public partial interface IAzureStorageNfsFileShareEndpointProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointProperties.cs deleted file mode 100644 index c8808b0087db..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointProperties.cs +++ /dev/null @@ -1,105 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The properties of Azure Storage NFS file share endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class AzureStorageNfsFileShareEndpointProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointPropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseProperties(); - - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description = value ?? null; } - - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType = value ; } - - /// Backing field for property. - private string _fileShareName; - - /// The name of the Azure Storage NFS file share. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string FileShareName { get => this._fileShareName; set => this._fileShareName = value; } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState = value; } - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; } - - /// Backing field for property. - private string _storageAccountResourceId; - - /// The Azure Resource ID of the storage account. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string StorageAccountResourceId { get => this._storageAccountResourceId; set => this._storageAccountResourceId = value; } - - /// - /// Creates an new instance. - /// - public AzureStorageNfsFileShareEndpointProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__endpointBaseProperties), __endpointBaseProperties); - await eventListener.AssertObjectIsValid(nameof(__endpointBaseProperties), __endpointBaseProperties); - } - } - /// The properties of Azure Storage NFS file share endpoint. - public partial interface IAzureStorageNfsFileShareEndpointProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties - { - /// The name of the Azure Storage NFS file share. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Azure Storage NFS file share.", - SerializedName = @"fileShareName", - PossibleTypes = new [] { typeof(string) })] - string FileShareName { get; set; } - /// The Azure Resource ID of the storage account. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Azure Resource ID of the storage account.", - SerializedName = @"storageAccountResourceId", - PossibleTypes = new [] { typeof(string) })] - string StorageAccountResourceId { get; set; } - - } - /// The properties of Azure Storage NFS file share endpoint. - internal partial interface IAzureStorageNfsFileShareEndpointPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal - { - /// The name of the Azure Storage NFS file share. - string FileShareName { get; set; } - /// The Azure Resource ID of the storage account. - string StorageAccountResourceId { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointUpdateProperties.cs deleted file mode 100644 index 820f24023908..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointUpdateProperties.cs +++ /dev/null @@ -1,64 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The properties of Azure Storage NFS file share endpoint to update. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class AzureStorageNfsFileShareEndpointUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointUpdatePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateProperties(); - - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description = value ?? null; } - - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType = value ; } - - /// - /// Creates an new instance. - /// - public AzureStorageNfsFileShareEndpointUpdateProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); - await eventListener.AssertObjectIsValid(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); - } - } - /// The properties of Azure Storage NFS file share endpoint to update. - public partial interface IAzureStorageNfsFileShareEndpointUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties - { - - } - /// The properties of Azure Storage NFS file share endpoint to update. - internal partial interface IAzureStorageNfsFileShareEndpointUpdatePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointProperties.PowerShell.cs deleted file mode 100644 index 4cb1494c6e92..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointProperties.PowerShell.cs +++ /dev/null @@ -1,201 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The properties of Azure Storage SMB file share endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureStorageSmbFileShareEndpointPropertiesTypeConverter))] - public partial class AzureStorageSmbFileShareEndpointProperties - { - - /// - /// 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 AzureStorageSmbFileShareEndpointProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("FileShareName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).FileShareName = (string) content.GetValueForProperty("FileShareName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).FileShareName, global::System.Convert.ToString); - } - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureStorageSmbFileShareEndpointProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("FileShareName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).FileShareName = (string) content.GetValueForProperty("FileShareName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).FileShareName, global::System.Convert.ToString); - } - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureStorageSmbFileShareEndpointProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureStorageSmbFileShareEndpointProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a - /// json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of Azure Storage SMB file share endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureStorageSmbFileShareEndpointPropertiesTypeConverter))] - public partial interface IAzureStorageSmbFileShareEndpointProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointProperties.cs deleted file mode 100644 index 00f117b4ca01..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointProperties.cs +++ /dev/null @@ -1,105 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The properties of Azure Storage SMB file share endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class AzureStorageSmbFileShareEndpointProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointPropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseProperties(); - - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description = value ?? null; } - - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType = value ; } - - /// Backing field for property. - private string _fileShareName; - - /// The name of the Azure Storage file share. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string FileShareName { get => this._fileShareName; set => this._fileShareName = value; } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState = value; } - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; } - - /// Backing field for property. - private string _storageAccountResourceId; - - /// The Azure Resource ID of the storage account. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string StorageAccountResourceId { get => this._storageAccountResourceId; set => this._storageAccountResourceId = value; } - - /// - /// Creates an new instance. - /// - public AzureStorageSmbFileShareEndpointProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__endpointBaseProperties), __endpointBaseProperties); - await eventListener.AssertObjectIsValid(nameof(__endpointBaseProperties), __endpointBaseProperties); - } - } - /// The properties of Azure Storage SMB file share endpoint. - public partial interface IAzureStorageSmbFileShareEndpointProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties - { - /// The name of the Azure Storage file share. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Azure Storage file share.", - SerializedName = @"fileShareName", - PossibleTypes = new [] { typeof(string) })] - string FileShareName { get; set; } - /// The Azure Resource ID of the storage account. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Azure Resource ID of the storage account.", - SerializedName = @"storageAccountResourceId", - PossibleTypes = new [] { typeof(string) })] - string StorageAccountResourceId { get; set; } - - } - /// The properties of Azure Storage SMB file share endpoint. - internal partial interface IAzureStorageSmbFileShareEndpointPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal - { - /// The name of the Azure Storage file share. - string FileShareName { get; set; } - /// The Azure Resource ID of the storage account. - string StorageAccountResourceId { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointUpdateProperties.cs deleted file mode 100644 index 0c40549929d2..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointUpdateProperties.cs +++ /dev/null @@ -1,64 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The properties of Azure Storage SMB file share endpoint to update. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class AzureStorageSmbFileShareEndpointUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointUpdatePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateProperties(); - - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description = value ?? null; } - - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType = value ; } - - /// - /// Creates an new instance. - /// - public AzureStorageSmbFileShareEndpointUpdateProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); - await eventListener.AssertObjectIsValid(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); - } - } - /// The properties of Azure Storage SMB file share endpoint to update. - public partial interface IAzureStorageSmbFileShareEndpointUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties - { - - } - /// The properties of Azure Storage SMB file share endpoint to update. - internal partial interface IAzureStorageSmbFileShareEndpointUpdatePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Endpoint.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Endpoint.PowerShell.cs deleted file mode 100644 index 34c50eded9ad..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Endpoint.PowerShell.cs +++ /dev/null @@ -1,286 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// The Endpoint resource, which contains information about file sources and targets. - /// - [System.ComponentModel.TypeConverter(typeof(EndpointTypeConverter))] - public partial class Endpoint - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Endpoint(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Endpoint(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Endpoint(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ManagedServiceIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBasePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Endpoint(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ManagedServiceIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBasePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Endpoint resource, which contains information about file sources and targets. - [System.ComponentModel.TypeConverter(typeof(EndpointTypeConverter))] - public partial interface IEndpoint - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Endpoint.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Endpoint.cs deleted file mode 100644 index 080f734a1dd3..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Endpoint.cs +++ /dev/null @@ -1,239 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// The Endpoint resource, which contains information about file sources and targets. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class Endpoint : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource(); - - /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity _identity; - - /// - /// The managed service identity of the resource. This property is only available on the latest version. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).PrincipalId; } - - /// - /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).TenantId; } - - /// - /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType)""); } - - /// - /// 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } - - /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ManagedServiceIdentity()); set { {_identity = value;} } } - - /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } - - /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).TenantId = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties _property; - - /// The resource specific properties for the Storage Mover resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseProperties()); set => this._property = value; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public Endpoint() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// The Endpoint resource, which contains information about file sources and targets. - public partial interface IEndpoint : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource - { - /// - /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - 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). - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType? 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } - /// The resource specific properties for the Storage Mover resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The resource specific properties for the Storage Mover resource.", - SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties Property { get; set; } - - } - /// The Endpoint resource, which contains information about file sources and targets. - internal partial interface IEndpointInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal - { - /// - /// The managed service identity of the resource. This property is only available on the latest version. - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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). - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType? 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. - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } - /// The resource specific properties for the Storage Mover resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties Property { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseProperties.PowerShell.cs deleted file mode 100644 index a2ed63ef9746..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseProperties.PowerShell.cs +++ /dev/null @@ -1,182 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The resource specific properties for the Storage Mover resource. - [System.ComponentModel.TypeConverter(typeof(EndpointBasePropertiesTypeConverter))] - public partial class EndpointBaseProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EndpointBaseProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EndpointBaseProperties(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EndpointBaseProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal EndpointBaseProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 resource specific properties for the Storage Mover resource. - [System.ComponentModel.TypeConverter(typeof(EndpointBasePropertiesTypeConverter))] - public partial interface IEndpointBaseProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseProperties.cs deleted file mode 100644 index d62ddcaaa6d4..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseProperties.cs +++ /dev/null @@ -1,89 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The resource specific properties for the Storage Mover resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class EndpointBaseProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal - { - - /// Backing field for property. - private string _description; - - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Description { get => this._description; set => this._description = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType _endpointType; - - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get => this._endpointType; set => this._endpointType = value; } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? _provisioningState; - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } - - /// Creates an new instance. - public EndpointBaseProperties() - { - - } - } - /// The resource specific properties for the Storage Mover resource. - public partial interface IEndpointBaseProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Endpoint.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Endpoint resource type.", - SerializedName = @"endpointType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get; set; } - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of this resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; } - - } - /// The resource specific properties for the Storage Mover resource. - internal partial interface IEndpointBasePropertiesInternal - - { - /// A description for the Endpoint. - string Description { get; set; } - /// The Endpoint resource type. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get; set; } - /// The provisioning state of this resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateParameters.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateParameters.PowerShell.cs deleted file mode 100644 index 24d2d23e9d04..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateParameters.PowerShell.cs +++ /dev/null @@ -1,206 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The Endpoint resource. - [System.ComponentModel.TypeConverter(typeof(EndpointBaseUpdateParametersTypeConverter))] - public partial class EndpointBaseUpdateParameters - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EndpointBaseUpdateParameters(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EndpointBaseUpdateParameters(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EndpointBaseUpdateParameters(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ManagedServiceIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal EndpointBaseUpdateParameters(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ManagedServiceIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Endpoint resource. - [System.ComponentModel.TypeConverter(typeof(EndpointBaseUpdateParametersTypeConverter))] - public partial interface IEndpointBaseUpdateParameters - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateParameters.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateParameters.cs deleted file mode 100644 index 0db46b075549..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateParameters.cs +++ /dev/null @@ -1,162 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The Endpoint resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class EndpointBaseUpdateParameters : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParameters, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity _identity; - - /// The managed system identity assigned to this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).PrincipalId; } - - /// - /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).TenantId; } - - /// - /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType)""); } - - /// - /// 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } - - /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ManagedServiceIdentity()); set { {_identity = value;} } } - - /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).PrincipalId = value; } - - /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParametersInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)Identity).TenantId = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties _property; - - /// - /// The Endpoint resource, which contains information about file sources and targets. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateProperties()); set => this._property = value; } - - /// Creates an new instance. - public EndpointBaseUpdateParameters() - { - - } - } - /// The Endpoint resource. - public partial interface IEndpointBaseUpdateParameters : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// - /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - 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). - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType? 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } - /// - /// The Endpoint resource, which contains information about file sources and targets. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Endpoint resource, which contains information about file sources and targets.", - SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties Property { get; set; } - - } - /// The Endpoint resource. - internal partial interface IEndpointBaseUpdateParametersInternal - - { - /// The managed system identity assigned to this resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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). - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType? 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. - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } - /// - /// The Endpoint resource, which contains information about file sources and targets. - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties Property { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateProperties.cs deleted file mode 100644 index fb5910d068d6..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateProperties.cs +++ /dev/null @@ -1,71 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// The Endpoint resource, which contains information about file sources and targets. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class EndpointBaseUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal - { - - /// Backing field for property. - private string _description; - - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Description { get => this._description; set => this._description = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType _endpointType; - - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get => this._endpointType; set => this._endpointType = value; } - - /// Creates an new instance. - public EndpointBaseUpdateProperties() - { - - } - } - /// The Endpoint resource, which contains information about file sources and targets. - public partial interface IEndpointBaseUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Endpoint.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Endpoint resource type.", - SerializedName = @"endpointType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get; set; } - - } - /// The Endpoint resource, which contains information about file sources and targets. - internal partial interface IEndpointBaseUpdatePropertiesInternal - - { - /// A description for the Endpoint. - string Description { get; set; } - /// The Endpoint resource type. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointList.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointList.cs deleted file mode 100644 index e2245f28488c..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointList.cs +++ /dev/null @@ -1,72 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// List of Endpoints. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class EndpointList : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointList, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointListInternal - { - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint[] Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointListInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// The link to the next page of items - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; set => this._nextLink = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint[] _value; - - /// The Endpoint items on this page - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint[] Value { get => this._value; } - - /// Creates an new instance. - public EndpointList() - { - - } - } - /// List of Endpoints. - public partial interface IEndpointList : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// The link to the next page of items - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The link to the next page of items", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; set; } - /// The Endpoint items on this page - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"The Endpoint items on this page", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint[] Value { get; } - - } - /// List of Endpoints. - internal partial interface IEndpointListInternal - - { - /// The link to the next page of items - string NextLink { get; set; } - /// The Endpoint items on this page - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinition.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinition.PowerShell.cs deleted file mode 100644 index 9f41ac423305..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinition.PowerShell.cs +++ /dev/null @@ -1,380 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The Job Definition resource. - [System.ComponentModel.TypeConverter(typeof(JobDefinitionTypeConverter))] - public partial class JobDefinition - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new JobDefinition(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new JobDefinition(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal JobDefinition(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("JobType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).JobType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType?) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).JobType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType.CreateFrom); - } - if (content.Contains("CopyMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).CopyMode = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).CopyMode, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("SourceTargetMap")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceTargetMap = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap) content.GetValueForProperty("SourceTargetMap",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceTargetMap, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionPropertiesSourceTargetMapTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("SourceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceName, global::System.Convert.ToString); - } - if (content.Contains("SourceResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceResourceId, global::System.Convert.ToString); - } - if (content.Contains("SourceSubpath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceSubpath = (string) content.GetValueForProperty("SourceSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceSubpath, global::System.Convert.ToString); - } - if (content.Contains("TargetName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).TargetName, global::System.Convert.ToString); - } - if (content.Contains("TargetResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).TargetResourceId, global::System.Convert.ToString); - } - if (content.Contains("TargetSubpath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).TargetSubpath = (string) content.GetValueForProperty("TargetSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).TargetSubpath, global::System.Convert.ToString); - } - if (content.Contains("LatestJobRunName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).LatestJobRunName = (string) content.GetValueForProperty("LatestJobRunName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).LatestJobRunName, global::System.Convert.ToString); - } - if (content.Contains("LatestJobRunResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).LatestJobRunResourceId = (string) content.GetValueForProperty("LatestJobRunResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).LatestJobRunResourceId, global::System.Convert.ToString); - } - if (content.Contains("LatestJobRunStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).LatestJobRunStatus = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus?) content.GetValueForProperty("LatestJobRunStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).LatestJobRunStatus, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus.CreateFrom); - } - if (content.Contains("AgentName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).AgentName, global::System.Convert.ToString); - } - if (content.Contains("AgentResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).AgentResourceId, global::System.Convert.ToString); - } - if (content.Contains("SourceTargetMapValue")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceTargetMapValue = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[]) content.GetValueForProperty("SourceTargetMapValue",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceTargetMapValue, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceTargetMapTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal JobDefinition(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("JobType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).JobType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType?) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).JobType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType.CreateFrom); - } - if (content.Contains("CopyMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).CopyMode = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).CopyMode, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode.CreateFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("SourceTargetMap")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceTargetMap = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap) content.GetValueForProperty("SourceTargetMap",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceTargetMap, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionPropertiesSourceTargetMapTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("SourceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceName, global::System.Convert.ToString); - } - if (content.Contains("SourceResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceResourceId, global::System.Convert.ToString); - } - if (content.Contains("SourceSubpath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceSubpath = (string) content.GetValueForProperty("SourceSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceSubpath, global::System.Convert.ToString); - } - if (content.Contains("TargetName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).TargetName, global::System.Convert.ToString); - } - if (content.Contains("TargetResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).TargetResourceId, global::System.Convert.ToString); - } - if (content.Contains("TargetSubpath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).TargetSubpath = (string) content.GetValueForProperty("TargetSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).TargetSubpath, global::System.Convert.ToString); - } - if (content.Contains("LatestJobRunName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).LatestJobRunName = (string) content.GetValueForProperty("LatestJobRunName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).LatestJobRunName, global::System.Convert.ToString); - } - if (content.Contains("LatestJobRunResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).LatestJobRunResourceId = (string) content.GetValueForProperty("LatestJobRunResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).LatestJobRunResourceId, global::System.Convert.ToString); - } - if (content.Contains("LatestJobRunStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).LatestJobRunStatus = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus?) content.GetValueForProperty("LatestJobRunStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).LatestJobRunStatus, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus.CreateFrom); - } - if (content.Contains("AgentName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).AgentName, global::System.Convert.ToString); - } - if (content.Contains("AgentResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).AgentResourceId, global::System.Convert.ToString); - } - if (content.Contains("SourceTargetMapValue")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceTargetMapValue = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[]) content.GetValueForProperty("SourceTargetMapValue",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal)this).SourceTargetMapValue, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceTargetMapTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Job Definition resource. - [System.ComponentModel.TypeConverter(typeof(JobDefinitionTypeConverter))] - public partial interface IJobDefinition - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinition.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinition.cs deleted file mode 100644 index 71b87b411a81..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinition.cs +++ /dev/null @@ -1,397 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The Job Definition resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class JobDefinition : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource(); - - /// Name of the Agent to assign for new Job Runs of this Job Definition. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string AgentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).AgentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).AgentName = value ?? null; } - - /// - /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string AgentResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).AgentResourceId; } - - /// Strategy to use for copy. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode CopyMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).CopyMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).CopyMode = value ; } - - /// - /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for - /// migrating data between cloud to cloud. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).Description = value ?? null; } - - /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id; } - - /// The type of the Job. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType? JobType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).JobType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).JobType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType)""); } - - /// The name of the Job Run in a non-terminal state, if exists. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string LatestJobRunName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).LatestJobRunName; } - - /// - /// The fully qualified resource ID of the Job Run in a non-terminal state, if exists. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string LatestJobRunResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).LatestJobRunResourceId; } - - /// The current status of the Job Run in a non-terminal state, if exists. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? LatestJobRunStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).LatestJobRunStatus; } - - /// Internal Acessors for AgentResourceId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal.AgentResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).AgentResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).AgentResourceId = value; } - - /// Internal Acessors for LatestJobRunName - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal.LatestJobRunName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).LatestJobRunName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).LatestJobRunName = value; } - - /// Internal Acessors for LatestJobRunResourceId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal.LatestJobRunResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).LatestJobRunResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).LatestJobRunResourceId = value; } - - /// Internal Acessors for LatestJobRunStatus - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal.LatestJobRunStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).LatestJobRunStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).LatestJobRunStatus = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for SourceResourceId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal.SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).SourceResourceId = value; } - - /// Internal Acessors for SourceTargetMap - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal.SourceTargetMap { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).SourceTargetMap; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).SourceTargetMap = value; } - - /// Internal Acessors for SourceTargetMapValue - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[] Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal.SourceTargetMapValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).SourceTargetMapValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).SourceTargetMapValue = value; } - - /// Internal Acessors for TargetResourceId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionInternal.TargetResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).TargetResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).TargetResourceId = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionProperties _property; - - /// Job definition properties. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionProperties()); set => this._property = value; } - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).ProvisioningState; } - - /// The name of the source Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string SourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).SourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).SourceName = value ; } - - /// Fully qualified resource ID of the source Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).SourceResourceId; } - - /// The subpath to use when reading from the source Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string SourceSubpath { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).SourceSubpath; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).SourceSubpath = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[] SourceTargetMapValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).SourceTargetMapValue; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// The name of the target Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string TargetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).TargetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).TargetName = value ; } - - /// Fully qualified resource ID of the target Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string TargetResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).TargetResourceId; } - - /// The subpath to use when writing to the target Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string TargetSubpath { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).TargetSubpath; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)Property).TargetSubpath = value ?? null; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public JobDefinition() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// The Job Definition resource. - public partial interface IJobDefinition : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource - { - /// Name of the Agent to assign for new Job Runs of this Job Definition. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Name of the Agent to assign for new Job Runs of this Job Definition.", - SerializedName = @"agentName", - PossibleTypes = new [] { typeof(string) })] - string AgentName { get; set; } - /// - /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition.", - SerializedName = @"agentResourceId", - PossibleTypes = new [] { typeof(string) })] - string AgentResourceId { get; } - /// Strategy to use for copy. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Strategy to use for copy.", - SerializedName = @"copyMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode CopyMode { get; set; } - /// - /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for - /// migrating data between cloud to cloud. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// The type of the Job. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of the Job.", - SerializedName = @"jobType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType? JobType { get; set; } - /// The name of the Job Run in a non-terminal state, if exists. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The name of the Job Run in a non-terminal state, if exists.", - SerializedName = @"latestJobRunName", - PossibleTypes = new [] { typeof(string) })] - string LatestJobRunName { get; } - /// - /// The fully qualified resource ID of the Job Run in a non-terminal state, if exists. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The fully qualified resource ID of the Job Run in a non-terminal state, if exists.", - SerializedName = @"latestJobRunResourceId", - PossibleTypes = new [] { typeof(string) })] - string LatestJobRunResourceId { get; } - /// The current status of the Job Run in a non-terminal state, if exists. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The current status of the Job Run in a non-terminal state, if exists.", - SerializedName = @"latestJobRunStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? LatestJobRunStatus { get; } - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of this resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; } - /// The name of the source Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the source Endpoint.", - SerializedName = @"sourceName", - PossibleTypes = new [] { typeof(string) })] - string SourceName { get; set; } - /// Fully qualified resource ID of the source Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Fully qualified resource ID of the source Endpoint.", - SerializedName = @"sourceResourceId", - PossibleTypes = new [] { typeof(string) })] - string SourceResourceId { get; } - /// The subpath to use when reading from the source Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The subpath to use when reading from the source Endpoint.", - SerializedName = @"sourceSubpath", - PossibleTypes = new [] { typeof(string) })] - string SourceSubpath { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[] SourceTargetMapValue { get; } - /// The name of the target Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the target Endpoint.", - SerializedName = @"targetName", - PossibleTypes = new [] { typeof(string) })] - string TargetName { get; set; } - /// Fully qualified resource ID of the target Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Fully qualified resource ID of the target Endpoint.", - SerializedName = @"targetResourceId", - PossibleTypes = new [] { typeof(string) })] - string TargetResourceId { get; } - /// The subpath to use when writing to the target Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The subpath to use when writing to the target Endpoint.", - SerializedName = @"targetSubpath", - PossibleTypes = new [] { typeof(string) })] - string TargetSubpath { get; set; } - - } - /// The Job Definition resource. - internal partial interface IJobDefinitionInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal - { - /// Name of the Agent to assign for new Job Runs of this Job Definition. - string AgentName { get; set; } - /// - /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. - /// - string AgentResourceId { get; set; } - /// Strategy to use for copy. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode CopyMode { get; set; } - /// - /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for - /// migrating data between cloud to cloud. - /// - string Description { get; set; } - /// The type of the Job. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType? JobType { get; set; } - /// The name of the Job Run in a non-terminal state, if exists. - string LatestJobRunName { get; set; } - /// - /// The fully qualified resource ID of the Job Run in a non-terminal state, if exists. - /// - string LatestJobRunResourceId { get; set; } - /// The current status of the Job Run in a non-terminal state, if exists. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? LatestJobRunStatus { get; set; } - /// Job definition properties. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionProperties Property { get; set; } - /// The provisioning state of this resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; set; } - /// The name of the source Endpoint. - string SourceName { get; set; } - /// Fully qualified resource ID of the source Endpoint. - string SourceResourceId { get; set; } - /// The subpath to use when reading from the source Endpoint. - string SourceSubpath { get; set; } - /// The list of cloud endpoints to migrate. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap SourceTargetMap { get; set; } - - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[] SourceTargetMapValue { get; set; } - /// The name of the target Endpoint. - string TargetName { get; set; } - /// Fully qualified resource ID of the target Endpoint. - string TargetResourceId { get; set; } - /// The subpath to use when writing to the target Endpoint. - string TargetSubpath { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionList.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionList.cs deleted file mode 100644 index 818f1dfe93e7..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionList.cs +++ /dev/null @@ -1,72 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// List of Job Definitions. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class JobDefinitionList : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionList, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionListInternal - { - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition[] Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionListInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// The link to the next page of items - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; set => this._nextLink = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition[] _value; - - /// The JobDefinition items on this page - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition[] Value { get => this._value; } - - /// Creates an new instance. - public JobDefinitionList() - { - - } - } - /// List of Job Definitions. - public partial interface IJobDefinitionList : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// The link to the next page of items - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The link to the next page of items", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; set; } - /// The JobDefinition items on this page - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"The JobDefinition items on this page", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition[] Value { get; } - - } - /// List of Job Definitions. - internal partial interface IJobDefinitionListInternal - - { - /// The link to the next page of items - string NextLink { get; set; } - /// The JobDefinition items on this page - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionProperties.PowerShell.cs deleted file mode 100644 index fd13d7026d20..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionProperties.PowerShell.cs +++ /dev/null @@ -1,294 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// Job definition properties. - [System.ComponentModel.TypeConverter(typeof(JobDefinitionPropertiesTypeConverter))] - public partial class JobDefinitionProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new JobDefinitionProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new JobDefinitionProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal JobDefinitionProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SourceTargetMap")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceTargetMap = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap) content.GetValueForProperty("SourceTargetMap",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceTargetMap, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionPropertiesSourceTargetMapTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("JobType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).JobType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType?) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).JobType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType.CreateFrom); - } - if (content.Contains("CopyMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).CopyMode = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).CopyMode, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode.CreateFrom); - } - if (content.Contains("SourceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceName, global::System.Convert.ToString); - } - if (content.Contains("SourceResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceResourceId, global::System.Convert.ToString); - } - if (content.Contains("SourceSubpath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceSubpath = (string) content.GetValueForProperty("SourceSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceSubpath, global::System.Convert.ToString); - } - if (content.Contains("TargetName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).TargetName, global::System.Convert.ToString); - } - if (content.Contains("TargetResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).TargetResourceId, global::System.Convert.ToString); - } - if (content.Contains("TargetSubpath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).TargetSubpath = (string) content.GetValueForProperty("TargetSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).TargetSubpath, global::System.Convert.ToString); - } - if (content.Contains("LatestJobRunName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).LatestJobRunName = (string) content.GetValueForProperty("LatestJobRunName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).LatestJobRunName, global::System.Convert.ToString); - } - if (content.Contains("LatestJobRunResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).LatestJobRunResourceId = (string) content.GetValueForProperty("LatestJobRunResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).LatestJobRunResourceId, global::System.Convert.ToString); - } - if (content.Contains("LatestJobRunStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).LatestJobRunStatus = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus?) content.GetValueForProperty("LatestJobRunStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).LatestJobRunStatus, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus.CreateFrom); - } - if (content.Contains("AgentName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).AgentName, global::System.Convert.ToString); - } - if (content.Contains("AgentResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).AgentResourceId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("SourceTargetMapValue")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceTargetMapValue = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[]) content.GetValueForProperty("SourceTargetMapValue",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceTargetMapValue, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceTargetMapTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal JobDefinitionProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SourceTargetMap")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceTargetMap = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap) content.GetValueForProperty("SourceTargetMap",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceTargetMap, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionPropertiesSourceTargetMapTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("JobType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).JobType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType?) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).JobType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType.CreateFrom); - } - if (content.Contains("CopyMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).CopyMode = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).CopyMode, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode.CreateFrom); - } - if (content.Contains("SourceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceName, global::System.Convert.ToString); - } - if (content.Contains("SourceResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceResourceId, global::System.Convert.ToString); - } - if (content.Contains("SourceSubpath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceSubpath = (string) content.GetValueForProperty("SourceSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceSubpath, global::System.Convert.ToString); - } - if (content.Contains("TargetName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).TargetName, global::System.Convert.ToString); - } - if (content.Contains("TargetResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).TargetResourceId, global::System.Convert.ToString); - } - if (content.Contains("TargetSubpath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).TargetSubpath = (string) content.GetValueForProperty("TargetSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).TargetSubpath, global::System.Convert.ToString); - } - if (content.Contains("LatestJobRunName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).LatestJobRunName = (string) content.GetValueForProperty("LatestJobRunName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).LatestJobRunName, global::System.Convert.ToString); - } - if (content.Contains("LatestJobRunResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).LatestJobRunResourceId = (string) content.GetValueForProperty("LatestJobRunResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).LatestJobRunResourceId, global::System.Convert.ToString); - } - if (content.Contains("LatestJobRunStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).LatestJobRunStatus = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus?) content.GetValueForProperty("LatestJobRunStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).LatestJobRunStatus, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus.CreateFrom); - } - if (content.Contains("AgentName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).AgentName, global::System.Convert.ToString); - } - if (content.Contains("AgentResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).AgentResourceId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("SourceTargetMapValue")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceTargetMapValue = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[]) content.GetValueForProperty("SourceTargetMapValue",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal)this).SourceTargetMapValue, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceTargetMapTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - } - } - /// Job definition properties. - [System.ComponentModel.TypeConverter(typeof(JobDefinitionPropertiesTypeConverter))] - public partial interface IJobDefinitionProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionProperties.cs deleted file mode 100644 index 1b324d2b0556..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionProperties.cs +++ /dev/null @@ -1,360 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// Job definition properties. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class JobDefinitionProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal - { - - /// Backing field for property. - private string _agentName; - - /// Name of the Agent to assign for new Job Runs of this Job Definition. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string AgentName { get => this._agentName; set => this._agentName = value; } - - /// Backing field for property. - private string _agentResourceId; - - /// - /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string AgentResourceId { get => this._agentResourceId; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode _copyMode; - - /// Strategy to use for copy. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode CopyMode { get => this._copyMode; set => this._copyMode = value; } - - /// Backing field for property. - private string _description; - - /// - /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for - /// migrating data between cloud to cloud. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Description { get => this._description; set => this._description = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType? _jobType; - - /// The type of the Job. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType? JobType { get => this._jobType; set => this._jobType = value; } - - /// Backing field for property. - private string _latestJobRunName; - - /// The name of the Job Run in a non-terminal state, if exists. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string LatestJobRunName { get => this._latestJobRunName; } - - /// Backing field for property. - private string _latestJobRunResourceId; - - /// - /// The fully qualified resource ID of the Job Run in a non-terminal state, if exists. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string LatestJobRunResourceId { get => this._latestJobRunResourceId; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? _latestJobRunStatus; - - /// The current status of the Job Run in a non-terminal state, if exists. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? LatestJobRunStatus { get => this._latestJobRunStatus; } - - /// Internal Acessors for AgentResourceId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal.AgentResourceId { get => this._agentResourceId; set { {_agentResourceId = value;} } } - - /// Internal Acessors for LatestJobRunName - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal.LatestJobRunName { get => this._latestJobRunName; set { {_latestJobRunName = value;} } } - - /// Internal Acessors for LatestJobRunResourceId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal.LatestJobRunResourceId { get => this._latestJobRunResourceId; set { {_latestJobRunResourceId = value;} } } - - /// Internal Acessors for LatestJobRunStatus - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal.LatestJobRunStatus { get => this._latestJobRunStatus; set { {_latestJobRunStatus = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Internal Acessors for SourceResourceId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal.SourceResourceId { get => this._sourceResourceId; set { {_sourceResourceId = value;} } } - - /// Internal Acessors for SourceTargetMap - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal.SourceTargetMap { get => (this._sourceTargetMap = this._sourceTargetMap ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionPropertiesSourceTargetMap()); set { {_sourceTargetMap = value;} } } - - /// Internal Acessors for SourceTargetMapValue - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[] Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal.SourceTargetMapValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMapInternal)SourceTargetMap).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMapInternal)SourceTargetMap).Value = value; } - - /// Internal Acessors for TargetResourceId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesInternal.TargetResourceId { get => this._targetResourceId; set { {_targetResourceId = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? _provisioningState; - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } - - /// Backing field for property. - private string _sourceName; - - /// The name of the source Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string SourceName { get => this._sourceName; set => this._sourceName = value; } - - /// Backing field for property. - private string _sourceResourceId; - - /// Fully qualified resource ID of the source Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string SourceResourceId { get => this._sourceResourceId; } - - /// Backing field for property. - private string _sourceSubpath; - - /// The subpath to use when reading from the source Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string SourceSubpath { get => this._sourceSubpath; set => this._sourceSubpath = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap _sourceTargetMap; - - /// The list of cloud endpoints to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap SourceTargetMap { get => (this._sourceTargetMap = this._sourceTargetMap ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionPropertiesSourceTargetMap()); set => this._sourceTargetMap = value; } - - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[] SourceTargetMapValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMapInternal)SourceTargetMap).Value; } - - /// Backing field for property. - private string _targetName; - - /// The name of the target Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string TargetName { get => this._targetName; set => this._targetName = value; } - - /// Backing field for property. - private string _targetResourceId; - - /// Fully qualified resource ID of the target Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string TargetResourceId { get => this._targetResourceId; } - - /// Backing field for property. - private string _targetSubpath; - - /// The subpath to use when writing to the target Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string TargetSubpath { get => this._targetSubpath; set => this._targetSubpath = value; } - - /// Creates an new instance. - public JobDefinitionProperties() - { - - } - } - /// Job definition properties. - public partial interface IJobDefinitionProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// Name of the Agent to assign for new Job Runs of this Job Definition. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Name of the Agent to assign for new Job Runs of this Job Definition.", - SerializedName = @"agentName", - PossibleTypes = new [] { typeof(string) })] - string AgentName { get; set; } - /// - /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition.", - SerializedName = @"agentResourceId", - PossibleTypes = new [] { typeof(string) })] - string AgentResourceId { get; } - /// Strategy to use for copy. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Strategy to use for copy.", - SerializedName = @"copyMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode CopyMode { get; set; } - /// - /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for - /// migrating data between cloud to cloud. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// The type of the Job. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of the Job.", - SerializedName = @"jobType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType? JobType { get; set; } - /// The name of the Job Run in a non-terminal state, if exists. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The name of the Job Run in a non-terminal state, if exists.", - SerializedName = @"latestJobRunName", - PossibleTypes = new [] { typeof(string) })] - string LatestJobRunName { get; } - /// - /// The fully qualified resource ID of the Job Run in a non-terminal state, if exists. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The fully qualified resource ID of the Job Run in a non-terminal state, if exists.", - SerializedName = @"latestJobRunResourceId", - PossibleTypes = new [] { typeof(string) })] - string LatestJobRunResourceId { get; } - /// The current status of the Job Run in a non-terminal state, if exists. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The current status of the Job Run in a non-terminal state, if exists.", - SerializedName = @"latestJobRunStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? LatestJobRunStatus { get; } - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of this resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; } - /// The name of the source Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the source Endpoint.", - SerializedName = @"sourceName", - PossibleTypes = new [] { typeof(string) })] - string SourceName { get; set; } - /// Fully qualified resource ID of the source Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Fully qualified resource ID of the source Endpoint.", - SerializedName = @"sourceResourceId", - PossibleTypes = new [] { typeof(string) })] - string SourceResourceId { get; } - /// The subpath to use when reading from the source Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The subpath to use when reading from the source Endpoint.", - SerializedName = @"sourceSubpath", - PossibleTypes = new [] { typeof(string) })] - string SourceSubpath { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[] SourceTargetMapValue { get; } - /// The name of the target Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the target Endpoint.", - SerializedName = @"targetName", - PossibleTypes = new [] { typeof(string) })] - string TargetName { get; set; } - /// Fully qualified resource ID of the target Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Fully qualified resource ID of the target Endpoint.", - SerializedName = @"targetResourceId", - PossibleTypes = new [] { typeof(string) })] - string TargetResourceId { get; } - /// The subpath to use when writing to the target Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The subpath to use when writing to the target Endpoint.", - SerializedName = @"targetSubpath", - PossibleTypes = new [] { typeof(string) })] - string TargetSubpath { get; set; } - - } - /// Job definition properties. - internal partial interface IJobDefinitionPropertiesInternal - - { - /// Name of the Agent to assign for new Job Runs of this Job Definition. - string AgentName { get; set; } - /// - /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. - /// - string AgentResourceId { get; set; } - /// Strategy to use for copy. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode CopyMode { get; set; } - /// - /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for - /// migrating data between cloud to cloud. - /// - string Description { get; set; } - /// The type of the Job. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType? JobType { get; set; } - /// The name of the Job Run in a non-terminal state, if exists. - string LatestJobRunName { get; set; } - /// - /// The fully qualified resource ID of the Job Run in a non-terminal state, if exists. - /// - string LatestJobRunResourceId { get; set; } - /// The current status of the Job Run in a non-terminal state, if exists. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? LatestJobRunStatus { get; set; } - /// The provisioning state of this resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; set; } - /// The name of the source Endpoint. - string SourceName { get; set; } - /// Fully qualified resource ID of the source Endpoint. - string SourceResourceId { get; set; } - /// The subpath to use when reading from the source Endpoint. - string SourceSubpath { get; set; } - /// The list of cloud endpoints to migrate. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap SourceTargetMap { get; set; } - - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[] SourceTargetMapValue { get; set; } - /// The name of the target Endpoint. - string TargetName { get; set; } - /// Fully qualified resource ID of the target Endpoint. - string TargetResourceId { get; set; } - /// The subpath to use when writing to the target Endpoint. - string TargetSubpath { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionPropertiesSourceTargetMap.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionPropertiesSourceTargetMap.cs deleted file mode 100644 index b024902a1e86..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionPropertiesSourceTargetMap.cs +++ /dev/null @@ -1,52 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The list of cloud endpoints to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class JobDefinitionPropertiesSourceTargetMap : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMapInternal - { - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[] Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMapInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[] _value; - - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[] Value { get => this._value; } - - /// Creates an new instance. - public JobDefinitionPropertiesSourceTargetMap() - { - - } - } - /// The list of cloud endpoints to migrate. - public partial interface IJobDefinitionPropertiesSourceTargetMap : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[] Value { get; } - - } - /// The list of cloud endpoints to migrate. - internal partial interface IJobDefinitionPropertiesSourceTargetMapInternal - - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateParameters.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateParameters.PowerShell.cs deleted file mode 100644 index d255a51b06ea..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateParameters.PowerShell.cs +++ /dev/null @@ -1,190 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The Job Definition resource. - [System.ComponentModel.TypeConverter(typeof(JobDefinitionUpdateParametersTypeConverter))] - public partial class JobDefinitionUpdateParameters - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new JobDefinitionUpdateParameters(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new JobDefinitionUpdateParameters(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal JobDefinitionUpdateParameters(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("CopyMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).CopyMode = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode?) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).CopyMode, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("AgentName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).AgentName, 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 JobDefinitionUpdateParameters(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("CopyMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).CopyMode = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode?) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).CopyMode, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("AgentName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal)this).AgentName, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Job Definition resource. - [System.ComponentModel.TypeConverter(typeof(JobDefinitionUpdateParametersTypeConverter))] - public partial interface IJobDefinitionUpdateParameters - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateParameters.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateParameters.cs deleted file mode 100644 index 4e7ad081f8df..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateParameters.cs +++ /dev/null @@ -1,89 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The Job Definition resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class JobDefinitionUpdateParameters : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal - { - - /// Name of the Agent to assign for new Job Runs of this Job Definition. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string AgentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)Property).AgentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)Property).AgentName = value ?? null; } - - /// Strategy to use for copy. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode? CopyMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)Property).CopyMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)Property).CopyMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode)""); } - - /// A description for the Job Definition. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)Property).Description = value ?? null; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionUpdateProperties()); set { {_property = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateProperties _property; - - /// Job definition properties. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionUpdateProperties()); set => this._property = value; } - - /// Creates an new instance. - public JobDefinitionUpdateParameters() - { - - } - } - /// The Job Definition resource. - public partial interface IJobDefinitionUpdateParameters : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// Name of the Agent to assign for new Job Runs of this Job Definition. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Name of the Agent to assign for new Job Runs of this Job Definition.", - SerializedName = @"agentName", - PossibleTypes = new [] { typeof(string) })] - string AgentName { get; set; } - /// Strategy to use for copy. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Strategy to use for copy.", - SerializedName = @"copyMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode? CopyMode { get; set; } - /// A description for the Job Definition. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Job Definition.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - - } - /// The Job Definition resource. - internal partial interface IJobDefinitionUpdateParametersInternal - - { - /// Name of the Agent to assign for new Job Runs of this Job Definition. - string AgentName { get; set; } - /// Strategy to use for copy. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode? CopyMode { get; set; } - /// A description for the Job Definition. - string Description { get; set; } - /// Job definition properties. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateProperties Property { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateProperties.PowerShell.cs deleted file mode 100644 index 32520e61ecf8..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateProperties.PowerShell.cs +++ /dev/null @@ -1,182 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// Job definition properties. - [System.ComponentModel.TypeConverter(typeof(JobDefinitionUpdatePropertiesTypeConverter))] - public partial class JobDefinitionUpdateProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new JobDefinitionUpdateProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new JobDefinitionUpdateProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal JobDefinitionUpdateProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("CopyMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)this).CopyMode = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode?) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)this).CopyMode, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode.CreateFrom); - } - if (content.Contains("AgentName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)this).AgentName, 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 JobDefinitionUpdateProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("CopyMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)this).CopyMode = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode?) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)this).CopyMode, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode.CreateFrom); - } - if (content.Contains("AgentName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal)this).AgentName, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - } - } - /// Job definition properties. - [System.ComponentModel.TypeConverter(typeof(JobDefinitionUpdatePropertiesTypeConverter))] - public partial interface IJobDefinitionUpdateProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRun.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRun.PowerShell.cs deleted file mode 100644 index cd5637b425a2..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRun.PowerShell.cs +++ /dev/null @@ -1,492 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The Job Run resource. - [System.ComponentModel.TypeConverter(typeof(JobRunTypeConverter))] - public partial class JobRun - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new JobRun(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new JobRun(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal JobRun(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunErrorTypeConverter.ConvertFrom); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus.CreateFrom); - } - if (content.Contains("ScanStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ScanStatus = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus?) content.GetValueForProperty("ScanStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ScanStatus, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus.CreateFrom); - } - if (content.Contains("AgentName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).AgentName, global::System.Convert.ToString); - } - if (content.Contains("AgentResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).AgentResourceId, global::System.Convert.ToString); - } - if (content.Contains("ExecutionStartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ExecutionStartTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ExecutionStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ExecutionEndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ExecutionEndTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionEndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ExecutionEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastStatusUpdate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ItemsScanned")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsScanned = (long?) content.GetValueForProperty("ItemsScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsExcluded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsExcluded = (long?) content.GetValueForProperty("ItemsExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsUnsupported")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsUnsupported = (long?) content.GetValueForProperty("ItemsUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsNoTransferNeeded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsNoTransferNeeded = (long?) content.GetValueForProperty("ItemsNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsFailed")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsFailed = (long?) content.GetValueForProperty("ItemsFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsTransferred")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsTransferred = (long?) content.GetValueForProperty("ItemsTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesScanned")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesScanned = (long?) content.GetValueForProperty("BytesScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesExcluded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesExcluded = (long?) content.GetValueForProperty("BytesExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesUnsupported")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesUnsupported = (long?) content.GetValueForProperty("BytesUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesNoTransferNeeded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesNoTransferNeeded = (long?) content.GetValueForProperty("BytesNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesFailed")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesFailed = (long?) content.GetValueForProperty("BytesFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesTransferred")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesTransferred = (long?) content.GetValueForProperty("BytesTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("SourceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).SourceName, global::System.Convert.ToString); - } - if (content.Contains("SourceResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).SourceResourceId, global::System.Convert.ToString); - } - if (content.Contains("SourceProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).SourceProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("SourceProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).SourceProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("TargetName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).TargetName, global::System.Convert.ToString); - } - if (content.Contains("TargetResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).TargetResourceId, global::System.Convert.ToString); - } - if (content.Contains("TargetProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).TargetProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("TargetProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).TargetProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("JobDefinitionProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).JobDefinitionProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("JobDefinitionProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).JobDefinitionProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("ErrorCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ErrorCode = (string) content.GetValueForProperty("ErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ErrorCode, global::System.Convert.ToString); - } - if (content.Contains("ErrorMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ErrorMessage, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Target, 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 JobRun(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunErrorTypeConverter.ConvertFrom); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus.CreateFrom); - } - if (content.Contains("ScanStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ScanStatus = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus?) content.GetValueForProperty("ScanStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ScanStatus, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus.CreateFrom); - } - if (content.Contains("AgentName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).AgentName, global::System.Convert.ToString); - } - if (content.Contains("AgentResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).AgentResourceId, global::System.Convert.ToString); - } - if (content.Contains("ExecutionStartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ExecutionStartTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ExecutionStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ExecutionEndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ExecutionEndTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionEndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ExecutionEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastStatusUpdate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ItemsScanned")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsScanned = (long?) content.GetValueForProperty("ItemsScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsExcluded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsExcluded = (long?) content.GetValueForProperty("ItemsExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsUnsupported")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsUnsupported = (long?) content.GetValueForProperty("ItemsUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsNoTransferNeeded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsNoTransferNeeded = (long?) content.GetValueForProperty("ItemsNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsFailed")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsFailed = (long?) content.GetValueForProperty("ItemsFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsTransferred")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsTransferred = (long?) content.GetValueForProperty("ItemsTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ItemsTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesScanned")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesScanned = (long?) content.GetValueForProperty("BytesScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesExcluded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesExcluded = (long?) content.GetValueForProperty("BytesExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesUnsupported")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesUnsupported = (long?) content.GetValueForProperty("BytesUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesNoTransferNeeded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesNoTransferNeeded = (long?) content.GetValueForProperty("BytesNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesFailed")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesFailed = (long?) content.GetValueForProperty("BytesFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesTransferred")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesTransferred = (long?) content.GetValueForProperty("BytesTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).BytesTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("SourceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).SourceName, global::System.Convert.ToString); - } - if (content.Contains("SourceResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).SourceResourceId, global::System.Convert.ToString); - } - if (content.Contains("SourceProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).SourceProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("SourceProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).SourceProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("TargetName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).TargetName, global::System.Convert.ToString); - } - if (content.Contains("TargetResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).TargetResourceId, global::System.Convert.ToString); - } - if (content.Contains("TargetProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).TargetProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("TargetProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).TargetProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("JobDefinitionProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).JobDefinitionProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("JobDefinitionProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).JobDefinitionProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("ErrorCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ErrorCode = (string) content.GetValueForProperty("ErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ErrorCode, global::System.Convert.ToString); - } - if (content.Contains("ErrorMessage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).ErrorMessage, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal)this).Target, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Job Run resource. - [System.ComponentModel.TypeConverter(typeof(JobRunTypeConverter))] - public partial interface IJobRun - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRun.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRun.cs deleted file mode 100644 index c13692313f51..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRun.cs +++ /dev/null @@ -1,660 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The Job Run resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class JobRun : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource(); - - /// Name of the Agent assigned to this run. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string AgentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).AgentName; } - - /// Fully qualified resource id of the Agent assigned to this run. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string AgentResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).AgentResourceId; } - - /// - /// Bytes of data that will not be transferred, as they are excluded by user configuration. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public long? BytesExcluded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesExcluded; } - - /// Bytes of data that were attempted to transfer and failed. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public long? BytesFailed { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesFailed; } - - /// - /// Bytes of data that will not be transferred, as they are already found on target (e.g. mirror mode). - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public long? BytesNoTransferNeeded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesNoTransferNeeded; } - - /// Bytes of data scanned so far in source. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public long? BytesScanned { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesScanned; } - - /// Bytes of data successfully transferred to target. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public long? BytesTransferred { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesTransferred; } - - /// Bytes of data that will not be transferred, as they are unsupported on target. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public long? BytesUnsupported { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesUnsupported; } - - /// Error code of the given entry. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string ErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).Code = value ?? null; } - - /// Error message of the given entry. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).Message = value ?? null; } - - /// End time of the run. Null if Agent has not reported that the job has ended. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public global::System.DateTime? ExecutionEndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ExecutionEndTime; } - - /// Start time of the run. Null if no Agent reported that the job has started. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public global::System.DateTime? ExecutionStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ExecutionStartTime; } - - /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id; } - - /// - /// Number of items that will not be transferred, as they are excluded by user configuration. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public long? ItemsExcluded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsExcluded; } - - /// Number of items that were attempted to transfer and failed. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public long? ItemsFailed { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsFailed; } - - /// - /// Number of items that will not be transferred, as they are already found on target (e.g. mirror mode). - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public long? ItemsNoTransferNeeded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsNoTransferNeeded; } - - /// Number of items scanned so far in source. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public long? ItemsScanned { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsScanned; } - - /// Number of items successfully transferred to target. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public long? ItemsTransferred { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsTransferred; } - - /// - /// Number of items that will not be transferred, as they are unsupported on target. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public long? ItemsUnsupported { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsUnsupported; } - - /// Copy of parent Job Definition's properties at time of Job Run creation. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny JobDefinitionProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).JobDefinitionProperty; } - - /// The last updated time of the Job Run. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public global::System.DateTime? LastStatusUpdate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).LastStatusUpdate; } - - /// Internal Acessors for AgentName - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.AgentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).AgentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).AgentName = value; } - - /// Internal Acessors for AgentResourceId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.AgentResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).AgentResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).AgentResourceId = value; } - - /// Internal Acessors for BytesExcluded - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.BytesExcluded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesExcluded; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesExcluded = value; } - - /// Internal Acessors for BytesFailed - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.BytesFailed { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesFailed; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesFailed = value; } - - /// Internal Acessors for BytesNoTransferNeeded - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.BytesNoTransferNeeded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesNoTransferNeeded; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesNoTransferNeeded = value; } - - /// Internal Acessors for BytesScanned - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.BytesScanned { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesScanned; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesScanned = value; } - - /// Internal Acessors for BytesTransferred - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.BytesTransferred { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesTransferred; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesTransferred = value; } - - /// Internal Acessors for BytesUnsupported - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.BytesUnsupported { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesUnsupported; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).BytesUnsupported = value; } - - /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).Error = value; } - - /// Internal Acessors for ExecutionEndTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.ExecutionEndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ExecutionEndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ExecutionEndTime = value; } - - /// Internal Acessors for ExecutionStartTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.ExecutionStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ExecutionStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ExecutionStartTime = value; } - - /// Internal Acessors for ItemsExcluded - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.ItemsExcluded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsExcluded; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsExcluded = value; } - - /// Internal Acessors for ItemsFailed - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.ItemsFailed { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsFailed; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsFailed = value; } - - /// Internal Acessors for ItemsNoTransferNeeded - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.ItemsNoTransferNeeded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsNoTransferNeeded; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsNoTransferNeeded = value; } - - /// Internal Acessors for ItemsScanned - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.ItemsScanned { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsScanned; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsScanned = value; } - - /// Internal Acessors for ItemsTransferred - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.ItemsTransferred { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsTransferred; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsTransferred = value; } - - /// Internal Acessors for ItemsUnsupported - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.ItemsUnsupported { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsUnsupported; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ItemsUnsupported = value; } - - /// Internal Acessors for JobDefinitionProperty - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.JobDefinitionProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).JobDefinitionProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).JobDefinitionProperty = value; } - - /// Internal Acessors for LastStatusUpdate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.LastStatusUpdate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).LastStatusUpdate; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).LastStatusUpdate = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for ScanStatus - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.ScanStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ScanStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ScanStatus = value; } - - /// Internal Acessors for SourceName - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.SourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).SourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).SourceName = value; } - - /// Internal Acessors for SourceProperty - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.SourceProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).SourceProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).SourceProperty = value; } - - /// Internal Acessors for SourceResourceId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).SourceResourceId = value; } - - /// Internal Acessors for Status - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).Status = value; } - - /// Internal Acessors for TargetName - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.TargetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).TargetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).TargetName = value; } - - /// Internal Acessors for TargetProperty - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.TargetProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).TargetProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).TargetProperty = value; } - - /// Internal Acessors for TargetResourceId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunInternal.TargetResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).TargetResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).TargetResourceId = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunProperties _property; - - /// Job run properties. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunProperties()); set => this._property = value; } - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ProvisioningState; } - - /// The status of Agent's scanning of source. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus? ScanStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).ScanStatus; } - - /// Name of source Endpoint resource. This resource may no longer exist. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string SourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).SourceName; } - - /// Copy of source Endpoint resource's properties at time of Job Run creation. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny SourceProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).SourceProperty; } - - /// Fully qualified resource id of source Endpoint. This id may no longer exist. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).SourceResourceId; } - - /// The state of the job execution. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).Status; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// Target of the given error entry. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).Target = value ?? null; } - - /// Name of target Endpoint resource. This resource may no longer exist. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string TargetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).TargetName; } - - /// Copy of Endpoint resource's properties at time of Job Run creation. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny TargetProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).TargetProperty; } - - /// Fully qualified resource id of of Endpoint. This id may no longer exist. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string TargetResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)Property).TargetResourceId; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public JobRun() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// The Job Run resource. - public partial interface IJobRun : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource - { - /// Name of the Agent assigned to this run. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Name of the Agent assigned to this run.", - SerializedName = @"agentName", - PossibleTypes = new [] { typeof(string) })] - string AgentName { get; } - /// Fully qualified resource id of the Agent assigned to this run. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Fully qualified resource id of the Agent assigned to this run.", - SerializedName = @"agentResourceId", - PossibleTypes = new [] { typeof(string) })] - string AgentResourceId { get; } - /// - /// Bytes of data that will not be transferred, as they are excluded by user configuration. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Bytes of data that will not be transferred, as they are excluded by user configuration.", - SerializedName = @"bytesExcluded", - PossibleTypes = new [] { typeof(long) })] - long? BytesExcluded { get; } - /// Bytes of data that were attempted to transfer and failed. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Bytes of data that were attempted to transfer and failed.", - SerializedName = @"bytesFailed", - PossibleTypes = new [] { typeof(long) })] - long? BytesFailed { get; } - /// - /// Bytes of data that will not be transferred, as they are already found on target (e.g. mirror mode). - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Bytes of data that will not be transferred, as they are already found on target (e.g. mirror mode).", - SerializedName = @"bytesNoTransferNeeded", - PossibleTypes = new [] { typeof(long) })] - long? BytesNoTransferNeeded { get; } - /// Bytes of data scanned so far in source. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Bytes of data scanned so far in source.", - SerializedName = @"bytesScanned", - PossibleTypes = new [] { typeof(long) })] - long? BytesScanned { get; } - /// Bytes of data successfully transferred to target. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Bytes of data successfully transferred to target.", - SerializedName = @"bytesTransferred", - PossibleTypes = new [] { typeof(long) })] - long? BytesTransferred { get; } - /// Bytes of data that will not be transferred, as they are unsupported on target. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Bytes of data that will not be transferred, as they are unsupported on target.", - SerializedName = @"bytesUnsupported", - PossibleTypes = new [] { typeof(long) })] - long? BytesUnsupported { get; } - /// Error code of the given entry. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Error code of the given entry.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string ErrorCode { get; set; } - /// Error message of the given entry. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Error message of the given entry.", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string ErrorMessage { get; set; } - /// End time of the run. Null if Agent has not reported that the job has ended. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"End time of the run. Null if Agent has not reported that the job has ended.", - SerializedName = @"executionEndTime", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? ExecutionEndTime { get; } - /// Start time of the run. Null if no Agent reported that the job has started. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Start time of the run. Null if no Agent reported that the job has started.", - SerializedName = @"executionStartTime", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? ExecutionStartTime { get; } - /// - /// Number of items that will not be transferred, as they are excluded by user configuration. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Number of items that will not be transferred, as they are excluded by user configuration.", - SerializedName = @"itemsExcluded", - PossibleTypes = new [] { typeof(long) })] - long? ItemsExcluded { get; } - /// Number of items that were attempted to transfer and failed. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Number of items that were attempted to transfer and failed.", - SerializedName = @"itemsFailed", - PossibleTypes = new [] { typeof(long) })] - long? ItemsFailed { get; } - /// - /// Number of items that will not be transferred, as they are already found on target (e.g. mirror mode). - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Number of items that will not be transferred, as they are already found on target (e.g. mirror mode).", - SerializedName = @"itemsNoTransferNeeded", - PossibleTypes = new [] { typeof(long) })] - long? ItemsNoTransferNeeded { get; } - /// Number of items scanned so far in source. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Number of items scanned so far in source.", - SerializedName = @"itemsScanned", - PossibleTypes = new [] { typeof(long) })] - long? ItemsScanned { get; } - /// Number of items successfully transferred to target. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Number of items successfully transferred to target.", - SerializedName = @"itemsTransferred", - PossibleTypes = new [] { typeof(long) })] - long? ItemsTransferred { get; } - /// - /// Number of items that will not be transferred, as they are unsupported on target. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Number of items that will not be transferred, as they are unsupported on target.", - SerializedName = @"itemsUnsupported", - PossibleTypes = new [] { typeof(long) })] - long? ItemsUnsupported { get; } - /// Copy of parent Job Definition's properties at time of Job Run creation. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Copy of parent Job Definition's properties at time of Job Run creation.", - SerializedName = @"jobDefinitionProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny JobDefinitionProperty { get; } - /// The last updated time of the Job Run. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The last updated time of the Job Run.", - SerializedName = @"lastStatusUpdate", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? LastStatusUpdate { get; } - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of this resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; } - /// The status of Agent's scanning of source. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The status of Agent's scanning of source.", - SerializedName = @"scanStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus? ScanStatus { get; } - /// Name of source Endpoint resource. This resource may no longer exist. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Name of source Endpoint resource. This resource may no longer exist.", - SerializedName = @"sourceName", - PossibleTypes = new [] { typeof(string) })] - string SourceName { get; } - /// Copy of source Endpoint resource's properties at time of Job Run creation. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Copy of source Endpoint resource's properties at time of Job Run creation.", - SerializedName = @"sourceProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny SourceProperty { get; } - /// Fully qualified resource id of source Endpoint. This id may no longer exist. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Fully qualified resource id of source Endpoint. This id may no longer exist.", - SerializedName = @"sourceResourceId", - PossibleTypes = new [] { typeof(string) })] - string SourceResourceId { get; } - /// The state of the job execution. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The state of the job execution.", - SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? Status { get; } - /// Target of the given error entry. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Target of the given error entry.", - SerializedName = @"target", - PossibleTypes = new [] { typeof(string) })] - string Target { get; set; } - /// Name of target Endpoint resource. This resource may no longer exist. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Name of target Endpoint resource. This resource may no longer exist.", - SerializedName = @"targetName", - PossibleTypes = new [] { typeof(string) })] - string TargetName { get; } - /// Copy of Endpoint resource's properties at time of Job Run creation. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Copy of Endpoint resource's properties at time of Job Run creation.", - SerializedName = @"targetProperties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny TargetProperty { get; } - /// Fully qualified resource id of of Endpoint. This id may no longer exist. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Fully qualified resource id of of Endpoint. This id may no longer exist.", - SerializedName = @"targetResourceId", - PossibleTypes = new [] { typeof(string) })] - string TargetResourceId { get; } - - } - /// The Job Run resource. - internal partial interface IJobRunInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal - { - /// Name of the Agent assigned to this run. - string AgentName { get; set; } - /// Fully qualified resource id of the Agent assigned to this run. - string AgentResourceId { get; set; } - /// - /// Bytes of data that will not be transferred, as they are excluded by user configuration. - /// - long? BytesExcluded { get; set; } - /// Bytes of data that were attempted to transfer and failed. - long? BytesFailed { get; set; } - /// - /// Bytes of data that will not be transferred, as they are already found on target (e.g. mirror mode). - /// - long? BytesNoTransferNeeded { get; set; } - /// Bytes of data scanned so far in source. - long? BytesScanned { get; set; } - /// Bytes of data successfully transferred to target. - long? BytesTransferred { get; set; } - /// Bytes of data that will not be transferred, as they are unsupported on target. - long? BytesUnsupported { get; set; } - /// Error details. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError Error { get; set; } - /// Error code of the given entry. - string ErrorCode { get; set; } - /// Error message of the given entry. - string ErrorMessage { get; set; } - /// End time of the run. Null if Agent has not reported that the job has ended. - global::System.DateTime? ExecutionEndTime { get; set; } - /// Start time of the run. Null if no Agent reported that the job has started. - global::System.DateTime? ExecutionStartTime { get; set; } - /// - /// Number of items that will not be transferred, as they are excluded by user configuration. - /// - long? ItemsExcluded { get; set; } - /// Number of items that were attempted to transfer and failed. - long? ItemsFailed { get; set; } - /// - /// Number of items that will not be transferred, as they are already found on target (e.g. mirror mode). - /// - long? ItemsNoTransferNeeded { get; set; } - /// Number of items scanned so far in source. - long? ItemsScanned { get; set; } - /// Number of items successfully transferred to target. - long? ItemsTransferred { get; set; } - /// - /// Number of items that will not be transferred, as they are unsupported on target. - /// - long? ItemsUnsupported { get; set; } - /// Copy of parent Job Definition's properties at time of Job Run creation. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny JobDefinitionProperty { get; set; } - /// The last updated time of the Job Run. - global::System.DateTime? LastStatusUpdate { get; set; } - /// Job run properties. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunProperties Property { get; set; } - /// The provisioning state of this resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; set; } - /// The status of Agent's scanning of source. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus? ScanStatus { get; set; } - /// Name of source Endpoint resource. This resource may no longer exist. - string SourceName { get; set; } - /// Copy of source Endpoint resource's properties at time of Job Run creation. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny SourceProperty { get; set; } - /// Fully qualified resource id of source Endpoint. This id may no longer exist. - string SourceResourceId { get; set; } - /// The state of the job execution. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? Status { get; set; } - /// Target of the given error entry. - string Target { get; set; } - /// Name of target Endpoint resource. This resource may no longer exist. - string TargetName { get; set; } - /// Copy of Endpoint resource's properties at time of Job Run creation. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny TargetProperty { get; set; } - /// Fully qualified resource id of of Endpoint. This id may no longer exist. - string TargetResourceId { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunList.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunList.cs deleted file mode 100644 index 174b9d6357bd..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunList.cs +++ /dev/null @@ -1,72 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// List of Job Runs. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class JobRunList : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunList, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunListInternal - { - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun[] Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunListInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// The link to the next page of items - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; set => this._nextLink = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun[] _value; - - /// The JobRun items on this page - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun[] Value { get => this._value; } - - /// Creates an new instance. - public JobRunList() - { - - } - } - /// List of Job Runs. - public partial interface IJobRunList : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// The link to the next page of items - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The link to the next page of items", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; set; } - /// The JobRun items on this page - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"The JobRun items on this page", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun[] Value { get; } - - } - /// List of Job Runs. - internal partial interface IJobRunListInternal - - { - /// The link to the next page of items - string NextLink { get; set; } - /// The JobRun items on this page - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunProperties.PowerShell.cs deleted file mode 100644 index cc554429cc8b..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunProperties.PowerShell.cs +++ /dev/null @@ -1,404 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// Job run properties. - [System.ComponentModel.TypeConverter(typeof(JobRunPropertiesTypeConverter))] - public partial class JobRunProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new JobRunProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new JobRunProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal JobRunProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunErrorTypeConverter.ConvertFrom); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus.CreateFrom); - } - if (content.Contains("ScanStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ScanStatus = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus?) content.GetValueForProperty("ScanStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ScanStatus, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus.CreateFrom); - } - if (content.Contains("AgentName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).AgentName, global::System.Convert.ToString); - } - if (content.Contains("AgentResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).AgentResourceId, global::System.Convert.ToString); - } - if (content.Contains("ExecutionStartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ExecutionStartTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ExecutionStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ExecutionEndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ExecutionEndTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionEndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ExecutionEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastStatusUpdate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ItemsScanned")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsScanned = (long?) content.GetValueForProperty("ItemsScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsExcluded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsExcluded = (long?) content.GetValueForProperty("ItemsExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsUnsupported")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsUnsupported = (long?) content.GetValueForProperty("ItemsUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsNoTransferNeeded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsNoTransferNeeded = (long?) content.GetValueForProperty("ItemsNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsFailed")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsFailed = (long?) content.GetValueForProperty("ItemsFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsTransferred")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsTransferred = (long?) content.GetValueForProperty("ItemsTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesScanned")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesScanned = (long?) content.GetValueForProperty("BytesScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesExcluded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesExcluded = (long?) content.GetValueForProperty("BytesExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesUnsupported")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesUnsupported = (long?) content.GetValueForProperty("BytesUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesNoTransferNeeded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesNoTransferNeeded = (long?) content.GetValueForProperty("BytesNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesFailed")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesFailed = (long?) content.GetValueForProperty("BytesFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesTransferred")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesTransferred = (long?) content.GetValueForProperty("BytesTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("SourceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).SourceName, global::System.Convert.ToString); - } - if (content.Contains("SourceResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).SourceResourceId, global::System.Convert.ToString); - } - if (content.Contains("SourceProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).SourceProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("SourceProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).SourceProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("TargetName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).TargetName, global::System.Convert.ToString); - } - if (content.Contains("TargetResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).TargetResourceId, global::System.Convert.ToString); - } - if (content.Contains("TargetProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).TargetProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("TargetProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).TargetProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("JobDefinitionProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).JobDefinitionProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("JobDefinitionProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).JobDefinitionProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Target, 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 JobRunProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunErrorTypeConverter.ConvertFrom); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus.CreateFrom); - } - if (content.Contains("ScanStatus")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ScanStatus = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus?) content.GetValueForProperty("ScanStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ScanStatus, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus.CreateFrom); - } - if (content.Contains("AgentName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).AgentName, global::System.Convert.ToString); - } - if (content.Contains("AgentResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).AgentResourceId, global::System.Convert.ToString); - } - if (content.Contains("ExecutionStartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ExecutionStartTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ExecutionStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ExecutionEndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ExecutionEndTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionEndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ExecutionEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastStatusUpdate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ItemsScanned")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsScanned = (long?) content.GetValueForProperty("ItemsScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsExcluded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsExcluded = (long?) content.GetValueForProperty("ItemsExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsUnsupported")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsUnsupported = (long?) content.GetValueForProperty("ItemsUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsNoTransferNeeded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsNoTransferNeeded = (long?) content.GetValueForProperty("ItemsNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsFailed")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsFailed = (long?) content.GetValueForProperty("ItemsFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("ItemsTransferred")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsTransferred = (long?) content.GetValueForProperty("ItemsTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ItemsTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesScanned")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesScanned = (long?) content.GetValueForProperty("BytesScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesExcluded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesExcluded = (long?) content.GetValueForProperty("BytesExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesUnsupported")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesUnsupported = (long?) content.GetValueForProperty("BytesUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesNoTransferNeeded")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesNoTransferNeeded = (long?) content.GetValueForProperty("BytesNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesFailed")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesFailed = (long?) content.GetValueForProperty("BytesFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("BytesTransferred")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesTransferred = (long?) content.GetValueForProperty("BytesTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).BytesTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); - } - if (content.Contains("SourceName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).SourceName, global::System.Convert.ToString); - } - if (content.Contains("SourceResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).SourceResourceId, global::System.Convert.ToString); - } - if (content.Contains("SourceProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).SourceProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("SourceProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).SourceProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("TargetName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).TargetName, global::System.Convert.ToString); - } - if (content.Contains("TargetResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).TargetResourceId, global::System.Convert.ToString); - } - if (content.Contains("TargetProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).TargetProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("TargetProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).TargetProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("JobDefinitionProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).JobDefinitionProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("JobDefinitionProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).JobDefinitionProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal)this).Target, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - } - } - /// Job run properties. - [System.ComponentModel.TypeConverter(typeof(JobRunPropertiesTypeConverter))] - public partial interface IJobRunProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointProperties.PowerShell.cs deleted file mode 100644 index 8a486e1fcba6..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointProperties.PowerShell.cs +++ /dev/null @@ -1,206 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The properties of NFS share endpoint. - [System.ComponentModel.TypeConverter(typeof(NfsMountEndpointPropertiesTypeConverter))] - public partial class NfsMountEndpointProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new NfsMountEndpointProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new NfsMountEndpointProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal NfsMountEndpointProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Host")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointPropertiesInternal)this).Host = (string) content.GetValueForProperty("Host",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointPropertiesInternal)this).Host, global::System.Convert.ToString); - } - if (content.Contains("NfsVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointPropertiesInternal)this).NfsVersion = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion?) content.GetValueForProperty("NfsVersion",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointPropertiesInternal)this).NfsVersion, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion.CreateFrom); - } - if (content.Contains("Export")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointPropertiesInternal)this).Export = (string) content.GetValueForProperty("Export",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointPropertiesInternal)this).Export, global::System.Convert.ToString); - } - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal NfsMountEndpointProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Host")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointPropertiesInternal)this).Host = (string) content.GetValueForProperty("Host",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointPropertiesInternal)this).Host, global::System.Convert.ToString); - } - if (content.Contains("NfsVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointPropertiesInternal)this).NfsVersion = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion?) content.GetValueForProperty("NfsVersion",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointPropertiesInternal)this).NfsVersion, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion.CreateFrom); - } - if (content.Contains("Export")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointPropertiesInternal)this).Export = (string) content.GetValueForProperty("Export",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointPropertiesInternal)this).Export, global::System.Convert.ToString); - } - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of NFS share endpoint. - [System.ComponentModel.TypeConverter(typeof(NfsMountEndpointPropertiesTypeConverter))] - public partial interface INfsMountEndpointProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointProperties.cs deleted file mode 100644 index c047490cfe6d..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointProperties.cs +++ /dev/null @@ -1,120 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The properties of NFS share endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class NfsMountEndpointProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointPropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseProperties(); - - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description = value ?? null; } - - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType = value ; } - - /// Backing field for property. - private string _export; - - /// The directory being exported from the server. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Export { get => this._export; set => this._export = value; } - - /// Backing field for property. - private string _host; - - /// The host name or IP address of the server exporting the file system. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Host { get => this._host; set => this._host = value; } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion? _nfsVersion; - - /// The NFS protocol version. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion? NfsVersion { get => this._nfsVersion; set => this._nfsVersion = value; } - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; } - - /// Creates an new instance. - public NfsMountEndpointProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__endpointBaseProperties), __endpointBaseProperties); - await eventListener.AssertObjectIsValid(nameof(__endpointBaseProperties), __endpointBaseProperties); - } - } - /// The properties of NFS share endpoint. - public partial interface INfsMountEndpointProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties - { - /// The directory being exported from the server. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The directory being exported from the server.", - SerializedName = @"export", - PossibleTypes = new [] { typeof(string) })] - string Export { get; set; } - /// The host name or IP address of the server exporting the file system. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The host name or IP address of the server exporting the file system.", - SerializedName = @"host", - PossibleTypes = new [] { typeof(string) })] - string Host { get; set; } - /// The NFS protocol version. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The NFS protocol version.", - SerializedName = @"nfsVersion", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion? NfsVersion { get; set; } - - } - /// The properties of NFS share endpoint. - internal partial interface INfsMountEndpointPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal - { - /// The directory being exported from the server. - string Export { get; set; } - /// The host name or IP address of the server exporting the file system. - string Host { get; set; } - /// The NFS protocol version. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion? NfsVersion { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointUpdateProperties.cs deleted file mode 100644 index 0baece16f27d..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointUpdateProperties.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class NfsMountEndpointUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointUpdatePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateProperties(); - - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description = value ?? null; } - - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType = value ; } - - /// Creates an new instance. - public NfsMountEndpointUpdateProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); - await eventListener.AssertObjectIsValid(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); - } - } - public partial interface INfsMountEndpointUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties - { - - } - internal partial interface INfsMountEndpointUpdatePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Project.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Project.PowerShell.cs deleted file mode 100644 index 0fc2ec52fb75..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Project.PowerShell.cs +++ /dev/null @@ -1,260 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The Project resource. - [System.ComponentModel.TypeConverter(typeof(ProjectTypeConverter))] - public partial class Project - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Project(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Project(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Project(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ProjectPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectInternal)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 Project(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ProjectPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectInternal)this).Description, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Project resource. - [System.ComponentModel.TypeConverter(typeof(ProjectTypeConverter))] - public partial interface IProject - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Project.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Project.TypeConverter.cs deleted file mode 100644 index ef7250206ffb..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Project.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ProjectTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return Project.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return Project.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return Project.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/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Project.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Project.cs deleted file mode 100644 index 6c0da0447688..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Project.cs +++ /dev/null @@ -1,155 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The Project resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class Project : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource(); - - /// A description for the Project. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectPropertiesInternal)Property).Description = value ?? null; } - - /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ProjectProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectPropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectProperties _property; - - /// Project properties. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ProjectProperties()); set => this._property = value; } - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectPropertiesInternal)Property).ProvisioningState; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public Project() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// The Project resource. - public partial interface IProject : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource - { - /// A description for the Project. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Project.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of this resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; } - - } - /// The Project resource. - internal partial interface IProjectInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal - { - /// A description for the Project. - string Description { get; set; } - /// Project properties. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectProperties Property { get; set; } - /// The provisioning state of this resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Project.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Project.json.cs deleted file mode 100644 index 8aac2f67cf35..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Project.json.cs +++ /dev/null @@ -1,110 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The Project resource. - public partial class Project - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new Project(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. - internal Project(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ProjectProperties.FromJson(__jsonProperties) : Property;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __resource?.ToJson(container, serializationMode); - AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectList.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectList.cs deleted file mode 100644 index 315261e091e5..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectList.cs +++ /dev/null @@ -1,72 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// List of Project resources. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class ProjectList : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectList, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectListInternal - { - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject[] Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectListInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// The link to the next page of items - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; set => this._nextLink = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject[] _value; - - /// The Project items on this page - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject[] Value { get => this._value; } - - /// Creates an new instance. - public ProjectList() - { - - } - } - /// List of Project resources. - public partial interface IProjectList : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// The link to the next page of items - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The link to the next page of items", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; set; } - /// The Project items on this page - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"The Project items on this page", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject[] Value { get; } - - } - /// List of Project resources. - internal partial interface IProjectListInternal - - { - /// The link to the next page of items - string NextLink { get; set; } - /// The Project items on this page - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectProperties.PowerShell.cs deleted file mode 100644 index d93b01ffde86..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectProperties.PowerShell.cs +++ /dev/null @@ -1,172 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// Project properties. - [System.ComponentModel.TypeConverter(typeof(ProjectPropertiesTypeConverter))] - public partial class ProjectProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ProjectProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ProjectProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ProjectProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectPropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ProjectProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectPropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - } - } - /// Project properties. - [System.ComponentModel.TypeConverter(typeof(ProjectPropertiesTypeConverter))] - public partial interface IProjectProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectProperties.TypeConverter.cs deleted file mode 100644 index 65b23c8c826c..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectProperties.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ProjectPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectProperties ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectProperties).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ProjectProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ProjectProperties.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ProjectProperties.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/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectProperties.cs deleted file mode 100644 index 3f9fafe3b6d3..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectProperties.cs +++ /dev/null @@ -1,72 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// Project properties. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class ProjectProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectPropertiesInternal - { - - /// Backing field for property. - private string _description; - - /// A description for the Project. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Description { get => this._description; set => this._description = value; } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? _provisioningState; - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } - - /// Creates an new instance. - public ProjectProperties() - { - - } - } - /// Project properties. - public partial interface IProjectProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// A description for the Project. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Project.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of this resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; } - - } - /// Project properties. - internal partial interface IProjectPropertiesInternal - - { - /// A description for the Project. - string Description { get; set; } - /// The provisioning state of this resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectProperties.json.cs deleted file mode 100644 index f0860c979bb6..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectProperties.json.cs +++ /dev/null @@ -1,113 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// Project properties. - public partial class ProjectProperties - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectProperties. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectProperties. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new ProjectProperties(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. - internal ProjectProperties(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateParameters.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateParameters.cs deleted file mode 100644 index 0640b59c86c1..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateParameters.cs +++ /dev/null @@ -1,61 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The Project resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class ProjectUpdateParameters : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParametersInternal - { - - /// A description for the Project. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdatePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdatePropertiesInternal)Property).Description = value ?? null; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ProjectUpdateProperties()); set { {_property = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateProperties _property; - - /// Project properties. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ProjectUpdateProperties()); set => this._property = value; } - - /// Creates an new instance. - public ProjectUpdateParameters() - { - - } - } - /// The Project resource. - public partial interface IProjectUpdateParameters : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// A description for the Project. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Project.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - - } - /// The Project resource. - internal partial interface IProjectUpdateParametersInternal - - { - /// A description for the Project. - string Description { get; set; } - /// Project properties. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateProperties Property { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateProperties.PowerShell.cs deleted file mode 100644 index becc2facbe3f..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateProperties.PowerShell.cs +++ /dev/null @@ -1,166 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// Project properties. - [System.ComponentModel.TypeConverter(typeof(ProjectUpdatePropertiesTypeConverter))] - public partial class ProjectUpdateProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ProjectUpdateProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ProjectUpdateProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ProjectUpdateProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdatePropertiesInternal)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 ProjectUpdateProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - } - } - /// Project properties. - [System.ComponentModel.TypeConverter(typeof(ProjectUpdatePropertiesTypeConverter))] - public partial interface IProjectUpdateProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateProperties.TypeConverter.cs deleted file mode 100644 index b96a79080d9f..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateProperties.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ProjectUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateProperties ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateProperties).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ProjectUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ProjectUpdateProperties.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ProjectUpdateProperties.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/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateProperties.cs deleted file mode 100644 index b78c47d3a50e..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateProperties.cs +++ /dev/null @@ -1,52 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// Project properties. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class ProjectUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdatePropertiesInternal - { - - /// Backing field for property. - private string _description; - - /// A description for the Project. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Description { get => this._description; set => this._description = value; } - - /// Creates an new instance. - public ProjectUpdateProperties() - { - - } - } - /// Project properties. - public partial interface IProjectUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// A description for the Project. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Project.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - - } - /// Project properties. - internal partial interface IProjectUpdatePropertiesInternal - - { - /// A description for the Project. - string Description { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateProperties.json.cs deleted file mode 100644 index 05c61f38b4b5..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateProperties.json.cs +++ /dev/null @@ -1,108 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// Project properties. - public partial class ProjectUpdateProperties - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateProperties. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateProperties. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new ProjectUpdateProperties(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. - internal ProjectUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Recurrence.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Recurrence.PowerShell.cs deleted file mode 100644 index bce8ede6f05b..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Recurrence.PowerShell.cs +++ /dev/null @@ -1,204 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The schedule recurrence. - [System.ComponentModel.TypeConverter(typeof(RecurrenceTypeConverter))] - public partial class Recurrence - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrence DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Recurrence(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrence DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Recurrence(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrence FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Recurrence(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TimeTypeConverter.ConvertFrom); - } - if (content.Contains("EndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TimeTypeConverter.ConvertFrom); - } - if (content.Contains("StartTimeHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeHour = (int) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StartTimeMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeMinute = (int?) content.GetValueForProperty("StartTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EndTimeHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeHour = (int) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EndTimeMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeMinute = (int?) content.GetValueForProperty("EndTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Recurrence(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TimeTypeConverter.ConvertFrom); - } - if (content.Contains("EndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TimeTypeConverter.ConvertFrom); - } - if (content.Contains("StartTimeHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeHour = (int) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StartTimeMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeMinute = (int?) content.GetValueForProperty("StartTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EndTimeHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeHour = (int) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EndTimeMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeMinute = (int?) content.GetValueForProperty("EndTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 schedule recurrence. - [System.ComponentModel.TypeConverter(typeof(RecurrenceTypeConverter))] - public partial interface IRecurrence - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointProperties.PowerShell.cs deleted file mode 100644 index d0ce0e2b228a..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointProperties.PowerShell.cs +++ /dev/null @@ -1,230 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The properties of SMB share endpoint. - [System.ComponentModel.TypeConverter(typeof(SmbMountEndpointPropertiesTypeConverter))] - public partial class SmbMountEndpointProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SmbMountEndpointProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SmbMountEndpointProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SmbMountEndpointProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Credentials")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).Credentials = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials) content.GetValueForProperty("Credentials",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).Credentials, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureKeyVaultSmbCredentialsTypeConverter.ConvertFrom); - } - if (content.Contains("Host")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).Host = (string) content.GetValueForProperty("Host",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).Host, global::System.Convert.ToString); - } - if (content.Contains("ShareName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).ShareName = (string) content.GetValueForProperty("ShareName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).ShareName, global::System.Convert.ToString); - } - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("CredentialsType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).CredentialsType = (string) content.GetValueForProperty("CredentialsType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).CredentialsType, global::System.Convert.ToString); - } - if (content.Contains("CredentialsUsernameUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).CredentialsUsernameUri = (string) content.GetValueForProperty("CredentialsUsernameUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).CredentialsUsernameUri, global::System.Convert.ToString); - } - if (content.Contains("CredentialsPasswordUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).CredentialsPasswordUri = (string) content.GetValueForProperty("CredentialsPasswordUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).CredentialsPasswordUri, 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 SmbMountEndpointProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Credentials")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).Credentials = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials) content.GetValueForProperty("Credentials",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).Credentials, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureKeyVaultSmbCredentialsTypeConverter.ConvertFrom); - } - if (content.Contains("Host")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).Host = (string) content.GetValueForProperty("Host",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).Host, global::System.Convert.ToString); - } - if (content.Contains("ShareName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).ShareName = (string) content.GetValueForProperty("ShareName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).ShareName, global::System.Convert.ToString); - } - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("CredentialsType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).CredentialsType = (string) content.GetValueForProperty("CredentialsType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).CredentialsType, global::System.Convert.ToString); - } - if (content.Contains("CredentialsUsernameUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).CredentialsUsernameUri = (string) content.GetValueForProperty("CredentialsUsernameUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).CredentialsUsernameUri, global::System.Convert.ToString); - } - if (content.Contains("CredentialsPasswordUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).CredentialsPasswordUri = (string) content.GetValueForProperty("CredentialsPasswordUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal)this).CredentialsPasswordUri, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of SMB share endpoint. - [System.ComponentModel.TypeConverter(typeof(SmbMountEndpointPropertiesTypeConverter))] - public partial interface ISmbMountEndpointProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointProperties.cs deleted file mode 100644 index 065f7930d06c..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointProperties.cs +++ /dev/null @@ -1,176 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The properties of SMB share endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class SmbMountEndpointProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseProperties(); - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials _credentials; - - /// - /// The Azure Key Vault secret URIs which store the required credentials to access the SMB share. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials Credentials { get => (this._credentials = this._credentials ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureKeyVaultSmbCredentials()); set => this._credentials = value; } - - /// - /// The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string CredentialsPasswordUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)Credentials).PasswordUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)Credentials).PasswordUri = value ?? null; } - - /// The Credentials type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string CredentialsType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)Credentials).Type; } - - /// - /// The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string CredentialsUsernameUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)Credentials).UsernameUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)Credentials).UsernameUri = value ?? null; } - - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description = value ?? null; } - - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType = value ; } - - /// Backing field for property. - private string _host; - - /// The host name or IP address of the server exporting the file system. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Host { get => this._host; set => this._host = value; } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState = value; } - - /// Internal Acessors for Credentials - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal.Credentials { get => (this._credentials = this._credentials ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureKeyVaultSmbCredentials()); set { {_credentials = value;} } } - - /// Internal Acessors for CredentialsType - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointPropertiesInternal.CredentialsType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)Credentials).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)Credentials).Type = value; } - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; } - - /// Backing field for property. - private string _shareName; - - /// The name of the SMB share being exported from the server. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string ShareName { get => this._shareName; set => this._shareName = value; } - - /// Creates an new instance. - public SmbMountEndpointProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__endpointBaseProperties), __endpointBaseProperties); - await eventListener.AssertObjectIsValid(nameof(__endpointBaseProperties), __endpointBaseProperties); - } - } - /// The properties of SMB share endpoint. - public partial interface ISmbMountEndpointProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties - { - /// - /// The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value.", - SerializedName = @"passwordUri", - PossibleTypes = new [] { typeof(string) })] - string CredentialsPasswordUri { get; set; } - /// The Credentials type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The Credentials type.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string CredentialsType { get; } - /// - /// The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value.", - SerializedName = @"usernameUri", - PossibleTypes = new [] { typeof(string) })] - string CredentialsUsernameUri { get; set; } - /// The host name or IP address of the server exporting the file system. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The host name or IP address of the server exporting the file system.", - SerializedName = @"host", - PossibleTypes = new [] { typeof(string) })] - string Host { get; set; } - /// The name of the SMB share being exported from the server. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the SMB share being exported from the server.", - SerializedName = @"shareName", - PossibleTypes = new [] { typeof(string) })] - string ShareName { get; set; } - - } - /// The properties of SMB share endpoint. - internal partial interface ISmbMountEndpointPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBasePropertiesInternal - { - /// - /// The Azure Key Vault secret URIs which store the required credentials to access the SMB share. - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials Credentials { get; set; } - /// - /// The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value. - /// - string CredentialsPasswordUri { get; set; } - /// The Credentials type. - string CredentialsType { get; set; } - /// - /// The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value. - /// - string CredentialsUsernameUri { get; set; } - /// The host name or IP address of the server exporting the file system. - string Host { get; set; } - /// The name of the SMB share being exported from the server. - string ShareName { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointUpdateProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointUpdateProperties.PowerShell.cs deleted file mode 100644 index 7c468a232b14..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointUpdateProperties.PowerShell.cs +++ /dev/null @@ -1,206 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The properties of SMB share endpoint to update. - [System.ComponentModel.TypeConverter(typeof(SmbMountEndpointUpdatePropertiesTypeConverter))] - public partial class SmbMountEndpointUpdateProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SmbMountEndpointUpdateProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SmbMountEndpointUpdateProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SmbMountEndpointUpdateProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Credentials")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).Credentials = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials) content.GetValueForProperty("Credentials",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).Credentials, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureKeyVaultSmbCredentialsTypeConverter.ConvertFrom); - } - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("CredentialsType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsType = (string) content.GetValueForProperty("CredentialsType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsType, global::System.Convert.ToString); - } - if (content.Contains("CredentialsUsernameUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsUsernameUri = (string) content.GetValueForProperty("CredentialsUsernameUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsUsernameUri, global::System.Convert.ToString); - } - if (content.Contains("CredentialsPasswordUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsPasswordUri = (string) content.GetValueForProperty("CredentialsPasswordUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsPasswordUri, 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 SmbMountEndpointUpdateProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Credentials")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).Credentials = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials) content.GetValueForProperty("Credentials",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).Credentials, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureKeyVaultSmbCredentialsTypeConverter.ConvertFrom); - } - if (content.Contains("EndpointType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); - } - if (content.Contains("CredentialsType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsType = (string) content.GetValueForProperty("CredentialsType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsType, global::System.Convert.ToString); - } - if (content.Contains("CredentialsUsernameUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsUsernameUri = (string) content.GetValueForProperty("CredentialsUsernameUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsUsernameUri, global::System.Convert.ToString); - } - if (content.Contains("CredentialsPasswordUri")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsPasswordUri = (string) content.GetValueForProperty("CredentialsPasswordUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsPasswordUri, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of SMB share endpoint to update. - [System.ComponentModel.TypeConverter(typeof(SmbMountEndpointUpdatePropertiesTypeConverter))] - public partial interface ISmbMountEndpointUpdateProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointUpdateProperties.cs deleted file mode 100644 index c5e22de8b3da..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointUpdateProperties.cs +++ /dev/null @@ -1,135 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The properties of SMB share endpoint to update. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class SmbMountEndpointUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateProperties(); - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials _credentials; - - /// - /// The Azure Key Vault secret URIs which store the required credentials to access the SMB share. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials Credentials { get => (this._credentials = this._credentials ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureKeyVaultSmbCredentials()); set => this._credentials = value; } - - /// - /// The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string CredentialsPasswordUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)Credentials).PasswordUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)Credentials).PasswordUri = value ?? null; } - - /// The Credentials type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string CredentialsType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)Credentials).Type; } - - /// - /// The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string CredentialsUsernameUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)Credentials).UsernameUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)Credentials).UsernameUri = value ?? null; } - - /// A description for the Endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description = value ?? null; } - - /// The Endpoint resource type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType EndpointType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType = value ; } - - /// Internal Acessors for Credentials - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal.Credentials { get => (this._credentials = this._credentials ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureKeyVaultSmbCredentials()); set { {_credentials = value;} } } - - /// Internal Acessors for CredentialsType - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdatePropertiesInternal.CredentialsType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)Credentials).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)Credentials).Type = value; } - - /// Creates an new instance. - public SmbMountEndpointUpdateProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); - await eventListener.AssertObjectIsValid(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); - } - } - /// The properties of SMB share endpoint to update. - public partial interface ISmbMountEndpointUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties - { - /// - /// The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value.", - SerializedName = @"passwordUri", - PossibleTypes = new [] { typeof(string) })] - string CredentialsPasswordUri { get; set; } - /// The Credentials type. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The Credentials type.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string CredentialsType { get; } - /// - /// The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value.", - SerializedName = @"usernameUri", - PossibleTypes = new [] { typeof(string) })] - string CredentialsUsernameUri { get; set; } - - } - /// The properties of SMB share endpoint to update. - internal partial interface ISmbMountEndpointUpdatePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal - { - /// - /// The Azure Key Vault secret URIs which store the required credentials to access the SMB share. - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials Credentials { get; set; } - /// - /// The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value. - /// - string CredentialsPasswordUri { get; set; } - /// The Credentials type. - string CredentialsType { get; set; } - /// - /// The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value. - /// - string CredentialsUsernameUri { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpoint.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpoint.PowerShell.cs deleted file mode 100644 index bfe1f89abd0b..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpoint.PowerShell.cs +++ /dev/null @@ -1,188 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The source endpoint resource for source and target mapping. - [System.ComponentModel.TypeConverter(typeof(SourceEndpointTypeConverter))] - public partial class SourceEndpoint - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SourceEndpoint(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SourceEndpoint(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SourceEndpoint(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceEndpointPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("ResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).ResourceId, global::System.Convert.ToString); - } - if (content.Contains("AwsS3BucketId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).AwsS3BucketId, 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 SourceEndpoint(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceEndpointPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("ResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).ResourceId, global::System.Convert.ToString); - } - if (content.Contains("AwsS3BucketId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)this).AwsS3BucketId, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 source endpoint resource for source and target mapping. - [System.ComponentModel.TypeConverter(typeof(SourceEndpointTypeConverter))] - public partial interface ISourceEndpoint - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpoint.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpoint.cs deleted file mode 100644 index f56423868c53..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpoint.cs +++ /dev/null @@ -1,89 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The source endpoint resource for source and target mapping. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class SourceEndpoint : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpoint, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal - { - - /// The fully qualified ARM resource ID of the AWS S3 bucket to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string AwsS3BucketId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)Property).AwsS3BucketId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)Property).AwsS3BucketId = value ?? null; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceEndpointProperties()); set { {_property = value;} } } - - /// The name of the cloud source endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)Property).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)Property).Name = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties _property; - - /// The properties of the cloud source endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceEndpointProperties()); set => this._property = value; } - - /// The fully qualified ARM resource ID of the cloud source endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string ResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)Property).SourceEndpointResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)Property).SourceEndpointResourceId = value ?? null; } - - /// Creates an new instance. - public SourceEndpoint() - { - - } - } - /// The source endpoint resource for source and target mapping. - public partial interface ISourceEndpoint : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// The fully qualified ARM resource ID of the AWS S3 bucket to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The fully qualified ARM resource ID of the AWS S3 bucket to migrate.", - SerializedName = @"awsS3BucketId", - PossibleTypes = new [] { typeof(string) })] - string AwsS3BucketId { get; set; } - /// The name of the cloud source endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the cloud source endpoint to migrate.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; set; } - /// The fully qualified ARM resource ID of the cloud source endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The fully qualified ARM resource ID of the cloud source endpoint to migrate.", - SerializedName = @"sourceEndpointResourceId", - PossibleTypes = new [] { typeof(string) })] - string ResourceId { get; set; } - - } - /// The source endpoint resource for source and target mapping. - internal partial interface ISourceEndpointInternal - - { - /// The fully qualified ARM resource ID of the AWS S3 bucket to migrate. - string AwsS3BucketId { get; set; } - /// The name of the cloud source endpoint to migrate. - string Name { get; set; } - /// The properties of the cloud source endpoint to migrate. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties Property { get; set; } - /// The fully qualified ARM resource ID of the cloud source endpoint to migrate. - string ResourceId { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceTargetMap.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceTargetMap.PowerShell.cs deleted file mode 100644 index 97a89e3ebef0..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceTargetMap.PowerShell.cs +++ /dev/null @@ -1,244 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The properties of cloud endpoints to migrate. - [System.ComponentModel.TypeConverter(typeof(SourceTargetMapTypeConverter))] - public partial class SourceTargetMap - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SourceTargetMap(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SourceTargetMap(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SourceTargetMap(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SourceEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpoint) content.GetValueForProperty("SourceEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpoint, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceEndpointTypeConverter.ConvertFrom); - } - if (content.Contains("TargetEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpoint) content.GetValueForProperty("TargetEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpoint, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TargetEndpointTypeConverter.ConvertFrom); - } - if (content.Contains("SourceEndpointProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpointProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties) content.GetValueForProperty("SourceEndpointProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpointProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceEndpointPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("TargetEndpointProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpointProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties) content.GetValueForProperty("TargetEndpointProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpointProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TargetEndpointPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SourceEndpointPropertiesName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpointPropertiesName = (string) content.GetValueForProperty("SourceEndpointPropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpointPropertiesName, global::System.Convert.ToString); - } - if (content.Contains("TargetEndpointPropertiesName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpointPropertiesName = (string) content.GetValueForProperty("TargetEndpointPropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpointPropertiesName, global::System.Convert.ToString); - } - if (content.Contains("SourceEndpointResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpointResourceId = (string) content.GetValueForProperty("SourceEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpointResourceId, global::System.Convert.ToString); - } - if (content.Contains("AwsS3BucketId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).AwsS3BucketId, global::System.Convert.ToString); - } - if (content.Contains("TargetEndpointResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpointResourceId = (string) content.GetValueForProperty("TargetEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpointResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureStorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).AzureStorageAccountResourceId = (string) content.GetValueForProperty("AzureStorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).AzureStorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureStorageBlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).AzureStorageBlobContainerName = (string) content.GetValueForProperty("AzureStorageBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).AzureStorageBlobContainerName, 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 SourceTargetMap(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SourceEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpoint) content.GetValueForProperty("SourceEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpoint, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceEndpointTypeConverter.ConvertFrom); - } - if (content.Contains("TargetEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpoint) content.GetValueForProperty("TargetEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpoint, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TargetEndpointTypeConverter.ConvertFrom); - } - if (content.Contains("SourceEndpointProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpointProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties) content.GetValueForProperty("SourceEndpointProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpointProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceEndpointPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("TargetEndpointProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpointProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties) content.GetValueForProperty("TargetEndpointProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpointProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TargetEndpointPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SourceEndpointPropertiesName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpointPropertiesName = (string) content.GetValueForProperty("SourceEndpointPropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpointPropertiesName, global::System.Convert.ToString); - } - if (content.Contains("TargetEndpointPropertiesName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpointPropertiesName = (string) content.GetValueForProperty("TargetEndpointPropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpointPropertiesName, global::System.Convert.ToString); - } - if (content.Contains("SourceEndpointResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpointResourceId = (string) content.GetValueForProperty("SourceEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).SourceEndpointResourceId, global::System.Convert.ToString); - } - if (content.Contains("AwsS3BucketId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).AwsS3BucketId, global::System.Convert.ToString); - } - if (content.Contains("TargetEndpointResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpointResourceId = (string) content.GetValueForProperty("TargetEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).TargetEndpointResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureStorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).AzureStorageAccountResourceId = (string) content.GetValueForProperty("AzureStorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).AzureStorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureStorageBlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).AzureStorageBlobContainerName = (string) content.GetValueForProperty("AzureStorageBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal)this).AzureStorageBlobContainerName, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of cloud endpoints to migrate. - [System.ComponentModel.TypeConverter(typeof(SourceTargetMapTypeConverter))] - public partial interface ISourceTargetMap - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceTargetMap.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceTargetMap.cs deleted file mode 100644 index fc51867c4812..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceTargetMap.cs +++ /dev/null @@ -1,166 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The properties of cloud endpoints to migrate. - public partial class SourceTargetMap : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal - { - - /// The fully qualified ARM resource ID of the AWS S3 bucket to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string AwsS3BucketId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)SourceEndpoint).AwsS3BucketId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)SourceEndpoint).AwsS3BucketId = value ?? null; } - - /// The fully qualified ARM resource ID of the Azure Storage account. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string AzureStorageAccountResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)TargetEndpoint).AzureStorageAccountResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)TargetEndpoint).AzureStorageAccountResourceId = value ?? null; } - - /// The name of the Azure Storage blob container. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string AzureStorageBlobContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)TargetEndpoint).AzureStorageBlobContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)TargetEndpoint).AzureStorageBlobContainerName = value ?? null; } - - /// Internal Acessors for SourceEndpoint - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpoint Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal.SourceEndpoint { get => (this._sourceEndpoint = this._sourceEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceEndpoint()); set { {_sourceEndpoint = value;} } } - - /// Internal Acessors for SourceEndpointProperty - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal.SourceEndpointProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)SourceEndpoint).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)SourceEndpoint).Property = value; } - - /// Internal Acessors for TargetEndpoint - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpoint Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal.TargetEndpoint { get => (this._targetEndpoint = this._targetEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TargetEndpoint()); set { {_targetEndpoint = value;} } } - - /// Internal Acessors for TargetEndpointProperty - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMapInternal.TargetEndpointProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)TargetEndpoint).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)TargetEndpoint).Property = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpoint _sourceEndpoint; - - /// The source endpoint resource for source and target mapping. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpoint SourceEndpoint { get => (this._sourceEndpoint = this._sourceEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceEndpoint()); set => this._sourceEndpoint = value; } - - /// The name of the cloud source endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string SourceEndpointPropertiesName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)SourceEndpoint).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)SourceEndpoint).Name = value ?? null; } - - /// The fully qualified ARM resource ID of the cloud source endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string SourceEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)SourceEndpoint).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointInternal)SourceEndpoint).ResourceId = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpoint _targetEndpoint; - - /// The target endpoint resource for source and target mapping. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpoint TargetEndpoint { get => (this._targetEndpoint = this._targetEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TargetEndpoint()); set => this._targetEndpoint = value; } - - /// The name of the cloud target endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string TargetEndpointPropertiesName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)TargetEndpoint).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)TargetEndpoint).Name = value ?? null; } - - /// The fully qualified ARM resource ID of the cloud target endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string TargetEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)TargetEndpoint).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)TargetEndpoint).ResourceId = value ?? null; } - - /// Creates an new instance. - public SourceTargetMap() - { - - } - } - /// The properties of cloud endpoints to migrate. - public partial interface ISourceTargetMap : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// The fully qualified ARM resource ID of the AWS S3 bucket to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The fully qualified ARM resource ID of the AWS S3 bucket to migrate.", - SerializedName = @"awsS3BucketId", - PossibleTypes = new [] { typeof(string) })] - string AwsS3BucketId { get; set; } - /// The fully qualified ARM resource ID of the Azure Storage account. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The fully qualified ARM resource ID of the Azure Storage account.", - SerializedName = @"azureStorageAccountResourceId", - PossibleTypes = new [] { typeof(string) })] - string AzureStorageAccountResourceId { get; set; } - /// The name of the Azure Storage blob container. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Azure Storage blob container.", - SerializedName = @"azureStorageBlobContainerName", - PossibleTypes = new [] { typeof(string) })] - string AzureStorageBlobContainerName { get; set; } - /// The name of the cloud source endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the cloud source endpoint to migrate.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string SourceEndpointPropertiesName { get; set; } - /// The fully qualified ARM resource ID of the cloud source endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The fully qualified ARM resource ID of the cloud source endpoint to migrate.", - SerializedName = @"sourceEndpointResourceId", - PossibleTypes = new [] { typeof(string) })] - string SourceEndpointResourceId { get; set; } - /// The name of the cloud target endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the cloud target endpoint to migrate.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string TargetEndpointPropertiesName { get; set; } - /// The fully qualified ARM resource ID of the cloud target endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The fully qualified ARM resource ID of the cloud target endpoint to migrate.", - SerializedName = @"targetEndpointResourceId", - PossibleTypes = new [] { typeof(string) })] - string TargetEndpointResourceId { get; set; } - - } - /// The properties of cloud endpoints to migrate. - internal partial interface ISourceTargetMapInternal - - { - /// The fully qualified ARM resource ID of the AWS S3 bucket to migrate. - string AwsS3BucketId { get; set; } - /// The fully qualified ARM resource ID of the Azure Storage account. - string AzureStorageAccountResourceId { get; set; } - /// The name of the Azure Storage blob container. - string AzureStorageBlobContainerName { get; set; } - /// The source endpoint resource for source and target mapping. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpoint SourceEndpoint { get; set; } - /// The name of the cloud source endpoint to migrate. - string SourceEndpointPropertiesName { get; set; } - /// The properties of the cloud source endpoint to migrate. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties SourceEndpointProperty { get; set; } - /// The fully qualified ARM resource ID of the cloud source endpoint to migrate. - string SourceEndpointResourceId { get; set; } - /// The target endpoint resource for source and target mapping. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpoint TargetEndpoint { get; set; } - /// The name of the cloud target endpoint to migrate. - string TargetEndpointPropertiesName { get; set; } - /// The properties of the cloud target endpoint to migrate. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties TargetEndpointProperty { get; set; } - /// The fully qualified ARM resource ID of the cloud target endpoint to migrate. - string TargetEndpointResourceId { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMover.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMover.PowerShell.cs deleted file mode 100644 index 792cf089ca8a..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMover.PowerShell.cs +++ /dev/null @@ -1,278 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. - /// - [System.ComponentModel.TypeConverter(typeof(StorageMoverTypeConverter))] - public partial class StorageMover - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new StorageMover(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new StorageMover(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal StorageMover(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverInternal)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 StorageMover(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverInternal)this).Description, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. - [System.ComponentModel.TypeConverter(typeof(StorageMoverTypeConverter))] - public partial interface IStorageMover - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMover.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMover.cs deleted file mode 100644 index a0770fe4f8b2..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMover.cs +++ /dev/null @@ -1,165 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class StorageMover : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.TrackedResource(); - - /// A description for the Storage Mover. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverPropertiesInternal)Property).Description = value ?? null; } - - /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).Id; } - - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)__trackedResource).Location = value ; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverPropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverProperties _property; - - /// The resource specific properties for the Storage Mover resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverProperties()); set => this._property = value; } - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverPropertiesInternal)Property).ProvisioningState; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__trackedResource).Type; } - - /// Creates an new instance. - public StorageMover() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); - await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); - } - } - /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. - public partial interface IStorageMover : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResource - { - /// A description for the Storage Mover. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Storage Mover.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of this resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; } - - } - /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. - internal partial interface IStorageMoverInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal - { - /// A description for the Storage Mover. - string Description { get; set; } - /// The resource specific properties for the Storage Mover resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverProperties Property { get; set; } - /// The provisioning state of this resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverList.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverList.cs deleted file mode 100644 index 7ea2ace6b4a9..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverList.cs +++ /dev/null @@ -1,72 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// List of Storage Movers. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class StorageMoverList : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverList, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverListInternal - { - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover[] Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverListInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// The link to the next page of items - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; set => this._nextLink = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover[] _value; - - /// The StorageMover items on this page - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover[] Value { get => this._value; } - - /// Creates an new instance. - public StorageMoverList() - { - - } - } - /// List of Storage Movers. - public partial interface IStorageMoverList : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// The link to the next page of items - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The link to the next page of items", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; set; } - /// The StorageMover items on this page - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = true, - Description = @"The StorageMover items on this page", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover[] Value { get; } - - } - /// List of Storage Movers. - internal partial interface IStorageMoverListInternal - - { - /// The link to the next page of items - string NextLink { get; set; } - /// The StorageMover items on this page - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverProperties.cs deleted file mode 100644 index ddf32bf4e0fa..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverProperties.cs +++ /dev/null @@ -1,72 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The resource specific properties for the Storage Mover resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class StorageMoverProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverPropertiesInternal - { - - /// Backing field for property. - private string _description; - - /// A description for the Storage Mover. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Description { get => this._description; set => this._description = value; } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? _provisioningState; - - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } - - /// Creates an new instance. - public StorageMoverProperties() - { - - } - } - /// The resource specific properties for the Storage Mover resource. - public partial interface IStorageMoverProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// A description for the Storage Mover. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Storage Mover.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// The provisioning state of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The provisioning state of this resource.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; } - - } - /// The resource specific properties for the Storage Mover resource. - internal partial interface IStorageMoverPropertiesInternal - - { - /// A description for the Storage Mover. - string Description { get; set; } - /// The provisioning state of this resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParameters.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParameters.PowerShell.cs deleted file mode 100644 index 1f81c70d6c6f..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParameters.PowerShell.cs +++ /dev/null @@ -1,182 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The Storage Mover resource. - [System.ComponentModel.TypeConverter(typeof(StorageMoverUpdateParametersTypeConverter))] - public partial class StorageMoverUpdateParameters - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new StorageMoverUpdateParameters(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new StorageMoverUpdateParameters(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal StorageMoverUpdateParameters(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverUpdateParametersTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersInternal)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 StorageMoverUpdateParameters(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverUpdatePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverUpdateParametersTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersInternal)this).Description, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Storage Mover resource. - [System.ComponentModel.TypeConverter(typeof(StorageMoverUpdateParametersTypeConverter))] - public partial interface IStorageMoverUpdateParameters - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParameters.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParameters.cs deleted file mode 100644 index 6efe553f73ad..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParameters.cs +++ /dev/null @@ -1,78 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The Storage Mover resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class StorageMoverUpdateParameters : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersInternal - { - - /// A description for the Storage Mover. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdatePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdatePropertiesInternal)Property).Description = value ?? null; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverUpdateProperties()); set { {_property = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateProperties _property; - - /// The resource specific properties for the Storage Mover resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverUpdateProperties()); set => this._property = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags _tag; - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverUpdateParametersTags()); set => this._tag = value; } - - /// Creates an new instance. - public StorageMoverUpdateParameters() - { - - } - } - /// The Storage Mover resource. - public partial interface IStorageMoverUpdateParameters : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// A description for the Storage Mover. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A description for the Storage Mover.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; set; } - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags Tag { get; set; } - - } - /// The Storage Mover resource. - internal partial interface IStorageMoverUpdateParametersInternal - - { - /// A description for the Storage Mover. - string Description { get; set; } - /// The resource specific properties for the Storage Mover resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateProperties Property { get; set; } - /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags Tag { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpoint.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpoint.PowerShell.cs deleted file mode 100644 index 62fa7feaeb08..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpoint.PowerShell.cs +++ /dev/null @@ -1,196 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The target endpoint resource for source and target mapping. - [System.ComponentModel.TypeConverter(typeof(TargetEndpointTypeConverter))] - public partial class TargetEndpoint - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new TargetEndpoint(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new TargetEndpoint(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal TargetEndpoint(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TargetEndpointPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("ResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).ResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureStorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).AzureStorageAccountResourceId = (string) content.GetValueForProperty("AzureStorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).AzureStorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureStorageBlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).AzureStorageBlobContainerName = (string) content.GetValueForProperty("AzureStorageBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).AzureStorageBlobContainerName, 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 TargetEndpoint(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TargetEndpointPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("ResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).ResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureStorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).AzureStorageAccountResourceId = (string) content.GetValueForProperty("AzureStorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).AzureStorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureStorageBlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).AzureStorageBlobContainerName = (string) content.GetValueForProperty("AzureStorageBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal)this).AzureStorageBlobContainerName, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 target endpoint resource for source and target mapping. - [System.ComponentModel.TypeConverter(typeof(TargetEndpointTypeConverter))] - public partial interface ITargetEndpoint - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpoint.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpoint.cs deleted file mode 100644 index 677daf1a2fdb..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpoint.cs +++ /dev/null @@ -1,103 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The target endpoint resource for source and target mapping. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] - public partial class TargetEndpoint : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpoint, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal - { - - /// The fully qualified ARM resource ID of the Azure Storage account. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string AzureStorageAccountResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)Property).AzureStorageAccountResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)Property).AzureStorageAccountResourceId = value ?? null; } - - /// The name of the Azure Storage blob container. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string AzureStorageBlobContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)Property).AzureStorageBlobContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)Property).AzureStorageBlobContainerName = value ?? null; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TargetEndpointProperties()); set { {_property = value;} } } - - /// The name of the cloud target endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)Property).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)Property).Name = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties _property; - - /// The properties of the cloud target endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TargetEndpointProperties()); set => this._property = value; } - - /// The fully qualified ARM resource ID of the cloud target endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string ResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)Property).TargetEndpointResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)Property).TargetEndpointResourceId = value ?? null; } - - /// Creates an new instance. - public TargetEndpoint() - { - - } - } - /// The target endpoint resource for source and target mapping. - public partial interface ITargetEndpoint : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// The fully qualified ARM resource ID of the Azure Storage account. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The fully qualified ARM resource ID of the Azure Storage account.", - SerializedName = @"azureStorageAccountResourceId", - PossibleTypes = new [] { typeof(string) })] - string AzureStorageAccountResourceId { get; set; } - /// The name of the Azure Storage blob container. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Azure Storage blob container.", - SerializedName = @"azureStorageBlobContainerName", - PossibleTypes = new [] { typeof(string) })] - string AzureStorageBlobContainerName { get; set; } - /// The name of the cloud target endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the cloud target endpoint to migrate.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; set; } - /// The fully qualified ARM resource ID of the cloud target endpoint to migrate. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The fully qualified ARM resource ID of the cloud target endpoint to migrate.", - SerializedName = @"targetEndpointResourceId", - PossibleTypes = new [] { typeof(string) })] - string ResourceId { get; set; } - - } - /// The target endpoint resource for source and target mapping. - internal partial interface ITargetEndpointInternal - - { - /// The fully qualified ARM resource ID of the Azure Storage account. - string AzureStorageAccountResourceId { get; set; } - /// The name of the Azure Storage blob container. - string AzureStorageBlobContainerName { get; set; } - /// The name of the cloud target endpoint to migrate. - string Name { get; set; } - /// The properties of the cloud target endpoint to migrate. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties Property { get; set; } - /// The fully qualified ARM resource ID of the cloud target endpoint to migrate. - string ResourceId { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpointProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpointProperties.PowerShell.cs deleted file mode 100644 index 3bf7c8a3d630..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpointProperties.PowerShell.cs +++ /dev/null @@ -1,190 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The properties of the cloud target endpoint to migrate. - [System.ComponentModel.TypeConverter(typeof(TargetEndpointPropertiesTypeConverter))] - public partial class TargetEndpointProperties - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new TargetEndpointProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new TargetEndpointProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal TargetEndpointProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("TargetEndpointResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).TargetEndpointResourceId = (string) content.GetValueForProperty("TargetEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).TargetEndpointResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureStorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).AzureStorageAccountResourceId = (string) content.GetValueForProperty("AzureStorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).AzureStorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureStorageBlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).AzureStorageBlobContainerName = (string) content.GetValueForProperty("AzureStorageBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).AzureStorageBlobContainerName, 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 TargetEndpointProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("TargetEndpointResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).TargetEndpointResourceId = (string) content.GetValueForProperty("TargetEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).TargetEndpointResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureStorageAccountResourceId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).AzureStorageAccountResourceId = (string) content.GetValueForProperty("AzureStorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).AzureStorageAccountResourceId, global::System.Convert.ToString); - } - if (content.Contains("AzureStorageBlobContainerName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).AzureStorageBlobContainerName = (string) content.GetValueForProperty("AzureStorageBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal)this).AzureStorageBlobContainerName, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of the cloud target endpoint to migrate. - [System.ComponentModel.TypeConverter(typeof(TargetEndpointPropertiesTypeConverter))] - public partial interface ITargetEndpointProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitSchedule.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitSchedule.cs deleted file mode 100644 index bf8588ce214b..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitSchedule.cs +++ /dev/null @@ -1,51 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The WAN-link upload limit schedule. Overlapping recurrences are not allowed. - public partial class UploadLimitSchedule : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitScheduleInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] _weeklyRecurrence; - - /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] WeeklyRecurrence { get => this._weeklyRecurrence; set => this._weeklyRecurrence = value; } - - /// Creates an new instance. - public UploadLimitSchedule() - { - - } - } - /// The WAN-link upload limit schedule. Overlapping recurrences are not allowed. - public partial interface IUploadLimitSchedule : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The set of weekly repeating recurrences of the WAN-link upload limit schedule.", - SerializedName = @"weeklyRecurrences", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] WeeklyRecurrence { get; set; } - - } - /// The WAN-link upload limit schedule. Overlapping recurrences are not allowed. - internal partial interface IUploadLimitScheduleInternal - - { - /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] WeeklyRecurrence { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitWeeklyRecurrence.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitWeeklyRecurrence.PowerShell.cs deleted file mode 100644 index ef359f53aacd..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitWeeklyRecurrence.PowerShell.cs +++ /dev/null @@ -1,226 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// The weekly recurrence of the WAN-link upload limit schedule. The start time must be earlier in the day than the end time. - /// The recurrence must not span across multiple days. - /// - [System.ComponentModel.TypeConverter(typeof(UploadLimitWeeklyRecurrenceTypeConverter))] - public partial class UploadLimitWeeklyRecurrence - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new UploadLimitWeeklyRecurrence(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new UploadLimitWeeklyRecurrence(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 UploadLimitWeeklyRecurrence(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("LimitInMbps")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrenceInternal)this).LimitInMbps = (int) content.GetValueForProperty("LimitInMbps",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrenceInternal)this).LimitInMbps, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StartTimeHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeHour = (int) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StartTimeMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeMinute = (int?) content.GetValueForProperty("StartTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EndTimeHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeHour = (int) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EndTimeMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeMinute = (int?) content.GetValueForProperty("EndTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TimeTypeConverter.ConvertFrom); - } - if (content.Contains("EndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TimeTypeConverter.ConvertFrom); - } - if (content.Contains("Day")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrenceInternal)this).Day = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek[]) content.GetValueForProperty("Day",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrenceInternal)this).Day, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek.CreateFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal UploadLimitWeeklyRecurrence(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("LimitInMbps")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrenceInternal)this).LimitInMbps = (int) content.GetValueForProperty("LimitInMbps",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrenceInternal)this).LimitInMbps, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StartTimeHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeHour = (int) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StartTimeMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeMinute = (int?) content.GetValueForProperty("StartTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EndTimeHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeHour = (int) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EndTimeMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeMinute = (int?) content.GetValueForProperty("EndTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TimeTypeConverter.ConvertFrom); - } - if (content.Contains("EndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TimeTypeConverter.ConvertFrom); - } - if (content.Contains("Day")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrenceInternal)this).Day = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek[]) content.GetValueForProperty("Day",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrenceInternal)this).Day, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek.CreateFrom)); - } - AfterDeserializePSObject(content); - } - } - /// The weekly recurrence of the WAN-link upload limit schedule. The start time must be earlier in the day than the end time. - /// The recurrence must not span across multiple days. - [System.ComponentModel.TypeConverter(typeof(UploadLimitWeeklyRecurrenceTypeConverter))] - public partial interface IUploadLimitWeeklyRecurrence - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitWeeklyRecurrence.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitWeeklyRecurrence.cs deleted file mode 100644 index fcf816758cac..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitWeeklyRecurrence.cs +++ /dev/null @@ -1,134 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// The weekly recurrence of the WAN-link upload limit schedule. The start time must be earlier in the day than the end time. - /// The recurrence must not span across multiple days. - /// - public partial class UploadLimitWeeklyRecurrence : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrenceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrence __weeklyRecurrence = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.WeeklyRecurrence(); - - /// - /// The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek[] Day { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrenceInternal)__weeklyRecurrence).Day; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrenceInternal)__weeklyRecurrence).Day = value ; } - - /// - /// The end time of the schedule recurrence. Full hour and 30-minute intervals are supported. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__weeklyRecurrence).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__weeklyRecurrence).EndTime = value ; } - - /// - /// The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). - /// Hour value 24 cannot be combined with any other minute value but 0. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public int EndTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__weeklyRecurrence).EndTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__weeklyRecurrence).EndTimeHour = value ; } - - /// - /// The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public int? EndTimeMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__weeklyRecurrence).EndTimeMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__weeklyRecurrence).EndTimeMinute = value ?? default(int); } - - /// Backing field for property. - private int _limitInMbps; - - /// - /// The WAN-link upload bandwidth (maximum data transfer rate) in megabits per second. Value of 0 indicates no throughput - /// is allowed and any running migration job is effectively paused for the duration of this recurrence. Only data plane operations - /// are governed by this limit. Control plane operations ensure seamless functionality. The agent may exceed this limit with - /// control messages, if necessary. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public int LimitInMbps { get => this._limitInMbps; set => this._limitInMbps = value; } - - /// - /// The start time of the schedule recurrence. Full hour and 30-minute intervals are supported. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__weeklyRecurrence).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__weeklyRecurrence).StartTime = value ; } - - /// - /// The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). - /// Hour value 24 cannot be combined with any other minute value but 0. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public int StartTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__weeklyRecurrence).StartTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__weeklyRecurrence).StartTimeHour = value ; } - - /// - /// The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public int? StartTimeMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__weeklyRecurrence).StartTimeMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__weeklyRecurrence).StartTimeMinute = value ?? default(int); } - - /// Creates an new instance. - public UploadLimitWeeklyRecurrence() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__weeklyRecurrence), __weeklyRecurrence); - await eventListener.AssertObjectIsValid(nameof(__weeklyRecurrence), __weeklyRecurrence); - } - } - /// The weekly recurrence of the WAN-link upload limit schedule. The start time must be earlier in the day than the end time. - /// The recurrence must not span across multiple days. - public partial interface IUploadLimitWeeklyRecurrence : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrence - { - /// - /// The WAN-link upload bandwidth (maximum data transfer rate) in megabits per second. Value of 0 indicates no throughput - /// is allowed and any running migration job is effectively paused for the duration of this recurrence. Only data plane operations - /// are governed by this limit. Control plane operations ensure seamless functionality. The agent may exceed this limit with - /// control messages, if necessary. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The WAN-link upload bandwidth (maximum data transfer rate) in megabits per second. Value of 0 indicates no throughput is allowed and any running migration job is effectively paused for the duration of this recurrence. Only data plane operations are governed by this limit. Control plane operations ensure seamless functionality. The agent may exceed this limit with control messages, if necessary.", - SerializedName = @"limitInMbps", - PossibleTypes = new [] { typeof(int) })] - int LimitInMbps { get; set; } - - } - /// The weekly recurrence of the WAN-link upload limit schedule. The start time must be earlier in the day than the end time. - /// The recurrence must not span across multiple days. - internal partial interface IUploadLimitWeeklyRecurrenceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrenceInternal - { - /// - /// The WAN-link upload bandwidth (maximum data transfer rate) in megabits per second. Value of 0 indicates no throughput - /// is allowed and any running migration job is effectively paused for the duration of this recurrence. Only data plane operations - /// are governed by this limit. Control plane operations ensure seamless functionality. The agent may exceed this limit with - /// control messages, if necessary. - /// - int LimitInMbps { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/WeeklyRecurrence.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/WeeklyRecurrence.PowerShell.cs deleted file mode 100644 index acb9b4d099db..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/WeeklyRecurrence.PowerShell.cs +++ /dev/null @@ -1,212 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The weekly recurrence of the schedule. - [System.ComponentModel.TypeConverter(typeof(WeeklyRecurrenceTypeConverter))] - public partial class WeeklyRecurrence - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrence DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new WeeklyRecurrence(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrence DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new WeeklyRecurrence(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrence FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 WeeklyRecurrence(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Day")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrenceInternal)this).Day = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek[]) content.GetValueForProperty("Day",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrenceInternal)this).Day, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek.CreateFrom)); - } - if (content.Contains("StartTimeHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeHour = (int) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StartTimeMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeMinute = (int?) content.GetValueForProperty("StartTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EndTimeHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeHour = (int) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EndTimeMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeMinute = (int?) content.GetValueForProperty("EndTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TimeTypeConverter.ConvertFrom); - } - if (content.Contains("EndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TimeTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal WeeklyRecurrence(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Day")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrenceInternal)this).Day = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek[]) content.GetValueForProperty("Day",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrenceInternal)this).Day, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek.CreateFrom)); - } - if (content.Contains("StartTimeHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeHour = (int) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StartTimeMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeMinute = (int?) content.GetValueForProperty("StartTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EndTimeHour")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeHour = (int) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EndTimeMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeMinute = (int?) content.GetValueForProperty("EndTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).StartTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TimeTypeConverter.ConvertFrom); - } - if (content.Contains("EndTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)this).EndTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TimeTypeConverter.ConvertFrom); - } - AfterDeserializePSObject(content); - } - } - /// The weekly recurrence of the schedule. - [System.ComponentModel.TypeConverter(typeof(WeeklyRecurrenceTypeConverter))] - public partial interface IWeeklyRecurrence - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/WeeklyRecurrence.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/WeeklyRecurrence.cs deleted file mode 100644 index 39e5aa62caf5..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/WeeklyRecurrence.cs +++ /dev/null @@ -1,114 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The weekly recurrence of the schedule. - public partial class WeeklyRecurrence : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrence, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrenceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrence __recurrence = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Recurrence(); - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek[] _day; - - /// - /// The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek[] Day { get => this._day; set => this._day = value; } - - /// - /// The end time of the schedule recurrence. Full hour and 30-minute intervals are supported. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__recurrence).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__recurrence).EndTime = value ; } - - /// - /// The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). - /// Hour value 24 cannot be combined with any other minute value but 0. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public int EndTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__recurrence).EndTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__recurrence).EndTimeHour = value ; } - - /// - /// The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public int? EndTimeMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__recurrence).EndTimeMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__recurrence).EndTimeMinute = value ?? default(int); } - - /// - /// The start time of the schedule recurrence. Full hour and 30-minute intervals are supported. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__recurrence).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__recurrence).StartTime = value ; } - - /// - /// The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). - /// Hour value 24 cannot be combined with any other minute value but 0. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public int StartTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__recurrence).StartTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__recurrence).StartTimeHour = value ; } - - /// - /// The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public int? StartTimeMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__recurrence).StartTimeMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal)__recurrence).StartTimeMinute = value ?? default(int); } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__recurrence), __recurrence); - await eventListener.AssertObjectIsValid(nameof(__recurrence), __recurrence); - } - - /// Creates an new instance. - public WeeklyRecurrence() - { - - } - } - /// The weekly recurrence of the schedule. - public partial interface IWeeklyRecurrence : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrence - { - /// - /// The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence.", - SerializedName = @"days", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek[] Day { get; set; } - - } - /// The weekly recurrence of the schedule. - internal partial interface IWeeklyRecurrenceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal - { - /// - /// The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence. - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek[] Day { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorDetail.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorDetail.PowerShell.cs deleted file mode 100644 index aac5536c47d5..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorDetail.PowerShell.cs +++ /dev/null @@ -1,196 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// The error detail. - [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] - public partial class ErrorDetail - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ErrorDetail(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ErrorDetail(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ErrorDetail(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("AdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ErrorDetail(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("AdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 error detail. - [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] - public partial interface IErrorDetail - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorDetail.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorDetail.TypeConverter.cs deleted file mode 100644 index 4806c0ea02e8..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorDetail.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ErrorDetailTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ErrorDetail.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ErrorDetail.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ErrorDetail.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/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorDetail.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorDetail.cs deleted file mode 100644 index 913489f3d917..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorDetail.cs +++ /dev/null @@ -1,134 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The error detail. - public partial class ErrorDetail : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo[] _additionalInfo; - - /// The error additional info. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } - - /// Backing field for property. - private string _code; - - /// The error code. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Code { get => this._code; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail[] _detail; - - /// The error details. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail[] Detail { get => this._detail; } - - /// Backing field for property. - private string _message; - - /// The error message. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Message { get => this._message; } - - /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } - - /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } - - /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } - - /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } - - /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } - - /// Backing field for property. - private string _target; - - /// The error target. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Target { get => this._target; } - - /// Creates an new instance. - public ErrorDetail() - { - - } - } - /// The error detail. - public partial interface IErrorDetail : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// The error additional info. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error additional info.", - SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; } - /// The error code. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error code.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string Code { get; } - /// The error details. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error details.", - SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail[] Detail { get; } - /// The error message. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error message.", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string Message { get; } - /// The error target. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error target.", - SerializedName = @"target", - PossibleTypes = new [] { typeof(string) })] - string Target { get; } - - } - /// The error detail. - internal partial interface IErrorDetailInternal - - { - /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; set; } - /// The error code. - string Code { get; set; } - /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail[] Detail { get; set; } - /// The error message. - string Message { get; set; } - /// The error target. - string Target { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorDetail.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorDetail.json.cs deleted file mode 100644 index b134f4c5d514..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorDetail.json.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// The error detail. - public partial class ErrorDetail - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. - internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorDetail.FromJson(__u) )) ))() : null : Detail;} - {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - if (null != this._detail) - { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.XNodeArray(); - foreach( var __x in this._detail ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("details",__w); - } - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - if (null != this._additionalInfo) - { - var __r = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.XNodeArray(); - foreach( var __s in this._additionalInfo ) - { - AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); - } - container.Add("additionalInfo",__r); - } - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorResponse.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorResponse.PowerShell.cs deleted file mode 100644 index 1c47fa0e6e56..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorResponse.PowerShell.cs +++ /dev/null @@ -1,208 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - /// the OData error response format.). - /// - [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] - public partial class ErrorResponse - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ErrorResponse(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ErrorResponse(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ErrorResponse(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorDetailTypeConverter.ConvertFrom); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("AdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ErrorResponse(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorDetailTypeConverter.ConvertFrom); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorDetailTypeConverter.ConvertFrom)); - } - if (content.Contains("AdditionalInfo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorAdditionalInfoTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - } - } - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - /// the OData error response format.). - [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] - public partial interface IErrorResponse - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorResponse.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorResponse.TypeConverter.cs deleted file mode 100644 index cfbf1d8018e1..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorResponse.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ErrorResponseTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ErrorResponse.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ErrorResponse.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/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorResponse.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorResponse.cs deleted file mode 100644 index 7e8e08a7226d..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorResponse.cs +++ /dev/null @@ -1,136 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - /// the OData error response format.). - /// - public partial class ErrorResponse : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal - { - - /// The error additional info. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)Error).AdditionalInfo; } - - /// The error code. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)Error).Code; } - - /// The error details. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)Error).Detail; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail _error; - - /// The error object. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorDetail()); set => this._error = value; } - - /// The error message. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)Error).Message; } - - /// Internal Acessors for AdditionalInfo - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)Error).AdditionalInfo = value; } - - /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)Error).Code = value; } - - /// Internal Acessors for Detail - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)Error).Detail = value; } - - /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorDetail()); set { {_error = value;} } } - - /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)Error).Message = value; } - - /// Internal Acessors for Target - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)Error).Target = value; } - - /// The error target. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetailInternal)Error).Target; } - - /// Creates an new instance. - public ErrorResponse() - { - - } - } - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - /// the OData error response format.). - public partial interface IErrorResponse : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// The error additional info. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error additional info.", - SerializedName = @"additionalInfo", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; } - /// The error code. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error code.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string Code { get; } - /// The error details. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error details.", - SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail[] Detail { get; } - /// The error message. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error message.", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string Message { get; } - /// The error target. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The error target.", - SerializedName = @"target", - PossibleTypes = new [] { typeof(string) })] - string Target { get; } - - } - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - /// the OData error response format.). - internal partial interface IErrorResponseInternal - - { - /// The error additional info. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo[] AdditionalInfo { get; set; } - /// The error code. - string Code { get; set; } - /// The error details. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail[] Detail { get; set; } - /// The error object. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorDetail Error { get; set; } - /// The error message. - string Message { get; set; } - /// The error target. - string Target { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorResponse.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorResponse.json.cs deleted file mode 100644 index c674c60ee2a6..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorResponse.json.cs +++ /dev/null @@ -1,111 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows - /// the OData error response format.). - /// - public partial class ErrorResponse - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. - internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorDetail.FromJson(__jsonError) : Error;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ManagedServiceIdentity.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ManagedServiceIdentity.PowerShell.cs deleted file mode 100644 index 9f0e7d271fbc..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ManagedServiceIdentity.PowerShell.cs +++ /dev/null @@ -1,188 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// Managed service identity (system assigned and/or user assigned identities) - [System.ComponentModel.TypeConverter(typeof(ManagedServiceIdentityTypeConverter))] - public partial class ManagedServiceIdentity - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ManagedServiceIdentity(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ManagedServiceIdentity(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ManagedServiceIdentity(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("PrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).PrincipalId, global::System.Convert.ToString); - } - if (content.Contains("TenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).TenantId, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("UserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ManagedServiceIdentity(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("PrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).PrincipalId, global::System.Convert.ToString); - } - if (content.Contains("TenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).TenantId, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType.CreateFrom); - } - if (content.Contains("UserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.UserAssignedIdentitiesTypeConverter.ConvertFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - } - } - /// Managed service identity (system assigned and/or user assigned identities) - [System.ComponentModel.TypeConverter(typeof(ManagedServiceIdentityTypeConverter))] - public partial interface IManagedServiceIdentity - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Operation.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Operation.PowerShell.cs deleted file mode 100644 index 9e2a4fc93924..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Operation.PowerShell.cs +++ /dev/null @@ -1,230 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// Details of a REST API operation, returned from the Resource Provider Operations API - /// - [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] - public partial class Operation - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Operation(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Operation(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Operation(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Display")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.OperationDisplayTypeConverter.ConvertFrom); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("IsDataAction")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Origin")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin?) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).Origin, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin.CreateFrom); - } - if (content.Contains("ActionType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).ActionType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType?) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).ActionType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType.CreateFrom); - } - if (content.Contains("DisplayProvider")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); - } - if (content.Contains("DisplayResource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); - } - if (content.Contains("DisplayOperation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); - } - if (content.Contains("DisplayDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Operation(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Display")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.OperationDisplayTypeConverter.ConvertFrom); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("IsDataAction")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Origin")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin?) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).Origin, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin.CreateFrom); - } - if (content.Contains("ActionType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).ActionType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType?) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).ActionType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType.CreateFrom); - } - if (content.Contains("DisplayProvider")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); - } - if (content.Contains("DisplayResource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); - } - if (content.Contains("DisplayOperation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); - } - if (content.Contains("DisplayDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - } - } - /// Details of a REST API operation, returned from the Resource Provider Operations API - [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] - public partial interface IOperation - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Operation.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Operation.TypeConverter.cs deleted file mode 100644 index fdf8af64285a..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Operation.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class OperationTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return Operation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return Operation.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return Operation.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Operation.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Operation.cs deleted file mode 100644 index 26cb000234b6..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Operation.cs +++ /dev/null @@ -1,256 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// Details of a REST API operation, returned from the Resource Provider Operations API - /// - public partial class Operation : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType? _actionType; - - /// - /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType? ActionType { get => this._actionType; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplay _display; - - /// Localized display information for this particular operation. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.OperationDisplay()); set => this._display = value; } - - /// - /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)Display).Description; } - - /// - /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", - /// "Restart Virtual Machine". - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)Display).Operation; } - - /// - /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)Display).Provider; } - - /// - /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)Display).Resource; } - - /// Backing field for property. - private bool? _isDataAction; - - /// - /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane - /// operations. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public bool? IsDataAction { get => this._isDataAction; } - - /// Internal Acessors for ActionType - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal.ActionType { get => this._actionType; set { {_actionType = value;} } } - - /// Internal Acessors for Display - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.OperationDisplay()); set { {_display = value;} } } - - /// Internal Acessors for DisplayDescription - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)Display).Description = value; } - - /// Internal Acessors for DisplayOperation - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)Display).Operation = value; } - - /// Internal Acessors for DisplayProvider - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)Display).Provider = value; } - - /// Internal Acessors for DisplayResource - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)Display).Resource = value; } - - /// Internal Acessors for IsDataAction - bool? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal.Name { get => this._name; set { {_name = value;} } } - - /// Internal Acessors for Origin - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationInternal.Origin { get => this._origin; set { {_origin = value;} } } - - /// Backing field for property. - private string _name; - - /// - /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", - /// "Microsoft.Compute/virtualMachines/capture/action" - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin? _origin; - - /// - /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is - /// "user,system" - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin? Origin { get => this._origin; } - - /// Creates an new instance. - public Operation() - { - - } - } - /// Details of a REST API operation, returned from the Resource Provider Operations API - public partial interface IOperation : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// - /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Enum. Indicates the action type. ""Internal"" refers to actions that are for internal only APIs.", - SerializedName = @"actionType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType? ActionType { get; } - /// - /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string DisplayDescription { get; } - /// - /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", - /// "Restart Virtual Machine". - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".", - SerializedName = @"operation", - PossibleTypes = new [] { typeof(string) })] - string DisplayOperation { get; } - /// - /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".", - SerializedName = @"provider", - PossibleTypes = new [] { typeof(string) })] - string DisplayProvider { get; } - /// - /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".", - SerializedName = @"resource", - PossibleTypes = new [] { typeof(string) })] - string DisplayResource { get; } - /// - /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane - /// operations. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Whether the operation applies to data-plane. This is ""true"" for data-plane operations and ""false"" for ARM/control-plane operations.", - SerializedName = @"isDataAction", - PossibleTypes = new [] { typeof(bool) })] - bool? IsDataAction { get; } - /// - /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", - /// "Microsoft.Compute/virtualMachines/capture/action" - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The name of the operation, as per Resource-Based Access Control (RBAC). Examples: ""Microsoft.Compute/virtualMachines/write"", ""Microsoft.Compute/virtualMachines/capture/action""", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// - /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is - /// "user,system" - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is ""user,system""", - SerializedName = @"origin", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin? Origin { get; } - - } - /// Details of a REST API operation, returned from the Resource Provider Operations API - internal partial interface IOperationInternal - - { - /// - /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType? ActionType { get; set; } - /// Localized display information for this particular operation. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplay Display { get; set; } - /// - /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. - /// - string DisplayDescription { get; set; } - /// - /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", - /// "Restart Virtual Machine". - /// - string DisplayOperation { get; set; } - /// - /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - /// - string DisplayProvider { get; set; } - /// - /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - /// - string DisplayResource { get; set; } - /// - /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane - /// operations. - /// - bool? IsDataAction { get; set; } - /// - /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", - /// "Microsoft.Compute/virtualMachines/capture/action" - /// - string Name { get; set; } - /// - /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is - /// "user,system" - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin? Origin { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Operation.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Operation.json.cs deleted file mode 100644 index bea19184094b..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Operation.json.cs +++ /dev/null @@ -1,130 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// Details of a REST API operation, returned from the Resource Provider Operations API - /// - public partial class Operation - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new Operation(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. - internal Operation(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.OperationDisplay.FromJson(__jsonDisplay) : Display;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction;} - {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;} - {_actionType = If( json?.PropertyT("actionType"), out var __jsonActionType) ? (string)__jsonActionType : (string)ActionType;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._actionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._actionType.ToString()) : null, "actionType" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationDisplay.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationDisplay.PowerShell.cs deleted file mode 100644 index 09c5504e5c22..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationDisplay.PowerShell.cs +++ /dev/null @@ -1,188 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// Localized display information for this particular operation. - [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] - public partial class OperationDisplay - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new OperationDisplay(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new OperationDisplay(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal OperationDisplay(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Provider")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); - } - if (content.Contains("Resource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); - } - if (content.Contains("Operation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal OperationDisplay(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Provider")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); - } - if (content.Contains("Resource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); - } - if (content.Contains("Operation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - } - } - /// Localized display information for this particular operation. - [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] - public partial interface IOperationDisplay - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationDisplay.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationDisplay.TypeConverter.cs deleted file mode 100644 index 82c90a0ebd6b..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationDisplay.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class OperationDisplayTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplay ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplay).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return OperationDisplay.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return OperationDisplay.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return OperationDisplay.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationDisplay.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationDisplay.cs deleted file mode 100644 index 9301611c7353..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationDisplay.cs +++ /dev/null @@ -1,141 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// Localized display information for this particular operation. - public partial class OperationDisplay : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplay, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal - { - - /// Backing field for property. - private string _description; - - /// - /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Description { get => this._description; } - - /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } - - /// Internal Acessors for Operation - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } - - /// Internal Acessors for Provider - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } - - /// Internal Acessors for Resource - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } - - /// Backing field for property. - private string _operation; - - /// - /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", - /// "Restart Virtual Machine". - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Operation { get => this._operation; } - - /// Backing field for property. - private string _provider; - - /// - /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Provider { get => this._provider; } - - /// Backing field for property. - private string _resource; - - /// - /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Resource { get => this._resource; } - - /// Creates an new instance. - public OperationDisplay() - { - - } - } - /// Localized display information for this particular operation. - public partial interface IOperationDisplay : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// - /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; } - /// - /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", - /// "Restart Virtual Machine". - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".", - SerializedName = @"operation", - PossibleTypes = new [] { typeof(string) })] - string Operation { get; } - /// - /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".", - SerializedName = @"provider", - PossibleTypes = new [] { typeof(string) })] - string Provider { get; } - /// - /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".", - SerializedName = @"resource", - PossibleTypes = new [] { typeof(string) })] - string Resource { get; } - - } - /// Localized display information for this particular operation. - internal partial interface IOperationDisplayInternal - - { - /// - /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. - /// - string Description { get; set; } - /// - /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", - /// "Restart Virtual Machine". - /// - string Operation { get; set; } - /// - /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - /// - string Provider { get; set; } - /// - /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - /// - string Resource { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationDisplay.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationDisplay.json.cs deleted file mode 100644 index 659a28771eea..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationDisplay.json.cs +++ /dev/null @@ -1,126 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// Localized display information for this particular operation. - public partial class OperationDisplay - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplay. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplay. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. - internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider;} - {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource;} - {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationListResult.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationListResult.PowerShell.cs deleted file mode 100644 index f970b34a8577..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationListResult.PowerShell.cs +++ /dev/null @@ -1,176 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - /// results. - /// - [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] - public partial class OperationListResult - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new OperationListResult(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new OperationListResult(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal OperationListResult(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.OperationTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal OperationListResult(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.OperationTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - } - } - /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - /// results. - [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] - public partial interface IOperationListResult - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationListResult.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationListResult.TypeConverter.cs deleted file mode 100644 index 2aacdf25057b..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationListResult.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class OperationListResultTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResult ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResult).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return OperationListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return OperationListResult.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return OperationListResult.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationListResult.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationListResult.cs deleted file mode 100644 index 35a286b6ffc2..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationListResult.cs +++ /dev/null @@ -1,79 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - /// results. - /// - public partial class OperationListResult : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResult, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResultInternal - { - - /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation[] Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// URL to get the next set of operation list results (if there are any). - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation[] _value; - - /// List of operations supported by the resource provider - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation[] Value { get => this._value; } - - /// Creates an new instance. - public OperationListResult() - { - - } - } - /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - /// results. - public partial interface IOperationListResult : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// URL to get the next set of operation list results (if there are any). - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"URL to get the next set of operation list results (if there are any).", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; } - /// List of operations supported by the resource provider - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"List of operations supported by the resource provider", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation[] Value { get; } - - } - /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - /// results. - internal partial interface IOperationListResultInternal - - { - /// URL to get the next set of operation list results (if there are any). - string NextLink { get; set; } - /// List of operations supported by the resource provider - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationListResult.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationListResult.json.cs deleted file mode 100644 index c1756a591483..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/OperationListResult.json.cs +++ /dev/null @@ -1,127 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - /// results. - /// - public partial class OperationListResult - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResult. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResult. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new OperationListResult(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. - internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Operation.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - if (null != this._value) - { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.XNodeArray(); - foreach( var __x in this._value ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("value",__w); - } - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ProxyResource.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ProxyResource.PowerShell.cs deleted file mode 100644 index e7e6ca1aa898..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ProxyResource.PowerShell.cs +++ /dev/null @@ -1,238 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location - /// - [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] - public partial class ProxyResource - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ProxyResource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ProxyResource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ProxyResource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ProxyResource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location - [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] - public partial interface IProxyResource - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ProxyResource.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ProxyResource.TypeConverter.cs deleted file mode 100644 index 7d249a3a3d94..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ProxyResource.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ProxyResourceTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IProxyResource ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IProxyResource).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ProxyResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ProxyResource.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ProxyResource.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ProxyResource.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ProxyResource.cs deleted file mode 100644 index 03060a2dbcc6..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ProxyResource.cs +++ /dev/null @@ -1,113 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location - /// - public partial class ProxyResource : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IProxyResource, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IProxyResourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource(); - - /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public ProxyResource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location - public partial interface IProxyResource : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource - { - - } - /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location - internal partial interface IProxyResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ProxyResource.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ProxyResource.json.cs deleted file mode 100644 index f24db2f399ac..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ProxyResource.json.cs +++ /dev/null @@ -1,110 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location - /// - public partial class ProxyResource - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IProxyResource. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IProxyResource. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. - internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource(json); - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __resource?.ToJson(container, serializationMode); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Resource.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Resource.PowerShell.cs deleted file mode 100644 index 670b99f5b408..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Resource.PowerShell.cs +++ /dev/null @@ -1,238 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// Common fields that are returned in the response for all Azure Resource Manager resources - /// - [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] - public partial class Resource - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Resource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Resource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Resource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Resource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SystemData")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - } - } - /// Common fields that are returned in the response for all Azure Resource Manager resources - [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] - public partial interface IResource - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Resource.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Resource.TypeConverter.cs deleted file mode 100644 index 19755cf45120..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Resource.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ResourceTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return Resource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return Resource.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return Resource.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/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Resource.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Resource.cs deleted file mode 100644 index 377ccafbe675..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Resource.cs +++ /dev/null @@ -1,208 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// Common fields that are returned in the response for all Azure Resource Manager resources - /// - public partial class Resource : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal - { - - /// Backing field for property. - private string _id; - - /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Id { get => this._id; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Id { get => this._id; set { {_id = value;} } } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Name { get => this._name; set { {_name = value;} } } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemData()); set { {_systemData = value;} } } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Type { get => this._type; set { {_type = value;} } } - - /// Backing field for property. - private string _name; - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData _systemData; - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemData()); } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// Backing field for property. - private string _type; - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Type { get => this._type; } - - /// Creates an new instance. - public Resource() - { - - } - } - /// Common fields that are returned in the response for all Azure Resource Manager resources - public partial interface IResource : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string Id { get; } - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The name of the resource", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The timestamp of resource creation (UTC).", - SerializedName = @"createdAt", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataCreatedAt { get; set; } - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The identity that created the resource.", - SerializedName = @"createdBy", - PossibleTypes = new [] { typeof(string) })] - string SystemDataCreatedBy { get; set; } - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of identity that created the resource.", - SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataCreatedByType { get; set; } - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The timestamp of resource last modification (UTC)", - SerializedName = @"lastModifiedAt", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? SystemDataLastModifiedAt { get; set; } - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The identity that last modified the resource.", - SerializedName = @"lastModifiedBy", - PossibleTypes = new [] { typeof(string) })] - string SystemDataLastModifiedBy { get; set; } - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of identity that last modified the resource.", - SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string Type { get; } - - } - /// Common fields that are returned in the response for all Azure Resource Manager resources - internal partial interface IResourceInternal - - { - /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - string Id { get; set; } - /// The name of the resource - string Name { get; set; } - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData SystemData { get; set; } - /// The timestamp of resource creation (UTC). - global::System.DateTime? SystemDataCreatedAt { get; set; } - /// The identity that created the resource. - string SystemDataCreatedBy { get; set; } - /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataCreatedByType { get; set; } - /// The timestamp of resource last modification (UTC) - global::System.DateTime? SystemDataLastModifiedAt { get; set; } - /// The identity that last modified the resource. - string SystemDataLastModifiedBy { get; set; } - /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - string Type { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Resource.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Resource.json.cs deleted file mode 100644 index dcd07d2ad393..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/Resource.json.cs +++ /dev/null @@ -1,128 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// Common fields that are returned in the response for all Azure Resource Manager resources - /// - public partial class Resource - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new Resource(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. - internal Resource(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemData.FromJson(__jsonSystemData) : SystemData;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/SystemData.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/SystemData.PowerShell.cs deleted file mode 100644 index 5b31c2823c9c..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/SystemData.PowerShell.cs +++ /dev/null @@ -1,204 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// Metadata pertaining to creation and last modification of the resource. - [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] - public partial class SystemData - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SystemData(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SystemData(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SystemData(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); - } - if (content.Contains("CreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("LastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("LastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SystemData(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); - } - if (content.Contains("CreatedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("CreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("LastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("LastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - /// Metadata pertaining to creation and last modification of the resource. - [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] - public partial interface ISystemData - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/SystemData.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/SystemData.TypeConverter.cs deleted file mode 100644 index 65a98b913cc2..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/SystemData.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class SystemDataTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return SystemData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return SystemData.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return SystemData.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/SystemData.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/SystemData.cs deleted file mode 100644 index be8b021531ef..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/SystemData.cs +++ /dev/null @@ -1,136 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// Metadata pertaining to creation and last modification of the resource. - public partial class SystemData : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemDataInternal - { - - /// Backing field for property. - private global::System.DateTime? _createdAt; - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public global::System.DateTime? CreatedAt { get => this._createdAt; set => this._createdAt = value; } - - /// Backing field for property. - private string _createdBy; - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? _createdByType; - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? CreatedByType { get => this._createdByType; set => this._createdByType = value; } - - /// Backing field for property. - private global::System.DateTime? _lastModifiedAt; - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public global::System.DateTime? LastModifiedAt { get => this._lastModifiedAt; set => this._lastModifiedAt = value; } - - /// Backing field for property. - private string _lastModifiedBy; - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? _lastModifiedByType; - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } - - /// Creates an new instance. - public SystemData() - { - - } - } - /// Metadata pertaining to creation and last modification of the resource. - public partial interface ISystemData : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable - { - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The timestamp of resource creation (UTC).", - SerializedName = @"createdAt", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? CreatedAt { get; set; } - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The identity that created the resource.", - SerializedName = @"createdBy", - PossibleTypes = new [] { typeof(string) })] - string CreatedBy { get; set; } - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of identity that created the resource.", - SerializedName = @"createdByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? CreatedByType { get; set; } - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The timestamp of resource last modification (UTC)", - SerializedName = @"lastModifiedAt", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? LastModifiedAt { get; set; } - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The identity that last modified the resource.", - SerializedName = @"lastModifiedBy", - PossibleTypes = new [] { typeof(string) })] - string LastModifiedBy { get; set; } - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of identity that last modified the resource.", - SerializedName = @"lastModifiedByType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? LastModifiedByType { get; set; } - - } - /// Metadata pertaining to creation and last modification of the resource. - internal partial interface ISystemDataInternal - - { - /// The timestamp of resource creation (UTC). - global::System.DateTime? CreatedAt { get; set; } - /// The identity that created the resource. - string CreatedBy { get; set; } - /// The type of identity that created the resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? CreatedByType { get; set; } - /// The timestamp of resource last modification (UTC) - global::System.DateTime? LastModifiedAt { get; set; } - /// The identity that last modified the resource. - string LastModifiedBy { get; set; } - /// The type of identity that last modified the resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? LastModifiedByType { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/SystemData.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/SystemData.json.cs deleted file mode 100644 index ee33dc39d6e5..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/SystemData.json.cs +++ /dev/null @@ -1,118 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// Metadata pertaining to creation and last modification of the resource. - public partial class SystemData - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new SystemData(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. - internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy;} - {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType;} - {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} - {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy;} - {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType;} - {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add ); - AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add ); - AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); - AddIf( null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy" ,container.Add ); - AddIf( null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType" ,container.Add ); - AddIf( null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt" ,container.Add ); - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResource.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResource.PowerShell.cs deleted file mode 100644 index b8f5c3bd05cf..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResource.PowerShell.cs +++ /dev/null @@ -1,254 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' - /// - [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] - public partial class TrackedResource - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new TrackedResource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new TrackedResource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal TrackedResource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, 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 TrackedResource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataCreatedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedBy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); - } - if (content.Contains("SystemDataLastModifiedByType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType.CreateFrom); - } - if (content.Contains("SystemDataLastModifiedAt")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.SystemDataTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - } - /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' - [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] - public partial interface ITrackedResource - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResource.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResource.TypeConverter.cs deleted file mode 100644 index 8e5bbf8974d3..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResource.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class TrackedResourceTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResource ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResource).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return TrackedResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return TrackedResource.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return TrackedResource.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResource.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResource.cs deleted file mode 100644 index 9a13d3a2861c..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResource.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' - /// - public partial class TrackedResource : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResource, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource(); - - /// - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id; } - - /// Backing field for property. - private string _location; - - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public string Location { get => this._location; set => this._location = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for SystemData - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Name; } - - /// - /// Azure Resource Manager metadata containing createdBy and modifiedBy information. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemData; } - - /// The timestamp of resource creation (UTC). - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } - - /// The identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } - - /// The type of identity that created the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// The timestamp of resource last modification (UTC) - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } - - /// The identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } - - /// The type of identity that last modified the resource. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType)""); } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags _tag; - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.TrackedResourceTags()); set => this._tag = value; } - - /// - /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - /// - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public TrackedResource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' - public partial interface ITrackedResource : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResource - { - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - string Location { get; set; } - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags Tag { get; set; } - - } - /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' - internal partial interface ITrackedResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IResourceInternal - { - /// The geo-location where the resource lives - string Location { get; set; } - /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags Tag { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResource.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResource.json.cs deleted file mode 100644 index b654462fe13a..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResource.json.cs +++ /dev/null @@ -1,114 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// - /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' - /// - public partial class TrackedResource - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResource. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResource. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __resource?.ToJson(container, serializationMode); - AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); - AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); - AfterToJson(ref container); - return container; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. - internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource(json); - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.TrackedResourceTags.FromJson(__jsonTags) : Tag;} - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} - AfterFromJson(json); - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResourceTags.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResourceTags.PowerShell.cs deleted file mode 100644 index 05d189086f57..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResourceTags.PowerShell.cs +++ /dev/null @@ -1,160 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// Resource tags. - [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] - public partial class TrackedResourceTags - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new TrackedResourceTags(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new TrackedResourceTags(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal TrackedResourceTags(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - // this type is a dictionary; copy elements from source to here. - CopyFrom(content); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal TrackedResourceTags(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - // this type is a dictionary; copy elements from source to here. - CopyFrom(content); - AfterDeserializePSObject(content); - } - } - /// Resource tags. - [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] - public partial interface ITrackedResourceTags - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResourceTags.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResourceTags.TypeConverter.cs deleted file mode 100644 index 20bd7cf31e65..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResourceTags.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class TrackedResourceTagsTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return TrackedResourceTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return TrackedResourceTags.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return TrackedResourceTags.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResourceTags.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResourceTags.cs deleted file mode 100644 index 471f53d992bd..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResourceTags.cs +++ /dev/null @@ -1,35 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// Resource tags. - public partial class TrackedResourceTags : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTagsInternal - { - - /// Creates an new instance. - public TrackedResourceTags() - { - - } - } - /// Resource tags. - public partial interface ITrackedResourceTags : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray - { - - } - /// Resource tags. - internal partial interface ITrackedResourceTagsInternal - - { - - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResourceTags.dictionary.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResourceTags.dictionary.cs deleted file mode 100644 index ae21f52eb4a9..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResourceTags.dictionary.cs +++ /dev/null @@ -1,75 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - public partial class TrackedResourceTags : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray - { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - - int Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - - public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } - - /// - /// - public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); - - public void Clear() => __additionalProperties.Clear(); - - /// - public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); - - /// - public void CopyFrom(global::System.Collections.IDictionary source) - { - if (null != source) - { - foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) - { - if ((null != property.Key && null != property.Value)) - { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); - } - } - } - } - - /// - public void CopyFrom(global::System.Management.Automation.PSObject source) - { - if (null != source) - { - foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) - { - if ((null != property.Key && null != property.Value)) - { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); - } - } - } - } - - /// - public bool Remove(global::System.String key) => __additionalProperties.Remove( key); - - /// - /// - public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); - - /// - - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.TrackedResourceTags source) => source.__additionalProperties; - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResourceTags.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResourceTags.json.cs deleted file mode 100644 index b6f4c665bc6f..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/TrackedResourceTags.json.cs +++ /dev/null @@ -1,109 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - /// Resource tags. - public partial class TrackedResourceTags - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray)this).AdditionalProperties, container); - AfterToJson(ref container); - return container; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. - /// - internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); - AfterFromJson(json); - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentities.dictionary.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentities.dictionary.cs deleted file mode 100644 index 0bca80023fda..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentities.dictionary.cs +++ /dev/null @@ -1,75 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - - public partial class UserAssignedIdentities : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray - { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - - int Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentity this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } - - /// - /// - public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentity value) => __additionalProperties.Add( key, value); - - public void Clear() => __additionalProperties.Clear(); - - /// - public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); - - /// - public void CopyFrom(global::System.Collections.IDictionary source) - { - if (null != source) - { - foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) - { - if ((null != property.Key && null != property.Value)) - { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); - } - } - } - } - - /// - public void CopyFrom(global::System.Management.Automation.PSObject source) - { - if (null != source) - { - foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentity value) => __additionalProperties.TryGetValue( key, out value); - - /// - - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.UserAssignedIdentities source) => source.__additionalProperties; - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureKeyVaultSmbCredentials.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureKeyVaultSmbCredentials.PowerShell.cs similarity index 76% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureKeyVaultSmbCredentials.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureKeyVaultSmbCredentials.PowerShell.cs index 25b1d0ec966d..60b254f87271 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureKeyVaultSmbCredentials.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureKeyVaultSmbCredentials.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AzureKeyVaultSmbCredentials partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,21 +78,21 @@ internal AzureKeyVaultSmbCredentials(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("UsernameUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)this).UsernameUri = (string) content.GetValueForProperty("UsernameUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)this).UsernameUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)this).UsernameUri = (string) content.GetValueForProperty("UsernameUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)this).UsernameUri, global::System.Convert.ToString); } if (content.Contains("PasswordUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)this).PasswordUri = (string) content.GetValueForProperty("PasswordUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)this).PasswordUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)this).PasswordUri = (string) content.GetValueForProperty("PasswordUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)this).PasswordUri, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)this).Type, 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. @@ -107,43 +107,41 @@ internal AzureKeyVaultSmbCredentials(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("UsernameUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)this).UsernameUri = (string) content.GetValueForProperty("UsernameUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)this).UsernameUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)this).UsernameUri = (string) content.GetValueForProperty("UsernameUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)this).UsernameUri, global::System.Convert.ToString); } if (content.Contains("PasswordUri")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)this).PasswordUri = (string) content.GetValueForProperty("PasswordUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal)this).PasswordUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)this).PasswordUri = (string) content.GetValueForProperty("PasswordUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)this).PasswordUri, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureKeyVaultSmbCredentials(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureKeyVaultSmbCredentials(content); } @@ -153,7 +151,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureKeyVaultSmbCredentials.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureKeyVaultSmbCredentials.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureKeyVaultSmbCredentials.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureKeyVaultSmbCredentials.TypeConverter.cs index db4f8c357679..8f91828113bb 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureKeyVaultSmbCredentials.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureKeyVaultSmbCredentials.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureKeyVaultSmbCredentials.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureKeyVaultSmbCredentials.cs similarity index 82% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureKeyVaultSmbCredentials.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureKeyVaultSmbCredentials.cs index 23c957214ef1..fc81269bf6e7 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureKeyVaultSmbCredentials.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureKeyVaultSmbCredentials.cs @@ -3,24 +3,23 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; /// The Azure Key Vault secret URIs which store the credentials. public partial class AzureKeyVaultSmbCredentials : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentialsInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates { /// - /// Backing field for Inherited model + /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentials __credentials = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Credentials(); + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentials __credentials = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Credentials(); /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)__credentials).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)__credentials).Type = value; } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)__credentials).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)__credentials).Type = value ; } /// Backing field for property. private string _passwordUri; @@ -32,8 +31,9 @@ public partial class AzureKeyVaultSmbCredentials : public string PasswordUri { get => this._passwordUri; set => this._passwordUri = value; } /// The Credentials type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Constant] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)__credentials).Type; } + public string Type { get => "AzureKeyVaultSmb"; } /// Backing field for property. private string _usernameUri; @@ -65,7 +65,7 @@ public AzureKeyVaultSmbCredentials() /// The Azure Key Vault secret URIs which store the credentials. public partial interface IAzureKeyVaultSmbCredentials : Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentials + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentials { /// /// The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value. @@ -73,6 +73,9 @@ public partial interface IAzureKeyVaultSmbCredentials : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value.", SerializedName = @"passwordUri", PossibleTypes = new [] { typeof(string) })] @@ -83,6 +86,9 @@ public partial interface IAzureKeyVaultSmbCredentials : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value.", SerializedName = @"usernameUri", PossibleTypes = new [] { typeof(string) })] @@ -91,7 +97,7 @@ public partial interface IAzureKeyVaultSmbCredentials : } /// The Azure Key Vault secret URIs which store the credentials. internal partial interface IAzureKeyVaultSmbCredentialsInternal : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal { /// /// The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureKeyVaultSmbCredentials.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureKeyVaultSmbCredentials.json.cs similarity index 94% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureKeyVaultSmbCredentials.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureKeyVaultSmbCredentials.json.cs index e40ceb861cf0..c5d3c720a5af 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureKeyVaultSmbCredentials.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureKeyVaultSmbCredentials.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -65,20 +65,20 @@ internal AzureKeyVaultSmbCredentials(Microsoft.Azure.PowerShell.Cmdlets.StorageM { return; } - __credentials = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Credentials(json); - {_usernameUri = If( json?.PropertyT("usernameUri"), out var __jsonUsernameUri) ? (string)__jsonUsernameUri : (string)UsernameUri;} - {_passwordUri = If( json?.PropertyT("passwordUri"), out var __jsonPasswordUri) ? (string)__jsonPasswordUri : (string)PasswordUri;} + __credentials = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Credentials(json); + {_usernameUri = If( json?.PropertyT("usernameUri"), out var __jsonUsernameUri) ? (string)__jsonUsernameUri : (string)_usernameUri;} + {_passwordUri = If( json?.PropertyT("passwordUri"), out var __jsonPasswordUri) ? (string)__jsonPasswordUri : (string)_passwordUri;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureKeyVaultSmbCredentials FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new AzureKeyVaultSmbCredentials(json) : null; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointProperties.PowerShell.cs new file mode 100644 index 000000000000..439740e41f9d --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointProperties.PowerShell.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The properties of Azure MultiCloudConnector endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureMultiCloudConnectorEndpointPropertiesTypeConverter))] + public partial class AzureMultiCloudConnectorEndpointProperties + { + + /// + /// 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 AzureMultiCloudConnectorEndpointProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MultiCloudConnectorId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).MultiCloudConnectorId = (string) content.GetValueForProperty("MultiCloudConnectorId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).MultiCloudConnectorId, global::System.Convert.ToString); + } + if (content.Contains("AwsS3BucketId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).AwsS3BucketId, global::System.Convert.ToString); + } + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState, 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 AzureMultiCloudConnectorEndpointProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MultiCloudConnectorId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).MultiCloudConnectorId = (string) content.GetValueForProperty("MultiCloudConnectorId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).MultiCloudConnectorId, global::System.Convert.ToString); + } + if (content.Contains("AwsS3BucketId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointPropertiesInternal)this).AwsS3BucketId, global::System.Convert.ToString); + } + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMultiCloudConnectorEndpointProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMultiCloudConnectorEndpointProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a + /// json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of Azure MultiCloudConnector endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureMultiCloudConnectorEndpointPropertiesTypeConverter))] + public partial interface IAzureMultiCloudConnectorEndpointProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointProperties.TypeConverter.cs index bfdfe560fc96..8855d3649e05 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointProperties.cs new file mode 100644 index 000000000000..85b612bfdba0 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointProperties.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The properties of Azure MultiCloudConnector endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class AzureMultiCloudConnectorEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseProperties(); + + /// Backing field for property. + private string _awsS3BucketId; + + /// The AWS S3 bucket ARM resource Id. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string AwsS3BucketId { get => this._awsS3BucketId; set => this._awsS3BucketId = value; } + + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description = value ?? null; } + + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string EndpointType { get => "AzureMultiCloudConnector"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType = "AzureMultiCloudConnector"; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState = value ?? null; } + + /// Backing field for property. + private string _multiCloudConnectorId; + + /// The Azure Resource ID of the MultiCloud Connector resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string MultiCloudConnectorId { get => this._multiCloudConnectorId; set => this._multiCloudConnectorId = value; } + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; } + + /// + /// Creates an new instance. + /// + public AzureMultiCloudConnectorEndpointProperties() + { + this.__endpointBaseProperties.EndpointType = "AzureMultiCloudConnector"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__endpointBaseProperties), __endpointBaseProperties); + await eventListener.AssertObjectIsValid(nameof(__endpointBaseProperties), __endpointBaseProperties); + } + } + /// The properties of Azure MultiCloudConnector endpoint. + public partial interface IAzureMultiCloudConnectorEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties + { + /// The AWS S3 bucket ARM resource Id. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The AWS S3 bucket ARM resource Id.", + SerializedName = @"awsS3BucketId", + PossibleTypes = new [] { typeof(string) })] + string AwsS3BucketId { get; set; } + /// The Azure Resource ID of the MultiCloud Connector resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The Azure Resource ID of the MultiCloud Connector resource.", + SerializedName = @"multiCloudConnectorId", + PossibleTypes = new [] { typeof(string) })] + string MultiCloudConnectorId { get; set; } + + } + /// The properties of Azure MultiCloudConnector endpoint. + internal partial interface IAzureMultiCloudConnectorEndpointPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal + { + /// The AWS S3 bucket ARM resource Id. + string AwsS3BucketId { get; set; } + /// The Azure Resource ID of the MultiCloud Connector resource. + string MultiCloudConnectorId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointProperties.json.cs similarity index 87% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointProperties.json.cs index c2ef2116a708..9eee3350c09f 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -65,20 +65,20 @@ internal AzureMultiCloudConnectorEndpointProperties(Microsoft.Azure.PowerShell.C { return; } - __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseProperties(json); - {_multiCloudConnectorId = If( json?.PropertyT("multiCloudConnectorId"), out var __jsonMultiCloudConnectorId) ? (string)__jsonMultiCloudConnectorId : (string)MultiCloudConnectorId;} - {_awsS3BucketId = If( json?.PropertyT("awsS3BucketId"), out var __jsonAwsS3BucketId) ? (string)__jsonAwsS3BucketId : (string)AwsS3BucketId;} + __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseProperties(json); + {_multiCloudConnectorId = If( json?.PropertyT("multiCloudConnectorId"), out var __jsonMultiCloudConnectorId) ? (string)__jsonMultiCloudConnectorId : (string)_multiCloudConnectorId;} + {_awsS3BucketId = If( json?.PropertyT("awsS3BucketId"), out var __jsonAwsS3BucketId) ? (string)__jsonAwsS3BucketId : (string)_awsS3BucketId;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new AzureMultiCloudConnectorEndpointProperties(json) : null; } @@ -105,7 +105,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ return container; } __endpointBaseProperties?.ToJson(container, serializationMode); - AddIf( null != (((object)this._multiCloudConnectorId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._multiCloudConnectorId.ToString()) : null, "multiCloudConnectorId" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._multiCloudConnectorId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._multiCloudConnectorId.ToString()) : null, "multiCloudConnectorId" ,container.Add ); + } AddIf( null != (((object)this._awsS3BucketId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._awsS3BucketId.ToString()) : null, "awsS3BucketId" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointUpdateProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointUpdateProperties.PowerShell.cs similarity index 77% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointUpdateProperties.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointUpdateProperties.PowerShell.cs index d485f1654fde..cc1de0e3cfb8 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointUpdateProperties.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointUpdateProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AzureMultiCloudConnectorEndpointUpdateProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal AzureMultiCloudConnectorEndpointUpdateProperties(global::System.Collect // actually deserialize if (content.Contains("EndpointType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description, 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. @@ -103,39 +103,39 @@ internal AzureMultiCloudConnectorEndpointUpdateProperties(global::System.Managem // actually deserialize if (content.Contains("EndpointType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureMultiCloudConnectorEndpointUpdateProperties(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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureMultiCloudConnectorEndpointUpdateProperties(content); } @@ -148,7 +148,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointUpdateProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointUpdateProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointUpdateProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointUpdateProperties.TypeConverter.cs index 9def1ae86198..4dda4e5440eb 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointUpdateProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointUpdateProperties.cs new file mode 100644 index 000000000000..db9ffcef38e1 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointUpdateProperties.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The properties of Azure Storage NFS file share endpoint to update. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class AzureMultiCloudConnectorEndpointUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointUpdatePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateProperties(); + + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description = value ?? null; } + + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string EndpointType { get => "AzureMultiCloudConnector"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType = "AzureMultiCloudConnector"; } + + /// + /// Creates an new instance. + /// + public AzureMultiCloudConnectorEndpointUpdateProperties() + { + this.__endpointBaseUpdateProperties.EndpointType = "AzureMultiCloudConnector"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); + await eventListener.AssertObjectIsValid(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); + } + } + /// The properties of Azure Storage NFS file share endpoint to update. + public partial interface IAzureMultiCloudConnectorEndpointUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties + { + + } + /// The properties of Azure Storage NFS file share endpoint to update. + internal partial interface IAzureMultiCloudConnectorEndpointUpdatePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointUpdateProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointUpdateProperties.json.cs similarity index 93% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointUpdateProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointUpdateProperties.json.cs index 4564797dc3a1..cb82ab8ab498 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureMultiCloudConnectorEndpointUpdateProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureMultiCloudConnectorEndpointUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -66,18 +66,18 @@ internal AzureMultiCloudConnectorEndpointUpdateProperties(Microsoft.Azure.PowerS { return; } - __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateProperties(json); + __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateProperties(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureMultiCloudConnectorEndpointUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureMultiCloudConnectorEndpointUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new AzureMultiCloudConnectorEndpointUpdateProperties(json) : null; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointProperties.PowerShell.cs new file mode 100644 index 000000000000..a513f501f900 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointProperties.PowerShell.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The properties of Azure Storage blob container endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureStorageBlobContainerEndpointPropertiesTypeConverter))] + public partial class AzureStorageBlobContainerEndpointProperties + { + + /// + /// 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 AzureStorageBlobContainerEndpointProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("BlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointPropertiesInternal)this).BlobContainerName = (string) content.GetValueForProperty("BlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointPropertiesInternal)this).BlobContainerName, global::System.Convert.ToString); + } + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState, 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 AzureStorageBlobContainerEndpointProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("BlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointPropertiesInternal)this).BlobContainerName = (string) content.GetValueForProperty("BlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointPropertiesInternal)this).BlobContainerName, global::System.Convert.ToString); + } + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureStorageBlobContainerEndpointProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureStorageBlobContainerEndpointProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a + /// json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of Azure Storage blob container endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureStorageBlobContainerEndpointPropertiesTypeConverter))] + public partial interface IAzureStorageBlobContainerEndpointProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointProperties.TypeConverter.cs index c656ec898bd9..cb552919514e 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointProperties.cs new file mode 100644 index 000000000000..0d6519192c34 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointProperties.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The properties of Azure Storage blob container endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class AzureStorageBlobContainerEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseProperties(); + + /// Backing field for property. + private string _blobContainerName; + + /// The name of the Storage blob container that is the target destination. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string BlobContainerName { get => this._blobContainerName; set => this._blobContainerName = value; } + + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description = value ?? null; } + + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string EndpointType { get => "AzureStorageBlobContainer"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType = "AzureStorageBlobContainer"; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState = value ?? null; } + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; } + + /// Backing field for property. + private string _storageAccountResourceId; + + /// The Azure Resource ID of the storage account that is the target destination. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string StorageAccountResourceId { get => this._storageAccountResourceId; set => this._storageAccountResourceId = value; } + + /// + /// Creates an new instance. + /// + public AzureStorageBlobContainerEndpointProperties() + { + this.__endpointBaseProperties.EndpointType = "AzureStorageBlobContainer"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__endpointBaseProperties), __endpointBaseProperties); + await eventListener.AssertObjectIsValid(nameof(__endpointBaseProperties), __endpointBaseProperties); + } + } + /// The properties of Azure Storage blob container endpoint. + public partial interface IAzureStorageBlobContainerEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties + { + /// The name of the Storage blob container that is the target destination. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The name of the Storage blob container that is the target destination.", + SerializedName = @"blobContainerName", + PossibleTypes = new [] { typeof(string) })] + string BlobContainerName { get; set; } + /// The Azure Resource ID of the storage account that is the target destination. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The Azure Resource ID of the storage account that is the target destination.", + SerializedName = @"storageAccountResourceId", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountResourceId { get; set; } + + } + /// The properties of Azure Storage blob container endpoint. + internal partial interface IAzureStorageBlobContainerEndpointPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal + { + /// The name of the Storage blob container that is the target destination. + string BlobContainerName { get; set; } + /// The Azure Resource ID of the storage account that is the target destination. + string StorageAccountResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointProperties.json.cs similarity index 80% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointProperties.json.cs index 9f5068343383..9a00114e00ac 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -65,20 +65,20 @@ internal AzureStorageBlobContainerEndpointProperties(Microsoft.Azure.PowerShell. { return; } - __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseProperties(json); - {_storageAccountResourceId = If( json?.PropertyT("storageAccountResourceId"), out var __jsonStorageAccountResourceId) ? (string)__jsonStorageAccountResourceId : (string)StorageAccountResourceId;} - {_blobContainerName = If( json?.PropertyT("blobContainerName"), out var __jsonBlobContainerName) ? (string)__jsonBlobContainerName : (string)BlobContainerName;} + __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseProperties(json); + {_storageAccountResourceId = If( json?.PropertyT("storageAccountResourceId"), out var __jsonStorageAccountResourceId) ? (string)__jsonStorageAccountResourceId : (string)_storageAccountResourceId;} + {_blobContainerName = If( json?.PropertyT("blobContainerName"), out var __jsonBlobContainerName) ? (string)__jsonBlobContainerName : (string)_blobContainerName;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new AzureStorageBlobContainerEndpointProperties(json) : null; } @@ -105,8 +105,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ return container; } __endpointBaseProperties?.ToJson(container, serializationMode); - AddIf( null != (((object)this._storageAccountResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._storageAccountResourceId.ToString()) : null, "storageAccountResourceId" ,container.Add ); - AddIf( null != (((object)this._blobContainerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._blobContainerName.ToString()) : null, "blobContainerName" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._storageAccountResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._storageAccountResourceId.ToString()) : null, "storageAccountResourceId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._blobContainerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._blobContainerName.ToString()) : null, "blobContainerName" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointUpdateProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointUpdateProperties.PowerShell.cs similarity index 77% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointUpdateProperties.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointUpdateProperties.PowerShell.cs index 0927a6830872..aebb9d7cfef6 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointUpdateProperties.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointUpdateProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -62,7 +62,7 @@ public partial class AzureStorageBlobContainerEndpointUpdateProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -77,17 +77,17 @@ internal AzureStorageBlobContainerEndpointUpdateProperties(global::System.Collec // actually deserialize if (content.Contains("EndpointType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description, 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. @@ -102,39 +102,39 @@ internal AzureStorageBlobContainerEndpointUpdateProperties(global::System.Manage // actually deserialize if (content.Contains("EndpointType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureStorageBlobContainerEndpointUpdateProperties(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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureStorageBlobContainerEndpointUpdateProperties(content); } @@ -147,7 +147,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointUpdateProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointUpdateProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointUpdateProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointUpdateProperties.TypeConverter.cs index 369eca9af1b0..635603424802 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointUpdateProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointUpdateProperties.cs new file mode 100644 index 000000000000..5c086884ab86 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointUpdateProperties.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class AzureStorageBlobContainerEndpointUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointUpdatePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateProperties(); + + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description = value ?? null; } + + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string EndpointType { get => "AzureStorageBlobContainer"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType = "AzureStorageBlobContainer"; } + + /// + /// Creates an new instance. + /// + public AzureStorageBlobContainerEndpointUpdateProperties() + { + this.__endpointBaseUpdateProperties.EndpointType = "AzureStorageBlobContainer"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); + await eventListener.AssertObjectIsValid(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); + } + } + public partial interface IAzureStorageBlobContainerEndpointUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties + { + + } + internal partial interface IAzureStorageBlobContainerEndpointUpdatePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointUpdateProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointUpdateProperties.json.cs similarity index 93% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointUpdateProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointUpdateProperties.json.cs index 64e18663a07f..c02754379925 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageBlobContainerEndpointUpdateProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageBlobContainerEndpointUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -65,18 +65,18 @@ internal AzureStorageBlobContainerEndpointUpdateProperties(Microsoft.Azure.Power { return; } - __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateProperties(json); + __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateProperties(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageBlobContainerEndpointUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageBlobContainerEndpointUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new AzureStorageBlobContainerEndpointUpdateProperties(json) : null; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointProperties.PowerShell.cs new file mode 100644 index 000000000000..a3e40927b425 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointProperties.PowerShell.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The properties of Azure Storage NFS file share endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureStorageNfsFileShareEndpointPropertiesTypeConverter))] + public partial class AzureStorageNfsFileShareEndpointProperties + { + + /// + /// 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 AzureStorageNfsFileShareEndpointProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("FileShareName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).FileShareName = (string) content.GetValueForProperty("FileShareName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).FileShareName, global::System.Convert.ToString); + } + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState, 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 AzureStorageNfsFileShareEndpointProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("FileShareName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).FileShareName = (string) content.GetValueForProperty("FileShareName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointPropertiesInternal)this).FileShareName, global::System.Convert.ToString); + } + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureStorageNfsFileShareEndpointProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureStorageNfsFileShareEndpointProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a + /// json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of Azure Storage NFS file share endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureStorageNfsFileShareEndpointPropertiesTypeConverter))] + public partial interface IAzureStorageNfsFileShareEndpointProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointProperties.TypeConverter.cs index 370bdccb3823..0ca4f39300f8 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointProperties.cs new file mode 100644 index 000000000000..9a0b60d6fc7b --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointProperties.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The properties of Azure Storage NFS file share endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class AzureStorageNfsFileShareEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseProperties(); + + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description = value ?? null; } + + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string EndpointType { get => "AzureStorageNfsFileShare"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType = "AzureStorageNfsFileShare"; } + + /// Backing field for property. + private string _fileShareName; + + /// The name of the Azure Storage NFS file share. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string FileShareName { get => this._fileShareName; set => this._fileShareName = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState = value ?? null; } + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; } + + /// Backing field for property. + private string _storageAccountResourceId; + + /// The Azure Resource ID of the storage account. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string StorageAccountResourceId { get => this._storageAccountResourceId; set => this._storageAccountResourceId = value; } + + /// + /// Creates an new instance. + /// + public AzureStorageNfsFileShareEndpointProperties() + { + this.__endpointBaseProperties.EndpointType = "AzureStorageNfsFileShare"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__endpointBaseProperties), __endpointBaseProperties); + await eventListener.AssertObjectIsValid(nameof(__endpointBaseProperties), __endpointBaseProperties); + } + } + /// The properties of Azure Storage NFS file share endpoint. + public partial interface IAzureStorageNfsFileShareEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties + { + /// The name of the Azure Storage NFS file share. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The name of the Azure Storage NFS file share.", + SerializedName = @"fileShareName", + PossibleTypes = new [] { typeof(string) })] + string FileShareName { get; set; } + /// The Azure Resource ID of the storage account. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The Azure Resource ID of the storage account.", + SerializedName = @"storageAccountResourceId", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountResourceId { get; set; } + + } + /// The properties of Azure Storage NFS file share endpoint. + internal partial interface IAzureStorageNfsFileShareEndpointPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal + { + /// The name of the Azure Storage NFS file share. + string FileShareName { get; set; } + /// The Azure Resource ID of the storage account. + string StorageAccountResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointProperties.json.cs similarity index 80% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointProperties.json.cs index 31b503c20e14..eaf2ddd28844 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -65,20 +65,20 @@ internal AzureStorageNfsFileShareEndpointProperties(Microsoft.Azure.PowerShell.C { return; } - __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseProperties(json); - {_storageAccountResourceId = If( json?.PropertyT("storageAccountResourceId"), out var __jsonStorageAccountResourceId) ? (string)__jsonStorageAccountResourceId : (string)StorageAccountResourceId;} - {_fileShareName = If( json?.PropertyT("fileShareName"), out var __jsonFileShareName) ? (string)__jsonFileShareName : (string)FileShareName;} + __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseProperties(json); + {_storageAccountResourceId = If( json?.PropertyT("storageAccountResourceId"), out var __jsonStorageAccountResourceId) ? (string)__jsonStorageAccountResourceId : (string)_storageAccountResourceId;} + {_fileShareName = If( json?.PropertyT("fileShareName"), out var __jsonFileShareName) ? (string)__jsonFileShareName : (string)_fileShareName;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new AzureStorageNfsFileShareEndpointProperties(json) : null; } @@ -105,8 +105,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ return container; } __endpointBaseProperties?.ToJson(container, serializationMode); - AddIf( null != (((object)this._storageAccountResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._storageAccountResourceId.ToString()) : null, "storageAccountResourceId" ,container.Add ); - AddIf( null != (((object)this._fileShareName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._fileShareName.ToString()) : null, "fileShareName" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._storageAccountResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._storageAccountResourceId.ToString()) : null, "storageAccountResourceId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._fileShareName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._fileShareName.ToString()) : null, "fileShareName" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointUpdateProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointUpdateProperties.PowerShell.cs similarity index 77% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointUpdateProperties.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointUpdateProperties.PowerShell.cs index 66f2689520f1..dc1954bad29a 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointUpdateProperties.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointUpdateProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AzureStorageNfsFileShareEndpointUpdateProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal AzureStorageNfsFileShareEndpointUpdateProperties(global::System.Collect // actually deserialize if (content.Contains("EndpointType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description, 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. @@ -103,39 +103,39 @@ internal AzureStorageNfsFileShareEndpointUpdateProperties(global::System.Managem // actually deserialize if (content.Contains("EndpointType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureStorageNfsFileShareEndpointUpdateProperties(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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureStorageNfsFileShareEndpointUpdateProperties(content); } @@ -148,7 +148,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointUpdateProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointUpdateProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointUpdateProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointUpdateProperties.TypeConverter.cs index 86ffd3163380..59d2bb3f939b 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointUpdateProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointUpdateProperties.cs new file mode 100644 index 000000000000..a1454be19674 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointUpdateProperties.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The properties of Azure Storage NFS file share endpoint to update. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class AzureStorageNfsFileShareEndpointUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointUpdatePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateProperties(); + + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description = value ?? null; } + + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string EndpointType { get => "AzureStorageNfsFileShare"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType = "AzureStorageNfsFileShare"; } + + /// + /// Creates an new instance. + /// + public AzureStorageNfsFileShareEndpointUpdateProperties() + { + this.__endpointBaseUpdateProperties.EndpointType = "AzureStorageNfsFileShare"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); + await eventListener.AssertObjectIsValid(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); + } + } + /// The properties of Azure Storage NFS file share endpoint to update. + public partial interface IAzureStorageNfsFileShareEndpointUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties + { + + } + /// The properties of Azure Storage NFS file share endpoint to update. + internal partial interface IAzureStorageNfsFileShareEndpointUpdatePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointUpdateProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointUpdateProperties.json.cs similarity index 93% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointUpdateProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointUpdateProperties.json.cs index 24181339d2d9..880fd6a67959 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageNfsFileShareEndpointUpdateProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageNfsFileShareEndpointUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -66,18 +66,18 @@ internal AzureStorageNfsFileShareEndpointUpdateProperties(Microsoft.Azure.PowerS { return; } - __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateProperties(json); + __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateProperties(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageNfsFileShareEndpointUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageNfsFileShareEndpointUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new AzureStorageNfsFileShareEndpointUpdateProperties(json) : null; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointProperties.PowerShell.cs new file mode 100644 index 000000000000..cf8d62707599 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointProperties.PowerShell.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The properties of Azure Storage SMB file share endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureStorageSmbFileShareEndpointPropertiesTypeConverter))] + public partial class AzureStorageSmbFileShareEndpointProperties + { + + /// + /// 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 AzureStorageSmbFileShareEndpointProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("FileShareName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).FileShareName = (string) content.GetValueForProperty("FileShareName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).FileShareName, global::System.Convert.ToString); + } + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState, 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 AzureStorageSmbFileShareEndpointProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).StorageAccountResourceId = (string) content.GetValueForProperty("StorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).StorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("FileShareName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).FileShareName = (string) content.GetValueForProperty("FileShareName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointPropertiesInternal)this).FileShareName, global::System.Convert.ToString); + } + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureStorageSmbFileShareEndpointProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureStorageSmbFileShareEndpointProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a + /// json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of Azure Storage SMB file share endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureStorageSmbFileShareEndpointPropertiesTypeConverter))] + public partial interface IAzureStorageSmbFileShareEndpointProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointProperties.TypeConverter.cs index 0f247e5ddebd..67b642bbf93f 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointProperties.cs new file mode 100644 index 000000000000..dfd929779b2e --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointProperties.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The properties of Azure Storage SMB file share endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class AzureStorageSmbFileShareEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseProperties(); + + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description = value ?? null; } + + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string EndpointType { get => "AzureStorageSmbFileShare"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType = "AzureStorageSmbFileShare"; } + + /// Backing field for property. + private string _fileShareName; + + /// The name of the Azure Storage file share. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string FileShareName { get => this._fileShareName; set => this._fileShareName = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState = value ?? null; } + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; } + + /// Backing field for property. + private string _storageAccountResourceId; + + /// The Azure Resource ID of the storage account. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string StorageAccountResourceId { get => this._storageAccountResourceId; set => this._storageAccountResourceId = value; } + + /// + /// Creates an new instance. + /// + public AzureStorageSmbFileShareEndpointProperties() + { + this.__endpointBaseProperties.EndpointType = "AzureStorageSmbFileShare"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__endpointBaseProperties), __endpointBaseProperties); + await eventListener.AssertObjectIsValid(nameof(__endpointBaseProperties), __endpointBaseProperties); + } + } + /// The properties of Azure Storage SMB file share endpoint. + public partial interface IAzureStorageSmbFileShareEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties + { + /// The name of the Azure Storage file share. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The name of the Azure Storage file share.", + SerializedName = @"fileShareName", + PossibleTypes = new [] { typeof(string) })] + string FileShareName { get; set; } + /// The Azure Resource ID of the storage account. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The Azure Resource ID of the storage account.", + SerializedName = @"storageAccountResourceId", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountResourceId { get; set; } + + } + /// The properties of Azure Storage SMB file share endpoint. + internal partial interface IAzureStorageSmbFileShareEndpointPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal + { + /// The name of the Azure Storage file share. + string FileShareName { get; set; } + /// The Azure Resource ID of the storage account. + string StorageAccountResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointProperties.json.cs similarity index 80% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointProperties.json.cs index 836252cd73fc..66b8446936f2 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -65,20 +65,20 @@ internal AzureStorageSmbFileShareEndpointProperties(Microsoft.Azure.PowerShell.C { return; } - __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseProperties(json); - {_storageAccountResourceId = If( json?.PropertyT("storageAccountResourceId"), out var __jsonStorageAccountResourceId) ? (string)__jsonStorageAccountResourceId : (string)StorageAccountResourceId;} - {_fileShareName = If( json?.PropertyT("fileShareName"), out var __jsonFileShareName) ? (string)__jsonFileShareName : (string)FileShareName;} + __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseProperties(json); + {_storageAccountResourceId = If( json?.PropertyT("storageAccountResourceId"), out var __jsonStorageAccountResourceId) ? (string)__jsonStorageAccountResourceId : (string)_storageAccountResourceId;} + {_fileShareName = If( json?.PropertyT("fileShareName"), out var __jsonFileShareName) ? (string)__jsonFileShareName : (string)_fileShareName;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new AzureStorageSmbFileShareEndpointProperties(json) : null; } @@ -105,8 +105,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ return container; } __endpointBaseProperties?.ToJson(container, serializationMode); - AddIf( null != (((object)this._storageAccountResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._storageAccountResourceId.ToString()) : null, "storageAccountResourceId" ,container.Add ); - AddIf( null != (((object)this._fileShareName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._fileShareName.ToString()) : null, "fileShareName" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._storageAccountResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._storageAccountResourceId.ToString()) : null, "storageAccountResourceId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._fileShareName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._fileShareName.ToString()) : null, "fileShareName" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointUpdateProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointUpdateProperties.PowerShell.cs similarity index 77% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointUpdateProperties.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointUpdateProperties.PowerShell.cs index af8da60f5efc..1188d4939fb7 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointUpdateProperties.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointUpdateProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class AzureStorageSmbFileShareEndpointUpdateProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,17 +78,17 @@ internal AzureStorageSmbFileShareEndpointUpdateProperties(global::System.Collect // actually deserialize if (content.Contains("EndpointType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description, 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. @@ -103,39 +103,39 @@ internal AzureStorageSmbFileShareEndpointUpdateProperties(global::System.Managem // actually deserialize if (content.Contains("EndpointType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AzureStorageSmbFileShareEndpointUpdateProperties(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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AzureStorageSmbFileShareEndpointUpdateProperties(content); } @@ -148,7 +148,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointUpdateProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointUpdateProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointUpdateProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointUpdateProperties.TypeConverter.cs index 36aa22074e30..5a130ec92e26 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointUpdateProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointUpdateProperties.cs new file mode 100644 index 000000000000..27e4f5ce1df3 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointUpdateProperties.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The properties of Azure Storage SMB file share endpoint to update. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class AzureStorageSmbFileShareEndpointUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointUpdatePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateProperties(); + + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description = value ?? null; } + + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string EndpointType { get => "AzureStorageSmbFileShare"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType = "AzureStorageSmbFileShare"; } + + /// + /// Creates an new instance. + /// + public AzureStorageSmbFileShareEndpointUpdateProperties() + { + this.__endpointBaseUpdateProperties.EndpointType = "AzureStorageSmbFileShare"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); + await eventListener.AssertObjectIsValid(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); + } + } + /// The properties of Azure Storage SMB file share endpoint to update. + public partial interface IAzureStorageSmbFileShareEndpointUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties + { + + } + /// The properties of Azure Storage SMB file share endpoint to update. + internal partial interface IAzureStorageSmbFileShareEndpointUpdatePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointUpdateProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointUpdateProperties.json.cs similarity index 93% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointUpdateProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointUpdateProperties.json.cs index 9cf82c0ec805..80068a0d77cd 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/AzureStorageSmbFileShareEndpointUpdateProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/AzureStorageSmbFileShareEndpointUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -66,18 +66,18 @@ internal AzureStorageSmbFileShareEndpointUpdateProperties(Microsoft.Azure.PowerS { return; } - __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateProperties(json); + __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateProperties(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAzureStorageSmbFileShareEndpointUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureStorageSmbFileShareEndpointUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new AzureStorageSmbFileShareEndpointUpdateProperties(json) : null; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Credentials.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Credentials.PowerShell.cs similarity index 85% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Credentials.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/Credentials.PowerShell.cs index 5e35053be6b8..52f3cf7d0217 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Credentials.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Credentials.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,7 +63,7 @@ public partial class Credentials partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -78,13 +78,13 @@ internal Credentials(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)this).Type, 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. @@ -99,33 +99,33 @@ internal Credentials(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentials DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentials DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Credentials(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentials DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentials DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Credentials(content); } @@ -135,7 +135,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentials FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentials FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Credentials.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Credentials.TypeConverter.cs similarity index 98% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Credentials.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/Credentials.TypeConverter.cs index aca751cc9e59..470ec1e5eaed 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Credentials.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Credentials.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentials ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentials ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentials).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentials).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Credentials.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Credentials.cs similarity index 85% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Credentials.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/Credentials.cs index a2ae0c64e199..3a35847da832 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Credentials.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Credentials.cs @@ -3,18 +3,18 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; /// The Credentials. public partial class Credentials : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentials, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentials, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal { /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentialsInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _type= @"AzureKeyVaultSmb"; @@ -37,6 +37,9 @@ public partial interface ICredentials : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = true, ReadOnly = true, + Read = true, + Create = true, + Update = true, Description = @"The Credentials type.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Credentials.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Credentials.json.cs similarity index 93% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Credentials.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/Credentials.json.cs index a5546950482e..190b17e88a15 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Credentials.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Credentials.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -65,20 +65,20 @@ internal Credentials(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Jso { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentials. - /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentials interface is polymorphic, and - /// the precise model class that will get deserialized is determined at runtime based on the payload. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentials. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentials interface is polymorphic, and the precise + /// model class that will get deserialized is determined at runtime based on the payload. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentials. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentials. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ICredentials FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentials FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json)) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Endpoint.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Endpoint.PowerShell.cs new file mode 100644 index 000000000000..f6b851f83c41 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Endpoint.PowerShell.cs @@ -0,0 +1,286 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// The Endpoint resource, which contains information about file sources and targets. + /// + [System.ComponentModel.TypeConverter(typeof(EndpointTypeConverter))] + public partial class Endpoint + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Endpoint(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Endpoint(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Endpoint(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBasePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Endpoint(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBasePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Endpoint resource, which contains information about file sources and targets. + [System.ComponentModel.TypeConverter(typeof(EndpointTypeConverter))] + public partial interface IEndpoint + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Endpoint.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Endpoint.TypeConverter.cs similarity index 98% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Endpoint.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/Endpoint.TypeConverter.cs index dc3ef9f6205a..eeb650279792 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Endpoint.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Endpoint.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Endpoint.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Endpoint.cs new file mode 100644 index 000000000000..1e9b9b31af98 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Endpoint.cs @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// The Endpoint resource, which contains information about file sources and targets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class Endpoint : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProxyResource(); + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Id; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity _identity; + + /// + /// The managed service identity of the resource. This property is only available on the latest version. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).PrincipalId; } + + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).TenantId; } + + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } + + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ManagedServiceIdentity()); set { {_identity = value;} } } + + /// Internal Acessors for IdentityPrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).PrincipalId = value ?? null; } + + /// Internal Acessors for IdentityTenantId + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).TenantId = value ?? null; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties _property; + + /// The resource specific properties for the Storage Mover resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseProperties()); set => this._property = value; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public Endpoint() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// The Endpoint resource, which contains information about file sources and targets. + public partial interface IEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource + { + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } + /// The resource specific properties for the Storage Mover resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The resource specific properties for the Storage Mover resource.", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties Property { get; set; } + + } + /// The Endpoint resource, which contains information about file sources and targets. + internal partial interface IEndpointInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResourceInternal + { + /// + /// The managed service identity of the resource. This property is only available on the latest version. + /// + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. + /// + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } + /// The resource specific properties for the Storage Mover resource. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Endpoint.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Endpoint.json.cs similarity index 92% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Endpoint.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/Endpoint.json.cs index 0717addcf68e..db788bdebcaa 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Endpoint.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Endpoint.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -67,20 +67,20 @@ internal Endpoint(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.J { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource(json); - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ManagedServiceIdentity.FromJson(__jsonIdentity) : Identity;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseProperties.FromJson(__jsonProperties) : Property;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProxyResource(json); + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ManagedServiceIdentity.FromJson(__jsonIdentity) : _identity;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new Endpoint(json) : null; } @@ -104,7 +104,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseProperties.PowerShell.cs new file mode 100644 index 000000000000..83ea5f74037e --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseProperties.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The resource specific properties for the Storage Mover resource. + [System.ComponentModel.TypeConverter(typeof(EndpointBasePropertiesTypeConverter))] + public partial class EndpointBaseProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EndpointBaseProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EndpointBaseProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EndpointBaseProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState, 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 EndpointBaseProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState, 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 resource specific properties for the Storage Mover resource. + [System.ComponentModel.TypeConverter(typeof(EndpointBasePropertiesTypeConverter))] + public partial interface IEndpointBaseProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseProperties.TypeConverter.cs index ed072999a236..d129fa6dc243 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseProperties.cs new file mode 100644 index 000000000000..675d46f037f8 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseProperties.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The resource specific properties for the Storage Mover resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class EndpointBaseProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal + { + + /// Backing field for property. + private string _description; + + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private string _endpointType; + + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string EndpointType { get => this._endpointType; set => this._endpointType = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Creates an new instance. + public EndpointBaseProperties() + { + + } + } + /// The resource specific properties for the Storage Mover resource. + public partial interface IEndpointBaseProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Endpoint.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The Endpoint resource type.", + SerializedName = @"endpointType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("AzureStorageBlobContainer", "NfsMount", "AzureStorageSmbFileShare", "SmbMount", "AzureMultiCloudConnector", "AzureStorageNfsFileShare")] + string EndpointType { get; set; } + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The provisioning state of this resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; } + + } + /// The resource specific properties for the Storage Mover resource. + internal partial interface IEndpointBasePropertiesInternal + + { + /// A description for the Endpoint. + string Description { get; set; } + /// The Endpoint resource type. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("AzureStorageBlobContainer", "NfsMount", "AzureStorageSmbFileShare", "SmbMount", "AzureMultiCloudConnector", "AzureStorageNfsFileShare")] + string EndpointType { get; set; } + /// The provisioning state of this resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseProperties.json.cs similarity index 88% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseProperties.json.cs index 60fec6a19325..9c98cacfb806 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -65,22 +65,22 @@ internal EndpointBaseProperties(Microsoft.Azure.PowerShell.Cmdlets.StorageMover. { return; } - {_endpointType = If( json?.PropertyT("endpointType"), out var __jsonEndpointType) ? (string)__jsonEndpointType : (string)EndpointType;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_endpointType = If( json?.PropertyT("endpointType"), out var __jsonEndpointType) ? (string)__jsonEndpointType : (string)_endpointType;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties. - /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties interface is polymorphic, - /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties interface is polymorphic, and + /// the precise model class that will get deserialized is determined at runtime based on the payload. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json)) { @@ -137,9 +137,12 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - AddIf( null != (((object)this._endpointType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._endpointType.ToString()) : null, "endpointType" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._endpointType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._endpointType.ToString()) : null, "endpointType" ,container.Add ); + } AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateParameters.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..411d78316ba1 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateParameters.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The Endpoint resource. + [System.ComponentModel.TypeConverter(typeof(EndpointBaseUpdateParametersTypeConverter))] + public partial class EndpointBaseUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EndpointBaseUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EndpointBaseUpdateParameters(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EndpointBaseUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EndpointBaseUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Endpoint resource. + [System.ComponentModel.TypeConverter(typeof(EndpointBaseUpdateParametersTypeConverter))] + public partial interface IEndpointBaseUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateParameters.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateParameters.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateParameters.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateParameters.TypeConverter.cs index b4f1b414893d..cd04cc207b44 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateParameters.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateParameters.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateParameters.cs new file mode 100644 index 000000000000..0e28b6bf3f64 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateParameters.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The Endpoint resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class EndpointBaseUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity _identity; + + /// The managed system identity assigned to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).PrincipalId; } + + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).TenantId; } + + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } + + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ManagedServiceIdentity()); set { {_identity = value;} } } + + /// Internal Acessors for IdentityPrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).PrincipalId = value ?? null; } + + /// Internal Acessors for IdentityTenantId + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParametersInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)Identity).TenantId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties _property; + + /// + /// The Endpoint resource, which contains information about file sources and targets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateProperties()); set => this._property = value; } + + /// Creates an new instance. + public EndpointBaseUpdateParameters() + { + + } + } + /// The Endpoint resource. + public partial interface IEndpointBaseUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } + /// + /// The Endpoint resource, which contains information about file sources and targets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Endpoint resource, which contains information about file sources and targets.", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties Property { get; set; } + + } + /// The Endpoint resource. + internal partial interface IEndpointBaseUpdateParametersInternal + + { + /// The managed system identity assigned to this resource. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. + /// + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } + /// + /// The Endpoint resource, which contains information about file sources and targets. + /// + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateParameters.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateParameters.json.cs similarity index 93% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateParameters.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateParameters.json.cs index 169f82c4c098..3d673eccbfca 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateParameters.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -65,19 +65,19 @@ internal EndpointBaseUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Storage { return; } - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ManagedServiceIdentity.FromJson(__jsonIdentity) : Identity;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateProperties.FromJson(__jsonProperties) : Property;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ManagedServiceIdentity.FromJson(__jsonIdentity) : _identity;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new EndpointBaseUpdateParameters(json) : null; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateProperties.PowerShell.cs similarity index 78% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateProperties.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateProperties.PowerShell.cs index 41152bbc5f15..7eb3b7ffd741 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateProperties.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -65,35 +65,33 @@ public partial class EndpointBaseUpdateProperties 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EndpointBaseUpdateProperties(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EndpointBaseUpdateProperties(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -108,17 +106,17 @@ internal EndpointBaseUpdateProperties(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("EndpointType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description, 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. @@ -133,11 +131,11 @@ internal EndpointBaseUpdateProperties(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("EndpointType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -147,7 +145,7 @@ internal EndpointBaseUpdateProperties(global::System.Management.Automation.PSObj /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateProperties.TypeConverter.cs index 90ae56d36fd2..a5188f0b9d9f 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateProperties.cs new file mode 100644 index 000000000000..24f8eab5b361 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateProperties.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// The Endpoint resource, which contains information about file sources and targets. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class EndpointBaseUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal + { + + /// Backing field for property. + private string _description; + + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private string _endpointType; + + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string EndpointType { get => this._endpointType; set => this._endpointType = value; } + + /// Creates an new instance. + public EndpointBaseUpdateProperties() + { + + } + } + /// The Endpoint resource, which contains information about file sources and targets. + public partial interface IEndpointBaseUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Endpoint.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Endpoint resource type.", + SerializedName = @"endpointType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("AzureStorageBlobContainer", "NfsMount", "AzureStorageSmbFileShare", "SmbMount", "AzureMultiCloudConnector", "AzureStorageNfsFileShare")] + string EndpointType { get; set; } + + } + /// The Endpoint resource, which contains information about file sources and targets. + internal partial interface IEndpointBaseUpdatePropertiesInternal + + { + /// A description for the Endpoint. + string Description { get; set; } + /// The Endpoint resource type. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("AzureStorageBlobContainer", "NfsMount", "AzureStorageSmbFileShare", "SmbMount", "AzureMultiCloudConnector", "AzureStorageNfsFileShare")] + string EndpointType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateProperties.json.cs similarity index 93% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateProperties.json.cs index c7d97a18fb3d..c24b6ebc7d03 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointBaseUpdateProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointBaseUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -67,21 +67,21 @@ internal EndpointBaseUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Storage { return; } - {_endpointType = If( json?.PropertyT("endpointType"), out var __jsonEndpointType) ? (string)__jsonEndpointType : (string)EndpointType;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_endpointType = If( json?.PropertyT("endpointType"), out var __jsonEndpointType) ? (string)__jsonEndpointType : (string)_endpointType;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties. - /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties interface is - /// polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json)) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointList.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointList.PowerShell.cs similarity index 77% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointList.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointList.PowerShell.cs index 2600b39304b3..b383981e797c 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointList.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class EndpointList 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new EndpointList(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new EndpointList(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,17 +104,17 @@ internal EndpointList(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointListInternal)this).NextLink, 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. @@ -129,11 +129,11 @@ internal EndpointList(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -143,7 +143,7 @@ internal EndpointList(global::System.Management.Automation.PSObject content) /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointList.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointList.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointList.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointList.TypeConverter.cs index 4271a4492e23..1b63783a1975 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointList.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointList.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointList.cs new file mode 100644 index 000000000000..7ccf68d82c96 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointList.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// List of Endpoints. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class EndpointList : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointList, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointListInternal + { + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointListInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The Endpoint items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public EndpointList() + { + + } + } + /// List of Endpoints. + public partial interface IEndpointList : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Endpoint items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Endpoint items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint) })] + System.Collections.Generic.List Value { get; } + + } + /// List of Endpoints. + internal partial interface IEndpointListInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The Endpoint items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointList.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointList.json.cs similarity index 90% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointList.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointList.json.cs index 95dd5a39ffbb..f20abe9b7024 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/EndpointList.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/EndpointList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -65,19 +65,19 @@ internal EndpointList(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Js { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Endpoint.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Endpoint.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointList FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointList FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new EndpointList(json) : null; } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs similarity index 80% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs index e64daf6aa509..374e2785bc99 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,33 +63,33 @@ public partial class ErrorAdditionalInfo 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ErrorAdditionalInfo(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ErrorAdditionalInfo(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -104,17 +104,17 @@ internal ErrorAdditionalInfo(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Info")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); } 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. @@ -129,11 +129,11 @@ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("Info")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } @@ -143,7 +143,7 @@ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject conte /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs similarity index 98% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs index daf78252f2eb..b2f8da8cfb9c 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfo).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorAdditionalInfo.cs similarity index 83% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorAdditionalInfo.cs index fbd35bd00e86..24e221d2bbb2 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorAdditionalInfo.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; /// The resource management error additional info. public partial class ErrorAdditionalInfo : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfoInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfoInternal { /// Backing field for property. @@ -21,10 +21,10 @@ public partial class ErrorAdditionalInfo : public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any()); } /// Internal Acessors for Info - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any()); set { {_info = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any()); set { {_info = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _type; @@ -47,6 +47,9 @@ public partial interface IErrorAdditionalInfo : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The additional info.", SerializedName = @"info", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) })] @@ -55,6 +58,9 @@ public partial interface IErrorAdditionalInfo : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The additional info type.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs similarity index 93% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs index 460f71cdc85e..e3b4819c0fa7 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ErrorAdditionalInfo.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Run { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any.FromJson(__jsonInfo) : Info;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any.FromJson(__jsonInfo) : _info;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfo. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfo. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null; } @@ -101,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add ); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs new file mode 100644 index 000000000000..d6e909f7693a --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial class ErrorDetail + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorDetail(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorDetail(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial interface IErrorDetail + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs new file mode 100644 index 000000000000..8d6529a097ea --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorDetailTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorDetail.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorDetail.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorDetail.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/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorDetail.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorDetail.cs new file mode 100644 index 000000000000..b0770df9c9d1 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorDetail.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _additionalInfo; + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public System.Collections.Generic.List AdditionalInfo { get => this._additionalInfo; } + + /// Backing field for property. + private string _code; + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Code { get => this._code; } + + /// Backing field for property. + private System.Collections.Generic.List _detail; + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public System.Collections.Generic.List Detail { get => this._detail; } + + /// Backing field for property. + private string _message; + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for AdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Detail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } + + /// Backing field for property. + private string _target; + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Target { get => this._target; } + + /// Creates an new instance. + public ErrorDetail() + { + + } + } + /// The error detail. + public partial interface IErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// The error detail. + internal partial interface IErrorDetailInternal + + { + /// The error additional info. + System.Collections.Generic.List AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + System.Collections.Generic.List Detail { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorDetail.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorDetail.json.cs new file mode 100644 index 000000000000..a560965c1b54 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorDetail.json.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)_target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorDetail.FromJson(__u) )) ))() : null : _detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : _additionalInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._additionalInfo) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.XNodeArray(); + foreach( var __s in this._additionalInfo ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("additionalInfo",__r); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs new file mode 100644 index 000000000000..845c29c2a654 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial class ErrorResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial interface IErrorResponse + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs new file mode 100644 index 000000000000..31b36d888edc --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorResponse.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/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorResponse.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorResponse.cs new file mode 100644 index 000000000000..821632dfc40c --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorResponse.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public System.Collections.Generic.List AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail _error; + + /// The error object. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorDetail()); set => this._error = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)Error).AdditionalInfo = value ?? null /* arrayOf */; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)Error).Code = value ?? null; } + + /// Internal Acessors for Detail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)Error).Detail = value ?? null /* arrayOf */; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorDetail()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)Error).Message = value ?? null; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)Error).Target = value ?? null; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetailInternal)Error).Target; } + + /// Creates an new instance. + public ErrorResponse() + { + + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + public partial interface IErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + internal partial interface IErrorResponseInternal + + { + /// The error additional info. + System.Collections.Generic.List AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + System.Collections.Generic.List Detail { get; set; } + /// The error object. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorDetail Error { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorResponse.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorResponse.json.cs new file mode 100644 index 000000000000..c9ebcd94a352 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ErrorResponse.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorDetail.FromJson(__jsonError) : _error;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinition.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinition.PowerShell.cs new file mode 100644 index 000000000000..5a5055f6266a --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinition.PowerShell.cs @@ -0,0 +1,380 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The Job Definition resource. + [System.ComponentModel.TypeConverter(typeof(JobDefinitionTypeConverter))] + public partial class JobDefinition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new JobDefinition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new JobDefinition(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal JobDefinition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("JobType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).JobType = (string) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).JobType, global::System.Convert.ToString); + } + if (content.Contains("CopyMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).CopyMode = (string) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).CopyMode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SourceTargetMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceTargetMap = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap) content.GetValueForProperty("SourceTargetMap",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceTargetMap, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionPropertiesSourceTargetMapTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("SourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceName, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceSubpath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceSubpath = (string) content.GetValueForProperty("SourceSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceSubpath, global::System.Convert.ToString); + } + if (content.Contains("TargetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).TargetName, global::System.Convert.ToString); + } + if (content.Contains("TargetResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).TargetResourceId, global::System.Convert.ToString); + } + if (content.Contains("TargetSubpath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).TargetSubpath = (string) content.GetValueForProperty("TargetSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).TargetSubpath, global::System.Convert.ToString); + } + if (content.Contains("LatestJobRunName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).LatestJobRunName = (string) content.GetValueForProperty("LatestJobRunName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).LatestJobRunName, global::System.Convert.ToString); + } + if (content.Contains("LatestJobRunResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).LatestJobRunResourceId = (string) content.GetValueForProperty("LatestJobRunResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).LatestJobRunResourceId, global::System.Convert.ToString); + } + if (content.Contains("LatestJobRunStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).LatestJobRunStatus = (string) content.GetValueForProperty("LatestJobRunStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).LatestJobRunStatus, global::System.Convert.ToString); + } + if (content.Contains("AgentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).AgentName, global::System.Convert.ToString); + } + if (content.Contains("AgentResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).AgentResourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceTargetMapValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceTargetMapValue = (System.Collections.Generic.List) content.GetValueForProperty("SourceTargetMapValue",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceTargetMapValue, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceTargetMapTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal JobDefinition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("JobType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).JobType = (string) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).JobType, global::System.Convert.ToString); + } + if (content.Contains("CopyMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).CopyMode = (string) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).CopyMode, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SourceTargetMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceTargetMap = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap) content.GetValueForProperty("SourceTargetMap",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceTargetMap, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionPropertiesSourceTargetMapTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("SourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceName, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceSubpath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceSubpath = (string) content.GetValueForProperty("SourceSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceSubpath, global::System.Convert.ToString); + } + if (content.Contains("TargetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).TargetName, global::System.Convert.ToString); + } + if (content.Contains("TargetResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).TargetResourceId, global::System.Convert.ToString); + } + if (content.Contains("TargetSubpath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).TargetSubpath = (string) content.GetValueForProperty("TargetSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).TargetSubpath, global::System.Convert.ToString); + } + if (content.Contains("LatestJobRunName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).LatestJobRunName = (string) content.GetValueForProperty("LatestJobRunName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).LatestJobRunName, global::System.Convert.ToString); + } + if (content.Contains("LatestJobRunResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).LatestJobRunResourceId = (string) content.GetValueForProperty("LatestJobRunResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).LatestJobRunResourceId, global::System.Convert.ToString); + } + if (content.Contains("LatestJobRunStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).LatestJobRunStatus = (string) content.GetValueForProperty("LatestJobRunStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).LatestJobRunStatus, global::System.Convert.ToString); + } + if (content.Contains("AgentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).AgentName, global::System.Convert.ToString); + } + if (content.Contains("AgentResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).AgentResourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceTargetMapValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceTargetMapValue = (System.Collections.Generic.List) content.GetValueForProperty("SourceTargetMapValue",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal)this).SourceTargetMapValue, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceTargetMapTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Job Definition resource. + [System.ComponentModel.TypeConverter(typeof(JobDefinitionTypeConverter))] + public partial interface IJobDefinition + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinition.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinition.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinition.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinition.TypeConverter.cs index b631de4d19b9..e243c8c26cd9 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinition.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinition.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinition.cs new file mode 100644 index 000000000000..d57c93f5160d --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinition.cs @@ -0,0 +1,474 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The Job Definition resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class JobDefinition : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProxyResource(); + + /// Name of the Agent to assign for new Job Runs of this Job Definition. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string AgentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).AgentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).AgentName = value ?? null; } + + /// + /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string AgentResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).AgentResourceId; } + + /// Strategy to use for copy. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string CopyMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).CopyMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).CopyMode = value ; } + + /// + /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for + /// migrating data between cloud to cloud. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).Description = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Id; } + + /// The type of the Job. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string JobType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).JobType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).JobType = value ?? null; } + + /// The name of the Job Run in a non-terminal state, if exists. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string LatestJobRunName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).LatestJobRunName; } + + /// + /// The fully qualified resource ID of the Job Run in a non-terminal state, if exists. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string LatestJobRunResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).LatestJobRunResourceId; } + + /// The current status of the Job Run in a non-terminal state, if exists. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string LatestJobRunStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).LatestJobRunStatus; } + + /// Internal Acessors for AgentResourceId + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal.AgentResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).AgentResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).AgentResourceId = value ?? null; } + + /// Internal Acessors for LatestJobRunName + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal.LatestJobRunName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).LatestJobRunName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).LatestJobRunName = value ?? null; } + + /// Internal Acessors for LatestJobRunResourceId + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal.LatestJobRunResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).LatestJobRunResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).LatestJobRunResourceId = value ?? null; } + + /// Internal Acessors for LatestJobRunStatus + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal.LatestJobRunStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).LatestJobRunStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).LatestJobRunStatus = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for SourceResourceId + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal.SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).SourceResourceId = value ?? null; } + + /// Internal Acessors for SourceTargetMap + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal.SourceTargetMap { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).SourceTargetMap; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).SourceTargetMap = value ?? null /* model class */; } + + /// Internal Acessors for SourceTargetMapValue + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal.SourceTargetMapValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).SourceTargetMapValue; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).SourceTargetMapValue = value ?? null /* arrayOf */; } + + /// Internal Acessors for TargetResourceId + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionInternal.TargetResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).TargetResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).TargetResourceId = value ?? null; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionProperties _property; + + /// Job definition properties. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionProperties()); set => this._property = value; } + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 name of the source Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string SourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).SourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).SourceName = value ?? null; } + + /// Fully qualified resource ID of the source Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).SourceResourceId; } + + /// The subpath to use when reading from the source Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string SourceSubpath { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).SourceSubpath; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).SourceSubpath = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public System.Collections.Generic.List SourceTargetMapValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).SourceTargetMapValue; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } + + /// The name of the target Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string TargetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).TargetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).TargetName = value ?? null; } + + /// Fully qualified resource ID of the target Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string TargetResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).TargetResourceId; } + + /// The subpath to use when writing to the target Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string TargetSubpath { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).TargetSubpath; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)Property).TargetSubpath = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public JobDefinition() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// The Job Definition resource. + public partial interface IJobDefinition : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource + { + /// Name of the Agent to assign for new Job Runs of this Job Definition. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the Agent to assign for new Job Runs of this Job Definition.", + SerializedName = @"agentName", + PossibleTypes = new [] { typeof(string) })] + string AgentName { get; set; } + /// + /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition.", + SerializedName = @"agentResourceId", + PossibleTypes = new [] { typeof(string) })] + string AgentResourceId { get; } + /// Strategy to use for copy. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Strategy to use for copy.", + SerializedName = @"copyMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] + string CopyMode { get; set; } + /// + /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for + /// migrating data between cloud to cloud. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The type of the Job. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The type of the Job.", + SerializedName = @"jobType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("OnPremToCloud", "CloudToCloud")] + string JobType { get; set; } + /// The name of the Job Run in a non-terminal state, if exists. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the Job Run in a non-terminal state, if exists.", + SerializedName = @"latestJobRunName", + PossibleTypes = new [] { typeof(string) })] + string LatestJobRunName { get; } + /// + /// The fully qualified resource ID of the Job Run in a non-terminal state, if exists. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The fully qualified resource ID of the Job Run in a non-terminal state, if exists.", + SerializedName = @"latestJobRunResourceId", + PossibleTypes = new [] { typeof(string) })] + string LatestJobRunResourceId { get; } + /// The current status of the Job Run in a non-terminal state, if exists. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current status of the Job Run in a non-terminal state, if exists.", + SerializedName = @"latestJobRunStatus", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Queued", "Started", "Running", "CancelRequested", "Canceling", "Canceled", "Failed", "Succeeded", "PausedByBandwidthManagement")] + string LatestJobRunStatus { get; } + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The provisioning state of this resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; } + /// The name of the source Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The name of the source Endpoint.", + SerializedName = @"sourceName", + PossibleTypes = new [] { typeof(string) })] + string SourceName { get; set; } + /// Fully qualified resource ID of the source Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Fully qualified resource ID of the source Endpoint.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; } + /// The subpath to use when reading from the source Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The subpath to use when reading from the source Endpoint.", + SerializedName = @"sourceSubpath", + PossibleTypes = new [] { typeof(string) })] + string SourceSubpath { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMap) })] + System.Collections.Generic.List SourceTargetMapValue { get; } + /// The name of the target Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The name of the target Endpoint.", + SerializedName = @"targetName", + PossibleTypes = new [] { typeof(string) })] + string TargetName { get; set; } + /// Fully qualified resource ID of the target Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Fully qualified resource ID of the target Endpoint.", + SerializedName = @"targetResourceId", + PossibleTypes = new [] { typeof(string) })] + string TargetResourceId { get; } + /// The subpath to use when writing to the target Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The subpath to use when writing to the target Endpoint.", + SerializedName = @"targetSubpath", + PossibleTypes = new [] { typeof(string) })] + string TargetSubpath { get; set; } + + } + /// The Job Definition resource. + internal partial interface IJobDefinitionInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResourceInternal + { + /// Name of the Agent to assign for new Job Runs of this Job Definition. + string AgentName { get; set; } + /// + /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. + /// + string AgentResourceId { get; set; } + /// Strategy to use for copy. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] + string CopyMode { get; set; } + /// + /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for + /// migrating data between cloud to cloud. + /// + string Description { get; set; } + /// The type of the Job. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("OnPremToCloud", "CloudToCloud")] + string JobType { get; set; } + /// The name of the Job Run in a non-terminal state, if exists. + string LatestJobRunName { get; set; } + /// + /// The fully qualified resource ID of the Job Run in a non-terminal state, if exists. + /// + string LatestJobRunResourceId { get; set; } + /// The current status of the Job Run in a non-terminal state, if exists. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Queued", "Started", "Running", "CancelRequested", "Canceling", "Canceled", "Failed", "Succeeded", "PausedByBandwidthManagement")] + string LatestJobRunStatus { get; set; } + /// Job definition properties. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionProperties Property { get; set; } + /// The provisioning state of this resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; set; } + /// The name of the source Endpoint. + string SourceName { get; set; } + /// Fully qualified resource ID of the source Endpoint. + string SourceResourceId { get; set; } + /// The subpath to use when reading from the source Endpoint. + string SourceSubpath { get; set; } + /// The list of cloud endpoints to migrate. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap SourceTargetMap { get; set; } + + System.Collections.Generic.List SourceTargetMapValue { get; set; } + /// The name of the target Endpoint. + string TargetName { get; set; } + /// Fully qualified resource ID of the target Endpoint. + string TargetResourceId { get; set; } + /// The subpath to use when writing to the target Endpoint. + string TargetSubpath { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinition.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinition.json.cs similarity index 92% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinition.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinition.json.cs index e1c3f2dcad8c..c4b2345229a3 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinition.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class JobDefinition partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new JobDefinition(json) : null; } @@ -77,8 +77,8 @@ internal JobDefinition(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.J { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionProperties.FromJson(__jsonProperties) : Property;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionList.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionList.PowerShell.cs similarity index 76% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionList.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionList.PowerShell.cs index e4b2f7101c92..6c80b75a7463 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionList.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class JobDefinitionList 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new JobDefinitionList(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new JobDefinitionList(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. @@ -111,17 +111,17 @@ internal JobDefinitionList(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionListInternal)this).NextLink, 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. @@ -136,11 +136,11 @@ internal JobDefinitionList(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionList.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionList.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionList.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionList.TypeConverter.cs index ca5e7d198659..80efb579d59d 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionList.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionList.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionList.cs new file mode 100644 index 000000000000..d60808df17f8 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionList.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// List of Job Definitions. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class JobDefinitionList : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionList, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionListInternal + { + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionListInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The JobDefinition items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public JobDefinitionList() + { + + } + } + /// List of Job Definitions. + public partial interface IJobDefinitionList : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinition items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The JobDefinition items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition) })] + System.Collections.Generic.List Value { get; } + + } + /// List of Job Definitions. + internal partial interface IJobDefinitionListInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The JobDefinition items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionList.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionList.json.cs similarity index 89% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionList.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionList.json.cs index 3336b83c0512..0db7f1b94bdf 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionList.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class JobDefinitionList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionList FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionList FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new JobDefinitionList(json) : null; } @@ -77,8 +77,8 @@ internal JobDefinitionList(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runti { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinition.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinition.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionProperties.PowerShell.cs new file mode 100644 index 000000000000..a7ff80ed641a --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionProperties.PowerShell.cs @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// Job definition properties. + [System.ComponentModel.TypeConverter(typeof(JobDefinitionPropertiesTypeConverter))] + public partial class JobDefinitionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new JobDefinitionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new JobDefinitionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal JobDefinitionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SourceTargetMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceTargetMap = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap) content.GetValueForProperty("SourceTargetMap",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceTargetMap, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionPropertiesSourceTargetMapTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("JobType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).JobType = (string) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).JobType, global::System.Convert.ToString); + } + if (content.Contains("CopyMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).CopyMode = (string) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).CopyMode, global::System.Convert.ToString); + } + if (content.Contains("SourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceName, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceSubpath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceSubpath = (string) content.GetValueForProperty("SourceSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceSubpath, global::System.Convert.ToString); + } + if (content.Contains("TargetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).TargetName, global::System.Convert.ToString); + } + if (content.Contains("TargetResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).TargetResourceId, global::System.Convert.ToString); + } + if (content.Contains("TargetSubpath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).TargetSubpath = (string) content.GetValueForProperty("TargetSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).TargetSubpath, global::System.Convert.ToString); + } + if (content.Contains("LatestJobRunName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).LatestJobRunName = (string) content.GetValueForProperty("LatestJobRunName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).LatestJobRunName, global::System.Convert.ToString); + } + if (content.Contains("LatestJobRunResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).LatestJobRunResourceId = (string) content.GetValueForProperty("LatestJobRunResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).LatestJobRunResourceId, global::System.Convert.ToString); + } + if (content.Contains("LatestJobRunStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).LatestJobRunStatus = (string) content.GetValueForProperty("LatestJobRunStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).LatestJobRunStatus, global::System.Convert.ToString); + } + if (content.Contains("AgentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).AgentName, global::System.Convert.ToString); + } + if (content.Contains("AgentResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).AgentResourceId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SourceTargetMapValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceTargetMapValue = (System.Collections.Generic.List) content.GetValueForProperty("SourceTargetMapValue",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceTargetMapValue, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceTargetMapTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal JobDefinitionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SourceTargetMap")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceTargetMap = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap) content.GetValueForProperty("SourceTargetMap",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceTargetMap, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionPropertiesSourceTargetMapTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("JobType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).JobType = (string) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).JobType, global::System.Convert.ToString); + } + if (content.Contains("CopyMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).CopyMode = (string) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).CopyMode, global::System.Convert.ToString); + } + if (content.Contains("SourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceName, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceSubpath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceSubpath = (string) content.GetValueForProperty("SourceSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceSubpath, global::System.Convert.ToString); + } + if (content.Contains("TargetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).TargetName, global::System.Convert.ToString); + } + if (content.Contains("TargetResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).TargetResourceId, global::System.Convert.ToString); + } + if (content.Contains("TargetSubpath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).TargetSubpath = (string) content.GetValueForProperty("TargetSubpath",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).TargetSubpath, global::System.Convert.ToString); + } + if (content.Contains("LatestJobRunName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).LatestJobRunName = (string) content.GetValueForProperty("LatestJobRunName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).LatestJobRunName, global::System.Convert.ToString); + } + if (content.Contains("LatestJobRunResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).LatestJobRunResourceId = (string) content.GetValueForProperty("LatestJobRunResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).LatestJobRunResourceId, global::System.Convert.ToString); + } + if (content.Contains("LatestJobRunStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).LatestJobRunStatus = (string) content.GetValueForProperty("LatestJobRunStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).LatestJobRunStatus, global::System.Convert.ToString); + } + if (content.Contains("AgentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).AgentName, global::System.Convert.ToString); + } + if (content.Contains("AgentResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).AgentResourceId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SourceTargetMapValue")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceTargetMapValue = (System.Collections.Generic.List) content.GetValueForProperty("SourceTargetMapValue",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal)this).SourceTargetMapValue, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceTargetMapTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); + } + } + /// Job definition properties. + [System.ComponentModel.TypeConverter(typeof(JobDefinitionPropertiesTypeConverter))] + public partial interface IJobDefinitionProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionProperties.TypeConverter.cs index 698eeebb9f28..e45473e2f818 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionProperties.cs new file mode 100644 index 000000000000..c364c8d3afce --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionProperties.cs @@ -0,0 +1,416 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// Job definition properties. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class JobDefinitionProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal + { + + /// Backing field for property. + private string _agentName; + + /// Name of the Agent to assign for new Job Runs of this Job Definition. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string AgentName { get => this._agentName; set => this._agentName = value; } + + /// Backing field for property. + private string _agentResourceId; + + /// + /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string AgentResourceId { get => this._agentResourceId; } + + /// Backing field for property. + private string _copyMode; + + /// Strategy to use for copy. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string CopyMode { get => this._copyMode; set => this._copyMode = value; } + + /// Backing field for property. + private string _description; + + /// + /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for + /// migrating data between cloud to cloud. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private string _jobType; + + /// The type of the Job. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string JobType { get => this._jobType; set => this._jobType = value; } + + /// Backing field for property. + private string _latestJobRunName; + + /// The name of the Job Run in a non-terminal state, if exists. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string LatestJobRunName { get => this._latestJobRunName; } + + /// Backing field for property. + private string _latestJobRunResourceId; + + /// + /// The fully qualified resource ID of the Job Run in a non-terminal state, if exists. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string LatestJobRunResourceId { get => this._latestJobRunResourceId; } + + /// Backing field for property. + private string _latestJobRunStatus; + + /// The current status of the Job Run in a non-terminal state, if exists. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string LatestJobRunStatus { get => this._latestJobRunStatus; } + + /// Internal Acessors for AgentResourceId + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal.AgentResourceId { get => this._agentResourceId; set { {_agentResourceId = value;} } } + + /// Internal Acessors for LatestJobRunName + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal.LatestJobRunName { get => this._latestJobRunName; set { {_latestJobRunName = value;} } } + + /// Internal Acessors for LatestJobRunResourceId + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal.LatestJobRunResourceId { get => this._latestJobRunResourceId; set { {_latestJobRunResourceId = value;} } } + + /// Internal Acessors for LatestJobRunStatus + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal.LatestJobRunStatus { get => this._latestJobRunStatus; set { {_latestJobRunStatus = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for SourceResourceId + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal.SourceResourceId { get => this._sourceResourceId; set { {_sourceResourceId = value;} } } + + /// Internal Acessors for SourceTargetMap + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal.SourceTargetMap { get => (this._sourceTargetMap = this._sourceTargetMap ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionPropertiesSourceTargetMap()); set { {_sourceTargetMap = value;} } } + + /// Internal Acessors for SourceTargetMapValue + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal.SourceTargetMapValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMapInternal)SourceTargetMap).Value; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMapInternal)SourceTargetMap).Value = value ?? null /* arrayOf */; } + + /// Internal Acessors for TargetResourceId + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesInternal.TargetResourceId { get => this._targetResourceId; set { {_targetResourceId = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _sourceName; + + /// The name of the source Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string SourceName { get => this._sourceName; set => this._sourceName = value; } + + /// Backing field for property. + private string _sourceResourceId; + + /// Fully qualified resource ID of the source Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string SourceResourceId { get => this._sourceResourceId; } + + /// Backing field for property. + private string _sourceSubpath; + + /// The subpath to use when reading from the source Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string SourceSubpath { get => this._sourceSubpath; set => this._sourceSubpath = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap _sourceTargetMap; + + /// The list of cloud endpoints to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap SourceTargetMap { get => (this._sourceTargetMap = this._sourceTargetMap ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionPropertiesSourceTargetMap()); set => this._sourceTargetMap = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public System.Collections.Generic.List SourceTargetMapValue { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMapInternal)SourceTargetMap).Value; } + + /// Backing field for property. + private string _targetName; + + /// The name of the target Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string TargetName { get => this._targetName; set => this._targetName = value; } + + /// Backing field for property. + private string _targetResourceId; + + /// Fully qualified resource ID of the target Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string TargetResourceId { get => this._targetResourceId; } + + /// Backing field for property. + private string _targetSubpath; + + /// The subpath to use when writing to the target Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string TargetSubpath { get => this._targetSubpath; set => this._targetSubpath = value; } + + /// Creates an new instance. + public JobDefinitionProperties() + { + + } + } + /// Job definition properties. + public partial interface IJobDefinitionProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// Name of the Agent to assign for new Job Runs of this Job Definition. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the Agent to assign for new Job Runs of this Job Definition.", + SerializedName = @"agentName", + PossibleTypes = new [] { typeof(string) })] + string AgentName { get; set; } + /// + /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition.", + SerializedName = @"agentResourceId", + PossibleTypes = new [] { typeof(string) })] + string AgentResourceId { get; } + /// Strategy to use for copy. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Strategy to use for copy.", + SerializedName = @"copyMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] + string CopyMode { get; set; } + /// + /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for + /// migrating data between cloud to cloud. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The type of the Job. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The type of the Job.", + SerializedName = @"jobType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("OnPremToCloud", "CloudToCloud")] + string JobType { get; set; } + /// The name of the Job Run in a non-terminal state, if exists. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the Job Run in a non-terminal state, if exists.", + SerializedName = @"latestJobRunName", + PossibleTypes = new [] { typeof(string) })] + string LatestJobRunName { get; } + /// + /// The fully qualified resource ID of the Job Run in a non-terminal state, if exists. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The fully qualified resource ID of the Job Run in a non-terminal state, if exists.", + SerializedName = @"latestJobRunResourceId", + PossibleTypes = new [] { typeof(string) })] + string LatestJobRunResourceId { get; } + /// The current status of the Job Run in a non-terminal state, if exists. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current status of the Job Run in a non-terminal state, if exists.", + SerializedName = @"latestJobRunStatus", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Queued", "Started", "Running", "CancelRequested", "Canceling", "Canceled", "Failed", "Succeeded", "PausedByBandwidthManagement")] + string LatestJobRunStatus { get; } + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The provisioning state of this resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; } + /// The name of the source Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The name of the source Endpoint.", + SerializedName = @"sourceName", + PossibleTypes = new [] { typeof(string) })] + string SourceName { get; set; } + /// Fully qualified resource ID of the source Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Fully qualified resource ID of the source Endpoint.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; } + /// The subpath to use when reading from the source Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The subpath to use when reading from the source Endpoint.", + SerializedName = @"sourceSubpath", + PossibleTypes = new [] { typeof(string) })] + string SourceSubpath { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMap) })] + System.Collections.Generic.List SourceTargetMapValue { get; } + /// The name of the target Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The name of the target Endpoint.", + SerializedName = @"targetName", + PossibleTypes = new [] { typeof(string) })] + string TargetName { get; set; } + /// Fully qualified resource ID of the target Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Fully qualified resource ID of the target Endpoint.", + SerializedName = @"targetResourceId", + PossibleTypes = new [] { typeof(string) })] + string TargetResourceId { get; } + /// The subpath to use when writing to the target Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The subpath to use when writing to the target Endpoint.", + SerializedName = @"targetSubpath", + PossibleTypes = new [] { typeof(string) })] + string TargetSubpath { get; set; } + + } + /// Job definition properties. + internal partial interface IJobDefinitionPropertiesInternal + + { + /// Name of the Agent to assign for new Job Runs of this Job Definition. + string AgentName { get; set; } + /// + /// Fully qualified resource id of the Agent to assign for new Job Runs of this Job Definition. + /// + string AgentResourceId { get; set; } + /// Strategy to use for copy. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] + string CopyMode { get; set; } + /// + /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for + /// migrating data between cloud to cloud. + /// + string Description { get; set; } + /// The type of the Job. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("OnPremToCloud", "CloudToCloud")] + string JobType { get; set; } + /// The name of the Job Run in a non-terminal state, if exists. + string LatestJobRunName { get; set; } + /// + /// The fully qualified resource ID of the Job Run in a non-terminal state, if exists. + /// + string LatestJobRunResourceId { get; set; } + /// The current status of the Job Run in a non-terminal state, if exists. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Queued", "Started", "Running", "CancelRequested", "Canceling", "Canceled", "Failed", "Succeeded", "PausedByBandwidthManagement")] + string LatestJobRunStatus { get; set; } + /// The provisioning state of this resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; set; } + /// The name of the source Endpoint. + string SourceName { get; set; } + /// Fully qualified resource ID of the source Endpoint. + string SourceResourceId { get; set; } + /// The subpath to use when reading from the source Endpoint. + string SourceSubpath { get; set; } + /// The list of cloud endpoints to migrate. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap SourceTargetMap { get; set; } + + System.Collections.Generic.List SourceTargetMapValue { get; set; } + /// The name of the target Endpoint. + string TargetName { get; set; } + /// Fully qualified resource ID of the target Endpoint. + string TargetResourceId { get; set; } + /// The subpath to use when writing to the target Endpoint. + string TargetSubpath { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionProperties.json.cs similarity index 77% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionProperties.json.cs index ffc2a90a97ba..8a8b83035da3 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class JobDefinitionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new JobDefinitionProperties(json) : null; } @@ -77,22 +77,22 @@ internal JobDefinitionProperties(Microsoft.Azure.PowerShell.Cmdlets.StorageMover { return; } - {_sourceTargetMap = If( json?.PropertyT("sourceTargetMap"), out var __jsonSourceTargetMap) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionPropertiesSourceTargetMap.FromJson(__jsonSourceTargetMap) : SourceTargetMap;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_jobType = If( json?.PropertyT("jobType"), out var __jsonJobType) ? (string)__jsonJobType : (string)JobType;} - {_copyMode = If( json?.PropertyT("copyMode"), out var __jsonCopyMode) ? (string)__jsonCopyMode : (string)CopyMode;} - {_sourceName = If( json?.PropertyT("sourceName"), out var __jsonSourceName) ? (string)__jsonSourceName : (string)SourceName;} - {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)SourceResourceId;} - {_sourceSubpath = If( json?.PropertyT("sourceSubpath"), out var __jsonSourceSubpath) ? (string)__jsonSourceSubpath : (string)SourceSubpath;} - {_targetName = If( json?.PropertyT("targetName"), out var __jsonTargetName) ? (string)__jsonTargetName : (string)TargetName;} - {_targetResourceId = If( json?.PropertyT("targetResourceId"), out var __jsonTargetResourceId) ? (string)__jsonTargetResourceId : (string)TargetResourceId;} - {_targetSubpath = If( json?.PropertyT("targetSubpath"), out var __jsonTargetSubpath) ? (string)__jsonTargetSubpath : (string)TargetSubpath;} - {_latestJobRunName = If( json?.PropertyT("latestJobRunName"), out var __jsonLatestJobRunName) ? (string)__jsonLatestJobRunName : (string)LatestJobRunName;} - {_latestJobRunResourceId = If( json?.PropertyT("latestJobRunResourceId"), out var __jsonLatestJobRunResourceId) ? (string)__jsonLatestJobRunResourceId : (string)LatestJobRunResourceId;} - {_latestJobRunStatus = If( json?.PropertyT("latestJobRunStatus"), out var __jsonLatestJobRunStatus) ? (string)__jsonLatestJobRunStatus : (string)LatestJobRunStatus;} - {_agentName = If( json?.PropertyT("agentName"), out var __jsonAgentName) ? (string)__jsonAgentName : (string)AgentName;} - {_agentResourceId = If( json?.PropertyT("agentResourceId"), out var __jsonAgentResourceId) ? (string)__jsonAgentResourceId : (string)AgentResourceId;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_sourceTargetMap = If( json?.PropertyT("sourceTargetMap"), out var __jsonSourceTargetMap) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionPropertiesSourceTargetMap.FromJson(__jsonSourceTargetMap) : _sourceTargetMap;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_jobType = If( json?.PropertyT("jobType"), out var __jsonJobType) ? (string)__jsonJobType : (string)_jobType;} + {_copyMode = If( json?.PropertyT("copyMode"), out var __jsonCopyMode) ? (string)__jsonCopyMode : (string)_copyMode;} + {_sourceName = If( json?.PropertyT("sourceName"), out var __jsonSourceName) ? (string)__jsonSourceName : (string)_sourceName;} + {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)_sourceResourceId;} + {_sourceSubpath = If( json?.PropertyT("sourceSubpath"), out var __jsonSourceSubpath) ? (string)__jsonSourceSubpath : (string)_sourceSubpath;} + {_targetName = If( json?.PropertyT("targetName"), out var __jsonTargetName) ? (string)__jsonTargetName : (string)_targetName;} + {_targetResourceId = If( json?.PropertyT("targetResourceId"), out var __jsonTargetResourceId) ? (string)__jsonTargetResourceId : (string)_targetResourceId;} + {_targetSubpath = If( json?.PropertyT("targetSubpath"), out var __jsonTargetSubpath) ? (string)__jsonTargetSubpath : (string)_targetSubpath;} + {_latestJobRunName = If( json?.PropertyT("latestJobRunName"), out var __jsonLatestJobRunName) ? (string)__jsonLatestJobRunName : (string)_latestJobRunName;} + {_latestJobRunResourceId = If( json?.PropertyT("latestJobRunResourceId"), out var __jsonLatestJobRunResourceId) ? (string)__jsonLatestJobRunResourceId : (string)_latestJobRunResourceId;} + {_latestJobRunStatus = If( json?.PropertyT("latestJobRunStatus"), out var __jsonLatestJobRunStatus) ? (string)__jsonLatestJobRunStatus : (string)_latestJobRunStatus;} + {_agentName = If( json?.PropertyT("agentName"), out var __jsonAgentName) ? (string)__jsonAgentName : (string)_agentName;} + {_agentResourceId = If( json?.PropertyT("agentResourceId"), out var __jsonAgentResourceId) ? (string)__jsonAgentResourceId : (string)_agentResourceId;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } @@ -119,36 +119,48 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); AddIf( null != (((object)this._jobType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._jobType.ToString()) : null, "jobType" ,container.Add ); AddIf( null != (((object)this._copyMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._copyMode.ToString()) : null, "copyMode" ,container.Add ); - AddIf( null != (((object)this._sourceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._sourceName.ToString()) : null, "sourceName" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._sourceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._sourceName.ToString()) : null, "sourceName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._sourceResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._sourceResourceId.ToString()) : null, "sourceResourceId" ,container.Add ); } - AddIf( null != (((object)this._sourceSubpath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._sourceSubpath.ToString()) : null, "sourceSubpath" ,container.Add ); - AddIf( null != (((object)this._targetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._targetName.ToString()) : null, "targetName" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._sourceSubpath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._sourceSubpath.ToString()) : null, "sourceSubpath" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._targetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._targetName.ToString()) : null, "targetName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._targetResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._targetResourceId.ToString()) : null, "targetResourceId" ,container.Add ); } - AddIf( null != (((object)this._targetSubpath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._targetSubpath.ToString()) : null, "targetSubpath" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._targetSubpath)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._targetSubpath.ToString()) : null, "targetSubpath" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._latestJobRunName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._latestJobRunName.ToString()) : null, "latestJobRunName" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._latestJobRunResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._latestJobRunResourceId.ToString()) : null, "latestJobRunResourceId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._latestJobRunStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._latestJobRunStatus.ToString()) : null, "latestJobRunStatus" ,container.Add ); } AddIf( null != (((object)this._agentName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._agentName.ToString()) : null, "agentName" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._agentResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._agentResourceId.ToString()) : null, "agentResourceId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionPropertiesSourceTargetMap.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionPropertiesSourceTargetMap.PowerShell.cs similarity index 78% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionPropertiesSourceTargetMap.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionPropertiesSourceTargetMap.PowerShell.cs index fa375113c124..da167891b599 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionPropertiesSourceTargetMap.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionPropertiesSourceTargetMap.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,29 +63,29 @@ public partial class JobDefinitionPropertiesSourceTargetMap 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new JobDefinitionPropertiesSourceTargetMap(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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new JobDefinitionPropertiesSourceTargetMap(content); } @@ -98,10 +98,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. @@ -116,13 +116,13 @@ internal JobDefinitionPropertiesSourceTargetMap(global::System.Collections.IDict // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMapInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMapInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceTargetMapTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMapInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMapInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceTargetMapTypeConverter.ConvertFrom)); } 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. @@ -137,7 +137,7 @@ internal JobDefinitionPropertiesSourceTargetMap(global::System.Management.Automa // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMapInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMapInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceTargetMapTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMapInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMapInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceTargetMapTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionPropertiesSourceTargetMap.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionPropertiesSourceTargetMap.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionPropertiesSourceTargetMap.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionPropertiesSourceTargetMap.TypeConverter.cs index 8d8546de05f1..a96a572366ca 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionPropertiesSourceTargetMap.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionPropertiesSourceTargetMap.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionPropertiesSourceTargetMap.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionPropertiesSourceTargetMap.cs new file mode 100644 index 000000000000..b9770b08c98a --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionPropertiesSourceTargetMap.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The list of cloud endpoints to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class JobDefinitionPropertiesSourceTargetMap : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMapInternal + { + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMapInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public JobDefinitionPropertiesSourceTargetMap() + { + + } + } + /// The list of cloud endpoints to migrate. + public partial interface IJobDefinitionPropertiesSourceTargetMap : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMap) })] + System.Collections.Generic.List Value { get; } + + } + /// The list of cloud endpoints to migrate. + internal partial interface IJobDefinitionPropertiesSourceTargetMapInternal + + { + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionPropertiesSourceTargetMap.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionPropertiesSourceTargetMap.json.cs similarity index 89% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionPropertiesSourceTargetMap.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionPropertiesSourceTargetMap.json.cs index 6dc71fd1820e..d123cda4ac60 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionPropertiesSourceTargetMap.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionPropertiesSourceTargetMap.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class JobDefinitionPropertiesSourceTargetMap partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionPropertiesSourceTargetMap FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionPropertiesSourceTargetMap FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new JobDefinitionPropertiesSourceTargetMap(json) : null; } @@ -77,7 +77,7 @@ internal JobDefinitionPropertiesSourceTargetMap(Microsoft.Azure.PowerShell.Cmdle { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceTargetMap.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMap) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceTargetMap.FromJson(__u) )) ))() : null : _value;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateParameters.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..98847811c769 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateParameters.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The Job Definition resource. + [System.ComponentModel.TypeConverter(typeof(JobDefinitionUpdateParametersTypeConverter))] + public partial class JobDefinitionUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new JobDefinitionUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new JobDefinitionUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal JobDefinitionUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("CopyMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).CopyMode = (string) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).CopyMode, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("AgentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).AgentName, 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 JobDefinitionUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("CopyMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).CopyMode = (string) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).CopyMode, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("AgentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal)this).AgentName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Job Definition resource. + [System.ComponentModel.TypeConverter(typeof(JobDefinitionUpdateParametersTypeConverter))] + public partial interface IJobDefinitionUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateParameters.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateParameters.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateParameters.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateParameters.TypeConverter.cs index 5e53d6cecc19..000c14643b38 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateParameters.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateParameters.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateParameters.cs new file mode 100644 index 000000000000..53255d2777dd --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateParameters.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The Job Definition resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class JobDefinitionUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal + { + + /// Name of the Agent to assign for new Job Runs of this Job Definition. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string AgentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)Property).AgentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)Property).AgentName = value ?? null; } + + /// Strategy to use for copy. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string CopyMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)Property).CopyMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)Property).CopyMode = value ?? null; } + + /// A description for the Job Definition. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)Property).Description = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionUpdateProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateProperties _property; + + /// Job definition properties. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionUpdateProperties()); set => this._property = value; } + + /// Creates an new instance. + public JobDefinitionUpdateParameters() + { + + } + } + /// The Job Definition resource. + public partial interface IJobDefinitionUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// Name of the Agent to assign for new Job Runs of this Job Definition. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the Agent to assign for new Job Runs of this Job Definition.", + SerializedName = @"agentName", + PossibleTypes = new [] { typeof(string) })] + string AgentName { get; set; } + /// Strategy to use for copy. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Strategy to use for copy.", + SerializedName = @"copyMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] + string CopyMode { get; set; } + /// A description for the Job Definition. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Job Definition.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + + } + /// The Job Definition resource. + internal partial interface IJobDefinitionUpdateParametersInternal + + { + /// Name of the Agent to assign for new Job Runs of this Job Definition. + string AgentName { get; set; } + /// Strategy to use for copy. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] + string CopyMode { get; set; } + /// A description for the Job Definition. + string Description { get; set; } + /// Job definition properties. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateParameters.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateParameters.json.cs similarity index 94% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateParameters.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateParameters.json.cs index 93d3f9557424..c240668c601f 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateParameters.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class JobDefinitionUpdateParameters partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new JobDefinitionUpdateParameters(json) : null; } @@ -77,7 +77,7 @@ internal JobDefinitionUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Storag { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionUpdateProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionUpdateProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..e1e0eafa92ca --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateProperties.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// Job definition properties. + [System.ComponentModel.TypeConverter(typeof(JobDefinitionUpdatePropertiesTypeConverter))] + public partial class JobDefinitionUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new JobDefinitionUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new JobDefinitionUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal JobDefinitionUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("CopyMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)this).CopyMode = (string) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)this).CopyMode, global::System.Convert.ToString); + } + if (content.Contains("AgentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)this).AgentName, 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 JobDefinitionUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("CopyMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)this).CopyMode = (string) content.GetValueForProperty("CopyMode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)this).CopyMode, global::System.Convert.ToString); + } + if (content.Contains("AgentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal)this).AgentName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); + } + } + /// Job definition properties. + [System.ComponentModel.TypeConverter(typeof(JobDefinitionUpdatePropertiesTypeConverter))] + public partial interface IJobDefinitionUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateProperties.TypeConverter.cs index 79649008c64c..b2804a39d373 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateProperties.cs similarity index 80% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateProperties.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateProperties.cs index d0ee0ef6e102..f189527f1702 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateProperties.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; /// Job definition properties. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] public partial class JobDefinitionUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdatePropertiesInternal { /// Backing field for property. @@ -22,11 +22,11 @@ public partial class JobDefinitionUpdateProperties : public string AgentName { get => this._agentName; set => this._agentName = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode? _copyMode; + private string _copyMode; /// Strategy to use for copy. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode? CopyMode { get => this._copyMode; set => this._copyMode = value; } + public string CopyMode { get => this._copyMode; set => this._copyMode = value; } /// Backing field for property. private string _description; @@ -49,6 +49,9 @@ public partial interface IJobDefinitionUpdateProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Name of the Agent to assign for new Job Runs of this Job Definition.", SerializedName = @"agentName", PossibleTypes = new [] { typeof(string) })] @@ -57,14 +60,21 @@ public partial interface IJobDefinitionUpdateProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Strategy to use for copy.", SerializedName = @"copyMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode? CopyMode { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] + string CopyMode { get; set; } /// A description for the Job Definition. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A description for the Job Definition.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] @@ -78,7 +88,8 @@ internal partial interface IJobDefinitionUpdatePropertiesInternal /// Name of the Agent to assign for new Job Runs of this Job Definition. string AgentName { get; set; } /// Strategy to use for copy. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode? CopyMode { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] + string CopyMode { get; set; } /// A description for the Job Definition. string Description { get; set; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateProperties.json.cs similarity index 94% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateProperties.json.cs index a39766fe7e68..7e98d0b4ade0 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobDefinitionUpdateProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobDefinitionUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class JobDefinitionUpdateProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new JobDefinitionUpdateProperties(json) : null; } @@ -77,9 +77,9 @@ internal JobDefinitionUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Storag { return; } - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_copyMode = If( json?.PropertyT("copyMode"), out var __jsonCopyMode) ? (string)__jsonCopyMode : (string)CopyMode;} - {_agentName = If( json?.PropertyT("agentName"), out var __jsonAgentName) ? (string)__jsonAgentName : (string)AgentName;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_copyMode = If( json?.PropertyT("copyMode"), out var __jsonCopyMode) ? (string)__jsonCopyMode : (string)_copyMode;} + {_agentName = If( json?.PropertyT("agentName"), out var __jsonAgentName) ? (string)__jsonAgentName : (string)_agentName;} AfterFromJson(json); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRun.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRun.PowerShell.cs new file mode 100644 index 000000000000..6947502a3f33 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRun.PowerShell.cs @@ -0,0 +1,492 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The Job Run resource. + [System.ComponentModel.TypeConverter(typeof(JobRunTypeConverter))] + public partial class JobRun + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new JobRun(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new JobRun(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal JobRun(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("ScanStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ScanStatus = (string) content.GetValueForProperty("ScanStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ScanStatus, global::System.Convert.ToString); + } + if (content.Contains("AgentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).AgentName, global::System.Convert.ToString); + } + if (content.Contains("AgentResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).AgentResourceId, global::System.Convert.ToString); + } + if (content.Contains("ExecutionStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ExecutionStartTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ExecutionStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ExecutionEndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ExecutionEndTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionEndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ExecutionEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastStatusUpdate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ItemsScanned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsScanned = (long?) content.GetValueForProperty("ItemsScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsExcluded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsExcluded = (long?) content.GetValueForProperty("ItemsExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsUnsupported")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsUnsupported = (long?) content.GetValueForProperty("ItemsUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsNoTransferNeeded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsNoTransferNeeded = (long?) content.GetValueForProperty("ItemsNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsFailed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsFailed = (long?) content.GetValueForProperty("ItemsFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsTransferred")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsTransferred = (long?) content.GetValueForProperty("ItemsTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesScanned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesScanned = (long?) content.GetValueForProperty("BytesScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesExcluded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesExcluded = (long?) content.GetValueForProperty("BytesExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesUnsupported")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesUnsupported = (long?) content.GetValueForProperty("BytesUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesNoTransferNeeded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesNoTransferNeeded = (long?) content.GetValueForProperty("BytesNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesFailed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesFailed = (long?) content.GetValueForProperty("BytesFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesTransferred")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesTransferred = (long?) content.GetValueForProperty("BytesTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).SourceName, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).SourceProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("SourceProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).SourceProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("TargetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).TargetName, global::System.Convert.ToString); + } + if (content.Contains("TargetResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).TargetResourceId, global::System.Convert.ToString); + } + if (content.Contains("TargetProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).TargetProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("TargetProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).TargetProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("JobDefinitionProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).JobDefinitionProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("JobDefinitionProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).JobDefinitionProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ErrorCode = (string) content.GetValueForProperty("ErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Target, 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 JobRun(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("ScanStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ScanStatus = (string) content.GetValueForProperty("ScanStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ScanStatus, global::System.Convert.ToString); + } + if (content.Contains("AgentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).AgentName, global::System.Convert.ToString); + } + if (content.Contains("AgentResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).AgentResourceId, global::System.Convert.ToString); + } + if (content.Contains("ExecutionStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ExecutionStartTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ExecutionStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ExecutionEndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ExecutionEndTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionEndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ExecutionEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastStatusUpdate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ItemsScanned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsScanned = (long?) content.GetValueForProperty("ItemsScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsExcluded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsExcluded = (long?) content.GetValueForProperty("ItemsExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsUnsupported")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsUnsupported = (long?) content.GetValueForProperty("ItemsUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsNoTransferNeeded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsNoTransferNeeded = (long?) content.GetValueForProperty("ItemsNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsFailed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsFailed = (long?) content.GetValueForProperty("ItemsFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsTransferred")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsTransferred = (long?) content.GetValueForProperty("ItemsTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ItemsTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesScanned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesScanned = (long?) content.GetValueForProperty("BytesScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesExcluded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesExcluded = (long?) content.GetValueForProperty("BytesExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesUnsupported")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesUnsupported = (long?) content.GetValueForProperty("BytesUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesNoTransferNeeded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesNoTransferNeeded = (long?) content.GetValueForProperty("BytesNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesFailed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesFailed = (long?) content.GetValueForProperty("BytesFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesTransferred")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesTransferred = (long?) content.GetValueForProperty("BytesTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).BytesTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).SourceName, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).SourceProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("SourceProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).SourceProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("TargetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).TargetName, global::System.Convert.ToString); + } + if (content.Contains("TargetResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).TargetResourceId, global::System.Convert.ToString); + } + if (content.Contains("TargetProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).TargetProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("TargetProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).TargetProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("JobDefinitionProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).JobDefinitionProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("JobDefinitionProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).JobDefinitionProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("ErrorCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ErrorCode = (string) content.GetValueForProperty("ErrorCode",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ErrorCode, global::System.Convert.ToString); + } + if (content.Contains("ErrorMessage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ErrorMessage = (string) content.GetValueForProperty("ErrorMessage",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).ErrorMessage, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal)this).Target, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Job Run resource. + [System.ComponentModel.TypeConverter(typeof(JobRunTypeConverter))] + public partial interface IJobRun + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRun.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRun.TypeConverter.cs similarity index 98% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRun.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRun.TypeConverter.cs index 4ef0509fb79e..63003a18a616 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRun.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRun.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRun.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRun.cs new file mode 100644 index 000000000000..0400d7231934 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRun.cs @@ -0,0 +1,786 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The Job Run resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class JobRun : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProxyResource(); + + /// Name of the Agent assigned to this run. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string AgentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).AgentName; } + + /// Fully qualified resource id of the Agent assigned to this run. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string AgentResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).AgentResourceId; } + + /// + /// Bytes of data that will not be transferred, as they are excluded by user configuration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public long? BytesExcluded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesExcluded; } + + /// Bytes of data that were attempted to transfer and failed. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public long? BytesFailed { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesFailed; } + + /// + /// Bytes of data that will not be transferred, as they are already found on target (e.g. mirror mode). + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public long? BytesNoTransferNeeded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesNoTransferNeeded; } + + /// Bytes of data scanned so far in source. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public long? BytesScanned { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesScanned; } + + /// Bytes of data successfully transferred to target. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public long? BytesTransferred { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesTransferred; } + + /// Bytes of data that will not be transferred, as they are unsupported on target. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public long? BytesUnsupported { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesUnsupported; } + + /// Error code of the given entry. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).Code; } + + /// Error message of the given entry. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).Message; } + + /// End time of the run. Null if Agent has not reported that the job has ended. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public global::System.DateTime? ExecutionEndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ExecutionEndTime; } + + /// Start time of the run. Null if no Agent reported that the job has started. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public global::System.DateTime? ExecutionStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ExecutionStartTime; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Id; } + + /// + /// Number of items that will not be transferred, as they are excluded by user configuration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public long? ItemsExcluded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsExcluded; } + + /// Number of items that were attempted to transfer and failed. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public long? ItemsFailed { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsFailed; } + + /// + /// Number of items that will not be transferred, as they are already found on target (e.g. mirror mode). + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public long? ItemsNoTransferNeeded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsNoTransferNeeded; } + + /// Number of items scanned so far in source. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public long? ItemsScanned { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsScanned; } + + /// Number of items successfully transferred to target. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public long? ItemsTransferred { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsTransferred; } + + /// + /// Number of items that will not be transferred, as they are unsupported on target. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public long? ItemsUnsupported { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsUnsupported; } + + /// Copy of parent Job Definition's properties at time of Job Run creation. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny JobDefinitionProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).JobDefinitionProperty; } + + /// The last updated time of the Job Run. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public global::System.DateTime? LastStatusUpdate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).LastStatusUpdate; } + + /// Internal Acessors for AgentName + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.AgentName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).AgentName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).AgentName = value ?? null; } + + /// Internal Acessors for AgentResourceId + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.AgentResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).AgentResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).AgentResourceId = value ?? null; } + + /// Internal Acessors for BytesExcluded + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.BytesExcluded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesExcluded; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesExcluded = value ?? default(long); } + + /// Internal Acessors for BytesFailed + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.BytesFailed { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesFailed; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesFailed = value ?? default(long); } + + /// Internal Acessors for BytesNoTransferNeeded + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.BytesNoTransferNeeded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesNoTransferNeeded; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesNoTransferNeeded = value ?? default(long); } + + /// Internal Acessors for BytesScanned + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.BytesScanned { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesScanned; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesScanned = value ?? default(long); } + + /// Internal Acessors for BytesTransferred + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.BytesTransferred { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesTransferred; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesTransferred = value ?? default(long); } + + /// Internal Acessors for BytesUnsupported + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.BytesUnsupported { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesUnsupported; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).BytesUnsupported = value ?? default(long); } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.Error { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).Error = value ?? null /* model class */; } + + /// Internal Acessors for ErrorCode + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.ErrorCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).Code = value ?? null; } + + /// Internal Acessors for ErrorMessage + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.ErrorMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).Message = value ?? null; } + + /// Internal Acessors for ExecutionEndTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.ExecutionEndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ExecutionEndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ExecutionEndTime = value ?? default(global::System.DateTime); } + + /// Internal Acessors for ExecutionStartTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.ExecutionStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ExecutionStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ExecutionStartTime = value ?? default(global::System.DateTime); } + + /// Internal Acessors for ItemsExcluded + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.ItemsExcluded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsExcluded; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsExcluded = value ?? default(long); } + + /// Internal Acessors for ItemsFailed + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.ItemsFailed { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsFailed; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsFailed = value ?? default(long); } + + /// Internal Acessors for ItemsNoTransferNeeded + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.ItemsNoTransferNeeded { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsNoTransferNeeded; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsNoTransferNeeded = value ?? default(long); } + + /// Internal Acessors for ItemsScanned + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.ItemsScanned { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsScanned; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsScanned = value ?? default(long); } + + /// Internal Acessors for ItemsTransferred + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.ItemsTransferred { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsTransferred; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsTransferred = value ?? default(long); } + + /// Internal Acessors for ItemsUnsupported + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.ItemsUnsupported { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsUnsupported; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ItemsUnsupported = value ?? default(long); } + + /// Internal Acessors for JobDefinitionProperty + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.JobDefinitionProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).JobDefinitionProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).JobDefinitionProperty = value ?? null /* model class */; } + + /// Internal Acessors for LastStatusUpdate + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.LastStatusUpdate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).LastStatusUpdate; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).LastStatusUpdate = value ?? default(global::System.DateTime); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for ScanStatus + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.ScanStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ScanStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ScanStatus = value ?? null; } + + /// Internal Acessors for SourceName + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.SourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).SourceName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).SourceName = value ?? null; } + + /// Internal Acessors for SourceProperty + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.SourceProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).SourceProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).SourceProperty = value ?? null /* model class */; } + + /// Internal Acessors for SourceResourceId + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).SourceResourceId = value ?? null; } + + /// Internal Acessors for Status + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).Status = value ?? null; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).Target = value ?? null; } + + /// Internal Acessors for TargetName + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.TargetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).TargetName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).TargetName = value ?? null; } + + /// Internal Acessors for TargetProperty + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.TargetProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).TargetProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).TargetProperty = value ?? null /* model class */; } + + /// Internal Acessors for TargetResourceId + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunInternal.TargetResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).TargetResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).TargetResourceId = value ?? null; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunProperties _property; + + /// Job run properties. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunProperties()); set => this._property = value; } + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 status of Agent's scanning of source. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ScanStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).ScanStatus; } + + /// Name of source Endpoint resource. This resource may no longer exist. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string SourceName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).SourceName; } + + /// Copy of source Endpoint resource's properties at time of Job Run creation. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny SourceProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).SourceProperty; } + + /// Fully qualified resource id of source Endpoint. This id may no longer exist. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string SourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).SourceResourceId; } + + /// The state of the job execution. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Status { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).Status; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } + + /// Target of the given error entry. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).Target; } + + /// Name of target Endpoint resource. This resource may no longer exist. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string TargetName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).TargetName; } + + /// Copy of Endpoint resource's properties at time of Job Run creation. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny TargetProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).TargetProperty; } + + /// Fully qualified resource id of of Endpoint. This id may no longer exist. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string TargetResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)Property).TargetResourceId; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public JobRun() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// The Job Run resource. + public partial interface IJobRun : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource + { + /// Name of the Agent assigned to this run. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Name of the Agent assigned to this run.", + SerializedName = @"agentName", + PossibleTypes = new [] { typeof(string) })] + string AgentName { get; } + /// Fully qualified resource id of the Agent assigned to this run. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Fully qualified resource id of the Agent assigned to this run.", + SerializedName = @"agentResourceId", + PossibleTypes = new [] { typeof(string) })] + string AgentResourceId { get; } + /// + /// Bytes of data that will not be transferred, as they are excluded by user configuration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Bytes of data that will not be transferred, as they are excluded by user configuration.", + SerializedName = @"bytesExcluded", + PossibleTypes = new [] { typeof(long) })] + long? BytesExcluded { get; } + /// Bytes of data that were attempted to transfer and failed. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Bytes of data that were attempted to transfer and failed.", + SerializedName = @"bytesFailed", + PossibleTypes = new [] { typeof(long) })] + long? BytesFailed { get; } + /// + /// Bytes of data that will not be transferred, as they are already found on target (e.g. mirror mode). + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Bytes of data that will not be transferred, as they are already found on target (e.g. mirror mode).", + SerializedName = @"bytesNoTransferNeeded", + PossibleTypes = new [] { typeof(long) })] + long? BytesNoTransferNeeded { get; } + /// Bytes of data scanned so far in source. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Bytes of data scanned so far in source.", + SerializedName = @"bytesScanned", + PossibleTypes = new [] { typeof(long) })] + long? BytesScanned { get; } + /// Bytes of data successfully transferred to target. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Bytes of data successfully transferred to target.", + SerializedName = @"bytesTransferred", + PossibleTypes = new [] { typeof(long) })] + long? BytesTransferred { get; } + /// Bytes of data that will not be transferred, as they are unsupported on target. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Bytes of data that will not be transferred, as they are unsupported on target.", + SerializedName = @"bytesUnsupported", + PossibleTypes = new [] { typeof(long) })] + long? BytesUnsupported { get; } + /// Error code of the given entry. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Error code of the given entry.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string ErrorCode { get; } + /// Error message of the given entry. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Error message of the given entry.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string ErrorMessage { get; } + /// End time of the run. Null if Agent has not reported that the job has ended. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"End time of the run. Null if Agent has not reported that the job has ended.", + SerializedName = @"executionEndTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExecutionEndTime { get; } + /// Start time of the run. Null if no Agent reported that the job has started. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Start time of the run. Null if no Agent reported that the job has started.", + SerializedName = @"executionStartTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? ExecutionStartTime { get; } + /// + /// Number of items that will not be transferred, as they are excluded by user configuration. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Number of items that will not be transferred, as they are excluded by user configuration.", + SerializedName = @"itemsExcluded", + PossibleTypes = new [] { typeof(long) })] + long? ItemsExcluded { get; } + /// Number of items that were attempted to transfer and failed. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Number of items that were attempted to transfer and failed.", + SerializedName = @"itemsFailed", + PossibleTypes = new [] { typeof(long) })] + long? ItemsFailed { get; } + /// + /// Number of items that will not be transferred, as they are already found on target (e.g. mirror mode). + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Number of items that will not be transferred, as they are already found on target (e.g. mirror mode).", + SerializedName = @"itemsNoTransferNeeded", + PossibleTypes = new [] { typeof(long) })] + long? ItemsNoTransferNeeded { get; } + /// Number of items scanned so far in source. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Number of items scanned so far in source.", + SerializedName = @"itemsScanned", + PossibleTypes = new [] { typeof(long) })] + long? ItemsScanned { get; } + /// Number of items successfully transferred to target. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Number of items successfully transferred to target.", + SerializedName = @"itemsTransferred", + PossibleTypes = new [] { typeof(long) })] + long? ItemsTransferred { get; } + /// + /// Number of items that will not be transferred, as they are unsupported on target. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Number of items that will not be transferred, as they are unsupported on target.", + SerializedName = @"itemsUnsupported", + PossibleTypes = new [] { typeof(long) })] + long? ItemsUnsupported { get; } + /// Copy of parent Job Definition's properties at time of Job Run creation. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Copy of parent Job Definition's properties at time of Job Run creation.", + SerializedName = @"jobDefinitionProperties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny JobDefinitionProperty { get; } + /// The last updated time of the Job Run. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The last updated time of the Job Run.", + SerializedName = @"lastStatusUpdate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastStatusUpdate { get; } + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The provisioning state of this resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; } + /// The status of Agent's scanning of source. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of Agent's scanning of source.", + SerializedName = @"scanStatus", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("NotStarted", "Scanning", "Completed")] + string ScanStatus { get; } + /// Name of source Endpoint resource. This resource may no longer exist. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Name of source Endpoint resource. This resource may no longer exist.", + SerializedName = @"sourceName", + PossibleTypes = new [] { typeof(string) })] + string SourceName { get; } + /// Copy of source Endpoint resource's properties at time of Job Run creation. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Copy of source Endpoint resource's properties at time of Job Run creation.", + SerializedName = @"sourceProperties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny SourceProperty { get; } + /// Fully qualified resource id of source Endpoint. This id may no longer exist. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Fully qualified resource id of source Endpoint. This id may no longer exist.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; } + /// The state of the job execution. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The state of the job execution.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Queued", "Started", "Running", "CancelRequested", "Canceling", "Canceled", "Failed", "Succeeded", "PausedByBandwidthManagement")] + string Status { get; } + /// Target of the given error entry. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Target of the given error entry.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + /// Name of target Endpoint resource. This resource may no longer exist. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Name of target Endpoint resource. This resource may no longer exist.", + SerializedName = @"targetName", + PossibleTypes = new [] { typeof(string) })] + string TargetName { get; } + /// Copy of Endpoint resource's properties at time of Job Run creation. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Copy of Endpoint resource's properties at time of Job Run creation.", + SerializedName = @"targetProperties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny TargetProperty { get; } + /// Fully qualified resource id of of Endpoint. This id may no longer exist. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Fully qualified resource id of of Endpoint. This id may no longer exist.", + SerializedName = @"targetResourceId", + PossibleTypes = new [] { typeof(string) })] + string TargetResourceId { get; } + + } + /// The Job Run resource. + internal partial interface IJobRunInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResourceInternal + { + /// Name of the Agent assigned to this run. + string AgentName { get; set; } + /// Fully qualified resource id of the Agent assigned to this run. + string AgentResourceId { get; set; } + /// + /// Bytes of data that will not be transferred, as they are excluded by user configuration. + /// + long? BytesExcluded { get; set; } + /// Bytes of data that were attempted to transfer and failed. + long? BytesFailed { get; set; } + /// + /// Bytes of data that will not be transferred, as they are already found on target (e.g. mirror mode). + /// + long? BytesNoTransferNeeded { get; set; } + /// Bytes of data scanned so far in source. + long? BytesScanned { get; set; } + /// Bytes of data successfully transferred to target. + long? BytesTransferred { get; set; } + /// Bytes of data that will not be transferred, as they are unsupported on target. + long? BytesUnsupported { get; set; } + /// Error details. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError Error { get; set; } + /// Error code of the given entry. + string ErrorCode { get; set; } + /// Error message of the given entry. + string ErrorMessage { get; set; } + /// End time of the run. Null if Agent has not reported that the job has ended. + global::System.DateTime? ExecutionEndTime { get; set; } + /// Start time of the run. Null if no Agent reported that the job has started. + global::System.DateTime? ExecutionStartTime { get; set; } + /// + /// Number of items that will not be transferred, as they are excluded by user configuration. + /// + long? ItemsExcluded { get; set; } + /// Number of items that were attempted to transfer and failed. + long? ItemsFailed { get; set; } + /// + /// Number of items that will not be transferred, as they are already found on target (e.g. mirror mode). + /// + long? ItemsNoTransferNeeded { get; set; } + /// Number of items scanned so far in source. + long? ItemsScanned { get; set; } + /// Number of items successfully transferred to target. + long? ItemsTransferred { get; set; } + /// + /// Number of items that will not be transferred, as they are unsupported on target. + /// + long? ItemsUnsupported { get; set; } + /// Copy of parent Job Definition's properties at time of Job Run creation. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny JobDefinitionProperty { get; set; } + /// The last updated time of the Job Run. + global::System.DateTime? LastStatusUpdate { get; set; } + /// Job run properties. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunProperties Property { get; set; } + /// The provisioning state of this resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; set; } + /// The status of Agent's scanning of source. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("NotStarted", "Scanning", "Completed")] + string ScanStatus { get; set; } + /// Name of source Endpoint resource. This resource may no longer exist. + string SourceName { get; set; } + /// Copy of source Endpoint resource's properties at time of Job Run creation. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny SourceProperty { get; set; } + /// Fully qualified resource id of source Endpoint. This id may no longer exist. + string SourceResourceId { get; set; } + /// The state of the job execution. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Queued", "Started", "Running", "CancelRequested", "Canceling", "Canceled", "Failed", "Succeeded", "PausedByBandwidthManagement")] + string Status { get; set; } + /// Target of the given error entry. + string Target { get; set; } + /// Name of target Endpoint resource. This resource may no longer exist. + string TargetName { get; set; } + /// Copy of Endpoint resource's properties at time of Job Run creation. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny TargetProperty { get; set; } + /// Fully qualified resource id of of Endpoint. This id may no longer exist. + string TargetResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRun.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRun.json.cs similarity index 91% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRun.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRun.json.cs index 938ac740abca..b8723ca21706 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRun.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRun.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class JobRun partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new JobRun(json) : null; } @@ -77,8 +75,8 @@ internal JobRun(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.Jso { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunProperties.FromJson(__jsonProperties) : Property;} + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -101,7 +99,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - __resource?.ToJson(container, serializationMode); + __proxyResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunError.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunError.PowerShell.cs similarity index 78% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunError.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunError.PowerShell.cs index f68e1c4eafe6..dc504449a95f 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunError.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunError.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class JobRunError 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new JobRunError(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new JobRunError(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. @@ -111,21 +111,21 @@ internal JobRunError(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)this).Target, 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. @@ -140,15 +140,15 @@ internal JobRunError(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)this).Target, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunError.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunError.TypeConverter.cs similarity index 98% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunError.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunError.TypeConverter.cs index e94847627fad..1275673fbbf5 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunError.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunError.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunError.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunError.cs similarity index 90% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunError.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunError.cs index 0550350338f9..bbaca12f208f 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunError.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunError.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; /// Error type [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] public partial class JobRunError : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal { /// Backing field for property. @@ -49,6 +49,9 @@ public partial interface IJobRunError : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Error code of the given entry.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -57,6 +60,9 @@ public partial interface IJobRunError : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Error message of the given entry.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -65,6 +71,9 @@ public partial interface IJobRunError : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Target of the given error entry.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunError.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunError.json.cs similarity index 94% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunError.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunError.json.cs index 6f70a11e8caf..886a94701ef2 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunError.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunError.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class JobRunError partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new JobRunError(json) : null; } @@ -77,9 +77,9 @@ internal JobRunError(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Jso { return; } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)_target;} AfterFromJson(json); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunList.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunList.PowerShell.cs similarity index 77% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunList.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunList.PowerShell.cs index 442a8ad423f5..9660cccc710a 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunList.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class JobRunList 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new JobRunList(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new JobRunList(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. @@ -111,17 +111,17 @@ internal JobRunList(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunListInternal)this).NextLink, 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. @@ -136,11 +136,11 @@ internal JobRunList(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunList.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunList.TypeConverter.cs similarity index 98% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunList.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunList.TypeConverter.cs index c62b29a35cb1..d6614ea642fc 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunList.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunList.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunList.cs new file mode 100644 index 000000000000..6d3cb3bda5fd --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunList.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// List of Job Runs. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class JobRunList : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunList, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunListInternal + { + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunListInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The JobRun items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public JobRunList() + { + + } + } + /// List of Job Runs. + public partial interface IJobRunList : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobRun items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The JobRun items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun) })] + System.Collections.Generic.List Value { get; } + + } + /// List of Job Runs. + internal partial interface IJobRunListInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The JobRun items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunList.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunList.json.cs similarity index 90% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunList.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunList.json.cs index ad3bd09143fd..d141df6c4145 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunList.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class JobRunList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunList FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunList FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new JobRunList(json) : null; } @@ -77,8 +77,8 @@ internal JobRunList(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRun.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRun.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunProperties.PowerShell.cs new file mode 100644 index 000000000000..c023315b64ca --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunProperties.PowerShell.cs @@ -0,0 +1,404 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// Job run properties. + [System.ComponentModel.TypeConverter(typeof(JobRunPropertiesTypeConverter))] + public partial class JobRunProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new JobRunProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new JobRunProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal JobRunProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("ScanStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ScanStatus = (string) content.GetValueForProperty("ScanStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ScanStatus, global::System.Convert.ToString); + } + if (content.Contains("AgentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).AgentName, global::System.Convert.ToString); + } + if (content.Contains("AgentResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).AgentResourceId, global::System.Convert.ToString); + } + if (content.Contains("ExecutionStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ExecutionStartTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ExecutionStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ExecutionEndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ExecutionEndTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionEndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ExecutionEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastStatusUpdate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ItemsScanned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsScanned = (long?) content.GetValueForProperty("ItemsScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsExcluded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsExcluded = (long?) content.GetValueForProperty("ItemsExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsUnsupported")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsUnsupported = (long?) content.GetValueForProperty("ItemsUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsNoTransferNeeded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsNoTransferNeeded = (long?) content.GetValueForProperty("ItemsNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsFailed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsFailed = (long?) content.GetValueForProperty("ItemsFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsTransferred")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsTransferred = (long?) content.GetValueForProperty("ItemsTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesScanned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesScanned = (long?) content.GetValueForProperty("BytesScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesExcluded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesExcluded = (long?) content.GetValueForProperty("BytesExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesUnsupported")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesUnsupported = (long?) content.GetValueForProperty("BytesUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesNoTransferNeeded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesNoTransferNeeded = (long?) content.GetValueForProperty("BytesNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesFailed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesFailed = (long?) content.GetValueForProperty("BytesFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesTransferred")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesTransferred = (long?) content.GetValueForProperty("BytesTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).SourceName, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).SourceProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("SourceProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).SourceProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("TargetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).TargetName, global::System.Convert.ToString); + } + if (content.Contains("TargetResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).TargetResourceId, global::System.Convert.ToString); + } + if (content.Contains("TargetProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).TargetProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("TargetProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).TargetProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("JobDefinitionProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).JobDefinitionProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("JobDefinitionProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).JobDefinitionProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Target, 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 JobRunProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("ScanStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ScanStatus = (string) content.GetValueForProperty("ScanStatus",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ScanStatus, global::System.Convert.ToString); + } + if (content.Contains("AgentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).AgentName = (string) content.GetValueForProperty("AgentName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).AgentName, global::System.Convert.ToString); + } + if (content.Contains("AgentResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).AgentResourceId = (string) content.GetValueForProperty("AgentResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).AgentResourceId, global::System.Convert.ToString); + } + if (content.Contains("ExecutionStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ExecutionStartTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ExecutionStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ExecutionEndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ExecutionEndTime = (global::System.DateTime?) content.GetValueForProperty("ExecutionEndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ExecutionEndTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastStatusUpdate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).LastStatusUpdate = (global::System.DateTime?) content.GetValueForProperty("LastStatusUpdate",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).LastStatusUpdate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ItemsScanned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsScanned = (long?) content.GetValueForProperty("ItemsScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsExcluded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsExcluded = (long?) content.GetValueForProperty("ItemsExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsUnsupported")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsUnsupported = (long?) content.GetValueForProperty("ItemsUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsNoTransferNeeded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsNoTransferNeeded = (long?) content.GetValueForProperty("ItemsNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsFailed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsFailed = (long?) content.GetValueForProperty("ItemsFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ItemsTransferred")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsTransferred = (long?) content.GetValueForProperty("ItemsTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ItemsTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesScanned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesScanned = (long?) content.GetValueForProperty("BytesScanned",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesScanned, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesExcluded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesExcluded = (long?) content.GetValueForProperty("BytesExcluded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesExcluded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesUnsupported")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesUnsupported = (long?) content.GetValueForProperty("BytesUnsupported",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesUnsupported, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesNoTransferNeeded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesNoTransferNeeded = (long?) content.GetValueForProperty("BytesNoTransferNeeded",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesNoTransferNeeded, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesFailed")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesFailed = (long?) content.GetValueForProperty("BytesFailed",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesFailed, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("BytesTransferred")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesTransferred = (long?) content.GetValueForProperty("BytesTransferred",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).BytesTransferred, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("SourceName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).SourceName, global::System.Convert.ToString); + } + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).SourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).SourceProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("SourceProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).SourceProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("TargetName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).TargetName = (string) content.GetValueForProperty("TargetName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).TargetName, global::System.Convert.ToString); + } + if (content.Contains("TargetResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).TargetResourceId = (string) content.GetValueForProperty("TargetResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).TargetResourceId, global::System.Convert.ToString); + } + if (content.Contains("TargetProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).TargetProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("TargetProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).TargetProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("JobDefinitionProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).JobDefinitionProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) content.GetValueForProperty("JobDefinitionProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).JobDefinitionProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal)this).Target, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); + } + } + /// Job run properties. + [System.ComponentModel.TypeConverter(typeof(JobRunPropertiesTypeConverter))] + public partial interface IJobRunProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunProperties.TypeConverter.cs index d57b6272153c..a2007cf0aec3 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunProperties.cs similarity index 78% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunProperties.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunProperties.cs index 81026ae16d77..dc1e64945a77 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunProperties.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; /// Job run properties. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] public partial class JobRunProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal { /// Backing field for property. @@ -76,14 +76,14 @@ public partial class JobRunProperties : /// Error code of the given entry. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)Error).Code = value ?? null; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)Error).Code; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError _error; + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError _error; /// Error details. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunError()); } + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunError()); } /// Backing field for property. private global::System.DateTime? _executionEndTime; @@ -163,105 +163,114 @@ public partial class JobRunProperties : /// Error message of the given entry. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)Error).Message = value ?? null; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)Error).Message; } /// Internal Acessors for AgentName - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.AgentName { get => this._agentName; set { {_agentName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.AgentName { get => this._agentName; set { {_agentName = value;} } } /// Internal Acessors for AgentResourceId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.AgentResourceId { get => this._agentResourceId; set { {_agentResourceId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.AgentResourceId { get => this._agentResourceId; set { {_agentResourceId = value;} } } /// Internal Acessors for BytesExcluded - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.BytesExcluded { get => this._bytesExcluded; set { {_bytesExcluded = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.BytesExcluded { get => this._bytesExcluded; set { {_bytesExcluded = value;} } } /// Internal Acessors for BytesFailed - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.BytesFailed { get => this._bytesFailed; set { {_bytesFailed = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.BytesFailed { get => this._bytesFailed; set { {_bytesFailed = value;} } } /// Internal Acessors for BytesNoTransferNeeded - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.BytesNoTransferNeeded { get => this._bytesNoTransferNeeded; set { {_bytesNoTransferNeeded = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.BytesNoTransferNeeded { get => this._bytesNoTransferNeeded; set { {_bytesNoTransferNeeded = value;} } } /// Internal Acessors for BytesScanned - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.BytesScanned { get => this._bytesScanned; set { {_bytesScanned = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.BytesScanned { get => this._bytesScanned; set { {_bytesScanned = value;} } } /// Internal Acessors for BytesTransferred - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.BytesTransferred { get => this._bytesTransferred; set { {_bytesTransferred = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.BytesTransferred { get => this._bytesTransferred; set { {_bytesTransferred = value;} } } /// Internal Acessors for BytesUnsupported - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.BytesUnsupported { get => this._bytesUnsupported; set { {_bytesUnsupported = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.BytesUnsupported { get => this._bytesUnsupported; set { {_bytesUnsupported = value;} } } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)Error).Code = value ?? null; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunError()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunError()); set { {_error = value;} } } /// Internal Acessors for ExecutionEndTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.ExecutionEndTime { get => this._executionEndTime; set { {_executionEndTime = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.ExecutionEndTime { get => this._executionEndTime; set { {_executionEndTime = value;} } } /// Internal Acessors for ExecutionStartTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.ExecutionStartTime { get => this._executionStartTime; set { {_executionStartTime = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.ExecutionStartTime { get => this._executionStartTime; set { {_executionStartTime = value;} } } /// Internal Acessors for ItemsExcluded - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.ItemsExcluded { get => this._itemsExcluded; set { {_itemsExcluded = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.ItemsExcluded { get => this._itemsExcluded; set { {_itemsExcluded = value;} } } /// Internal Acessors for ItemsFailed - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.ItemsFailed { get => this._itemsFailed; set { {_itemsFailed = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.ItemsFailed { get => this._itemsFailed; set { {_itemsFailed = value;} } } /// Internal Acessors for ItemsNoTransferNeeded - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.ItemsNoTransferNeeded { get => this._itemsNoTransferNeeded; set { {_itemsNoTransferNeeded = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.ItemsNoTransferNeeded { get => this._itemsNoTransferNeeded; set { {_itemsNoTransferNeeded = value;} } } /// Internal Acessors for ItemsScanned - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.ItemsScanned { get => this._itemsScanned; set { {_itemsScanned = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.ItemsScanned { get => this._itemsScanned; set { {_itemsScanned = value;} } } /// Internal Acessors for ItemsTransferred - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.ItemsTransferred { get => this._itemsTransferred; set { {_itemsTransferred = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.ItemsTransferred { get => this._itemsTransferred; set { {_itemsTransferred = value;} } } /// Internal Acessors for ItemsUnsupported - long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.ItemsUnsupported { get => this._itemsUnsupported; set { {_itemsUnsupported = value;} } } + long? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.ItemsUnsupported { get => this._itemsUnsupported; set { {_itemsUnsupported = value;} } } /// Internal Acessors for JobDefinitionProperty - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.JobDefinitionProperty { get => (this._jobDefinitionProperty = this._jobDefinitionProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any()); set { {_jobDefinitionProperty = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.JobDefinitionProperty { get => (this._jobDefinitionProperty = this._jobDefinitionProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any()); set { {_jobDefinitionProperty = value;} } } /// Internal Acessors for LastStatusUpdate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.LastStatusUpdate { get => this._lastStatusUpdate; set { {_lastStatusUpdate = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.LastStatusUpdate { get => this._lastStatusUpdate; set { {_lastStatusUpdate = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)Error).Message = value ?? null; } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Internal Acessors for ScanStatus - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.ScanStatus { get => this._scanStatus; set { {_scanStatus = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.ScanStatus { get => this._scanStatus; set { {_scanStatus = value;} } } /// Internal Acessors for SourceName - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.SourceName { get => this._sourceName; set { {_sourceName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.SourceName { get => this._sourceName; set { {_sourceName = value;} } } /// Internal Acessors for SourceProperty - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.SourceProperty { get => (this._sourceProperty = this._sourceProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any()); set { {_sourceProperty = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.SourceProperty { get => (this._sourceProperty = this._sourceProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any()); set { {_sourceProperty = value;} } } /// Internal Acessors for SourceResourceId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.SourceResourceId { get => this._sourceResourceId; set { {_sourceResourceId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.SourceResourceId { get => this._sourceResourceId; set { {_sourceResourceId = value;} } } /// Internal Acessors for Status - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.Status { get => this._status; set { {_status = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.Status { get => this._status; set { {_status = value;} } } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)Error).Target = value ?? null; } /// Internal Acessors for TargetName - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.TargetName { get => this._targetName; set { {_targetName = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.TargetName { get => this._targetName; set { {_targetName = value;} } } /// Internal Acessors for TargetProperty - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.TargetProperty { get => (this._targetProperty = this._targetProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any()); set { {_targetProperty = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.TargetProperty { get => (this._targetProperty = this._targetProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any()); set { {_targetProperty = value;} } } /// Internal Acessors for TargetResourceId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunPropertiesInternal.TargetResourceId { get => this._targetResourceId; set { {_targetResourceId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunPropertiesInternal.TargetResourceId { get => this._targetResourceId; set { {_targetResourceId = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? _provisioningState; + private string _provisioningState; /// The provisioning state of this resource. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; } + public string ProvisioningState { get => this._provisioningState; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus? _scanStatus; + private string _scanStatus; /// The status of Agent's scanning of source. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus? ScanStatus { get => this._scanStatus; } + public string ScanStatus { get => this._scanStatus; } /// Backing field for property. private string _sourceName; @@ -285,15 +294,15 @@ public partial class JobRunProperties : public string SourceResourceId { get => this._sourceResourceId; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? _status; + private string _status; /// The state of the job execution. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? Status { get => this._status; } + public string Status { get => this._status; } /// Target of the given error entry. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunErrorInternal)Error).Target = value ?? null; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunErrorInternal)Error).Target; } /// Backing field for property. private string _targetName; @@ -330,6 +339,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Name of the Agent assigned to this run.", SerializedName = @"agentName", PossibleTypes = new [] { typeof(string) })] @@ -338,6 +350,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Fully qualified resource id of the Agent assigned to this run.", SerializedName = @"agentResourceId", PossibleTypes = new [] { typeof(string) })] @@ -348,6 +363,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Bytes of data that will not be transferred, as they are excluded by user configuration.", SerializedName = @"bytesExcluded", PossibleTypes = new [] { typeof(long) })] @@ -356,6 +374,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Bytes of data that were attempted to transfer and failed.", SerializedName = @"bytesFailed", PossibleTypes = new [] { typeof(long) })] @@ -366,6 +387,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Bytes of data that will not be transferred, as they are already found on target (e.g. mirror mode).", SerializedName = @"bytesNoTransferNeeded", PossibleTypes = new [] { typeof(long) })] @@ -374,6 +398,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Bytes of data scanned so far in source.", SerializedName = @"bytesScanned", PossibleTypes = new [] { typeof(long) })] @@ -382,6 +409,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Bytes of data successfully transferred to target.", SerializedName = @"bytesTransferred", PossibleTypes = new [] { typeof(long) })] @@ -390,6 +420,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Bytes of data that will not be transferred, as they are unsupported on target.", SerializedName = @"bytesUnsupported", PossibleTypes = new [] { typeof(long) })] @@ -397,15 +430,21 @@ public partial interface IJobRunProperties : /// Error code of the given entry. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Error code of the given entry.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] - string Code { get; set; } + string Code { get; } /// End time of the run. Null if Agent has not reported that the job has ended. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"End time of the run. Null if Agent has not reported that the job has ended.", SerializedName = @"executionEndTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -414,6 +453,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Start time of the run. Null if no Agent reported that the job has started.", SerializedName = @"executionStartTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -424,6 +466,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of items that will not be transferred, as they are excluded by user configuration.", SerializedName = @"itemsExcluded", PossibleTypes = new [] { typeof(long) })] @@ -432,6 +477,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of items that were attempted to transfer and failed.", SerializedName = @"itemsFailed", PossibleTypes = new [] { typeof(long) })] @@ -442,6 +490,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of items that will not be transferred, as they are already found on target (e.g. mirror mode).", SerializedName = @"itemsNoTransferNeeded", PossibleTypes = new [] { typeof(long) })] @@ -450,6 +501,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of items scanned so far in source.", SerializedName = @"itemsScanned", PossibleTypes = new [] { typeof(long) })] @@ -458,6 +512,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of items successfully transferred to target.", SerializedName = @"itemsTransferred", PossibleTypes = new [] { typeof(long) })] @@ -468,6 +525,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Number of items that will not be transferred, as they are unsupported on target.", SerializedName = @"itemsUnsupported", PossibleTypes = new [] { typeof(long) })] @@ -476,6 +536,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Copy of parent Job Definition's properties at time of Job Run creation.", SerializedName = @"jobDefinitionProperties", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) })] @@ -484,6 +547,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The last updated time of the Job Run.", SerializedName = @"lastStatusUpdate", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -491,31 +557,45 @@ public partial interface IJobRunProperties : /// Error message of the given entry. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Error message of the given entry.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] - string Message { get; set; } + string Message { get; } /// The provisioning state of this resource. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The provisioning state of this resource.", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; } /// The status of Agent's scanning of source. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The status of Agent's scanning of source.", SerializedName = @"scanStatus", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus? ScanStatus { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("NotStarted", "Scanning", "Completed")] + string ScanStatus { get; } /// Name of source Endpoint resource. This resource may no longer exist. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Name of source Endpoint resource. This resource may no longer exist.", SerializedName = @"sourceName", PossibleTypes = new [] { typeof(string) })] @@ -524,6 +604,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Copy of source Endpoint resource's properties at time of Job Run creation.", SerializedName = @"sourceProperties", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) })] @@ -532,6 +615,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Fully qualified resource id of source Endpoint. This id may no longer exist.", SerializedName = @"sourceResourceId", PossibleTypes = new [] { typeof(string) })] @@ -540,22 +626,32 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The state of the job execution.", SerializedName = @"status", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? Status { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Queued", "Started", "Running", "CancelRequested", "Canceling", "Canceled", "Failed", "Succeeded", "PausedByBandwidthManagement")] + string Status { get; } /// Target of the given error entry. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Target of the given error entry.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] - string Target { get; set; } + string Target { get; } /// Name of target Endpoint resource. This resource may no longer exist. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Name of target Endpoint resource. This resource may no longer exist.", SerializedName = @"targetName", PossibleTypes = new [] { typeof(string) })] @@ -564,6 +660,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Copy of Endpoint resource's properties at time of Job Run creation.", SerializedName = @"targetProperties", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAny) })] @@ -572,6 +671,9 @@ public partial interface IJobRunProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Fully qualified resource id of of Endpoint. This id may no longer exist.", SerializedName = @"targetResourceId", PossibleTypes = new [] { typeof(string) })] @@ -605,7 +707,7 @@ internal partial interface IJobRunPropertiesInternal /// Error code of the given entry. string Code { get; set; } /// Error details. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunError Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunError Error { get; set; } /// End time of the run. Null if Agent has not reported that the job has ended. global::System.DateTime? ExecutionEndTime { get; set; } /// Start time of the run. Null if no Agent reported that the job has started. @@ -635,9 +737,11 @@ internal partial interface IJobRunPropertiesInternal /// Error message of the given entry. string Message { get; set; } /// The provisioning state of this resource. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; set; } /// The status of Agent's scanning of source. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus? ScanStatus { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("NotStarted", "Scanning", "Completed")] + string ScanStatus { get; set; } /// Name of source Endpoint resource. This resource may no longer exist. string SourceName { get; set; } /// Copy of source Endpoint resource's properties at time of Job Run creation. @@ -645,7 +749,8 @@ internal partial interface IJobRunPropertiesInternal /// Fully qualified resource id of source Endpoint. This id may no longer exist. string SourceResourceId { get; set; } /// The state of the job execution. - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus? Status { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Queued", "Started", "Running", "CancelRequested", "Canceling", "Canceled", "Failed", "Succeeded", "PausedByBandwidthManagement")] + string Status { get; set; } /// Target of the given error entry. string Target { get; set; } /// Name of target Endpoint resource. This resource may no longer exist. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunProperties.json.cs similarity index 87% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunProperties.json.cs index ab50aecb5404..4cb5362e1483 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class JobRunProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new JobRunProperties(json) : null; } @@ -77,34 +77,34 @@ internal JobRunProperties(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtim { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunError.FromJson(__jsonError) : Error;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} - {_scanStatus = If( json?.PropertyT("scanStatus"), out var __jsonScanStatus) ? (string)__jsonScanStatus : (string)ScanStatus;} - {_agentName = If( json?.PropertyT("agentName"), out var __jsonAgentName) ? (string)__jsonAgentName : (string)AgentName;} - {_agentResourceId = If( json?.PropertyT("agentResourceId"), out var __jsonAgentResourceId) ? (string)__jsonAgentResourceId : (string)AgentResourceId;} - {_executionStartTime = If( json?.PropertyT("executionStartTime"), out var __jsonExecutionStartTime) ? global::System.DateTime.TryParse((string)__jsonExecutionStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExecutionStartTimeValue) ? __jsonExecutionStartTimeValue : ExecutionStartTime : ExecutionStartTime;} - {_executionEndTime = If( json?.PropertyT("executionEndTime"), out var __jsonExecutionEndTime) ? global::System.DateTime.TryParse((string)__jsonExecutionEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExecutionEndTimeValue) ? __jsonExecutionEndTimeValue : ExecutionEndTime : ExecutionEndTime;} - {_lastStatusUpdate = If( json?.PropertyT("lastStatusUpdate"), out var __jsonLastStatusUpdate) ? global::System.DateTime.TryParse((string)__jsonLastStatusUpdate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastStatusUpdateValue) ? __jsonLastStatusUpdateValue : LastStatusUpdate : LastStatusUpdate;} - {_itemsScanned = If( json?.PropertyT("itemsScanned"), out var __jsonItemsScanned) ? (long?)__jsonItemsScanned : ItemsScanned;} - {_itemsExcluded = If( json?.PropertyT("itemsExcluded"), out var __jsonItemsExcluded) ? (long?)__jsonItemsExcluded : ItemsExcluded;} - {_itemsUnsupported = If( json?.PropertyT("itemsUnsupported"), out var __jsonItemsUnsupported) ? (long?)__jsonItemsUnsupported : ItemsUnsupported;} - {_itemsNoTransferNeeded = If( json?.PropertyT("itemsNoTransferNeeded"), out var __jsonItemsNoTransferNeeded) ? (long?)__jsonItemsNoTransferNeeded : ItemsNoTransferNeeded;} - {_itemsFailed = If( json?.PropertyT("itemsFailed"), out var __jsonItemsFailed) ? (long?)__jsonItemsFailed : ItemsFailed;} - {_itemsTransferred = If( json?.PropertyT("itemsTransferred"), out var __jsonItemsTransferred) ? (long?)__jsonItemsTransferred : ItemsTransferred;} - {_bytesScanned = If( json?.PropertyT("bytesScanned"), out var __jsonBytesScanned) ? (long?)__jsonBytesScanned : BytesScanned;} - {_bytesExcluded = If( json?.PropertyT("bytesExcluded"), out var __jsonBytesExcluded) ? (long?)__jsonBytesExcluded : BytesExcluded;} - {_bytesUnsupported = If( json?.PropertyT("bytesUnsupported"), out var __jsonBytesUnsupported) ? (long?)__jsonBytesUnsupported : BytesUnsupported;} - {_bytesNoTransferNeeded = If( json?.PropertyT("bytesNoTransferNeeded"), out var __jsonBytesNoTransferNeeded) ? (long?)__jsonBytesNoTransferNeeded : BytesNoTransferNeeded;} - {_bytesFailed = If( json?.PropertyT("bytesFailed"), out var __jsonBytesFailed) ? (long?)__jsonBytesFailed : BytesFailed;} - {_bytesTransferred = If( json?.PropertyT("bytesTransferred"), out var __jsonBytesTransferred) ? (long?)__jsonBytesTransferred : BytesTransferred;} - {_sourceName = If( json?.PropertyT("sourceName"), out var __jsonSourceName) ? (string)__jsonSourceName : (string)SourceName;} - {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)SourceResourceId;} - {_sourceProperty = If( json?.PropertyT("sourceProperties"), out var __jsonSourceProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any.FromJson(__jsonSourceProperties) : SourceProperty;} - {_targetName = If( json?.PropertyT("targetName"), out var __jsonTargetName) ? (string)__jsonTargetName : (string)TargetName;} - {_targetResourceId = If( json?.PropertyT("targetResourceId"), out var __jsonTargetResourceId) ? (string)__jsonTargetResourceId : (string)TargetResourceId;} - {_targetProperty = If( json?.PropertyT("targetProperties"), out var __jsonTargetProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any.FromJson(__jsonTargetProperties) : TargetProperty;} - {_jobDefinitionProperty = If( json?.PropertyT("jobDefinitionProperties"), out var __jsonJobDefinitionProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any.FromJson(__jsonJobDefinitionProperties) : JobDefinitionProperty;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunError.FromJson(__jsonError) : _error;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_scanStatus = If( json?.PropertyT("scanStatus"), out var __jsonScanStatus) ? (string)__jsonScanStatus : (string)_scanStatus;} + {_agentName = If( json?.PropertyT("agentName"), out var __jsonAgentName) ? (string)__jsonAgentName : (string)_agentName;} + {_agentResourceId = If( json?.PropertyT("agentResourceId"), out var __jsonAgentResourceId) ? (string)__jsonAgentResourceId : (string)_agentResourceId;} + {_executionStartTime = If( json?.PropertyT("executionStartTime"), out var __jsonExecutionStartTime) ? global::System.DateTime.TryParse((string)__jsonExecutionStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExecutionStartTimeValue) ? __jsonExecutionStartTimeValue : _executionStartTime : _executionStartTime;} + {_executionEndTime = If( json?.PropertyT("executionEndTime"), out var __jsonExecutionEndTime) ? global::System.DateTime.TryParse((string)__jsonExecutionEndTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonExecutionEndTimeValue) ? __jsonExecutionEndTimeValue : _executionEndTime : _executionEndTime;} + {_lastStatusUpdate = If( json?.PropertyT("lastStatusUpdate"), out var __jsonLastStatusUpdate) ? global::System.DateTime.TryParse((string)__jsonLastStatusUpdate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastStatusUpdateValue) ? __jsonLastStatusUpdateValue : _lastStatusUpdate : _lastStatusUpdate;} + {_itemsScanned = If( json?.PropertyT("itemsScanned"), out var __jsonItemsScanned) ? (long?)__jsonItemsScanned : _itemsScanned;} + {_itemsExcluded = If( json?.PropertyT("itemsExcluded"), out var __jsonItemsExcluded) ? (long?)__jsonItemsExcluded : _itemsExcluded;} + {_itemsUnsupported = If( json?.PropertyT("itemsUnsupported"), out var __jsonItemsUnsupported) ? (long?)__jsonItemsUnsupported : _itemsUnsupported;} + {_itemsNoTransferNeeded = If( json?.PropertyT("itemsNoTransferNeeded"), out var __jsonItemsNoTransferNeeded) ? (long?)__jsonItemsNoTransferNeeded : _itemsNoTransferNeeded;} + {_itemsFailed = If( json?.PropertyT("itemsFailed"), out var __jsonItemsFailed) ? (long?)__jsonItemsFailed : _itemsFailed;} + {_itemsTransferred = If( json?.PropertyT("itemsTransferred"), out var __jsonItemsTransferred) ? (long?)__jsonItemsTransferred : _itemsTransferred;} + {_bytesScanned = If( json?.PropertyT("bytesScanned"), out var __jsonBytesScanned) ? (long?)__jsonBytesScanned : _bytesScanned;} + {_bytesExcluded = If( json?.PropertyT("bytesExcluded"), out var __jsonBytesExcluded) ? (long?)__jsonBytesExcluded : _bytesExcluded;} + {_bytesUnsupported = If( json?.PropertyT("bytesUnsupported"), out var __jsonBytesUnsupported) ? (long?)__jsonBytesUnsupported : _bytesUnsupported;} + {_bytesNoTransferNeeded = If( json?.PropertyT("bytesNoTransferNeeded"), out var __jsonBytesNoTransferNeeded) ? (long?)__jsonBytesNoTransferNeeded : _bytesNoTransferNeeded;} + {_bytesFailed = If( json?.PropertyT("bytesFailed"), out var __jsonBytesFailed) ? (long?)__jsonBytesFailed : _bytesFailed;} + {_bytesTransferred = If( json?.PropertyT("bytesTransferred"), out var __jsonBytesTransferred) ? (long?)__jsonBytesTransferred : _bytesTransferred;} + {_sourceName = If( json?.PropertyT("sourceName"), out var __jsonSourceName) ? (string)__jsonSourceName : (string)_sourceName;} + {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)_sourceResourceId;} + {_sourceProperty = If( json?.PropertyT("sourceProperties"), out var __jsonSourceProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any.FromJson(__jsonSourceProperties) : _sourceProperty;} + {_targetName = If( json?.PropertyT("targetName"), out var __jsonTargetName) ? (string)__jsonTargetName : (string)_targetName;} + {_targetResourceId = If( json?.PropertyT("targetResourceId"), out var __jsonTargetResourceId) ? (string)__jsonTargetResourceId : (string)_targetResourceId;} + {_targetProperty = If( json?.PropertyT("targetProperties"), out var __jsonTargetProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any.FromJson(__jsonTargetProperties) : _targetProperty;} + {_jobDefinitionProperty = If( json?.PropertyT("jobDefinitionProperties"), out var __jsonJobDefinitionProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Any.FromJson(__jsonJobDefinitionProperties) : _jobDefinitionProperty;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } @@ -127,115 +127,115 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._scanStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._scanStatus.ToString()) : null, "scanStatus" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._agentName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._agentName.ToString()) : null, "agentName" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._agentResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._agentResourceId.ToString()) : null, "agentResourceId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._executionStartTime ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._executionStartTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "executionStartTime" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._executionEndTime ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._executionEndTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "executionEndTime" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._lastStatusUpdate ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._lastStatusUpdate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastStatusUpdate" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._itemsScanned ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNumber((long)this._itemsScanned) : null, "itemsScanned" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._itemsExcluded ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNumber((long)this._itemsExcluded) : null, "itemsExcluded" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._itemsUnsupported ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNumber((long)this._itemsUnsupported) : null, "itemsUnsupported" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._itemsNoTransferNeeded ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNumber((long)this._itemsNoTransferNeeded) : null, "itemsNoTransferNeeded" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._itemsFailed ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNumber((long)this._itemsFailed) : null, "itemsFailed" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._itemsTransferred ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNumber((long)this._itemsTransferred) : null, "itemsTransferred" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._bytesScanned ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNumber((long)this._bytesScanned) : null, "bytesScanned" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._bytesExcluded ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNumber((long)this._bytesExcluded) : null, "bytesExcluded" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._bytesUnsupported ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNumber((long)this._bytesUnsupported) : null, "bytesUnsupported" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._bytesNoTransferNeeded ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNumber((long)this._bytesNoTransferNeeded) : null, "bytesNoTransferNeeded" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._bytesFailed ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNumber((long)this._bytesFailed) : null, "bytesFailed" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._bytesTransferred ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNumber((long)this._bytesTransferred) : null, "bytesTransferred" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._sourceName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._sourceName.ToString()) : null, "sourceName" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._sourceResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._sourceResourceId.ToString()) : null, "sourceResourceId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._sourceProperty ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._sourceProperty.ToJson(null,serializationMode) : null, "sourceProperties" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._targetName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._targetName.ToString()) : null, "targetName" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._targetResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._targetResourceId.ToString()) : null, "targetResourceId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._targetProperty ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._targetProperty.ToJson(null,serializationMode) : null, "targetProperties" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._jobDefinitionProperty ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._jobDefinitionProperty.ToJson(null,serializationMode) : null, "jobDefinitionProperties" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunResourceId.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunResourceId.PowerShell.cs similarity index 84% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunResourceId.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunResourceId.PowerShell.cs index 17148f946f53..fd4e9d0e08c1 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunResourceId.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunResourceId.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class JobRunResourceId 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new JobRunResourceId(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new JobRunResourceId(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. @@ -111,13 +111,13 @@ internal JobRunResourceId(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("JobRunResourceId1")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceIdInternal)this).JobRunResourceId1 = (string) content.GetValueForProperty("JobRunResourceId1",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceIdInternal)this).JobRunResourceId1, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceIdInternal)this).JobRunResourceId1 = (string) content.GetValueForProperty("JobRunResourceId1",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceIdInternal)this).JobRunResourceId1, 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. @@ -132,7 +132,7 @@ internal JobRunResourceId(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("JobRunResourceId1")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceIdInternal)this).JobRunResourceId1 = (string) content.GetValueForProperty("JobRunResourceId1",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceIdInternal)this).JobRunResourceId1, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceIdInternal)this).JobRunResourceId1 = (string) content.GetValueForProperty("JobRunResourceId1",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceIdInternal)this).JobRunResourceId1, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunResourceId.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunResourceId.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunResourceId.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunResourceId.TypeConverter.cs index e4cf9aea4b50..b993a032dd04 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunResourceId.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunResourceId.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunResourceId.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunResourceId.cs similarity index 85% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunResourceId.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunResourceId.cs index 6ae1ae6e46c0..61190fcb2681 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunResourceId.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunResourceId.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; /// Response that identifies a Job Run. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] public partial class JobRunResourceId : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceIdInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceIdInternal { /// Backing field for property. @@ -22,7 +22,7 @@ public partial class JobRunResourceId : public string JobRunResourceId1 { get => this._jobRunResourceId1; } /// Internal Acessors for JobRunResourceId1 - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceIdInternal.JobRunResourceId1 { get => this._jobRunResourceId1; set { {_jobRunResourceId1 = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceIdInternal.JobRunResourceId1 { get => this._jobRunResourceId1; set { {_jobRunResourceId1 = value;} } } /// Creates an new instance. public JobRunResourceId() @@ -38,6 +38,9 @@ public partial interface IJobRunResourceId : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Fully qualified resource id of the Job Run.", SerializedName = @"jobRunResourceId", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunResourceId.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunResourceId.json.cs similarity index 94% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunResourceId.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunResourceId.json.cs index fea9113c73a5..113b48b04b3a 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/JobRunResourceId.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/JobRunResourceId.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class JobRunResourceId partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new JobRunResourceId(json) : null; } @@ -77,7 +77,7 @@ internal JobRunResourceId(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtim { return; } - {_jobRunResourceId1 = If( json?.PropertyT("jobRunResourceId"), out var __jsonJobRunResourceId) ? (string)__jsonJobRunResourceId : (string)JobRunResourceId1;} + {_jobRunResourceId1 = If( json?.PropertyT("jobRunResourceId"), out var __jsonJobRunResourceId) ? (string)__jsonJobRunResourceId : (string)_jobRunResourceId1;} AfterFromJson(json); } @@ -100,7 +100,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._jobRunResourceId1)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._jobRunResourceId1.ToString()) : null, "jobRunResourceId" ,container.Add ); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ManagedServiceIdentity.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ManagedServiceIdentity.PowerShell.cs new file mode 100644 index 000000000000..7cb0c4c8d809 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ManagedServiceIdentity.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// Managed service identity (system assigned and/or user assigned identities) + [System.ComponentModel.TypeConverter(typeof(ManagedServiceIdentityTypeConverter))] + public partial class ManagedServiceIdentity + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedServiceIdentity(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedServiceIdentity(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedServiceIdentity(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("UserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedServiceIdentity(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("UserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); + } + } + /// Managed service identity (system assigned and/or user assigned identities) + [System.ComponentModel.TypeConverter(typeof(ManagedServiceIdentityTypeConverter))] + public partial interface IManagedServiceIdentity + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ManagedServiceIdentity.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ManagedServiceIdentity.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ManagedServiceIdentity.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/ManagedServiceIdentity.TypeConverter.cs index ddde9d1dcc18..22ed82629486 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ManagedServiceIdentity.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ManagedServiceIdentity.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ManagedServiceIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ManagedServiceIdentity.cs similarity index 79% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ManagedServiceIdentity.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/ManagedServiceIdentity.cs index 923acd9e4653..4dd9db8c680a 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ManagedServiceIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ManagedServiceIdentity.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; /// Managed service identity (system assigned and/or user assigned identities) public partial class ManagedServiceIdentity : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal { /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } /// Internal Acessors for TenantId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } /// Backing field for property. private string _principalId; @@ -38,16 +38,16 @@ public partial class ManagedServiceIdentity : public string TenantId { get => this._tenantId; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType _type; + private string _type; /// /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). /// [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType Type { get => this._type; set => this._type = value; } + public string Type { get => this._type; set => this._type = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities _userAssignedIdentity; + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities _userAssignedIdentity; /// /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM @@ -55,7 +55,7 @@ public partial class ManagedServiceIdentity : /// The dictionary values can be empty objects ({}) in requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities UserAssignedIdentity { get => (this._userAssignedIdentity = this._userAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.UserAssignedIdentities()); set => this._userAssignedIdentity = value; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities UserAssignedIdentity { get => (this._userAssignedIdentity = this._userAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentities()); set => this._userAssignedIdentity = value; } /// Creates an new instance. public ManagedServiceIdentity() @@ -73,6 +73,9 @@ public partial interface IManagedServiceIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) })] @@ -83,6 +86,9 @@ public partial interface IManagedServiceIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) })] @@ -93,10 +99,14 @@ public partial interface IManagedServiceIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = true, 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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType Type { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + string Type { 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}. @@ -105,10 +115,13 @@ public partial interface IManagedServiceIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities) })] - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities UserAssignedIdentity { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities UserAssignedIdentity { get; set; } } /// Managed service identity (system assigned and/or user assigned identities) @@ -126,13 +139,14 @@ internal partial interface IManagedServiceIdentityInternal /// /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType Type { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + string Type { 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. /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities UserAssignedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities UserAssignedIdentity { get; set; } } } \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ManagedServiceIdentity.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ManagedServiceIdentity.json.cs similarity index 92% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ManagedServiceIdentity.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/ManagedServiceIdentity.json.cs index 71890b1343d1..30a79587550d 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/ManagedServiceIdentity.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ManagedServiceIdentity.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedServiceIdentity partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IManagedServiceIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IManagedServiceIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new ManagedServiceIdentity(json) : null; } @@ -77,10 +77,10 @@ internal ManagedServiceIdentity(Microsoft.Azure.PowerShell.Cmdlets.StorageMover. { return; } - {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId;} - {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)TenantId;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentities"), out var __jsonUserAssignedIdentities) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.UserAssignedIdentities.FromJson(__jsonUserAssignedIdentities) : UserAssignedIdentity;} + {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)_principalId;} + {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)_tenantId;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentities"), out var __jsonUserAssignedIdentities) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentities.FromJson(__jsonUserAssignedIdentities) : _userAssignedIdentity;} AfterFromJson(json); } @@ -103,11 +103,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId" ,container.Add ); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointProperties.PowerShell.cs new file mode 100644 index 000000000000..fb06270c123a --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointProperties.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The properties of NFS share endpoint. + [System.ComponentModel.TypeConverter(typeof(NfsMountEndpointPropertiesTypeConverter))] + public partial class NfsMountEndpointProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new NfsMountEndpointProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new NfsMountEndpointProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal NfsMountEndpointProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Host")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointPropertiesInternal)this).Host = (string) content.GetValueForProperty("Host",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointPropertiesInternal)this).Host, global::System.Convert.ToString); + } + if (content.Contains("NfsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointPropertiesInternal)this).NfsVersion = (string) content.GetValueForProperty("NfsVersion",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointPropertiesInternal)this).NfsVersion, global::System.Convert.ToString); + } + if (content.Contains("Export")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointPropertiesInternal)this).Export = (string) content.GetValueForProperty("Export",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointPropertiesInternal)this).Export, global::System.Convert.ToString); + } + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState, 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 NfsMountEndpointProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Host")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointPropertiesInternal)this).Host = (string) content.GetValueForProperty("Host",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointPropertiesInternal)this).Host, global::System.Convert.ToString); + } + if (content.Contains("NfsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointPropertiesInternal)this).NfsVersion = (string) content.GetValueForProperty("NfsVersion",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointPropertiesInternal)this).NfsVersion, global::System.Convert.ToString); + } + if (content.Contains("Export")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointPropertiesInternal)this).Export = (string) content.GetValueForProperty("Export",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointPropertiesInternal)this).Export, global::System.Convert.ToString); + } + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of NFS share endpoint. + [System.ComponentModel.TypeConverter(typeof(NfsMountEndpointPropertiesTypeConverter))] + public partial interface INfsMountEndpointProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointProperties.TypeConverter.cs index 2de052550067..fb47623ac6bf 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointProperties.cs new file mode 100644 index 000000000000..0e7c8c7afc3f --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointProperties.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The properties of NFS share endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class NfsMountEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseProperties(); + + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description = value ?? null; } + + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string EndpointType { get => "NfsMount"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType = "NfsMount"; } + + /// Backing field for property. + private string _export; + + /// The directory being exported from the server. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Export { get => this._export; set => this._export = value; } + + /// Backing field for property. + private string _host; + + /// The host name or IP address of the server exporting the file system. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Host { get => this._host; set => this._host = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState = value ?? null; } + + /// Backing field for property. + private string _nfsVersion; + + /// The NFS protocol version. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string NfsVersion { get => this._nfsVersion; set => this._nfsVersion = value; } + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; } + + /// Creates an new instance. + public NfsMountEndpointProperties() + { + this.__endpointBaseProperties.EndpointType = "NfsMount"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__endpointBaseProperties), __endpointBaseProperties); + await eventListener.AssertObjectIsValid(nameof(__endpointBaseProperties), __endpointBaseProperties); + } + } + /// The properties of NFS share endpoint. + public partial interface INfsMountEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties + { + /// The directory being exported from the server. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The directory being exported from the server.", + SerializedName = @"export", + PossibleTypes = new [] { typeof(string) })] + string Export { get; set; } + /// The host name or IP address of the server exporting the file system. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The host name or IP address of the server exporting the file system.", + SerializedName = @"host", + PossibleTypes = new [] { typeof(string) })] + string Host { get; set; } + /// The NFS protocol version. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The NFS protocol version.", + SerializedName = @"nfsVersion", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("NFSauto", "NFSv3", "NFSv4")] + string NfsVersion { get; set; } + + } + /// The properties of NFS share endpoint. + internal partial interface INfsMountEndpointPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal + { + /// The directory being exported from the server. + string Export { get; set; } + /// The host name or IP address of the server exporting the file system. + string Host { get; set; } + /// The NFS protocol version. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("NFSauto", "NFSv3", "NFSv4")] + string NfsVersion { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointProperties.json.cs similarity index 77% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointProperties.json.cs index 7c25e9432055..7b96b6d9202b 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class NfsMountEndpointProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new NfsMountEndpointProperties(json) : null; } @@ -77,10 +77,10 @@ internal NfsMountEndpointProperties(Microsoft.Azure.PowerShell.Cmdlets.StorageMo { return; } - __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseProperties(json); - {_host = If( json?.PropertyT("host"), out var __jsonHost) ? (string)__jsonHost : (string)Host;} - {_nfsVersion = If( json?.PropertyT("nfsVersion"), out var __jsonNfsVersion) ? (string)__jsonNfsVersion : (string)NfsVersion;} - {_export = If( json?.PropertyT("export"), out var __jsonExport) ? (string)__jsonExport : (string)Export;} + __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseProperties(json); + {_host = If( json?.PropertyT("host"), out var __jsonHost) ? (string)__jsonHost : (string)_host;} + {_nfsVersion = If( json?.PropertyT("nfsVersion"), out var __jsonNfsVersion) ? (string)__jsonNfsVersion : (string)_nfsVersion;} + {_export = If( json?.PropertyT("export"), out var __jsonExport) ? (string)__jsonExport : (string)_export;} AfterFromJson(json); } @@ -104,9 +104,18 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ return container; } __endpointBaseProperties?.ToJson(container, serializationMode); - AddIf( null != (((object)this._host)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._host.ToString()) : null, "host" ,container.Add ); - AddIf( null != (((object)this._nfsVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._nfsVersion.ToString()) : null, "nfsVersion" ,container.Add ); - AddIf( null != (((object)this._export)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._export.ToString()) : null, "export" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._host)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._host.ToString()) : null, "host" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._nfsVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._nfsVersion.ToString()) : null, "nfsVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._export)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._export.ToString()) : null, "export" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointUpdateProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointUpdateProperties.PowerShell.cs similarity index 77% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointUpdateProperties.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointUpdateProperties.PowerShell.cs index b76f43653306..e6208ea60d5a 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointUpdateProperties.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointUpdateProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -62,29 +62,27 @@ public partial class NfsMountEndpointUpdateProperties 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new NfsMountEndpointUpdateProperties(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new NfsMountEndpointUpdateProperties(content); } @@ -94,10 +92,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. @@ -112,17 +110,17 @@ internal NfsMountEndpointUpdateProperties(global::System.Collections.IDictionary // actually deserialize if (content.Contains("EndpointType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description, 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. @@ -137,11 +135,11 @@ internal NfsMountEndpointUpdateProperties(global::System.Management.Automation.P // actually deserialize if (content.Contains("EndpointType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointUpdateProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointUpdateProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointUpdateProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointUpdateProperties.TypeConverter.cs index 528f6a5cae9b..501e5d5fc1e4 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointUpdateProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointUpdateProperties.cs new file mode 100644 index 000000000000..066b5fe7cd40 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointUpdateProperties.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class NfsMountEndpointUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointUpdatePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateProperties(); + + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description = value ?? null; } + + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string EndpointType { get => "NfsMount"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType = "NfsMount"; } + + /// Creates an new instance. + public NfsMountEndpointUpdateProperties() + { + this.__endpointBaseUpdateProperties.EndpointType = "NfsMount"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); + await eventListener.AssertObjectIsValid(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); + } + } + public partial interface INfsMountEndpointUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties + { + + } + internal partial interface INfsMountEndpointUpdatePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointUpdateProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointUpdateProperties.json.cs similarity index 93% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointUpdateProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointUpdateProperties.json.cs index 228d5a5afa62..fb4b877e53ee 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/NfsMountEndpointUpdateProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/NfsMountEndpointUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -53,13 +53,13 @@ public partial class NfsMountEndpointUpdateProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.INfsMountEndpointUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.INfsMountEndpointUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new NfsMountEndpointUpdateProperties(json) : null; } @@ -76,7 +76,7 @@ internal NfsMountEndpointUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Sto { return; } - __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateProperties(json); + __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateProperties(json); AfterFromJson(json); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Operation.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Operation.PowerShell.cs new file mode 100644 index 000000000000..b9e28a17134a --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Operation.PowerShell.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// Details of a REST API operation, returned from the Resource Provider Operations API + /// + [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] + public partial class Operation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Operation(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Operation(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Operation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.OperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("IsDataAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); + } + if (content.Contains("ActionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).ActionType, global::System.Convert.ToString); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Operation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.OperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("IsDataAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); + } + if (content.Contains("ActionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).ActionType, global::System.Convert.ToString); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); + } + } + /// Details of a REST API operation, returned from the Resource Provider Operations API + [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] + public partial interface IOperation + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Operation.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Operation.TypeConverter.cs new file mode 100644 index 000000000000..2dd7da861b3c --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Operation.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Operation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Operation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Operation.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Operation.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Operation.cs new file mode 100644 index 000000000000..b0dd88fb91c1 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Operation.cs @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// Details of a REST API operation, returned from the Resource Provider Operations API + /// + public partial class Operation : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal + { + + /// Backing field for property. + private string _actionType; + + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string ActionType { get => this._actionType; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplay _display; + + /// Localized display information for this particular operation. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.OperationDisplay()); set => this._display = value; } + + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)Display).Description; } + + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)Display).Operation; } + + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)Display).Provider; } + + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)Display).Resource; } + + /// Backing field for property. + private bool? _isDataAction; + + /// + /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + /// operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public bool? IsDataAction { get => this._isDataAction; } + + /// Internal Acessors for ActionType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal.ActionType { get => this._actionType; set { {_actionType = value;} } } + + /// Internal Acessors for Display + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.OperationDisplay()); set { {_display = value;} } } + + /// Internal Acessors for DisplayDescription + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)Display).Description = value ?? null; } + + /// Internal Acessors for DisplayOperation + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)Display).Operation = value ?? null; } + + /// Internal Acessors for DisplayProvider + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)Display).Provider = value ?? null; } + + /// Internal Acessors for DisplayResource + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)Display).Resource = value ?? null; } + + /// Internal Acessors for IsDataAction + bool? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for Origin + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationInternal.Origin { get => this._origin; set { {_origin = value;} } } + + /// Backing field for property. + private string _name; + + /// + /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + /// "Microsoft.Compute/virtualMachines/capture/action" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private string _origin; + + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Origin { get => this._origin; } + + /// Creates an new instance. + public Operation() + { + + } + } + /// Details of a REST API operation, returned from the Resource Provider Operations API + public partial interface IOperation : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Enum. Indicates the action type. ""Internal"" refers to actions that are for internal only APIs.", + SerializedName = @"actionType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Internal")] + string ActionType { get; } + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string DisplayDescription { get; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string DisplayOperation { get; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string DisplayProvider { get; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string DisplayResource { get; } + /// + /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + /// operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Whether the operation applies to data-plane. This is ""true"" for data-plane operations and ""false"" for ARM/control-plane operations.", + SerializedName = @"isDataAction", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDataAction { get; } + /// + /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + /// "Microsoft.Compute/virtualMachines/capture/action" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the operation, as per Resource-Based Access Control (RBAC). Examples: ""Microsoft.Compute/virtualMachines/write"", ""Microsoft.Compute/virtualMachines/capture/action""", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is ""user,system""", + SerializedName = @"origin", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("user", "system", "user,system")] + string Origin { get; } + + } + /// Details of a REST API operation, returned from the Resource Provider Operations API + internal partial interface IOperationInternal + + { + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Internal")] + string ActionType { get; set; } + /// Localized display information for this particular operation. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplay Display { get; set; } + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + string DisplayDescription { get; set; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + string DisplayOperation { get; set; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + string DisplayProvider { get; set; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + string DisplayResource { get; set; } + /// + /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + /// operations. + /// + bool? IsDataAction { get; set; } + /// + /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + /// "Microsoft.Compute/virtualMachines/capture/action" + /// + string Name { get; set; } + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("user", "system", "user,system")] + string Origin { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Operation.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Operation.json.cs new file mode 100644 index 000000000000..6391b58ceb22 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Operation.json.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// Details of a REST API operation, returned from the Resource Provider Operations API + /// + public partial class Operation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new Operation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. + internal Operation(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.OperationDisplay.FromJson(__jsonDisplay) : _display;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : _isDataAction;} + {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)_origin;} + {_actionType = If( json?.PropertyT("actionType"), out var __jsonActionType) ? (string)__jsonActionType : (string)_actionType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._actionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._actionType.ToString()) : null, "actionType" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs new file mode 100644 index 000000000000..45e66038933a --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// Localized display information for this particular operation. + [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] + public partial class OperationDisplay + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationDisplay(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationDisplay(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationDisplay(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationDisplay(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); + } + } + /// Localized display information for this particular operation. + [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] + public partial interface IOperationDisplay + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs new file mode 100644 index 000000000000..5d8a3814cac9 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationDisplayTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplay ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplay).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationDisplay.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationDisplay.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationDisplay.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationDisplay.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationDisplay.cs new file mode 100644 index 000000000000..46162cfb0013 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationDisplay.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// Localized display information for this particular operation. + public partial class OperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplay, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal + { + + /// Backing field for property. + private string _description; + + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Description { get => this._description; } + + /// Internal Acessors for Description + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } + + /// Internal Acessors for Operation + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } + + /// Internal Acessors for Provider + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } + + /// Internal Acessors for Resource + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } + + /// Backing field for property. + private string _operation; + + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Operation { get => this._operation; } + + /// Backing field for property. + private string _provider; + + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Provider { get => this._provider; } + + /// Backing field for property. + private string _resource; + + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Resource { get => this._resource; } + + /// Creates an new instance. + public OperationDisplay() + { + + } + } + /// Localized display information for this particular operation. + public partial interface IOperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string Operation { get; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string Provider { get; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string Resource { get; } + + } + /// Localized display information for this particular operation. + internal partial interface IOperationDisplayInternal + + { + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + string Description { get; set; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + string Operation { get; set; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + string Provider { get; set; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + string Resource { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationDisplay.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationDisplay.json.cs new file mode 100644 index 000000000000..e9e395a8e192 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationDisplay.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// Localized display information for this particular operation. + public partial class OperationDisplay + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplay. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplay. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. + internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)_provider;} + {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)_resource;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)_operation;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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/StorageMover/StorageMover.Autorest/generated/api/Models/OperationListResult.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationListResult.PowerShell.cs new file mode 100644 index 000000000000..0970d3814678 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationListResult.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + /// + [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] + public partial class OperationListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); + } + } + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] + public partial interface IOperationListResult + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs new file mode 100644 index 000000000000..cf9d42453522 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationListResult.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationListResult.cs new file mode 100644 index 000000000000..1fa4603e8607 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationListResult.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + /// + public partial class OperationListResult : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResult, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of operation list results (if there are any). + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// List of operations supported by the resource provider + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public OperationListResult() + { + + } + } + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + public partial interface IOperationListResult : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// URL to get the next set of operation list results (if there are any). + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"URL to get the next set of operation list results (if there are any).", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// List of operations supported by the resource provider + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of operations supported by the resource provider", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation) })] + System.Collections.Generic.List Value { get; } + + } + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + internal partial interface IOperationListResultInternal + + { + /// URL to get the next set of operation list results (if there are any). + string NextLink { get; set; } + /// List of operations supported by the resource provider + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationListResult.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationListResult.json.cs new file mode 100644 index 000000000000..90d081d156f5 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/OperationListResult.json.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + /// + public partial class OperationListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new OperationListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. + internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Operation.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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/StorageMover/StorageMover.Autorest/generated/api/Models/Project.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Project.PowerShell.cs new file mode 100644 index 000000000000..f59447d850e2 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Project.PowerShell.cs @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The Project resource. + [System.ComponentModel.TypeConverter(typeof(ProjectTypeConverter))] + public partial class Project + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Project(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Project(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Project(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectInternal)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 Project(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Project resource. + [System.ComponentModel.TypeConverter(typeof(ProjectTypeConverter))] + public partial interface IProject + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Project.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Project.TypeConverter.cs new file mode 100644 index 000000000000..27fde53f2775 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Project.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Project.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Project.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Project.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/StorageMover/StorageMover.Autorest/generated/api/Models/Project.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Project.cs new file mode 100644 index 000000000000..58f2320ee467 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Project.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The Project resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class Project : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProxyResource(); + + /// A description for the Project. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectPropertiesInternal)Property).Description = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectPropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectProperties _property; + + /// Project properties. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectProperties()); set => this._property = value; } + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public Project() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// The Project resource. + public partial interface IProject : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource + { + /// A description for the Project. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Project.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The provisioning state of this resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; } + + } + /// The Project resource. + internal partial interface IProjectInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResourceInternal + { + /// A description for the Project. + string Description { get; set; } + /// Project properties. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectProperties Property { get; set; } + /// The provisioning state of this resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Project.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Project.json.cs new file mode 100644 index 000000000000..52767dd8f5d1 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Project.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The Project resource. + public partial class Project + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new Project(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. + internal Project(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectList.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectList.PowerShell.cs similarity index 77% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectList.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectList.PowerShell.cs index 6abf4402d4ee..b546c8459ac5 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectList.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class ProjectList 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProjectList(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProjectList(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. @@ -111,17 +111,17 @@ internal ProjectList(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ProjectTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectListInternal)this).NextLink, 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. @@ -136,11 +136,11 @@ internal ProjectList(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ProjectTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectList.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectList.TypeConverter.cs similarity index 98% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectList.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectList.TypeConverter.cs index 892cfd3703d5..1c31e95c96d3 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectList.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectList.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectList.cs new file mode 100644 index 000000000000..29666ba894cf --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectList.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// List of Project resources. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class ProjectList : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectList, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectListInternal + { + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectListInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The Project items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public ProjectList() + { + + } + } + /// List of Project resources. + public partial interface IProjectList : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Project items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Project items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject) })] + System.Collections.Generic.List Value { get; } + + } + /// List of Project resources. + internal partial interface IProjectListInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The Project items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectList.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectList.json.cs similarity index 90% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectList.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectList.json.cs index 02f89c4db2e4..f49dd67acae3 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectList.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ProjectList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectList FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectList FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new ProjectList(json) : null; } @@ -77,8 +77,8 @@ internal ProjectList(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Jso { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Project.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Project.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectProperties.PowerShell.cs new file mode 100644 index 000000000000..0fa6ae7a292e --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectProperties.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// Project properties. + [System.ComponentModel.TypeConverter(typeof(ProjectPropertiesTypeConverter))] + public partial class ProjectProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProjectProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProjectProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProjectProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectPropertiesInternal)this).ProvisioningState, 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 ProjectProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); + } + } + /// Project properties. + [System.ComponentModel.TypeConverter(typeof(ProjectPropertiesTypeConverter))] + public partial interface IProjectProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectProperties.TypeConverter.cs new file mode 100644 index 000000000000..cb1b109ff89c --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProjectProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProjectProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProjectProperties.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/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectProperties.cs new file mode 100644 index 000000000000..a13b456b2f21 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectProperties.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// Project properties. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class ProjectProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectPropertiesInternal + { + + /// Backing field for property. + private string _description; + + /// A description for the Project. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Creates an new instance. + public ProjectProperties() + { + + } + } + /// Project properties. + public partial interface IProjectProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// A description for the Project. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Project.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The provisioning state of this resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; } + + } + /// Project properties. + internal partial interface IProjectPropertiesInternal + + { + /// A description for the Project. + string Description { get; set; } + /// The provisioning state of this resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectProperties.json.cs new file mode 100644 index 000000000000..42edcec3da48 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectProperties.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// Project properties. + public partial class ProjectProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new ProjectProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. + internal ProjectProperties(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateParameters.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateParameters.PowerShell.cs similarity index 77% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateParameters.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateParameters.PowerShell.cs index 19276af7e2aa..ab3b5240243f 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateParameters.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class ProjectUpdateParameters 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ProjectUpdateParameters(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ProjectUpdateParameters(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. @@ -113,17 +111,17 @@ internal ProjectUpdateParameters(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ProjectUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParametersInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParametersInternal)this).Description, 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. @@ -138,11 +136,11 @@ internal ProjectUpdateParameters(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ProjectUpdatePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectUpdatePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParametersInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParametersInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateParameters.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateParameters.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateParameters.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateParameters.TypeConverter.cs index 566564bd0f04..9b35531ae8d6 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateParameters.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateParameters.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateParameters.cs new file mode 100644 index 000000000000..0aeafe88102a --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateParameters.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The Project resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class ProjectUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParametersInternal + { + + /// A description for the Project. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdatePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdatePropertiesInternal)Property).Description = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectUpdateProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateProperties _property; + + /// Project properties. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectUpdateProperties()); set => this._property = value; } + + /// Creates an new instance. + public ProjectUpdateParameters() + { + + } + } + /// The Project resource. + public partial interface IProjectUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// A description for the Project. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Project.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + + } + /// The Project resource. + internal partial interface IProjectUpdateParametersInternal + + { + /// A description for the Project. + string Description { get; set; } + /// Project properties. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateParameters.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateParameters.json.cs similarity index 94% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateParameters.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateParameters.json.cs index e054388e3832..811a3285f5cf 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/ProjectUpdateParameters.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ProjectUpdateParameters partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new ProjectUpdateParameters(json) : null; } @@ -77,7 +77,7 @@ internal ProjectUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.StorageMover { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ProjectUpdateProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectUpdateProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..8db814cebe9e --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateProperties.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// Project properties. + [System.ComponentModel.TypeConverter(typeof(ProjectUpdatePropertiesTypeConverter))] + public partial class ProjectUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProjectUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProjectUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProjectUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdatePropertiesInternal)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 ProjectUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); + } + } + /// Project properties. + [System.ComponentModel.TypeConverter(typeof(ProjectUpdatePropertiesTypeConverter))] + public partial interface IProjectUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..79bac6e2ac25 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProjectUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProjectUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProjectUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProjectUpdateProperties.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/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateProperties.cs new file mode 100644 index 000000000000..dcb020829931 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateProperties.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// Project properties. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class ProjectUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdatePropertiesInternal + { + + /// Backing field for property. + private string _description; + + /// A description for the Project. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Creates an new instance. + public ProjectUpdateProperties() + { + + } + } + /// Project properties. + public partial interface IProjectUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// A description for the Project. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Project.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + + } + /// Project properties. + internal partial interface IProjectUpdatePropertiesInternal + + { + /// A description for the Project. + string Description { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateProperties.json.cs new file mode 100644 index 000000000000..49847b61139e --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProjectUpdateProperties.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// Project properties. + public partial class ProjectUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new ProjectUpdateProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. + internal ProjectUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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/StorageMover/StorageMover.Autorest/generated/api/Models/ProxyResource.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProxyResource.PowerShell.cs new file mode 100644 index 000000000000..bfa0931f9e4c --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProxyResource.PowerShell.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial class ProxyResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProxyResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProxyResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProxyResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProxyResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial interface IProxyResource + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs new file mode 100644 index 000000000000..66a52560f072 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProxyResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProxyResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProxyResource.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProxyResource.cs new file mode 100644 index 000000000000..6a093777f7d4 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProxyResource.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Resource(); + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProxyResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + public partial interface IProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResource + { + + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + internal partial interface IProxyResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProxyResource.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProxyResource.json.cs new file mode 100644 index 000000000000..506f3a49ec3a --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/ProxyResource.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. + internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Resource(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Recurrence.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Recurrence.PowerShell.cs new file mode 100644 index 000000000000..2fe27cfd55db --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Recurrence.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The schedule recurrence. + [System.ComponentModel.TypeConverter(typeof(RecurrenceTypeConverter))] + public partial class Recurrence + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrence DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Recurrence(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrence DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Recurrence(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrence FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Recurrence(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TimeTypeConverter.ConvertFrom); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TimeTypeConverter.ConvertFrom); + } + if (content.Contains("StartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeHour = (int) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartTimeMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeMinute = (int?) content.GetValueForProperty("StartTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeHour = (int) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeMinute = (int?) content.GetValueForProperty("EndTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Recurrence(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TimeTypeConverter.ConvertFrom); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TimeTypeConverter.ConvertFrom); + } + if (content.Contains("StartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeHour = (int) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartTimeMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeMinute = (int?) content.GetValueForProperty("StartTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeHour = (int) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeMinute = (int?) content.GetValueForProperty("EndTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 schedule recurrence. + [System.ComponentModel.TypeConverter(typeof(RecurrenceTypeConverter))] + public partial interface IRecurrence + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Recurrence.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Recurrence.TypeConverter.cs similarity index 98% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Recurrence.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/Recurrence.TypeConverter.cs index a3a7098360c3..1337ad533073 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Recurrence.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Recurrence.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrence ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrence ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrence).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrence).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Recurrence.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Recurrence.cs similarity index 76% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Recurrence.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/Recurrence.cs index d1a0cffd0e3f..97e349acacac 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Recurrence.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Recurrence.cs @@ -3,65 +3,65 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; /// The schedule recurrence. public partial class Recurrence : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrence, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrence, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime _endTime; + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime _endTime; /// /// The end time of the schedule recurrence. Full hour and 30-minute intervals are supported. /// [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime EndTime { get => (this._endTime = this._endTime ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Time()); set => this._endTime = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime EndTime { get => (this._endTime = this._endTime ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Time()); set => this._endTime = value; } /// /// The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). /// Hour value 24 cannot be combined with any other minute value but 0. /// [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public int EndTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)EndTime).Hour; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)EndTime).Hour = value ; } + public int EndTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)EndTime).Hour; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)EndTime).Hour = value ; } /// /// The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. /// [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public int? EndTimeMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)EndTime).Minute; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)EndTime).Minute = value ?? default(int); } + public int? EndTimeMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)EndTime).Minute; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)EndTime).Minute = value ?? default(int); } /// Internal Acessors for EndTime - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal.EndTime { get => (this._endTime = this._endTime ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Time()); set { {_endTime = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal.EndTime { get => (this._endTime = this._endTime ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Time()); set { {_endTime = value;} } } /// Internal Acessors for StartTime - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrenceInternal.StartTime { get => (this._startTime = this._startTime ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Time()); set { {_startTime = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal.StartTime { get => (this._startTime = this._startTime ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Time()); set { {_startTime = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime _startTime; + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime _startTime; /// /// The start time of the schedule recurrence. Full hour and 30-minute intervals are supported. /// [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime StartTime { get => (this._startTime = this._startTime ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Time()); set => this._startTime = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime StartTime { get => (this._startTime = this._startTime ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Time()); set => this._startTime = value; } /// /// The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). /// Hour value 24 cannot be combined with any other minute value but 0. /// [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public int StartTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)StartTime).Hour; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)StartTime).Hour = value ; } + public int StartTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)StartTime).Hour; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)StartTime).Hour = value ; } /// /// The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. /// [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] - public int? StartTimeMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)StartTime).Minute; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)StartTime).Minute = value ?? default(int); } + public int? StartTimeMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)StartTime).Minute; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)StartTime).Minute = value ?? default(int); } /// Creates an new instance. public Recurrence() @@ -80,6 +80,9 @@ public partial interface IRecurrence : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). Hour value 24 cannot be combined with any other minute value but 0.", SerializedName = @"hour", PossibleTypes = new [] { typeof(int) })] @@ -90,6 +93,9 @@ public partial interface IRecurrence : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0.", SerializedName = @"minute", PossibleTypes = new [] { typeof(int) })] @@ -101,6 +107,9 @@ public partial interface IRecurrence : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). Hour value 24 cannot be combined with any other minute value but 0.", SerializedName = @"hour", PossibleTypes = new [] { typeof(int) })] @@ -111,6 +120,9 @@ public partial interface IRecurrence : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0.", SerializedName = @"minute", PossibleTypes = new [] { typeof(int) })] @@ -124,7 +136,7 @@ internal partial interface IRecurrenceInternal /// /// The end time of the schedule recurrence. Full hour and 30-minute intervals are supported. /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime EndTime { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime EndTime { get; set; } /// /// The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). /// Hour value 24 cannot be combined with any other minute value but 0. @@ -137,7 +149,7 @@ internal partial interface IRecurrenceInternal /// /// The start time of the schedule recurrence. Full hour and 30-minute intervals are supported. /// - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime StartTime { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime StartTime { get; set; } /// /// The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). /// Hour value 24 cannot be combined with any other minute value but 0. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Recurrence.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Recurrence.json.cs similarity index 94% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Recurrence.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/Recurrence.json.cs index f4dc107083f6..986973423f1f 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Recurrence.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Recurrence.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Recurrence partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrence. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrence. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrence. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrence. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IRecurrence FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrence FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new Recurrence(json) : null; } @@ -77,8 +77,8 @@ internal Recurrence(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json { return; } - {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Time.FromJson(__jsonStartTime) : StartTime;} - {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Time.FromJson(__jsonEndTime) : EndTime;} + {_startTime = If( json?.PropertyT("startTime"), out var __jsonStartTime) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Time.FromJson(__jsonStartTime) : _startTime;} + {_endTime = If( json?.PropertyT("endTime"), out var __jsonEndTime) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Time.FromJson(__jsonEndTime) : _endTime;} AfterFromJson(json); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Resource.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Resource.PowerShell.cs new file mode 100644 index 000000000000..83d516b33c49 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Resource.PowerShell.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial class Resource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Resource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Resource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Resource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Resource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); + } + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial interface IResource + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Resource.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Resource.TypeConverter.cs new file mode 100644 index 000000000000..f821e345888e --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Resource.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Resource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Resource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Resource.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/StorageMover/StorageMover.Autorest/generated/api/Models/Resource.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Resource.cs new file mode 100644 index 000000000000..9bbb0814d5e2 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Resource.cs @@ -0,0 +1,257 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResource, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal + { + + /// Backing field for property. + private string _id; + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData _systemData; + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).CreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).CreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).CreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).LastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).LastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)SystemData).LastModifiedByType; } + + /// Backing field for property. + private string _type; + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public Resource() + { + + } + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + public partial interface IResource : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the resource", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + internal partial interface IResourceInternal + + { + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + string Id { get; set; } + /// The name of the resource + string Name { get; set; } + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Resource.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Resource.json.cs new file mode 100644 index 000000000000..e8f966a6b5d5 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Resource.json.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new Resource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. + internal Resource(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointProperties.PowerShell.cs new file mode 100644 index 000000000000..8d56a0bc113d --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointProperties.PowerShell.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The properties of SMB share endpoint. + [System.ComponentModel.TypeConverter(typeof(SmbMountEndpointPropertiesTypeConverter))] + public partial class SmbMountEndpointProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SmbMountEndpointProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SmbMountEndpointProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SmbMountEndpointProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Credentials")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).Credentials = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials) content.GetValueForProperty("Credentials",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).Credentials, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureKeyVaultSmbCredentialsTypeConverter.ConvertFrom); + } + if (content.Contains("Host")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).Host = (string) content.GetValueForProperty("Host",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).Host, global::System.Convert.ToString); + } + if (content.Contains("ShareName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).ShareName = (string) content.GetValueForProperty("ShareName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).ShareName, global::System.Convert.ToString); + } + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("CredentialsType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).CredentialsType = (string) content.GetValueForProperty("CredentialsType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).CredentialsType, global::System.Convert.ToString); + } + if (content.Contains("CredentialsUsernameUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).CredentialsUsernameUri = (string) content.GetValueForProperty("CredentialsUsernameUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).CredentialsUsernameUri, global::System.Convert.ToString); + } + if (content.Contains("CredentialsPasswordUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).CredentialsPasswordUri = (string) content.GetValueForProperty("CredentialsPasswordUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).CredentialsPasswordUri, 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 SmbMountEndpointProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Credentials")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).Credentials = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials) content.GetValueForProperty("Credentials",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).Credentials, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureKeyVaultSmbCredentialsTypeConverter.ConvertFrom); + } + if (content.Contains("Host")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).Host = (string) content.GetValueForProperty("Host",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).Host, global::System.Convert.ToString); + } + if (content.Contains("ShareName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).ShareName = (string) content.GetValueForProperty("ShareName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).ShareName, global::System.Convert.ToString); + } + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("CredentialsType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).CredentialsType = (string) content.GetValueForProperty("CredentialsType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).CredentialsType, global::System.Convert.ToString); + } + if (content.Contains("CredentialsUsernameUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).CredentialsUsernameUri = (string) content.GetValueForProperty("CredentialsUsernameUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).CredentialsUsernameUri, global::System.Convert.ToString); + } + if (content.Contains("CredentialsPasswordUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).CredentialsPasswordUri = (string) content.GetValueForProperty("CredentialsPasswordUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal)this).CredentialsPasswordUri, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of SMB share endpoint. + [System.ComponentModel.TypeConverter(typeof(SmbMountEndpointPropertiesTypeConverter))] + public partial interface ISmbMountEndpointProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointProperties.TypeConverter.cs index 372a569500be..b18652cea941 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointProperties.cs new file mode 100644 index 000000000000..f2798f60dec8 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointProperties.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The properties of SMB share endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class SmbMountEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseProperties(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials _credentials; + + /// + /// The Azure Key Vault secret URIs which store the required credentials to access the SMB share. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials Credentials { get => (this._credentials = this._credentials ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureKeyVaultSmbCredentials()); set => this._credentials = value; } + + /// + /// The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string CredentialsPasswordUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)Credentials).PasswordUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)Credentials).PasswordUri = value ?? null; } + + /// The Credentials type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string CredentialsType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)Credentials).Type; } + + /// + /// The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string CredentialsUsernameUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)Credentials).UsernameUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)Credentials).UsernameUri = value ?? null; } + + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).Description = value ?? null; } + + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string EndpointType { get => "SmbMount"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).EndpointType = "SmbMount"; } + + /// Backing field for property. + private string _host; + + /// The host name or IP address of the server exporting the file system. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Host { get => this._host; set => this._host = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState = value ?? null; } + + /// Internal Acessors for Credentials + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal.Credentials { get => (this._credentials = this._credentials ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureKeyVaultSmbCredentials()); set { {_credentials = value;} } } + + /// Internal Acessors for CredentialsType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointPropertiesInternal.CredentialsType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)Credentials).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)Credentials).Type = value ?? null; } + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal)__endpointBaseProperties).ProvisioningState; } + + /// Backing field for property. + private string _shareName; + + /// The name of the SMB share being exported from the server. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string ShareName { get => this._shareName; set => this._shareName = value; } + + /// Creates an new instance. + public SmbMountEndpointProperties() + { + this.__endpointBaseProperties.EndpointType = "SmbMount"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__endpointBaseProperties), __endpointBaseProperties); + await eventListener.AssertObjectIsValid(nameof(__endpointBaseProperties), __endpointBaseProperties); + } + } + /// The properties of SMB share endpoint. + public partial interface ISmbMountEndpointProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties + { + /// + /// The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value.", + SerializedName = @"passwordUri", + PossibleTypes = new [] { typeof(string) })] + string CredentialsPasswordUri { get; set; } + /// The Credentials type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = true, + Update = true, + Description = @"The Credentials type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string CredentialsType { get; } + /// + /// The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value.", + SerializedName = @"usernameUri", + PossibleTypes = new [] { typeof(string) })] + string CredentialsUsernameUri { get; set; } + /// The host name or IP address of the server exporting the file system. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The host name or IP address of the server exporting the file system.", + SerializedName = @"host", + PossibleTypes = new [] { typeof(string) })] + string Host { get; set; } + /// The name of the SMB share being exported from the server. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The name of the SMB share being exported from the server.", + SerializedName = @"shareName", + PossibleTypes = new [] { typeof(string) })] + string ShareName { get; set; } + + } + /// The properties of SMB share endpoint. + internal partial interface ISmbMountEndpointPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBasePropertiesInternal + { + /// + /// The Azure Key Vault secret URIs which store the required credentials to access the SMB share. + /// + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials Credentials { get; set; } + /// + /// The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value. + /// + string CredentialsPasswordUri { get; set; } + /// The Credentials type. + string CredentialsType { get; set; } + /// + /// The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value. + /// + string CredentialsUsernameUri { get; set; } + /// The host name or IP address of the server exporting the file system. + string Host { get; set; } + /// The name of the SMB share being exported from the server. + string ShareName { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointProperties.json.cs similarity index 81% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointProperties.json.cs index 4814569a8993..eb28008d3288 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SmbMountEndpointProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new SmbMountEndpointProperties(json) : null; } @@ -77,10 +77,10 @@ internal SmbMountEndpointProperties(Microsoft.Azure.PowerShell.Cmdlets.StorageMo { return; } - __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseProperties(json); - {_credentials = If( json?.PropertyT("credentials"), out var __jsonCredentials) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureKeyVaultSmbCredentials.FromJson(__jsonCredentials) : Credentials;} - {_host = If( json?.PropertyT("host"), out var __jsonHost) ? (string)__jsonHost : (string)Host;} - {_shareName = If( json?.PropertyT("shareName"), out var __jsonShareName) ? (string)__jsonShareName : (string)ShareName;} + __endpointBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseProperties(json); + {_credentials = If( json?.PropertyT("credentials"), out var __jsonCredentials) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureKeyVaultSmbCredentials.FromJson(__jsonCredentials) : _credentials;} + {_host = If( json?.PropertyT("host"), out var __jsonHost) ? (string)__jsonHost : (string)_host;} + {_shareName = If( json?.PropertyT("shareName"), out var __jsonShareName) ? (string)__jsonShareName : (string)_shareName;} AfterFromJson(json); } @@ -105,8 +105,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ } __endpointBaseProperties?.ToJson(container, serializationMode); AddIf( null != this._credentials ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._credentials.ToJson(null,serializationMode) : null, "credentials" ,container.Add ); - AddIf( null != (((object)this._host)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._host.ToString()) : null, "host" ,container.Add ); - AddIf( null != (((object)this._shareName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._shareName.ToString()) : null, "shareName" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._host)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._host.ToString()) : null, "host" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._shareName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._shareName.ToString()) : null, "shareName" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointUpdateProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..08e7fadbcb12 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointUpdateProperties.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The properties of SMB share endpoint to update. + [System.ComponentModel.TypeConverter(typeof(SmbMountEndpointUpdatePropertiesTypeConverter))] + public partial class SmbMountEndpointUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SmbMountEndpointUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SmbMountEndpointUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SmbMountEndpointUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Credentials")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).Credentials = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials) content.GetValueForProperty("Credentials",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).Credentials, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureKeyVaultSmbCredentialsTypeConverter.ConvertFrom); + } + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("CredentialsType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsType = (string) content.GetValueForProperty("CredentialsType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsType, global::System.Convert.ToString); + } + if (content.Contains("CredentialsUsernameUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsUsernameUri = (string) content.GetValueForProperty("CredentialsUsernameUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsUsernameUri, global::System.Convert.ToString); + } + if (content.Contains("CredentialsPasswordUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsPasswordUri = (string) content.GetValueForProperty("CredentialsPasswordUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsPasswordUri, 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 SmbMountEndpointUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Credentials")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).Credentials = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials) content.GetValueForProperty("Credentials",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).Credentials, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureKeyVaultSmbCredentialsTypeConverter.ConvertFrom); + } + if (content.Contains("EndpointType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType = (string) content.GetValueForProperty("EndpointType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).EndpointType, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("CredentialsType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsType = (string) content.GetValueForProperty("CredentialsType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsType, global::System.Convert.ToString); + } + if (content.Contains("CredentialsUsernameUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsUsernameUri = (string) content.GetValueForProperty("CredentialsUsernameUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsUsernameUri, global::System.Convert.ToString); + } + if (content.Contains("CredentialsPasswordUri")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsPasswordUri = (string) content.GetValueForProperty("CredentialsPasswordUri",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal)this).CredentialsPasswordUri, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of SMB share endpoint to update. + [System.ComponentModel.TypeConverter(typeof(SmbMountEndpointUpdatePropertiesTypeConverter))] + public partial interface ISmbMountEndpointUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointUpdateProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointUpdateProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointUpdateProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointUpdateProperties.TypeConverter.cs index 918aff4b609f..80233de1f06b 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointUpdateProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointUpdateProperties.cs new file mode 100644 index 000000000000..29823c3e4c74 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointUpdateProperties.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The properties of SMB share endpoint to update. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class SmbMountEndpointUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateProperties(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials _credentials; + + /// + /// The Azure Key Vault secret URIs which store the required credentials to access the SMB share. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials Credentials { get => (this._credentials = this._credentials ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureKeyVaultSmbCredentials()); set => this._credentials = value; } + + /// + /// The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string CredentialsPasswordUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)Credentials).PasswordUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)Credentials).PasswordUri = value ?? null; } + + /// The Credentials type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string CredentialsType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)Credentials).Type; } + + /// + /// The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string CredentialsUsernameUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)Credentials).UsernameUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentialsInternal)Credentials).UsernameUri = value ?? null; } + + /// A description for the Endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).Description = value ?? null; } + + /// The Endpoint resource type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string EndpointType { get => "SmbMount"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal)__endpointBaseUpdateProperties).EndpointType = "SmbMount"; } + + /// Internal Acessors for Credentials + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal.Credentials { get => (this._credentials = this._credentials ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureKeyVaultSmbCredentials()); set { {_credentials = value;} } } + + /// Internal Acessors for CredentialsType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdatePropertiesInternal.CredentialsType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)Credentials).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ICredentialsInternal)Credentials).Type = value ?? null; } + + /// Creates an new instance. + public SmbMountEndpointUpdateProperties() + { + this.__endpointBaseUpdateProperties.EndpointType = "SmbMount"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); + await eventListener.AssertObjectIsValid(nameof(__endpointBaseUpdateProperties), __endpointBaseUpdateProperties); + } + } + /// The properties of SMB share endpoint to update. + public partial interface ISmbMountEndpointUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties + { + /// + /// The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value.", + SerializedName = @"passwordUri", + PossibleTypes = new [] { typeof(string) })] + string CredentialsPasswordUri { get; set; } + /// The Credentials type. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = true, + Update = true, + Description = @"The Credentials type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string CredentialsType { get; } + /// + /// The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value.", + SerializedName = @"usernameUri", + PossibleTypes = new [] { typeof(string) })] + string CredentialsUsernameUri { get; set; } + + } + /// The properties of SMB share endpoint to update. + internal partial interface ISmbMountEndpointUpdatePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdatePropertiesInternal + { + /// + /// The Azure Key Vault secret URIs which store the required credentials to access the SMB share. + /// + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAzureKeyVaultSmbCredentials Credentials { get; set; } + /// + /// The Azure Key Vault secret URI which stores the password. Use empty string to clean-up existing value. + /// + string CredentialsPasswordUri { get; set; } + /// The Credentials type. + string CredentialsType { get; set; } + /// + /// The Azure Key Vault secret URI which stores the username. Use empty string to clean-up existing value. + /// + string CredentialsUsernameUri { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointUpdateProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointUpdateProperties.json.cs similarity index 92% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointUpdateProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointUpdateProperties.json.cs index 3eb346023786..e5b668edb932 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SmbMountEndpointUpdateProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SmbMountEndpointUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SmbMountEndpointUpdateProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISmbMountEndpointUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISmbMountEndpointUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new SmbMountEndpointUpdateProperties(json) : null; } @@ -77,8 +77,8 @@ internal SmbMountEndpointUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Sto { return; } - __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateProperties(json); - {_credentials = If( json?.PropertyT("credentials"), out var __jsonCredentials) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AzureKeyVaultSmbCredentials.FromJson(__jsonCredentials) : Credentials;} + __endpointBaseUpdateProperties = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateProperties(json); + {_credentials = If( json?.PropertyT("credentials"), out var __jsonCredentials) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AzureKeyVaultSmbCredentials.FromJson(__jsonCredentials) : _credentials;} AfterFromJson(json); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpoint.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpoint.PowerShell.cs new file mode 100644 index 000000000000..ba7fa0b51df9 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpoint.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The source endpoint resource for source and target mapping. + [System.ComponentModel.TypeConverter(typeof(SourceEndpointTypeConverter))] + public partial class SourceEndpoint + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SourceEndpoint(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SourceEndpoint(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SourceEndpoint(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceEndpointPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("AwsS3BucketId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).AwsS3BucketId, 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 SourceEndpoint(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceEndpointPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("AwsS3BucketId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)this).AwsS3BucketId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 source endpoint resource for source and target mapping. + [System.ComponentModel.TypeConverter(typeof(SourceEndpointTypeConverter))] + public partial interface ISourceEndpoint + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpoint.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpoint.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpoint.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpoint.TypeConverter.cs index 19756e6e4682..eb0e2c342916 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpoint.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpoint.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpoint ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpoint ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpoint).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpoint).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpoint.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpoint.cs new file mode 100644 index 000000000000..22845f342423 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpoint.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The source endpoint resource for source and target mapping. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class SourceEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpoint, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal + { + + /// The fully qualified ARM resource ID of the AWS S3 bucket to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string AwsS3BucketId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)Property).AwsS3BucketId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)Property).AwsS3BucketId = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceEndpointProperties()); set { {_property = value;} } } + + /// The name of the cloud source endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)Property).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)Property).Name = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties _property; + + /// The properties of the cloud source endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceEndpointProperties()); set => this._property = value; } + + /// The fully qualified ARM resource ID of the cloud source endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)Property).SourceEndpointResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)Property).SourceEndpointResourceId = value ?? null; } + + /// Creates an new instance. + public SourceEndpoint() + { + + } + } + /// The source endpoint resource for source and target mapping. + public partial interface ISourceEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// The fully qualified ARM resource ID of the AWS S3 bucket to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The fully qualified ARM resource ID of the AWS S3 bucket to migrate.", + SerializedName = @"awsS3BucketId", + PossibleTypes = new [] { typeof(string) })] + string AwsS3BucketId { get; set; } + /// The name of the cloud source endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the cloud source endpoint to migrate.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// The fully qualified ARM resource ID of the cloud source endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The fully qualified ARM resource ID of the cloud source endpoint to migrate.", + SerializedName = @"sourceEndpointResourceId", + PossibleTypes = new [] { typeof(string) })] + string ResourceId { get; set; } + + } + /// The source endpoint resource for source and target mapping. + internal partial interface ISourceEndpointInternal + + { + /// The fully qualified ARM resource ID of the AWS S3 bucket to migrate. + string AwsS3BucketId { get; set; } + /// The name of the cloud source endpoint to migrate. + string Name { get; set; } + /// The properties of the cloud source endpoint to migrate. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties Property { get; set; } + /// The fully qualified ARM resource ID of the cloud source endpoint to migrate. + string ResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpoint.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpoint.json.cs similarity index 94% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpoint.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpoint.json.cs index 879448d149c8..52fd93b529b5 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpoint.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpoint.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SourceEndpoint partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpoint. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpoint. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpoint. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpoint. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new SourceEndpoint(json) : null; } @@ -77,7 +77,7 @@ internal SourceEndpoint(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime. { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceEndpointProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceEndpointProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpointProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpointProperties.PowerShell.cs similarity index 76% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpointProperties.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpointProperties.PowerShell.cs index a15ddf4c827d..80b2681b3470 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpointProperties.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpointProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class SourceEndpointProperties 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SourceEndpointProperties(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SourceEndpointProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. @@ -113,21 +111,21 @@ internal SourceEndpointProperties(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("SourceEndpointResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)this).SourceEndpointResourceId = (string) content.GetValueForProperty("SourceEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)this).SourceEndpointResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)this).SourceEndpointResourceId = (string) content.GetValueForProperty("SourceEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)this).SourceEndpointResourceId, global::System.Convert.ToString); } if (content.Contains("AwsS3BucketId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)this).AwsS3BucketId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)this).AwsS3BucketId, 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. @@ -142,15 +140,15 @@ internal SourceEndpointProperties(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("SourceEndpointResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)this).SourceEndpointResourceId = (string) content.GetValueForProperty("SourceEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)this).SourceEndpointResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)this).SourceEndpointResourceId = (string) content.GetValueForProperty("SourceEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)this).SourceEndpointResourceId, global::System.Convert.ToString); } if (content.Contains("AwsS3BucketId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal)this).AwsS3BucketId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal)this).AwsS3BucketId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpointProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpointProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpointProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpointProperties.TypeConverter.cs index 2bf4e06f9808..53daacff53e1 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpointProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpointProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpointProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpointProperties.cs similarity index 91% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpointProperties.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpointProperties.cs index ee5cce9020af..f0c0b72fee1e 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpointProperties.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpointProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; /// The properties of the cloud source endpoint to migrate. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] public partial class SourceEndpointProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointPropertiesInternal { /// Backing field for property. @@ -49,6 +49,9 @@ public partial interface ISourceEndpointProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = false, Description = @"The fully qualified ARM resource ID of the AWS S3 bucket to migrate.", SerializedName = @"awsS3BucketId", PossibleTypes = new [] { typeof(string) })] @@ -57,6 +60,9 @@ public partial interface ISourceEndpointProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the cloud source endpoint to migrate.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -65,6 +71,9 @@ public partial interface ISourceEndpointProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = false, Description = @"The fully qualified ARM resource ID of the cloud source endpoint to migrate.", SerializedName = @"sourceEndpointResourceId", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpointProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpointProperties.json.cs similarity index 81% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpointProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpointProperties.json.cs index 0703c3757b72..de2dc8cf7ade 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceEndpointProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceEndpointProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SourceEndpointProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new SourceEndpointProperties(json) : null; } @@ -77,9 +77,9 @@ internal SourceEndpointProperties(Microsoft.Azure.PowerShell.Cmdlets.StorageMove { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_sourceEndpointResourceId = If( json?.PropertyT("sourceEndpointResourceId"), out var __jsonSourceEndpointResourceId) ? (string)__jsonSourceEndpointResourceId : (string)SourceEndpointResourceId;} - {_awsS3BucketId = If( json?.PropertyT("awsS3BucketId"), out var __jsonAwsS3BucketId) ? (string)__jsonAwsS3BucketId : (string)AwsS3BucketId;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_sourceEndpointResourceId = If( json?.PropertyT("sourceEndpointResourceId"), out var __jsonSourceEndpointResourceId) ? (string)__jsonSourceEndpointResourceId : (string)_sourceEndpointResourceId;} + {_awsS3BucketId = If( json?.PropertyT("awsS3BucketId"), out var __jsonAwsS3BucketId) ? (string)__jsonAwsS3BucketId : (string)_awsS3BucketId;} AfterFromJson(json); } @@ -103,8 +103,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ return container; } AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - AddIf( null != (((object)this._sourceEndpointResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._sourceEndpointResourceId.ToString()) : null, "sourceEndpointResourceId" ,container.Add ); - AddIf( null != (((object)this._awsS3BucketId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._awsS3BucketId.ToString()) : null, "awsS3BucketId" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._sourceEndpointResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._sourceEndpointResourceId.ToString()) : null, "sourceEndpointResourceId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._awsS3BucketId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._awsS3BucketId.ToString()) : null, "awsS3BucketId" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceTargetMap.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceTargetMap.PowerShell.cs new file mode 100644 index 000000000000..4f794b1e5fe7 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceTargetMap.PowerShell.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The properties of cloud endpoints to migrate. + [System.ComponentModel.TypeConverter(typeof(SourceTargetMapTypeConverter))] + public partial class SourceTargetMap + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMap DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SourceTargetMap(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMap DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SourceTargetMap(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMap FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SourceTargetMap(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SourceEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpoint) content.GetValueForProperty("SourceEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpoint, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceEndpointTypeConverter.ConvertFrom); + } + if (content.Contains("TargetEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpoint) content.GetValueForProperty("TargetEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpoint, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TargetEndpointTypeConverter.ConvertFrom); + } + if (content.Contains("SourceEndpointProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpointProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties) content.GetValueForProperty("SourceEndpointProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpointProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceEndpointPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("TargetEndpointProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpointProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties) content.GetValueForProperty("TargetEndpointProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpointProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TargetEndpointPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SourceEndpointPropertiesName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpointPropertiesName = (string) content.GetValueForProperty("SourceEndpointPropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpointPropertiesName, global::System.Convert.ToString); + } + if (content.Contains("TargetEndpointPropertiesName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpointPropertiesName = (string) content.GetValueForProperty("TargetEndpointPropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpointPropertiesName, global::System.Convert.ToString); + } + if (content.Contains("SourceEndpointResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpointResourceId = (string) content.GetValueForProperty("SourceEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpointResourceId, global::System.Convert.ToString); + } + if (content.Contains("AwsS3BucketId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).AwsS3BucketId, global::System.Convert.ToString); + } + if (content.Contains("TargetEndpointResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpointResourceId = (string) content.GetValueForProperty("TargetEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpointResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureStorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).AzureStorageAccountResourceId = (string) content.GetValueForProperty("AzureStorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).AzureStorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureStorageBlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).AzureStorageBlobContainerName = (string) content.GetValueForProperty("AzureStorageBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).AzureStorageBlobContainerName, 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 SourceTargetMap(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SourceEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpoint) content.GetValueForProperty("SourceEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpoint, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceEndpointTypeConverter.ConvertFrom); + } + if (content.Contains("TargetEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpoint) content.GetValueForProperty("TargetEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpoint, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TargetEndpointTypeConverter.ConvertFrom); + } + if (content.Contains("SourceEndpointProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpointProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties) content.GetValueForProperty("SourceEndpointProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpointProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceEndpointPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("TargetEndpointProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpointProperty = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties) content.GetValueForProperty("TargetEndpointProperty",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpointProperty, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TargetEndpointPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SourceEndpointPropertiesName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpointPropertiesName = (string) content.GetValueForProperty("SourceEndpointPropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpointPropertiesName, global::System.Convert.ToString); + } + if (content.Contains("TargetEndpointPropertiesName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpointPropertiesName = (string) content.GetValueForProperty("TargetEndpointPropertiesName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpointPropertiesName, global::System.Convert.ToString); + } + if (content.Contains("SourceEndpointResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpointResourceId = (string) content.GetValueForProperty("SourceEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).SourceEndpointResourceId, global::System.Convert.ToString); + } + if (content.Contains("AwsS3BucketId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).AwsS3BucketId = (string) content.GetValueForProperty("AwsS3BucketId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).AwsS3BucketId, global::System.Convert.ToString); + } + if (content.Contains("TargetEndpointResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpointResourceId = (string) content.GetValueForProperty("TargetEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).TargetEndpointResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureStorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).AzureStorageAccountResourceId = (string) content.GetValueForProperty("AzureStorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).AzureStorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureStorageBlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).AzureStorageBlobContainerName = (string) content.GetValueForProperty("AzureStorageBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal)this).AzureStorageBlobContainerName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of cloud endpoints to migrate. + [System.ComponentModel.TypeConverter(typeof(SourceTargetMapTypeConverter))] + public partial interface ISourceTargetMap + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceTargetMap.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceTargetMap.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceTargetMap.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceTargetMap.TypeConverter.cs index 6b040bfa90b5..2b0b9616b921 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceTargetMap.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceTargetMap.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMap ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMap).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceTargetMap.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceTargetMap.cs new file mode 100644 index 000000000000..0f3e7fe2f400 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceTargetMap.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The properties of cloud endpoints to migrate. + public partial class SourceTargetMap : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMap, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal + { + + /// The fully qualified ARM resource ID of the AWS S3 bucket to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string AwsS3BucketId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)SourceEndpoint).AwsS3BucketId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)SourceEndpoint).AwsS3BucketId = value ?? null; } + + /// The fully qualified ARM resource ID of the Azure Storage account. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string AzureStorageAccountResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)TargetEndpoint).AzureStorageAccountResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)TargetEndpoint).AzureStorageAccountResourceId = value ?? null; } + + /// The name of the Azure Storage blob container. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string AzureStorageBlobContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)TargetEndpoint).AzureStorageBlobContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)TargetEndpoint).AzureStorageBlobContainerName = value ?? null; } + + /// Internal Acessors for SourceEndpoint + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpoint Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal.SourceEndpoint { get => (this._sourceEndpoint = this._sourceEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceEndpoint()); set { {_sourceEndpoint = value;} } } + + /// Internal Acessors for SourceEndpointProperty + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal.SourceEndpointProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)SourceEndpoint).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)SourceEndpoint).Property = value ?? null /* model class */; } + + /// Internal Acessors for TargetEndpoint + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpoint Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal.TargetEndpoint { get => (this._targetEndpoint = this._targetEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TargetEndpoint()); set { {_targetEndpoint = value;} } } + + /// Internal Acessors for TargetEndpointProperty + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMapInternal.TargetEndpointProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)TargetEndpoint).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)TargetEndpoint).Property = value ?? null /* model class */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpoint _sourceEndpoint; + + /// The source endpoint resource for source and target mapping. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpoint SourceEndpoint { get => (this._sourceEndpoint = this._sourceEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceEndpoint()); set => this._sourceEndpoint = value; } + + /// The name of the cloud source endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string SourceEndpointPropertiesName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)SourceEndpoint).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)SourceEndpoint).Name = value ?? null; } + + /// The fully qualified ARM resource ID of the cloud source endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string SourceEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)SourceEndpoint).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointInternal)SourceEndpoint).ResourceId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpoint _targetEndpoint; + + /// The target endpoint resource for source and target mapping. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpoint TargetEndpoint { get => (this._targetEndpoint = this._targetEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TargetEndpoint()); set => this._targetEndpoint = value; } + + /// The name of the cloud target endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string TargetEndpointPropertiesName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)TargetEndpoint).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)TargetEndpoint).Name = value ?? null; } + + /// The fully qualified ARM resource ID of the cloud target endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string TargetEndpointResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)TargetEndpoint).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)TargetEndpoint).ResourceId = value ?? null; } + + /// Creates an new instance. + public SourceTargetMap() + { + + } + } + /// The properties of cloud endpoints to migrate. + public partial interface ISourceTargetMap : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// The fully qualified ARM resource ID of the AWS S3 bucket to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The fully qualified ARM resource ID of the AWS S3 bucket to migrate.", + SerializedName = @"awsS3BucketId", + PossibleTypes = new [] { typeof(string) })] + string AwsS3BucketId { get; set; } + /// The fully qualified ARM resource ID of the Azure Storage account. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The fully qualified ARM resource ID of the Azure Storage account.", + SerializedName = @"azureStorageAccountResourceId", + PossibleTypes = new [] { typeof(string) })] + string AzureStorageAccountResourceId { get; set; } + /// The name of the Azure Storage blob container. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The name of the Azure Storage blob container.", + SerializedName = @"azureStorageBlobContainerName", + PossibleTypes = new [] { typeof(string) })] + string AzureStorageBlobContainerName { get; set; } + /// The name of the cloud source endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the cloud source endpoint to migrate.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string SourceEndpointPropertiesName { get; set; } + /// The fully qualified ARM resource ID of the cloud source endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The fully qualified ARM resource ID of the cloud source endpoint to migrate.", + SerializedName = @"sourceEndpointResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceEndpointResourceId { get; set; } + /// The name of the cloud target endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the cloud target endpoint to migrate.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string TargetEndpointPropertiesName { get; set; } + /// The fully qualified ARM resource ID of the cloud target endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The fully qualified ARM resource ID of the cloud target endpoint to migrate.", + SerializedName = @"targetEndpointResourceId", + PossibleTypes = new [] { typeof(string) })] + string TargetEndpointResourceId { get; set; } + + } + /// The properties of cloud endpoints to migrate. + internal partial interface ISourceTargetMapInternal + + { + /// The fully qualified ARM resource ID of the AWS S3 bucket to migrate. + string AwsS3BucketId { get; set; } + /// The fully qualified ARM resource ID of the Azure Storage account. + string AzureStorageAccountResourceId { get; set; } + /// The name of the Azure Storage blob container. + string AzureStorageBlobContainerName { get; set; } + /// The source endpoint resource for source and target mapping. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpoint SourceEndpoint { get; set; } + /// The name of the cloud source endpoint to migrate. + string SourceEndpointPropertiesName { get; set; } + /// The properties of the cloud source endpoint to migrate. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceEndpointProperties SourceEndpointProperty { get; set; } + /// The fully qualified ARM resource ID of the cloud source endpoint to migrate. + string SourceEndpointResourceId { get; set; } + /// The target endpoint resource for source and target mapping. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpoint TargetEndpoint { get; set; } + /// The name of the cloud target endpoint to migrate. + string TargetEndpointPropertiesName { get; set; } + /// The properties of the cloud target endpoint to migrate. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties TargetEndpointProperty { get; set; } + /// The fully qualified ARM resource ID of the cloud target endpoint to migrate. + string TargetEndpointResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceTargetMap.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceTargetMap.json.cs similarity index 93% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceTargetMap.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceTargetMap.json.cs index 98627006472f..041b9b0c6888 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/SourceTargetMap.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SourceTargetMap.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SourceTargetMap partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMap. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMap. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ISourceTargetMap FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISourceTargetMap FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new SourceTargetMap(json) : null; } @@ -77,8 +77,8 @@ internal SourceTargetMap(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime { return; } - {_sourceEndpoint = If( json?.PropertyT("sourceEndpoint"), out var __jsonSourceEndpoint) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.SourceEndpoint.FromJson(__jsonSourceEndpoint) : SourceEndpoint;} - {_targetEndpoint = If( json?.PropertyT("targetEndpoint"), out var __jsonTargetEndpoint) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TargetEndpoint.FromJson(__jsonTargetEndpoint) : TargetEndpoint;} + {_sourceEndpoint = If( json?.PropertyT("sourceEndpoint"), out var __jsonSourceEndpoint) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SourceEndpoint.FromJson(__jsonSourceEndpoint) : _sourceEndpoint;} + {_targetEndpoint = If( json?.PropertyT("targetEndpoint"), out var __jsonTargetEndpoint) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TargetEndpoint.FromJson(__jsonTargetEndpoint) : _targetEndpoint;} AfterFromJson(json); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMover.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMover.PowerShell.cs new file mode 100644 index 000000000000..0190a1df520f --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMover.PowerShell.cs @@ -0,0 +1,278 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. + /// + [System.ComponentModel.TypeConverter(typeof(StorageMoverTypeConverter))] + public partial class StorageMover + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageMover(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageMover(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageMover(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverInternal)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 StorageMover(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. + [System.ComponentModel.TypeConverter(typeof(StorageMoverTypeConverter))] + public partial interface IStorageMover + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMover.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMover.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMover.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMover.TypeConverter.cs index 29e2e24209f2..110c40a76f5c 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMover.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMover.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMover.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMover.cs new file mode 100644 index 000000000000..25dca2f5cf1c --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMover.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class StorageMover : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TrackedResource(); + + /// A description for the Storage Mover. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverPropertiesInternal)Property).Description = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).Id; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)__trackedResource).Location = value ?? null; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).Type = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverPropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverProperties _property; + + /// The resource specific properties for the Storage Mover resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverProperties()); set => this._property = value; } + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__trackedResource).Type; } + + /// Creates an new instance. + public StorageMover() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. + public partial interface IStorageMover : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResource + { + /// A description for the Storage Mover. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Storage Mover.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The provisioning state of this resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; } + + } + /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. + internal partial interface IStorageMoverInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal + { + /// A description for the Storage Mover. + string Description { get; set; } + /// The resource specific properties for the Storage Mover resource. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverProperties Property { get; set; } + /// The provisioning state of this resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMover.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMover.json.cs similarity index 94% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMover.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMover.json.cs index 5d5002507fe8..ba86ebb2aa8c 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMover.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMover.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class StorageMover partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new StorageMover(json) : null; } @@ -79,8 +79,8 @@ internal StorageMover(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Js { return; } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.TrackedResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverProperties.FromJson(__jsonProperties) : Property;} + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverIdentity.cs index f1ecbd07b6d4..0c055df434b1 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverIdentity.cs @@ -89,6 +89,9 @@ public partial interface IStorageMoverIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Agent resource.", SerializedName = @"agentName", PossibleTypes = new [] { typeof(string) })] @@ -97,6 +100,9 @@ public partial interface IStorageMoverIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Endpoint resource.", SerializedName = @"endpointName", PossibleTypes = new [] { typeof(string) })] @@ -105,6 +111,9 @@ public partial interface IStorageMoverIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource identity path", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -113,6 +122,9 @@ public partial interface IStorageMoverIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Job Definition resource.", SerializedName = @"jobDefinitionName", PossibleTypes = new [] { typeof(string) })] @@ -121,6 +133,9 @@ public partial interface IStorageMoverIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Job Run resource.", SerializedName = @"jobRunName", PossibleTypes = new [] { typeof(string) })] @@ -129,6 +144,9 @@ public partial interface IStorageMoverIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Project resource.", SerializedName = @"projectName", PossibleTypes = new [] { typeof(string) })] @@ -137,6 +155,9 @@ public partial interface IStorageMoverIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the resource group. The name is case insensitive.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] @@ -145,6 +166,9 @@ public partial interface IStorageMoverIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Storage Mover resource.", SerializedName = @"storageMoverName", PossibleTypes = new [] { typeof(string) })] @@ -153,6 +177,9 @@ public partial interface IStorageMoverIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverIdentity.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverIdentity.json.cs index 29b97b3f7742..6def05b261f0 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverIdentity.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverIdentity.json.cs @@ -76,15 +76,15 @@ internal StorageMoverIdentity(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Ru { return; } - {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} - {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} - {_storageMoverName = If( json?.PropertyT("storageMoverName"), out var __jsonStorageMoverName) ? (string)__jsonStorageMoverName : (string)StorageMoverName;} - {_agentName = If( json?.PropertyT("agentName"), out var __jsonAgentName) ? (string)__jsonAgentName : (string)AgentName;} - {_endpointName = If( json?.PropertyT("endpointName"), out var __jsonEndpointName) ? (string)__jsonEndpointName : (string)EndpointName;} - {_projectName = If( json?.PropertyT("projectName"), out var __jsonProjectName) ? (string)__jsonProjectName : (string)ProjectName;} - {_jobDefinitionName = If( json?.PropertyT("jobDefinitionName"), out var __jsonJobDefinitionName) ? (string)__jsonJobDefinitionName : (string)JobDefinitionName;} - {_jobRunName = If( json?.PropertyT("jobRunName"), out var __jsonJobRunName) ? (string)__jsonJobRunName : (string)JobRunName;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)_subscriptionId;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)_resourceGroupName;} + {_storageMoverName = If( json?.PropertyT("storageMoverName"), out var __jsonStorageMoverName) ? (string)__jsonStorageMoverName : (string)_storageMoverName;} + {_agentName = If( json?.PropertyT("agentName"), out var __jsonAgentName) ? (string)__jsonAgentName : (string)_agentName;} + {_endpointName = If( json?.PropertyT("endpointName"), out var __jsonEndpointName) ? (string)__jsonEndpointName : (string)_endpointName;} + {_projectName = If( json?.PropertyT("projectName"), out var __jsonProjectName) ? (string)__jsonProjectName : (string)_projectName;} + {_jobDefinitionName = If( json?.PropertyT("jobDefinitionName"), out var __jsonJobDefinitionName) ? (string)__jsonJobDefinitionName : (string)_jobDefinitionName;} + {_jobRunName = If( json?.PropertyT("jobRunName"), out var __jsonJobRunName) ? (string)__jsonJobRunName : (string)_jobRunName;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverList.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverList.PowerShell.cs similarity index 77% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverList.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverList.PowerShell.cs index 5e6d5ef32a5b..1660b44f227d 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverList.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverList.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class StorageMoverList 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverList DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverList DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new StorageMoverList(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverList DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new StorageMoverList(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. @@ -111,17 +111,17 @@ internal StorageMoverList(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverListInternal)this).NextLink, 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. @@ -136,11 +136,11 @@ internal StorageMoverList(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverListInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverListInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverListInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverListInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverListInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverListInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverListInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverList.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverList.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverList.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverList.TypeConverter.cs index 713cd0c1eec1..bb794a924969 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverList.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverList.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverList ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverList ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverList).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverList).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverList.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverList.cs new file mode 100644 index 000000000000..f738901a0fd2 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverList.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// List of Storage Movers. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class StorageMoverList : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverList, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverListInternal + { + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverListInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The StorageMover items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public StorageMoverList() + { + + } + } + /// List of Storage Movers. + public partial interface IStorageMoverList : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMover items on this page + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The StorageMover items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover) })] + System.Collections.Generic.List Value { get; } + + } + /// List of Storage Movers. + internal partial interface IStorageMoverListInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The StorageMover items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverList.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverList.json.cs similarity index 90% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverList.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverList.json.cs index d9c54ef8cc09..fbfee8b9c7eb 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverList.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverList.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class StorageMoverList partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverList. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverList. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverList. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverList. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverList FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverList FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new StorageMoverList(json) : null; } @@ -77,8 +77,8 @@ internal StorageMoverList(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtim { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMover.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMover.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverProperties.PowerShell.cs similarity index 78% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverProperties.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverProperties.PowerShell.cs index 08be1e6dfaf4..890df4ea00a0 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverProperties.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class StorageMoverProperties 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new StorageMoverProperties(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new StorageMoverProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. @@ -113,17 +111,17 @@ internal StorageMoverProperties(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverPropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverPropertiesInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverPropertiesInternal)this).ProvisioningState, 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. @@ -138,11 +136,11 @@ internal StorageMoverProperties(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverPropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverPropertiesInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverProperties.TypeConverter.cs index 733160be0fd8..0654c09f2b96 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverProperties.cs new file mode 100644 index 000000000000..8b0b1557eb65 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverProperties.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The resource specific properties for the Storage Mover resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class StorageMoverProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverPropertiesInternal + { + + /// Backing field for property. + private string _description; + + /// A description for the Storage Mover. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Creates an new instance. + public StorageMoverProperties() + { + + } + } + /// The resource specific properties for the Storage Mover resource. + public partial interface IStorageMoverProperties : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// A description for the Storage Mover. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Storage Mover.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// The provisioning state of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The provisioning state of this resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; } + + } + /// The resource specific properties for the Storage Mover resource. + internal partial interface IStorageMoverPropertiesInternal + + { + /// A description for the Storage Mover. + string Description { get; set; } + /// The provisioning state of this resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Succeeded", "Canceled", "Failed", "Deleting")] + string ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverProperties.json.cs similarity index 94% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverProperties.json.cs index 9a4984876b1e..93115a7c4a89 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class StorageMoverProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new StorageMoverProperties(json) : null; } @@ -77,8 +77,8 @@ internal StorageMoverProperties(Microsoft.Azure.PowerShell.Cmdlets.StorageMover. { return; } - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} AfterFromJson(json); } @@ -102,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ return container; } AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParameters.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParameters.PowerShell.cs new file mode 100644 index 000000000000..dcffee6d8236 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParameters.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The Storage Mover resource. + [System.ComponentModel.TypeConverter(typeof(StorageMoverUpdateParametersTypeConverter))] + public partial class StorageMoverUpdateParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageMoverUpdateParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageMoverUpdateParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageMoverUpdateParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverUpdateParametersTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersInternal)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 StorageMoverUpdateParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverUpdateParametersTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Storage Mover resource. + [System.ComponentModel.TypeConverter(typeof(StorageMoverUpdateParametersTypeConverter))] + public partial interface IStorageMoverUpdateParameters + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParameters.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParameters.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParameters.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParameters.TypeConverter.cs index 3e3683f47d88..2e063ba858c1 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParameters.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParameters.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParameters.cs new file mode 100644 index 000000000000..769f8a2d8351 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParameters.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The Storage Mover resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class StorageMoverUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersInternal + { + + /// A description for the Storage Mover. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdatePropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdatePropertiesInternal)Property).Description = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverUpdateProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateProperties _property; + + /// The resource specific properties for the Storage Mover resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverUpdateProperties()); set => this._property = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverUpdateParametersTags()); set => this._tag = value; } + + /// Creates an new instance. + public StorageMoverUpdateParameters() + { + + } + } + /// The Storage Mover resource. + public partial interface IStorageMoverUpdateParameters : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// A description for the Storage Mover. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description for the Storage Mover.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags) })] + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags Tag { get; set; } + + } + /// The Storage Mover resource. + internal partial interface IStorageMoverUpdateParametersInternal + + { + /// A description for the Storage Mover. + string Description { get; set; } + /// The resource specific properties for the Storage Mover resource. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateProperties Property { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParameters.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParameters.json.cs similarity index 93% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParameters.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParameters.json.cs index 1acdf2f8a6a8..6b68e2f533d8 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParameters.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class StorageMoverUpdateParameters partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new StorageMoverUpdateParameters(json) : null; } @@ -77,8 +77,8 @@ internal StorageMoverUpdateParameters(Microsoft.Azure.PowerShell.Cmdlets.Storage { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverUpdateProperties.FromJson(__jsonProperties) : Property;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverUpdateParametersTags.FromJson(__jsonTags) : Tag;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverUpdateProperties.FromJson(__jsonProperties) : _property;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverUpdateParametersTags.FromJson(__jsonTags) : _tag;} AfterFromJson(json); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParametersTags.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParametersTags.PowerShell.cs similarity index 88% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParametersTags.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParametersTags.PowerShell.cs index b9d48ca27124..d283a84a94fc 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParametersTags.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParametersTags.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class StorageMoverUpdateParametersTags 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new StorageMoverUpdateParametersTags(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new StorageMoverUpdateParametersTags(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. @@ -117,7 +115,7 @@ internal StorageMoverUpdateParametersTags(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. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParametersTags.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParametersTags.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParametersTags.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParametersTags.TypeConverter.cs index cf19825b2e25..27b1149a15cc 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParametersTags.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParametersTags.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParametersTags.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParametersTags.cs similarity index 82% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParametersTags.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParametersTags.cs index e8bf6fcece4a..317a09066689 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParametersTags.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParametersTags.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; /// Resource tags. public partial class StorageMoverUpdateParametersTags : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTagsInternal { /// Creates an new instance. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParametersTags.dictionary.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParametersTags.dictionary.cs similarity index 96% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParametersTags.dictionary.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParametersTags.dictionary.cs index 75d6f100d4c8..2489d8aa84f0 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParametersTags.dictionary.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParametersTags.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverUpdateParametersTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverUpdateParametersTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParametersTags.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParametersTags.json.cs similarity index 95% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParametersTags.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParametersTags.json.cs index 6544e17f5916..0a9c0606dc04 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateParametersTags.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateParametersTags.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class StorageMoverUpdateParametersTags partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new StorageMoverUpdateParametersTags(json) : null; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateProperties.PowerShell.cs similarity index 83% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateProperties.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateProperties.PowerShell.cs index ce70974b712f..9563a716bd4b 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateProperties.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,29 +63,27 @@ public partial class StorageMoverUpdateProperties 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new StorageMoverUpdateProperties(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new StorageMoverUpdateProperties(content); } @@ -95,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. @@ -113,13 +111,13 @@ internal StorageMoverUpdateProperties(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdatePropertiesInternal)this).Description, 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. @@ -134,7 +132,7 @@ internal StorageMoverUpdateProperties(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdatePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdatePropertiesInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateProperties.TypeConverter.cs index 203cb6a25627..1b23a90c2cb7 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateProperties.cs similarity index 89% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateProperties.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateProperties.cs index b9df2d462a92..8382c3b604a7 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateProperties.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; /// The resource specific properties for the Storage Mover resource. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] public partial class StorageMoverUpdateProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdatePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdatePropertiesInternal { /// Backing field for property. @@ -35,6 +35,9 @@ public partial interface IStorageMoverUpdateProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A description for the Storage Mover.", SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateProperties.json.cs similarity index 95% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateProperties.json.cs index cbeaeea6d2fb..4a4fc95e9d2f 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/StorageMoverUpdateProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/StorageMoverUpdateProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class StorageMoverUpdateProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new StorageMoverUpdateProperties(json) : null; } @@ -77,7 +77,7 @@ internal StorageMoverUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Storage { return; } - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} AfterFromJson(json); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SystemData.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SystemData.PowerShell.cs new file mode 100644 index 000000000000..bdccbaf79b62 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SystemData.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial class SystemData + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemData(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemData(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemData(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemData(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial interface ISystemData + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SystemData.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SystemData.TypeConverter.cs new file mode 100644 index 000000000000..216a0069a490 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SystemData.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemDataTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SystemData.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SystemData.cs new file mode 100644 index 000000000000..665d26ae9d85 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SystemData.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemDataInternal + { + + /// Backing field for property. + private global::System.DateTime? _createdAt; + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public global::System.DateTime? CreatedAt { get => this._createdAt; set => this._createdAt = value; } + + /// Backing field for property. + private string _createdBy; + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } + + /// Backing field for property. + private string _createdByType; + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string CreatedByType { get => this._createdByType; set => this._createdByType = value; } + + /// Backing field for property. + private global::System.DateTime? _lastModifiedAt; + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public global::System.DateTime? LastModifiedAt { get => this._lastModifiedAt; set => this._lastModifiedAt = value; } + + /// Backing field for property. + private string _lastModifiedBy; + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } + + /// Backing field for property. + private string _lastModifiedByType; + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + + /// Creates an new instance. + public SystemData() + { + + } + } + /// Metadata pertaining to creation and last modification of the resource. + public partial interface ISystemData : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string CreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } + + } + /// Metadata pertaining to creation and last modification of the resource. + internal partial interface ISystemDataInternal + + { + /// The timestamp of resource creation (UTC). + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + string CreatedBy { get; set; } + /// The type of identity that created the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SystemData.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SystemData.json.cs new file mode 100644 index 000000000000..ac58da2acddf --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/SystemData.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new SystemData(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. + internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)_createdBy;} + {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)_createdByType;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)_lastModifiedBy;} + {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)_lastModifiedByType;} + {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : _lastModifiedAt : _lastModifiedAt;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add ); + AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add ); + AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); + AddIf( null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy" ,container.Add ); + AddIf( null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType" ,container.Add ); + AddIf( null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpoint.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpoint.PowerShell.cs new file mode 100644 index 000000000000..6e47a2619bf0 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpoint.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The target endpoint resource for source and target mapping. + [System.ComponentModel.TypeConverter(typeof(TargetEndpointTypeConverter))] + public partial class TargetEndpoint + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TargetEndpoint(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TargetEndpoint(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TargetEndpoint(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TargetEndpointPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureStorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).AzureStorageAccountResourceId = (string) content.GetValueForProperty("AzureStorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).AzureStorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureStorageBlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).AzureStorageBlobContainerName = (string) content.GetValueForProperty("AzureStorageBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).AzureStorageBlobContainerName, 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 TargetEndpoint(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TargetEndpointPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).ResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureStorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).AzureStorageAccountResourceId = (string) content.GetValueForProperty("AzureStorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).AzureStorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureStorageBlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).AzureStorageBlobContainerName = (string) content.GetValueForProperty("AzureStorageBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal)this).AzureStorageBlobContainerName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 target endpoint resource for source and target mapping. + [System.ComponentModel.TypeConverter(typeof(TargetEndpointTypeConverter))] + public partial interface ITargetEndpoint + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpoint.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpoint.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpoint.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpoint.TypeConverter.cs index 614361f7c3cf..35fec2afced4 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpoint.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpoint.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpoint ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpoint ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpoint).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpoint).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpoint.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpoint.cs new file mode 100644 index 000000000000..7ff57b002227 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpoint.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The target endpoint resource for source and target mapping. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] + public partial class TargetEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpoint, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal + { + + /// The fully qualified ARM resource ID of the Azure Storage account. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string AzureStorageAccountResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)Property).AzureStorageAccountResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)Property).AzureStorageAccountResourceId = value ?? null; } + + /// The name of the Azure Storage blob container. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string AzureStorageBlobContainerName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)Property).AzureStorageBlobContainerName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)Property).AzureStorageBlobContainerName = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TargetEndpointProperties()); set { {_property = value;} } } + + /// The name of the cloud target endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)Property).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)Property).Name = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties _property; + + /// The properties of the cloud target endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TargetEndpointProperties()); set => this._property = value; } + + /// The fully qualified ARM resource ID of the cloud target endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inlined)] + public string ResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)Property).TargetEndpointResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)Property).TargetEndpointResourceId = value ?? null; } + + /// Creates an new instance. + public TargetEndpoint() + { + + } + } + /// The target endpoint resource for source and target mapping. + public partial interface ITargetEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// The fully qualified ARM resource ID of the Azure Storage account. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The fully qualified ARM resource ID of the Azure Storage account.", + SerializedName = @"azureStorageAccountResourceId", + PossibleTypes = new [] { typeof(string) })] + string AzureStorageAccountResourceId { get; set; } + /// The name of the Azure Storage blob container. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The name of the Azure Storage blob container.", + SerializedName = @"azureStorageBlobContainerName", + PossibleTypes = new [] { typeof(string) })] + string AzureStorageBlobContainerName { get; set; } + /// The name of the cloud target endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the cloud target endpoint to migrate.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// The fully qualified ARM resource ID of the cloud target endpoint to migrate. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The fully qualified ARM resource ID of the cloud target endpoint to migrate.", + SerializedName = @"targetEndpointResourceId", + PossibleTypes = new [] { typeof(string) })] + string ResourceId { get; set; } + + } + /// The target endpoint resource for source and target mapping. + internal partial interface ITargetEndpointInternal + + { + /// The fully qualified ARM resource ID of the Azure Storage account. + string AzureStorageAccountResourceId { get; set; } + /// The name of the Azure Storage blob container. + string AzureStorageBlobContainerName { get; set; } + /// The name of the cloud target endpoint to migrate. + string Name { get; set; } + /// The properties of the cloud target endpoint to migrate. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties Property { get; set; } + /// The fully qualified ARM resource ID of the cloud target endpoint to migrate. + string ResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpoint.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpoint.json.cs similarity index 94% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpoint.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpoint.json.cs index 52881946feef..59627e2e481e 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpoint.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpoint.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TargetEndpoint partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpoint. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpoint. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpoint. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpoint. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new TargetEndpoint(json) : null; } @@ -77,7 +77,7 @@ internal TargetEndpoint(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime. { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.TargetEndpointProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TargetEndpointProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpointProperties.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpointProperties.PowerShell.cs new file mode 100644 index 000000000000..2eeced6ce2e8 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpointProperties.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The properties of the cloud target endpoint to migrate. + [System.ComponentModel.TypeConverter(typeof(TargetEndpointPropertiesTypeConverter))] + public partial class TargetEndpointProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TargetEndpointProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TargetEndpointProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TargetEndpointProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("TargetEndpointResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).TargetEndpointResourceId = (string) content.GetValueForProperty("TargetEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).TargetEndpointResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureStorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).AzureStorageAccountResourceId = (string) content.GetValueForProperty("AzureStorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).AzureStorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureStorageBlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).AzureStorageBlobContainerName = (string) content.GetValueForProperty("AzureStorageBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).AzureStorageBlobContainerName, 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 TargetEndpointProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("TargetEndpointResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).TargetEndpointResourceId = (string) content.GetValueForProperty("TargetEndpointResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).TargetEndpointResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureStorageAccountResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).AzureStorageAccountResourceId = (string) content.GetValueForProperty("AzureStorageAccountResourceId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).AzureStorageAccountResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureStorageBlobContainerName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).AzureStorageBlobContainerName = (string) content.GetValueForProperty("AzureStorageBlobContainerName",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal)this).AzureStorageBlobContainerName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 properties of the cloud target endpoint to migrate. + [System.ComponentModel.TypeConverter(typeof(TargetEndpointPropertiesTypeConverter))] + public partial interface ITargetEndpointProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpointProperties.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpointProperties.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpointProperties.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpointProperties.TypeConverter.cs index c113bc52c62a..0df7f2d3e0a5 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpointProperties.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpointProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpointProperties.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpointProperties.cs similarity index 92% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpointProperties.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpointProperties.cs index 495aa8d5091d..0b1169cc04bf 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpointProperties.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpointProperties.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; /// The properties of the cloud target endpoint to migrate. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.DoNotFormat] public partial class TargetEndpointProperties : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointPropertiesInternal { /// Backing field for property. @@ -56,6 +56,9 @@ public partial interface ITargetEndpointProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = false, Description = @"The fully qualified ARM resource ID of the Azure Storage account.", SerializedName = @"azureStorageAccountResourceId", PossibleTypes = new [] { typeof(string) })] @@ -64,6 +67,9 @@ public partial interface ITargetEndpointProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = false, Description = @"The name of the Azure Storage blob container.", SerializedName = @"azureStorageBlobContainerName", PossibleTypes = new [] { typeof(string) })] @@ -72,6 +78,9 @@ public partial interface ITargetEndpointProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the cloud target endpoint to migrate.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -80,6 +89,9 @@ public partial interface ITargetEndpointProperties : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = false, Description = @"The fully qualified ARM resource ID of the cloud target endpoint to migrate.", SerializedName = @"targetEndpointResourceId", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpointProperties.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpointProperties.json.cs similarity index 76% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpointProperties.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpointProperties.json.cs index 418f4b038460..c3ffd58121a7 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/TargetEndpointProperties.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TargetEndpointProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TargetEndpointProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITargetEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITargetEndpointProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new TargetEndpointProperties(json) : null; } @@ -77,10 +77,10 @@ internal TargetEndpointProperties(Microsoft.Azure.PowerShell.Cmdlets.StorageMove { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_targetEndpointResourceId = If( json?.PropertyT("targetEndpointResourceId"), out var __jsonTargetEndpointResourceId) ? (string)__jsonTargetEndpointResourceId : (string)TargetEndpointResourceId;} - {_azureStorageAccountResourceId = If( json?.PropertyT("azureStorageAccountResourceId"), out var __jsonAzureStorageAccountResourceId) ? (string)__jsonAzureStorageAccountResourceId : (string)AzureStorageAccountResourceId;} - {_azureStorageBlobContainerName = If( json?.PropertyT("azureStorageBlobContainerName"), out var __jsonAzureStorageBlobContainerName) ? (string)__jsonAzureStorageBlobContainerName : (string)AzureStorageBlobContainerName;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_targetEndpointResourceId = If( json?.PropertyT("targetEndpointResourceId"), out var __jsonTargetEndpointResourceId) ? (string)__jsonTargetEndpointResourceId : (string)_targetEndpointResourceId;} + {_azureStorageAccountResourceId = If( json?.PropertyT("azureStorageAccountResourceId"), out var __jsonAzureStorageAccountResourceId) ? (string)__jsonAzureStorageAccountResourceId : (string)_azureStorageAccountResourceId;} + {_azureStorageBlobContainerName = If( json?.PropertyT("azureStorageBlobContainerName"), out var __jsonAzureStorageBlobContainerName) ? (string)__jsonAzureStorageBlobContainerName : (string)_azureStorageBlobContainerName;} AfterFromJson(json); } @@ -104,9 +104,18 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ return container; } AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - AddIf( null != (((object)this._targetEndpointResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._targetEndpointResourceId.ToString()) : null, "targetEndpointResourceId" ,container.Add ); - AddIf( null != (((object)this._azureStorageAccountResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._azureStorageAccountResourceId.ToString()) : null, "azureStorageAccountResourceId" ,container.Add ); - AddIf( null != (((object)this._azureStorageBlobContainerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._azureStorageBlobContainerName.ToString()) : null, "azureStorageBlobContainerName" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._targetEndpointResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._targetEndpointResourceId.ToString()) : null, "targetEndpointResourceId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._azureStorageAccountResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._azureStorageAccountResourceId.ToString()) : null, "azureStorageAccountResourceId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._azureStorageBlobContainerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._azureStorageBlobContainerName.ToString()) : null, "azureStorageBlobContainerName" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Time.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Time.PowerShell.cs similarity index 81% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Time.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/Time.PowerShell.cs index 47be755afc8c..38cc027f035a 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Time.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Time.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class Time 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Time(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Time(content); } @@ -93,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. @@ -111,17 +111,17 @@ internal Time(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Hour")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)this).Hour = (int) content.GetValueForProperty("Hour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)this).Hour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)this).Hour = (int) content.GetValueForProperty("Hour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)this).Hour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Minute")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)this).Minute = (int?) content.GetValueForProperty("Minute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)this).Minute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)this).Minute = (int?) content.GetValueForProperty("Minute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)this).Minute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -136,11 +136,11 @@ internal Time(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Hour")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)this).Hour = (int) content.GetValueForProperty("Hour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)this).Hour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)this).Hour = (int) content.GetValueForProperty("Hour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)this).Hour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("Minute")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)this).Minute = (int?) content.GetValueForProperty("Minute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal)this).Minute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)this).Minute = (int?) content.GetValueForProperty("Minute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal)this).Minute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Time.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Time.TypeConverter.cs similarity index 98% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Time.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/Time.TypeConverter.cs index a4709c8bfad0..56348d2daf8c 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Time.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Time.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Time.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Time.cs similarity index 92% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Time.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/Time.cs index ce6467010674..35f96511542a 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Time.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Time.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; /// The time of day. public partial class Time : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITimeInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITimeInternal { /// Backing field for property. @@ -49,6 +49,9 @@ public partial interface ITime : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). Hour value 24 cannot be combined with any other minute value but 0.", SerializedName = @"hour", PossibleTypes = new [] { typeof(int) })] @@ -59,6 +62,9 @@ public partial interface ITime : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0.", SerializedName = @"minute", PossibleTypes = new [] { typeof(int) })] diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Time.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Time.json.cs similarity index 93% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Time.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/Time.json.cs index f725bd850b2c..9e86daf3ae9e 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/Time.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Time.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,11 @@ public partial class Time partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ITime FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new Time(json) : null; } @@ -77,8 +75,8 @@ internal Time(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonO { return; } - {_hour = If( json?.PropertyT("hour"), out var __jsonHour) ? (int)__jsonHour : Hour;} - {_minute = If( json?.PropertyT("minute"), out var __jsonMinute) ? (int?)__jsonMinute : Minute;} + {_hour = If( json?.PropertyT("hour"), out var __jsonHour) ? (int)__jsonHour : _hour;} + {_minute = If( json?.PropertyT("minute"), out var __jsonMinute) ? (int?)__jsonMinute : _minute;} AfterFromJson(json); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResource.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResource.PowerShell.cs new file mode 100644 index 000000000000..41e85e7ff734 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResource.PowerShell.cs @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial class TrackedResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, 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 TrackedResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial interface ITrackedResource + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs new file mode 100644 index 000000000000..e9b2a16d37f0 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResource.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResource.cs new file mode 100644 index 000000000000..875cbb4d3377 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResource.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResource, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Resource(); + + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Id; } + + /// Backing field for property. + private string _location; + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Name = value ?? null; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TrackedResourceTags()); set => this._tag = value; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public TrackedResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + public partial interface ITrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResource + { + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags Tag { get; set; } + + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + internal partial interface ITrackedResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IResourceInternal + { + /// The geo-location where the resource lives + string Location { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResource.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResource.json.cs new file mode 100644 index 000000000000..0cc10e5fcab7 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResource.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. + internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Resource(json); + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TrackedResourceTags.FromJson(__jsonTags) : _tag;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs new file mode 100644 index 000000000000..7c03c2a5406f --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial class TrackedResourceTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResourceTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResourceTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResourceTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrackedResourceTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial interface ITrackedResourceTags + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs new file mode 100644 index 000000000000..614d7deee5b4 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResourceTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResourceTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResourceTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResourceTags.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResourceTags.cs new file mode 100644 index 000000000000..a19dfa8bf069 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResourceTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTagsInternal + { + + /// Creates an new instance. + public TrackedResourceTags() + { + + } + } + /// Resource tags. + public partial interface ITrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface ITrackedResourceTagsInternal + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs new file mode 100644 index 000000000000..dcd55dd73e9c --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TrackedResourceTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResourceTags.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResourceTags.json.cs new file mode 100644 index 000000000000..46196fa5cc65 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/TrackedResourceTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject instance to deserialize from. + /// + internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitSchedule.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitSchedule.PowerShell.cs similarity index 79% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitSchedule.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitSchedule.PowerShell.cs index 4a57ecbae9a4..c878593c47ca 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitSchedule.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitSchedule.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class UploadLimitSchedule 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UploadLimitSchedule(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UploadLimitSchedule(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -128,13 +128,13 @@ internal UploadLimitSchedule(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("WeeklyRecurrence")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitScheduleInternal)this).WeeklyRecurrence = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[]) content.GetValueForProperty("WeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitScheduleInternal)this).WeeklyRecurrence, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitScheduleInternal)this).WeeklyRecurrence = (System.Collections.Generic.List) content.GetValueForProperty("WeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitScheduleInternal)this).WeeklyRecurrence, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); } 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. @@ -149,7 +149,7 @@ internal UploadLimitSchedule(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("WeeklyRecurrence")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitScheduleInternal)this).WeeklyRecurrence = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[]) content.GetValueForProperty("WeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitScheduleInternal)this).WeeklyRecurrence, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitScheduleInternal)this).WeeklyRecurrence = (System.Collections.Generic.List) content.GetValueForProperty("WeeklyRecurrence",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitScheduleInternal)this).WeeklyRecurrence, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrenceTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitSchedule.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitSchedule.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitSchedule.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitSchedule.TypeConverter.cs index d002477668d8..0f6a554dc23c 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitSchedule.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitSchedule.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitSchedule.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitSchedule.cs new file mode 100644 index 000000000000..1c4e0a687a86 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitSchedule.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The WAN-link upload limit schedule. Overlapping recurrences are not allowed. + public partial class UploadLimitSchedule : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitScheduleInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _weeklyRecurrence; + + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public System.Collections.Generic.List WeeklyRecurrence { get => this._weeklyRecurrence; set => this._weeklyRecurrence = value; } + + /// Creates an new instance. + public UploadLimitSchedule() + { + + } + } + /// The WAN-link upload limit schedule. Overlapping recurrences are not allowed. + public partial interface IUploadLimitSchedule : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable + { + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The set of weekly repeating recurrences of the WAN-link upload limit schedule.", + SerializedName = @"weeklyRecurrences", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence) })] + System.Collections.Generic.List WeeklyRecurrence { get; set; } + + } + /// The WAN-link upload limit schedule. Overlapping recurrences are not allowed. + internal partial interface IUploadLimitScheduleInternal + + { + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + System.Collections.Generic.List WeeklyRecurrence { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitSchedule.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitSchedule.json.cs similarity index 90% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitSchedule.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitSchedule.json.cs index d6f7cb9c1956..913e72c10def 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitSchedule.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitSchedule.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class UploadLimitSchedule partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitSchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitSchedule FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new UploadLimitSchedule(json) : null; } @@ -109,7 +109,7 @@ internal UploadLimitSchedule(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Run { return; } - {_weeklyRecurrence = If( json?.PropertyT("weeklyRecurrences"), out var __jsonWeeklyRecurrences) ? If( __jsonWeeklyRecurrences as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.UploadLimitWeeklyRecurrence.FromJson(__u) )) ))() : null : WeeklyRecurrence;} + {_weeklyRecurrence = If( json?.PropertyT("weeklyRecurrences"), out var __jsonWeeklyRecurrences) ? If( __jsonWeeklyRecurrences as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence) (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UploadLimitWeeklyRecurrence.FromJson(__u) )) ))() : null : _weeklyRecurrence;} AfterFromJson(json); } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitWeeklyRecurrence.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitWeeklyRecurrence.PowerShell.cs new file mode 100644 index 000000000000..57e3fe5ee929 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitWeeklyRecurrence.PowerShell.cs @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// + /// The weekly recurrence of the WAN-link upload limit schedule. The start time must be earlier in the day than the end time. + /// The recurrence must not span across multiple days. + /// + [System.ComponentModel.TypeConverter(typeof(UploadLimitWeeklyRecurrenceTypeConverter))] + public partial class UploadLimitWeeklyRecurrence + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UploadLimitWeeklyRecurrence(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UploadLimitWeeklyRecurrence(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 UploadLimitWeeklyRecurrence(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LimitInMbps")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrenceInternal)this).LimitInMbps = (int) content.GetValueForProperty("LimitInMbps",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrenceInternal)this).LimitInMbps, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeHour = (int) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartTimeMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeMinute = (int?) content.GetValueForProperty("StartTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeHour = (int) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeMinute = (int?) content.GetValueForProperty("EndTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TimeTypeConverter.ConvertFrom); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TimeTypeConverter.ConvertFrom); + } + if (content.Contains("Day")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrenceInternal)this).Day = (System.Collections.Generic.List) content.GetValueForProperty("Day",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrenceInternal)this).Day, __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 UploadLimitWeeklyRecurrence(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LimitInMbps")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrenceInternal)this).LimitInMbps = (int) content.GetValueForProperty("LimitInMbps",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrenceInternal)this).LimitInMbps, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeHour = (int) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartTimeMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeMinute = (int?) content.GetValueForProperty("StartTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeHour = (int) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeMinute = (int?) content.GetValueForProperty("EndTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TimeTypeConverter.ConvertFrom); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TimeTypeConverter.ConvertFrom); + } + if (content.Contains("Day")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrenceInternal)this).Day = (System.Collections.Generic.List) content.GetValueForProperty("Day",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrenceInternal)this).Day, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + } + /// The weekly recurrence of the WAN-link upload limit schedule. The start time must be earlier in the day than the end time. + /// The recurrence must not span across multiple days. + [System.ComponentModel.TypeConverter(typeof(UploadLimitWeeklyRecurrenceTypeConverter))] + public partial interface IUploadLimitWeeklyRecurrence + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitWeeklyRecurrence.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitWeeklyRecurrence.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitWeeklyRecurrence.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitWeeklyRecurrence.TypeConverter.cs index 8b59da293bd0..2e510f22a83b 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitWeeklyRecurrence.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitWeeklyRecurrence.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitWeeklyRecurrence.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitWeeklyRecurrence.cs new file mode 100644 index 000000000000..ba4b1a84bc5c --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitWeeklyRecurrence.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// The weekly recurrence of the WAN-link upload limit schedule. The start time must be earlier in the day than the end time. + /// The recurrence must not span across multiple days. + /// + public partial class UploadLimitWeeklyRecurrence : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrenceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrence __weeklyRecurrence = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.WeeklyRecurrence(); + + /// + /// The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public System.Collections.Generic.List Day { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrenceInternal)__weeklyRecurrence).Day; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrenceInternal)__weeklyRecurrence).Day = value ; } + + /// + /// The end time of the schedule recurrence. Full hour and 30-minute intervals are supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).EndTime = value ?? null /* model class */; } + + /// + /// The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). + /// Hour value 24 cannot be combined with any other minute value but 0. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public int EndTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).EndTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).EndTimeHour = value ; } + + /// + /// The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public int? EndTimeMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).EndTimeMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).EndTimeMinute = value ?? default(int); } + + /// Backing field for property. + private int _limitInMbps; + + /// + /// The WAN-link upload bandwidth (maximum data transfer rate) in megabits per second. Value of 0 indicates no throughput + /// is allowed and any running migration job is effectively paused for the duration of this recurrence. Only data plane operations + /// are governed by this limit. Control plane operations ensure seamless functionality. The agent may exceed this limit with + /// control messages, if necessary. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public int LimitInMbps { get => this._limitInMbps; set => this._limitInMbps = value; } + + /// Internal Acessors for EndTime + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal.EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).EndTime = value ?? null /* model class */; } + + /// Internal Acessors for StartTime + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal.StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).StartTime = value ?? null /* model class */; } + + /// + /// The start time of the schedule recurrence. Full hour and 30-minute intervals are supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).StartTime = value ?? null /* model class */; } + + /// + /// The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). + /// Hour value 24 cannot be combined with any other minute value but 0. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public int StartTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).StartTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).StartTimeHour = value ; } + + /// + /// The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public int? StartTimeMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).StartTimeMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__weeklyRecurrence).StartTimeMinute = value ?? default(int); } + + /// Creates an new instance. + public UploadLimitWeeklyRecurrence() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__weeklyRecurrence), __weeklyRecurrence); + await eventListener.AssertObjectIsValid(nameof(__weeklyRecurrence), __weeklyRecurrence); + } + } + /// The weekly recurrence of the WAN-link upload limit schedule. The start time must be earlier in the day than the end time. + /// The recurrence must not span across multiple days. + public partial interface IUploadLimitWeeklyRecurrence : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrence + { + /// + /// The WAN-link upload bandwidth (maximum data transfer rate) in megabits per second. Value of 0 indicates no throughput + /// is allowed and any running migration job is effectively paused for the duration of this recurrence. Only data plane operations + /// are governed by this limit. Control plane operations ensure seamless functionality. The agent may exceed this limit with + /// control messages, if necessary. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The WAN-link upload bandwidth (maximum data transfer rate) in megabits per second. Value of 0 indicates no throughput is allowed and any running migration job is effectively paused for the duration of this recurrence. Only data plane operations are governed by this limit. Control plane operations ensure seamless functionality. The agent may exceed this limit with control messages, if necessary.", + SerializedName = @"limitInMbps", + PossibleTypes = new [] { typeof(int) })] + int LimitInMbps { get; set; } + + } + /// The weekly recurrence of the WAN-link upload limit schedule. The start time must be earlier in the day than the end time. + /// The recurrence must not span across multiple days. + internal partial interface IUploadLimitWeeklyRecurrenceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrenceInternal + { + /// + /// The WAN-link upload bandwidth (maximum data transfer rate) in megabits per second. Value of 0 indicates no throughput + /// is allowed and any running migration job is effectively paused for the duration of this recurrence. Only data plane operations + /// are governed by this limit. Control plane operations ensure seamless functionality. The agent may exceed this limit with + /// control messages, if necessary. + /// + int LimitInMbps { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitWeeklyRecurrence.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitWeeklyRecurrence.json.cs similarity index 93% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitWeeklyRecurrence.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitWeeklyRecurrence.json.cs index fb81c5c7e45d..469b29c0beec 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/UploadLimitWeeklyRecurrence.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UploadLimitWeeklyRecurrence.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -57,13 +57,13 @@ public partial class UploadLimitWeeklyRecurrence partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new UploadLimitWeeklyRecurrence(json) : null; } @@ -105,8 +105,8 @@ internal UploadLimitWeeklyRecurrence(Microsoft.Azure.PowerShell.Cmdlets.StorageM { return; } - __weeklyRecurrence = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.WeeklyRecurrence(json); - {_limitInMbps = If( json?.PropertyT("limitInMbps"), out var __jsonLimitInMbps) ? (int)__jsonLimitInMbps : LimitInMbps;} + __weeklyRecurrence = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.WeeklyRecurrence(json); + {_limitInMbps = If( json?.PropertyT("limitInMbps"), out var __jsonLimitInMbps) ? (int)__jsonLimitInMbps : _limitInMbps;} AfterFromJson(json); } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentities.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentities.PowerShell.cs similarity index 91% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentities.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentities.PowerShell.cs index 97dcb3951a79..22d0453cc0db 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentities.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentities.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -67,27 +67,27 @@ public partial class UserAssignedIdentities 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UserAssignedIdentities(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UserAssignedIdentities(content); } @@ -97,7 +97,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUser /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -117,7 +117,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -136,7 +136,7 @@ internal UserAssignedIdentities(global::System.Collections.IDictionary content) } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentities.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentities.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentities.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentities.TypeConverter.cs index 249661fcc182..8ce8319c681e 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentities.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentities.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentities.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentities.cs similarity index 90% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentities.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentities.cs index c9e85ce486f8..32eddfb5d4ac 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentities.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentities.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -13,8 +13,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 /// The dictionary values can be empty objects ({}) in requests. /// public partial class UserAssignedIdentities : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentitiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentitiesInternal { /// Creates an new instance. @@ -28,7 +28,7 @@ public UserAssignedIdentities() /// The dictionary values can be empty objects ({}) in requests. public partial interface IUserAssignedIdentities : Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray { } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentities.dictionary.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentities.dictionary.cs new file mode 100644 index 000000000000..edb5271ee42e --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentities.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + public partial class UserAssignedIdentities : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentity this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentity value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentity value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentities source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentities.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentities.json.cs similarity index 92% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentities.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentities.json.cs index 6bd97840a13d..ac7c1363e0cb 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentities.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentities.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -58,13 +58,13 @@ public partial class UserAssignedIdentities partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentities FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new UserAssignedIdentities(json) : null; } @@ -88,7 +88,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray)this).AdditionalProperties, container); + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray)this).AdditionalProperties, container); AfterToJson(ref container); return container; } @@ -106,7 +106,7 @@ internal UserAssignedIdentities(Microsoft.Azure.PowerShell.Cmdlets.StorageMover. { return; } - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.UserAssignedIdentity.FromJson(j) ,exclusions ); + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentity.FromJson(j) ,exclusions ); AfterFromJson(json); } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentity.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentity.PowerShell.cs similarity index 81% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentity.PowerShell.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentity.PowerShell.cs index 97ce83fd7a2a..69471e7e7c76 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentity.PowerShell.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentity.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -63,27 +63,27 @@ public partial class UserAssignedIdentity 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UserAssignedIdentity(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UserAssignedIdentity(content); } @@ -93,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUser /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -113,7 +113,7 @@ public override string ToString() } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -128,17 +128,17 @@ internal UserAssignedIdentity(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentityInternal)this).ClientId, 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. @@ -153,11 +153,11 @@ internal UserAssignedIdentity(global::System.Management.Automation.PSObject cont // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentity.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentity.TypeConverter.cs similarity index 98% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentity.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentity.TypeConverter.cs index ce6aced1f82c..61c9b5721fbd 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentity.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentity.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentity.cs similarity index 85% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentity.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentity.cs index 571d288d11e8..dfe0249c5507 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentity.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; /// User assigned identity properties public partial class UserAssignedIdentity : - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentity, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentity, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentityInternal { /// Backing field for property. @@ -21,10 +21,10 @@ public partial class UserAssignedIdentity : public string ClientId { get => this._clientId; } /// Internal Acessors for ClientId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentityInternal.ClientId { get => this._clientId; set { {_clientId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentityInternal.ClientId { get => this._clientId; set { {_clientId = value;} } } /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } /// Backing field for property. private string _principalId; @@ -47,6 +47,9 @@ public partial interface IUserAssignedIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The client ID of the assigned identity.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] @@ -55,6 +58,9 @@ public partial interface IUserAssignedIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The principal ID of the assigned identity.", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentity.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentity.json.cs similarity index 93% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentity.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentity.json.cs index 544ef2be4097..953cc9bd43da 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api30/UserAssignedIdentity.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/UserAssignedIdentity.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class UserAssignedIdentity partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUserAssignedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new UserAssignedIdentity(json) : null; } @@ -84,11 +84,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode ToJ { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._clientId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString(this._clientId.ToString()) : null, "clientId" ,container.Add ); } @@ -108,8 +108,8 @@ internal UserAssignedIdentity(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Ru { return; } - {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId;} - {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)ClientId;} + {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)_principalId;} + {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)_clientId;} AfterFromJson(json); } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/WeeklyRecurrence.PowerShell.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/WeeklyRecurrence.PowerShell.cs new file mode 100644 index 000000000000..8ed45b8858b7 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/WeeklyRecurrence.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + + /// The weekly recurrence of the schedule. + [System.ComponentModel.TypeConverter(typeof(WeeklyRecurrenceTypeConverter))] + public partial class WeeklyRecurrence + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrence DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new WeeklyRecurrence(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrence DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new WeeklyRecurrence(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrence FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 WeeklyRecurrence(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Day")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrenceInternal)this).Day = (System.Collections.Generic.List) content.GetValueForProperty("Day",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrenceInternal)this).Day, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("StartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeHour = (int) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartTimeMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeMinute = (int?) content.GetValueForProperty("StartTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeHour = (int) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeMinute = (int?) content.GetValueForProperty("EndTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TimeTypeConverter.ConvertFrom); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TimeTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal WeeklyRecurrence(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Day")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrenceInternal)this).Day = (System.Collections.Generic.List) content.GetValueForProperty("Day",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrenceInternal)this).Day, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("StartTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeHour = (int) content.GetValueForProperty("StartTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartTimeMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeMinute = (int?) content.GetValueForProperty("StartTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeHour = (int) content.GetValueForProperty("EndTimeHour",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EndTimeMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeMinute = (int?) content.GetValueForProperty("EndTimeMinute",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTimeMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime) content.GetValueForProperty("StartTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).StartTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TimeTypeConverter.ConvertFrom); + } + if (content.Contains("EndTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTime = (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime) content.GetValueForProperty("EndTime",((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)this).EndTime, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.TimeTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + } + /// The weekly recurrence of the schedule. + [System.ComponentModel.TypeConverter(typeof(WeeklyRecurrenceTypeConverter))] + public partial interface IWeeklyRecurrence + + { + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/WeeklyRecurrence.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/WeeklyRecurrence.TypeConverter.cs similarity index 97% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/WeeklyRecurrence.TypeConverter.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/WeeklyRecurrence.TypeConverter.cs index eafdc7095ef1..62b17b18f77d 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/WeeklyRecurrence.TypeConverter.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/WeeklyRecurrence.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrence ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrence ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrence).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrence).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/WeeklyRecurrence.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/WeeklyRecurrence.cs new file mode 100644 index 000000000000..d58992e91398 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/WeeklyRecurrence.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// The weekly recurrence of the schedule. + public partial class WeeklyRecurrence : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrence, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrenceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrence __recurrence = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Recurrence(); + + /// Backing field for property. + private System.Collections.Generic.List _day; + + /// + /// The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Owned)] + public System.Collections.Generic.List Day { get => this._day; set => this._day = value; } + + /// + /// The end time of the schedule recurrence. Full hour and 30-minute intervals are supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).EndTime = value ?? null /* model class */; } + + /// + /// The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). + /// Hour value 24 cannot be combined with any other minute value but 0. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public int EndTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).EndTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).EndTimeHour = value ; } + + /// + /// The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public int? EndTimeMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).EndTimeMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).EndTimeMinute = value ?? default(int); } + + /// Internal Acessors for EndTime + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal.EndTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).EndTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).EndTime = value ?? null /* model class */; } + + /// Internal Acessors for StartTime + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal.StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).StartTime = value ?? null /* model class */; } + + /// + /// The start time of the schedule recurrence. Full hour and 30-minute intervals are supported. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITime StartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).StartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).StartTime = value ?? null /* model class */; } + + /// + /// The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). + /// Hour value 24 cannot be combined with any other minute value but 0. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public int StartTimeHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).StartTimeHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).StartTimeHour = value ; } + + /// + /// The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Origin(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PropertyOrigin.Inherited)] + public int? StartTimeMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).StartTimeMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal)__recurrence).StartTimeMinute = value ?? default(int); } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__recurrence), __recurrence); + await eventListener.AssertObjectIsValid(nameof(__recurrence), __recurrence); + } + + /// Creates an new instance. + public WeeklyRecurrence() + { + + } + } + /// The weekly recurrence of the schedule. + public partial interface IWeeklyRecurrence : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrence + { + /// + /// The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence.", + SerializedName = @"days", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + System.Collections.Generic.List Day { get; set; } + + } + /// The weekly recurrence of the schedule. + internal partial interface IWeeklyRecurrenceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IRecurrenceInternal + { + /// + /// The set of days of week for the schedule recurrence. A day must not be specified more than once in a recurrence. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + System.Collections.Generic.List Day { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/WeeklyRecurrence.json.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/WeeklyRecurrence.json.cs similarity index 89% rename from generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/WeeklyRecurrence.json.cs rename to generated/StorageMover/StorageMover.Autorest/generated/api/Models/WeeklyRecurrence.json.cs index 25c8b2f350e2..5015d68c41a7 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Models/Api20250701/WeeklyRecurrence.json.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/Models/WeeklyRecurrence.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701 +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class WeeklyRecurrence partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrence. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrence. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrence. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrence. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IWeeklyRecurrence FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IWeeklyRecurrence FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonObject json ? new WeeklyRecurrence(json) : null; } @@ -110,8 +110,8 @@ internal WeeklyRecurrence(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtim { return; } - __recurrence = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Recurrence(json); - {_day = If( json?.PropertyT("days"), out var __jsonDays) ? If( __jsonDays as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek) (__u is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString __t ? (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek)(__t.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek)""))) ))() : null : Day;} + __recurrence = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Recurrence(json); + {_day = If( json?.PropertyT("days"), out var __jsonDays) ? If( __jsonDays as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _day;} AfterFromJson(json); } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/StorageMover.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/StorageMover.cs index 1fb353ee8b82..bd89ede4de1d 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/StorageMover.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/api/StorageMover.cs @@ -15,7 +15,7 @@ public partial class StorageMover { /// - /// Creates or updates an Agent resource, which references a hybrid compute machine that can run jobs. + /// update an Agent resource, which references a hybrid compute machine that can run jobs. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -27,10 +27,11 @@ public partial class StorageMover /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsCreateOrUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentsCreateOrUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -59,16 +60,16 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AgentsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.AgentsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// Creates or updates an Agent resource, which references a hybrid compute machine that can run jobs. + /// update an Agent resource, which references a hybrid compute machine that can run jobs. /// /// /// The Agent resource. @@ -77,10 +78,11 @@ public partial class StorageMover /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -122,15 +124,293 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AgentsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.AgentsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. + /// + /// update an Agent resource, which references a hybrid compute machine that can run jobs. + /// + /// + /// The Agent resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/agents/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var agentName = _match.Groups["agentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/agents/" + + agentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AgentsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update an Agent resource, which references a hybrid compute machine that can run jobs. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Agent resource. + /// Json string supplied to the AgentsCreateOrUpdate 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/agents/" + + global::System.Uri.EscapeDataString(agentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AgentsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update an Agent resource, which references a hybrid compute machine that can run jobs. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Agent resource. + /// Json string supplied to the AgentsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/agents/" + + global::System.Uri.EscapeDataString(agentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AgentsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update an Agent resource, which references a hybrid compute machine that can run jobs. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Agent resource. + /// The Agent resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/agents/" + + global::System.Uri.EscapeDataString(agentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AgentsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Agent.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 @@ -140,7 +420,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AgentsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AgentsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -151,6 +431,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -158,13 +439,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Agent.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Agent.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -192,7 +473,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AgentsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task AgentsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -222,7 +503,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentsDelete(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentsDelete(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -251,7 +532,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AgentsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.AgentsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } @@ -266,7 +547,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -308,11 +589,11 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AgentsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.AgentsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// 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 204 (NoContent). @@ -323,32 +604,29 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AgentsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AgentsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; // 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 ) { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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"))) { @@ -357,15 +635,14 @@ public partial class StorageMover if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + 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), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); @@ -374,45 +651,45 @@ public partial class StorageMover _response = await sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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( Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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; + // 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( Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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; - 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException(_response); - } - } + + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException(_response); + } + } // check for terminal status code if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) @@ -431,6 +708,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -450,7 +728,7 @@ public partial class StorageMover default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -504,7 +782,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentsGet(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentsGet(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -533,7 +811,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AgentsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.AgentsGet_Call (request, onOk,onDefault,eventListener,sender); } } @@ -547,7 +825,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -589,45 +867,204 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AgentsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.AgentsGet_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 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Gets an Agent resource. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsGet_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { + var apiVersion = @"2025-07-01"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/agents/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}'"); + } - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var agentName = _match.Groups["agentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/agents/" + + agentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AgentsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets an Agent resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Agent resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsGetWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/agents/" + + global::System.Uri.EscapeDataString(agentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AgentsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Agent.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsGet_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Agent.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Agent.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -680,7 +1117,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentsList(string subscriptionId, string resourceGroupName, string storageMoverName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentsList(string subscriptionId, string resourceGroupName, string storageMoverName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -708,7 +1145,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AgentsList_Call(request,onOk,onDefault,eventListener,sender); + await this.AgentsList_Call (request, onOk,onDefault,eventListener,sender); } } @@ -722,7 +1159,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task AgentsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -762,11 +1199,165 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AgentsList_Call(request,onOk,onDefault,eventListener,sender); + await this.AgentsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all Agents in a Storage Mover. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/agents$", 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.StorageMover/storageMovers/{storageMoverName}/agents'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/agents" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AgentsListWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all Agents in a Storage Mover. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsListWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/agents" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AgentsListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 @@ -776,7 +1367,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task AgentsList_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AgentsList_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -787,6 +1378,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -794,13 +1386,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -839,7 +1431,7 @@ public partial class StorageMover } } - /// Creates or updates an Agent resource. + /// update an Agent resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. @@ -850,10 +1442,11 @@ public partial class StorageMover /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentsUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -882,15 +1475,15 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AgentsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.AgentsUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Creates or updates an Agent resource. + /// update an Agent resource. /// /// The Agent resource. /// a delegate that is called when the remote service returns 200 (OK). @@ -898,10 +1491,11 @@ public partial class StorageMover /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -943,109 +1537,138 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.AgentsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.AgentsUpdate_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 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// update an Agent resource. + /// + /// The Agent resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. /// - internal async global::System.Threading.Tasks.Task AgentsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2025-07-01"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Agent.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/agents/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var agentName = _match.Groups["agentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/agents/" + + agentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AgentsUpdateWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// + /// update an Agent resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Agent resource. - /// The Agent resource. + /// Json string supplied to the AgentsUpdate 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task AgentsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { + var apiVersion = @"2025-07-01"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); - await eventListener.AssertNotNull(nameof(agentName),agentName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/agents/" + + global::System.Uri.EscapeDataString(agentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AgentsUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Creates or updates an Endpoint resource, which represents a data transfer source or destination. - /// + /// update an Agent resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. - /// The name of the Endpoint resource. - /// The Endpoint resource, which contains information about file sources and targets. - /// 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). + /// The name of the Agent resource. + /// Json string supplied to the AgentsUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsCreateOrUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -1059,93 +1682,140 @@ public partial class StorageMover + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StorageMover/storageMovers/" + global::System.Uri.EscapeDataString(storageMoverName) - + "/endpoints/" - + global::System.Uri.EscapeDataString(endpointName) + + "/agents/" + + global::System.Uri.EscapeDataString(agentName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.EndpointsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + return await this.AgentsUpdateWithResult_Call (request, eventListener,sender); } } - /// - /// Creates or updates an Endpoint resource, which represents a data transfer source or destination. - /// - /// - /// The Endpoint resource, which contains information about file sources and targets. - /// 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). + /// update an Agent resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Agent resource. + /// The Agent resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AgentsUpdateWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // 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.StorageMover/storageMovers/(?[^/]+)/endpoints/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var storageMoverName = _match.Groups["storageMoverName"].Value; - var endpointName = _match.Groups["endpointName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StorageMover/storageMovers/" - + storageMoverName - + "/endpoints/" - + endpointName + + global::System.Uri.EscapeDataString(storageMoverName) + + "/agents/" + + global::System.Uri.EscapeDataString(agentName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.EndpointsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + return await this.AgentsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 AgentsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Agent.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 @@ -1155,7 +1825,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EndpointsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AgentsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1166,6 +1836,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1173,13 +1844,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Endpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Agent.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1195,19 +1866,19 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. - /// The name of the Endpoint resource. - /// The Endpoint resource, which contains information about file sources and targets. + /// The name of the Agent resource. + /// The Agent resource. /// 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 EndpointsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task AgentsUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string agentName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1217,27 +1888,30 @@ public partial class StorageMover await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); - await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(agentName),agentName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Deletes an Endpoint resource. + /// + /// update an Endpoint resource, which represents a data transfer source or destination. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Endpoint resource. + /// The Endpoint resource, which contains information about file sources and targets. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsDelete(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EndpointsCreateOrUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -1261,27 +1935,34 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EndpointsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.EndpointsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes an Endpoint resource. + /// + /// update an Endpoint resource, which represents a data transfer source or destination. + /// /// + /// The Endpoint resource, which contains information about file sources and targets. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EndpointsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -1318,208 +1999,149 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EndpointsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.EndpointsCreateOrUpdate_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 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// + /// update an Endpoint resource, which represents a data transfer source or destination. + /// + /// + /// The Endpoint resource, which contains information about file sources and targets. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. /// - internal async global::System.Threading.Tasks.Task EndpointsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EndpointsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2025-07-01"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/endpoints/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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( Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException(_response); - } - } + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}'"); + } - // 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), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get); + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/endpoints/" + + endpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // drop the old response - _response?.Dispose(); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EndpointsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// update an Endpoint resource, which represents a data transfer source or destination. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Endpoint resource. + /// Json string supplied to the EndpointsCreateOrUpdate 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsDelete_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task EndpointsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { + var apiVersion = @"2025-07-01"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); - await eventListener.AssertNotNull(nameof(endpointName),endpointName); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets an Endpoint resource. + /// + /// update an Endpoint resource, which represents a data transfer source or destination. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Endpoint 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). + /// Json string supplied to the EndpointsCreateOrUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsGet(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EndpointsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -1539,76 +2161,136 @@ public partial class StorageMover + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.EndpointsGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.EndpointsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Gets an Endpoint 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). + /// + /// update an Endpoint resource, which represents a data transfer source or destination. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Endpoint resource. + /// The Endpoint resource, which contains information about file sources and targets. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EndpointsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // 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.StorageMover/storageMovers/(?[^/]+)/endpoints/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var storageMoverName = _match.Groups["storageMoverName"].Value; - var endpointName = _match.Groups["endpointName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StorageMover/storageMovers/" - + storageMoverName + + global::System.Uri.EscapeDataString(storageMoverName) + "/endpoints/" - + endpointName + + global::System.Uri.EscapeDataString(endpointName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.EndpointsGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.EndpointsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Endpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 @@ -1618,7 +2300,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EndpointsGet_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EndpointsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1629,6 +2311,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1636,13 +2319,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Endpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Endpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1658,18 +2341,19 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Endpoint resource. + /// The Endpoint resource, which contains information about file sources and targets. /// 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 EndpointsGet_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task EndpointsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1680,14 +2364,18 @@ public partial class StorageMover await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Lists all Endpoints in a Storage Mover. + /// Deletes an Endpoint resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. + /// The name of the Endpoint resource. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -1695,7 +2383,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EndpointsList(string subscriptionId, string resourceGroupName, string storageMoverName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EndpointsDelete(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -1709,7 +2397,8 @@ public partial class StorageMover + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StorageMover/storageMovers/" + global::System.Uri.EscapeDataString(storageMoverName) - + "/endpoints" + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1718,18 +2407,19 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EndpointsList_Call(request,onOk,onDefault,eventListener,sender); + await this.EndpointsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Lists all Endpoints in a Storage Mover. + /// Deletes an Endpoint resource. /// /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -1737,7 +2427,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EndpointsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EndpointsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -1745,16 +2435,17 @@ public partial class StorageMover { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/endpoints$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/endpoints/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/endpoints'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var storageMoverName = _match.Groups["storageMoverName"].Value; + var endpointName = _match.Groups["endpointName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -1763,7 +2454,8 @@ public partial class StorageMover + resourceGroupName + "/providers/Microsoft.StorageMover/storageMovers/" + storageMoverName - + "/endpoints" + + "/endpoints/" + + endpointName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1772,18 +2464,19 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EndpointsList_Call(request,onOk,onDefault,eventListener,sender); + await this.EndpointsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// 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 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -1791,17 +2484,111 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EndpointsList_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EndpointsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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( Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1809,13 +2596,19 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1831,17 +2624,18 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. + /// The name of the Endpoint resource. /// 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 EndpointsList_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task EndpointsDelete_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1851,17 +2645,15 @@ public partial class StorageMover await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); } } - /// - /// Updates properties for an Endpoint resource. Properties not specified in the request body will be unchanged. - /// + /// Gets an Endpoint resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Endpoint resource. - /// The Endpoint 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). @@ -1870,7 +2662,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EndpointsUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EndpointsGet(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -1894,24 +2686,17 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EndpointsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.EndpointsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Updates properties for an Endpoint resource. Properties not specified in the request body will be unchanged. - /// + /// Gets an Endpoint resource. /// - /// The Endpoint 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). @@ -1920,7 +2705,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task EndpointsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EndpointsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -1957,20 +2742,174 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.EndpointsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.EndpointsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets an Endpoint resource. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/endpoints/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/endpoints/" + + endpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EndpointsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets an Endpoint resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Endpoint resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsGetWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EndpointsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Endpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 @@ -1980,7 +2919,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task EndpointsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task EndpointsGet_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1991,6 +2930,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1998,13 +2938,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Endpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Endpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2020,19 +2960,18 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Endpoint resource. - /// The Endpoint resource. /// 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 EndpointsUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task EndpointsGet_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2043,20 +2982,13 @@ public partial class StorageMover await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); await eventListener.AssertNotNull(nameof(endpointName),endpointName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer. - /// + /// Lists all Endpoints in a Storage Mover. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. - /// The name of the Project resource. - /// The name of the Job Definition resource. - /// The Job Definition 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). @@ -2065,7 +2997,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task JobDefinitionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EndpointsList(string subscriptionId, string resourceGroupName, string storageMoverName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -2079,10 +3011,7 @@ public partial class StorageMover + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StorageMover/storageMovers/" + global::System.Uri.EscapeDataString(storageMoverName) - + "/projects/" - + global::System.Uri.EscapeDataString(projectName) - + "/jobDefinitions/" - + global::System.Uri.EscapeDataString(jobDefinitionName) + + "/endpoints" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2091,24 +3020,17 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.JobDefinitionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.EndpointsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer. - /// + /// Lists all Endpoints in a Storage Mover. /// - /// The Job Definition 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). @@ -2117,7 +3039,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task JobDefinitionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task EndpointsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -2125,18 +3047,16 @@ public partial class StorageMover { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/endpoints$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var storageMoverName = _match.Groups["storageMoverName"].Value; - var projectName = _match.Groups["projectName"].Value; - var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -2145,10 +3065,7 @@ public partial class StorageMover + resourceGroupName + "/providers/Microsoft.StorageMover/storageMovers/" + storageMoverName - + "/projects/" - + projectName - + "/jobDefinitions/" - + jobDefinitionName + + "/endpoints" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2157,22 +3074,3326 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.JobDefinitionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.EndpointsList_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 200 (OK). + /// Lists all Endpoints in a Storage Mover. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/endpoints$", 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.StorageMover/storageMovers/{storageMoverName}/endpoints'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/endpoints" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EndpointsListWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all Endpoints in a Storage Mover. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsListWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/endpoints" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EndpointsListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsList_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// 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 EndpointsList_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); + } + } + + /// + /// update properties for an Endpoint resource. Properties not specified in the request body will be unchanged. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Endpoint resource. + /// The Endpoint 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update properties for an Endpoint resource. Properties not specified in the request body will be unchanged. + /// + /// + /// The Endpoint 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/endpoints/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/endpoints/" + + endpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update properties for an Endpoint resource. Properties not specified in the request body will be unchanged. + /// + /// + /// The Endpoint resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/endpoints/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var endpointName = _match.Groups["endpointName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/endpoints/" + + endpointName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EndpointsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update properties for an Endpoint resource. Properties not specified in the request body will be unchanged. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Endpoint resource. + /// Json string supplied to the EndpointsUpdate 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.EndpointsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update properties for an Endpoint resource. Properties not specified in the request body will be unchanged. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Endpoint resource. + /// Json string supplied to the EndpointsUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EndpointsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update properties for an Endpoint resource. Properties not specified in the request body will be unchanged. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Endpoint resource. + /// The Endpoint resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsUpdateWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/endpoints/" + + global::System.Uri.EscapeDataString(endpointName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.EndpointsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Endpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 EndpointsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Endpoint.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Endpoint resource. + /// The Endpoint resource. + /// 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 EndpointsUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string endpointName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); + await eventListener.AssertNotNull(nameof(endpointName),endpointName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// update a Job Definition resource, which contains configuration for a single unit of managed data transfer. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// The Job Definition 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update a Job Definition resource, which contains configuration for a single unit of managed data transfer. + /// + /// + /// The Job Definition 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "/jobDefinitions/" + + jobDefinitionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update a Job Definition resource, which contains configuration for a single unit of managed data transfer. + /// + /// + /// The Job Definition resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "/jobDefinitions/" + + jobDefinitionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobDefinitionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update a Job Definition resource, which contains configuration for a single unit of managed data transfer. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// Json string supplied to the JobDefinitionsCreateOrUpdate 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update a Job Definition resource, which contains configuration for a single unit of managed data transfer. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// Json string supplied to the JobDefinitionsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobDefinitionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update a Job Definition resource, which contains configuration for a single unit of managed data transfer. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// The Job Definition resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobDefinitionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// The Job Definition resource. + /// 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 JobDefinitionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertNotNull(nameof(jobDefinitionName),jobDefinitionName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes a Job Definition resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsDelete(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes a Job Definition resource. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "/jobDefinitions/" + + jobDefinitionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); + } + } + + /// 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 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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( Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// 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 JobDefinitionsDelete_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertNotNull(nameof(jobDefinitionName),jobDefinitionName); + } + } + + /// Gets a Job Definition resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsGet(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets a Job Definition 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "/jobDefinitions/" + + jobDefinitionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets a Job Definition resource. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "/jobDefinitions/" + + jobDefinitionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobDefinitionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets a Job Definition resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsGetWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobDefinitionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsGet_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// 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 JobDefinitionsGet_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertNotNull(nameof(jobDefinitionName),jobDefinitionName); + } + } + + /// Lists all Job Definitions in a Project. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsList(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all Job Definitions in a Project. + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "/jobDefinitions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all Job Definitions in a Project. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "/jobDefinitions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobDefinitionsListWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all Job Definitions in a Project. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsListWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobDefinitionsListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsList_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// 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 JobDefinitionsList_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); + await eventListener.AssertNotNull(nameof(projectName),projectName); + } + } + + /// + /// start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsStartJob(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "/startJob" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsStartJob_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. + /// + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsStartJobViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "/jobDefinitions/" + + jobDefinitionName + + "/startJob" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsStartJob_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsStartJobViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "/jobDefinitions/" + + jobDefinitionName + + "/startJob" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobDefinitionsStartJobWithResult_Call (request, eventListener,sender); + } + } + + /// + /// start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsStartJobWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "/startJob" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobDefinitionsStartJobWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsStartJobWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunResourceId.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsStartJob_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunResourceId.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// 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 JobDefinitionsStartJob_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertNotNull(nameof(jobDefinitionName),jobDefinitionName); + } + } + + /// Requests the Agent of any active instance of this Job Definition to stop. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsStopJob(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "/stopJob" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsStopJob_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Requests the Agent of any active instance of this Job Definition to stop. + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsStopJobViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "/jobDefinitions/" + + jobDefinitionName + + "/stopJob" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsStopJob_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Requests the Agent of any active instance of this Job Definition to stop. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsStopJobViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "/jobDefinitions/" + + jobDefinitionName + + "/stopJob" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobDefinitionsStopJobWithResult_Call (request, eventListener,sender); + } + } + + /// Requests the Agent of any active instance of this Job Definition to stop. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsStopJobWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "/stopJob" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobDefinitionsStopJobWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsStopJobWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunResourceId.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsStopJob_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunResourceId.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// 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 JobDefinitionsStopJob_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); + await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertNotNull(nameof(jobDefinitionName),jobDefinitionName); + } + } + + /// + /// update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// The Job Definition 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. + /// + /// + /// The Job Definition 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "/jobDefinitions/" + + jobDefinitionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. + /// + /// + /// The Job Definition resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "/jobDefinitions/" + + jobDefinitionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobDefinitionsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// Json string supplied to the JobDefinitionsUpdate 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.JobDefinitionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// Json string supplied to the JobDefinitionsUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobDefinitionsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// The Job Definition resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsUpdateWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobDefinitionsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. @@ -2180,7 +6401,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task JobDefinitionsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task JobDefinitionsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2191,6 +6412,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2198,13 +6420,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2220,8 +6442,8 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. @@ -2233,7 +6455,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task JobDefinitionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task JobDefinitionsUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2250,14 +6472,14 @@ public partial class StorageMover } } - /// Deletes a Job Definition resource. + /// Gets a Job Run resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Project resource. /// The name of the Job Definition resource. + /// The name of the Job Run resource. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -2265,7 +6487,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task JobDefinitionsDelete(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task JobRunsGet(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, string jobRunName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -2283,6 +6505,8 @@ public partial class StorageMover + global::System.Uri.EscapeDataString(projectName) + "/jobDefinitions/" + global::System.Uri.EscapeDataString(jobDefinitionName) + + "/jobRuns/" + + global::System.Uri.EscapeDataString(jobRunName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2291,19 +6515,18 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.JobDefinitionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.JobRunsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes a Job Definition resource. + /// Gets a Job Run resource. /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -2311,7 +6534,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task JobDefinitionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task JobRunsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -2319,10 +6542,10 @@ public partial class StorageMover { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)/jobRuns/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns/{jobRunName}'"); } // replace URI parameters with values from identity @@ -2331,6 +6554,7 @@ public partial class StorageMover var storageMoverName = _match.Groups["storageMoverName"].Value; var projectName = _match.Groups["projectName"].Value; var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; + var jobRunName = _match.Groups["jobRunName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -2343,6 +6567,8 @@ public partial class StorageMover + projectName + "/jobDefinitions/" + jobDefinitionName + + "/jobRuns/" + + jobRunName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2351,19 +6577,188 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.JobDefinitionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.JobRunsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets a Job Run resource. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobRunsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)/jobRuns/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns/{jobRunName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; + var jobRunName = _match.Groups["jobRunName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "/jobDefinitions/" + + jobDefinitionName + + "/jobRuns/" + + jobRunName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobRunsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets a Job Run resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The name of the Job Definition resource. + /// The name of the Job Run resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobRunsGetWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, string jobRunName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "/jobRuns/" + + global::System.Uri.EscapeDataString(jobRunName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobRunsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobRunsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRun.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -2371,7 +6766,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task JobDefinitionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task JobRunsGet_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2382,103 +6777,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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( Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2486,19 +6785,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRun.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2514,19 +6807,20 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Project resource. /// The name of the Job Definition resource. + /// The name of the Job Run resource. /// 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 JobDefinitionsDelete_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task JobRunsGet_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, string jobRunName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2538,10 +6832,11 @@ public partial class StorageMover await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); await eventListener.AssertNotNull(nameof(projectName),projectName); await eventListener.AssertNotNull(nameof(jobDefinitionName),jobDefinitionName); + await eventListener.AssertNotNull(nameof(jobRunName),jobRunName); } } - /// Gets a Job Definition resource. + /// Lists all Job Runs in a Job Definition. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. @@ -2555,7 +6850,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task JobDefinitionsGet(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task JobRunsList(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -2573,6 +6868,7 @@ public partial class StorageMover + global::System.Uri.EscapeDataString(projectName) + "/jobDefinitions/" + global::System.Uri.EscapeDataString(jobDefinitionName) + + "/jobRuns" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2586,11 +6882,11 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.JobDefinitionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.JobRunsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets a Job Definition resource. + /// Lists all Job Runs in a Job Definition. /// /// 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 @@ -2600,7 +6896,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task JobDefinitionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task JobRunsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -2608,10 +6904,10 @@ public partial class StorageMover { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)/jobRuns$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns'"); } // replace URI parameters with values from identity @@ -2632,6 +6928,7 @@ public partial class StorageMover + projectName + "/jobDefinitions/" + jobDefinitionName + + "/jobRuns" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2645,101 +6942,81 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.JobDefinitionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.JobRunsList_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 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Lists all Job Runs in a Job Definition. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsGet_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task JobRunsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { + var apiVersion = @"2025-07-01"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)/jobRuns$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns'"); } - } - } - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the Storage Mover resource. - /// The name of the Project resource. - /// The name of the Job Definition resource. - /// 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 JobDefinitionsGet_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); - await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertNotNull(nameof(jobDefinitionName),jobDefinitionName); + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "/jobDefinitions/" + + jobDefinitionName + + "/jobRuns" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.JobRunsListWithResult_Call (request, eventListener,sender); } } - /// Lists all Job Definitions in a Project. + /// Lists all Job Runs in a Job Definition. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Project 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). + /// The name of the Job Definition resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsList(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task JobRunsListWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -2755,82 +7032,87 @@ public partial class StorageMover + global::System.Uri.EscapeDataString(storageMoverName) + "/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/jobDefinitions" + + "/jobDefinitions/" + + global::System.Uri.EscapeDataString(jobDefinitionName) + + "/jobRuns" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.JobDefinitionsList_Call(request,onOk,onDefault,eventListener,sender); + return await this.JobRunsListWithResult_Call (request, eventListener,sender); } } - /// Lists all Job Definitions in a Project. - /// - /// 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). + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task JobRunsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { - var apiVersion = @"2025-07-01"; - // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + global::System.Net.Http.HttpResponseMessage _response = null; + try { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var storageMoverName = _match.Groups["storageMoverName"].Value; - var projectName = _match.Groups["projectName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StorageMover/storageMovers/" - + storageMoverName - + "/projects/" - + projectName - + "/jobDefinitions" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.JobDefinitionsList_Call(request,onOk,onDefault,eventListener,sender); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 @@ -2840,7 +7122,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task JobDefinitionsList_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task JobRunsList_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2851,6 +7133,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2858,13 +7141,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobRunList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2880,18 +7163,19 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Project resource. + /// The name of the Job Definition resource. /// 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 JobDefinitionsList_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task JobRunsList_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2902,17 +7186,11 @@ public partial class StorageMover await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertNotNull(nameof(jobDefinitionName),jobDefinitionName); } } - /// - /// Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the Storage Mover resource. - /// The name of the Project resource. - /// The name of the Job Definition resource. + /// List the operations for the provider /// 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). @@ -2921,7 +7199,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task JobDefinitionsStartJob(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -2929,17 +7207,7 @@ public partial class StorageMover { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StorageMover/storageMovers/" - + global::System.Uri.EscapeDataString(storageMoverName) - + "/projects/" - + global::System.Uri.EscapeDataString(projectName) - + "/jobDefinitions/" - + global::System.Uri.EscapeDataString(jobDefinitionName) - + "/startJob" + "/providers/Microsoft.StorageMover/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2948,18 +7216,16 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.JobDefinitionsStartJob_Call(request,onOk,onDefault,eventListener,sender); + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. - /// + /// List the operations for the provider /// /// 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 @@ -2969,7 +7235,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task JobDefinitionsStartJobViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -2977,31 +7243,16 @@ public partial class StorageMover { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.StorageMover/operations$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/startJob'"); + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.StorageMover/operations'"); } // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var storageMoverName = _match.Groups["storageMoverName"].Value; - var projectName = _match.Groups["projectName"].Value; - var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StorageMover/storageMovers/" - + storageMoverName - + "/projects/" - + projectName - + "/jobDefinitions/" - + jobDefinitionName - + "/startJob" + "/providers/Microsoft.StorageMover/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3010,16 +7261,152 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.JobDefinitionsStartJob_Call(request,onOk,onDefault,eventListener,sender); + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List the operations for the provider + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.StorageMover/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.StorageMover/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.StorageMover/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// List the operations for the provider + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.StorageMover/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 @@ -3029,7 +7416,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task JobDefinitionsStartJob_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationsList_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3040,6 +7427,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3047,13 +7435,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunResourceId.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3069,48 +7457,37 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the Storage Mover resource. - /// The name of the Project resource. - /// The name of the Job Definition resource. /// 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 JobDefinitionsStartJob_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); - await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertNotNull(nameof(jobDefinitionName),jobDefinitionName); + } } - /// Requests the Agent of any active instance of this Job Definition to stop. + /// update a Project resource, which is a logical grouping of related jobs. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Project resource. - /// The name of the Job Definition resource. + /// The Project 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsStopJob(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsCreateOrUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -3126,9 +7503,6 @@ public partial class StorageMover + global::System.Uri.EscapeDataString(storageMoverName) + "/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/jobDefinitions/" - + global::System.Uri.EscapeDataString(jobDefinitionName) - + "/stopJob" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3137,26 +7511,32 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.JobDefinitionsStopJob_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Requests the Agent of any active instance of this Job Definition to stop. + /// update a Project resource, which is a logical grouping of related jobs. /// + /// The Project 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsStopJobViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -3164,10 +7544,10 @@ public partial class StorageMover { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/stopJob'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}'"); } // replace URI parameters with values from identity @@ -3175,7 +7555,6 @@ public partial class StorageMover var resourceGroupName = _match.Groups["resourceGroupName"].Value; var storageMoverName = _match.Groups["storageMoverName"].Value; var projectName = _match.Groups["projectName"].Value; - var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3186,9 +7565,6 @@ public partial class StorageMover + storageMoverName + "/projects/" + projectName - + "/jobDefinitions/" - + jobDefinitionName - + "/stopJob" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3197,101 +7573,85 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.JobDefinitionsStopJob_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 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsStopJob_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunResourceId.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 name of the resource group. The name is case insensitive. - /// The name of the Storage Mover resource. - /// The name of the Project resource. - /// The name of the Job Definition resource. + // 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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProjectsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// update a Project resource, which is a logical grouping of related jobs. + /// + /// The Project resource. /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. /// - internal async global::System.Threading.Tasks.Task JobDefinitionsStopJob_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task ProjectsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2025-07-01"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); - await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertNotNull(nameof(jobDefinitionName),jobDefinitionName); + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProjectsCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// - /// Updates properties for a Job Definition resource. Properties not specified in the request body will be unchanged. - /// + /// update a Project resource, which is a logical grouping of related jobs. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Project resource. - /// The name of the Job Definition resource. - /// The Job Definition resource. + /// Json string supplied to the ProjectsCreateOrUpdate 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). @@ -3300,7 +7660,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task JobDefinitionsUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -3316,8 +7676,6 @@ public partial class StorageMover + global::System.Uri.EscapeDataString(storageMoverName) + "/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/jobDefinitions/" - + global::System.Uri.EscapeDataString(jobDefinitionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3326,86 +7684,179 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.JobDefinitionsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Updates properties for a Job Definition resource. Properties not specified in the request body will be unchanged. - /// - /// - /// The Job Definition 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). + /// update a Project resource, which is a logical grouping of related jobs. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// Json string supplied to the ProjectsCreateOrUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobDefinitionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}'"); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var storageMoverName = _match.Groups["storageMoverName"].Value; - var projectName = _match.Groups["projectName"].Value; - var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProjectsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update a Project resource, which is a logical grouping of related jobs. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The Project resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StorageMover/storageMovers/" - + storageMoverName + + global::System.Uri.EscapeDataString(storageMoverName) + "/projects/" - + projectName - + "/jobDefinitions/" - + jobDefinitionName + + global::System.Uri.EscapeDataString(projectName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.JobDefinitionsUpdate_Call(request,onOk,onDefault,eventListener,sender); + return await this.ProjectsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 @@ -3415,7 +7866,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task JobDefinitionsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3426,6 +7877,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3433,13 +7885,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinition.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3455,20 +7907,19 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Project resource. - /// The name of the Job Definition resource. - /// The Job Definition resource. + /// The Project resource. /// 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 JobDefinitionsUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3479,20 +7930,18 @@ public partial class StorageMover await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertNotNull(nameof(jobDefinitionName),jobDefinitionName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Gets a Job Run resource. + /// Deletes a Project resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Project resource. - /// The name of the Job Definition resource. - /// The name of the Job Run resource. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -3500,7 +7949,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task JobRunsGet(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, string jobRunName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsDelete(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -3516,10 +7965,6 @@ public partial class StorageMover + global::System.Uri.EscapeDataString(storageMoverName) + "/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/jobDefinitions/" - + global::System.Uri.EscapeDataString(jobDefinitionName) - + "/jobRuns/" - + global::System.Uri.EscapeDataString(jobRunName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3528,18 +7973,19 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.JobRunsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Gets a Job Run resource. + /// Deletes a Project resource. /// /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -3547,7 +7993,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task JobRunsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -3555,10 +8001,10 @@ public partial class StorageMover { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)/jobRuns/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns/{jobRunName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}'"); } // replace URI parameters with values from identity @@ -3566,8 +8012,6 @@ public partial class StorageMover var resourceGroupName = _match.Groups["resourceGroupName"].Value; var storageMoverName = _match.Groups["storageMoverName"].Value; var projectName = _match.Groups["projectName"].Value; - var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; - var jobRunName = _match.Groups["jobRunName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3578,10 +8022,6 @@ public partial class StorageMover + storageMoverName + "/projects/" + projectName - + "/jobDefinitions/" - + jobDefinitionName - + "/jobRuns/" - + jobRunName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3590,18 +8030,19 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.JobRunsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectsDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// 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 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -3609,17 +8050,111 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task JobRunsGet_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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( Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3627,13 +8162,19 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRun.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3649,20 +8190,18 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Project resource. - /// The name of the Job Definition resource. - /// The name of the Job Run resource. /// 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 JobRunsGet_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, string jobRunName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectsDelete_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3673,17 +8212,14 @@ public partial class StorageMover await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertNotNull(nameof(jobDefinitionName),jobDefinitionName); - await eventListener.AssertNotNull(nameof(jobRunName),jobRunName); } } - /// Lists all Job Runs in a Job Definition. + /// Gets a Project resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Project resource. - /// The name of the Job Definition 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). @@ -3692,7 +8228,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task JobRunsList(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsGet(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -3708,9 +8244,6 @@ public partial class StorageMover + global::System.Uri.EscapeDataString(storageMoverName) + "/projects/" + global::System.Uri.EscapeDataString(projectName) - + "/jobDefinitions/" - + global::System.Uri.EscapeDataString(jobDefinitionName) - + "/jobRuns" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3724,11 +8257,11 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.JobRunsList_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectsGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists all Job Runs in a Job Definition. + /// Gets a Project 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 @@ -3738,7 +8271,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task JobRunsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -3746,10 +8279,10 @@ public partial class StorageMover { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)/jobDefinitions/(?[^/]+)/jobRuns$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}'"); } // replace URI parameters with values from identity @@ -3757,7 +8290,6 @@ public partial class StorageMover var resourceGroupName = _match.Groups["resourceGroupName"].Value; var storageMoverName = _match.Groups["storageMoverName"].Value; var projectName = _match.Groups["projectName"].Value; - var jobDefinitionName = _match.Groups["jobDefinitionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3768,9 +8300,6 @@ public partial class StorageMover + storageMoverName + "/projects/" + projectName - + "/jobDefinitions/" - + jobDefinitionName - + "/jobRuns" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3784,97 +8313,76 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.JobRunsList_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectsGet_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 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Gets a Project resource. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 JobRunsList_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { + var apiVersion = @"2025-07-01"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobRunList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProjectsGetWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will get validation events - /// back. - /// + /// Gets a Project resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Project resource. - /// The name of the Job Definition resource. - /// 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 JobRunsList_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, string jobDefinitionName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); - await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertNotNull(nameof(jobDefinitionName),jobDefinitionName); - } - } - - /// List the operations for the provider - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsGetWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -3882,70 +8390,92 @@ public partial class StorageMover { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.StorageMover/operations" + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + return await this.ProjectsGetWithResult_Call (request, eventListener,sender); } } - /// List the operations for the provider - /// - /// 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). + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { - var apiVersion = @"2025-07-01"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.StorageMover/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.StorageMover/operations'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - // replace URI parameters with values from identity - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.StorageMover/operations" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); } } - /// 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 @@ -3955,7 +8485,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationsList_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsGet_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3966,6 +8496,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3973,13 +8504,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3995,29 +8526,35 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. /// 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 OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectsGet_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); + await eventListener.AssertNotNull(nameof(projectName),projectName); } } - /// - /// Creates or updates a Project resource, which is a logical grouping of related jobs. - /// + /// Lists all Projects in a Storage Mover. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. - /// The name of the Project resource. - /// The Project 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). @@ -4026,22 +8563,75 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsCreateOrUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsList(string subscriptionId, string resourceGroupName, string storageMoverName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProjectsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all Projects in a Storage Mover. + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // 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.StorageMover/storageMovers/(?[^/]+)/projects$", 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.StorageMover/storageMovers/{storageMoverName}/projects'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.StorageMover/storageMovers/" - + global::System.Uri.EscapeDataString(storageMoverName) - + "/projects/" - + global::System.Uri.EscapeDataString(projectName) + + storageMoverName + + "/projects" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4050,33 +8640,24 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ProjectsList_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Creates or updates a Project resource, which is a logical grouping of related jobs. - /// + /// Lists all Projects in a Storage Mover. /// - /// The Project 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -4084,17 +8665,16 @@ public partial class StorageMover { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var storageMoverName = _match.Groups["storageMoverName"].Value; - var projectName = _match.Groups["projectName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4103,30 +8683,127 @@ public partial class StorageMover + resourceGroupName + "/providers/Microsoft.StorageMover/storageMovers/" + storageMoverName - + "/projects/" - + projectName + + "/projects" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProjectsListWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all Projects in a Storage Mover. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsListWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ProjectsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + return await this.ProjectsListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 @@ -4136,7 +8813,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectsCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsList_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4147,6 +8824,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4154,13 +8832,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4176,19 +8854,17 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. - /// The name of the Project resource. - /// The Project resource. /// 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 ProjectsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectsList_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -4198,27 +8874,27 @@ public partial class StorageMover await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); - await eventListener.AssertNotNull(nameof(projectName),projectName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Deletes a Project resource. + /// + /// update properties for a Project resource. Properties not specified in the request body will be unchanged. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Project resource. + /// The Project resource. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsDelete(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -4242,27 +8918,34 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ProjectsUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes a Project resource. + /// + /// update properties for a Project resource. Properties not specified in the request body will be unchanged. + /// /// + /// The Project resource. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -4299,208 +8982,149 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.ProjectsUpdate_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 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// + /// update properties for a Project resource. Properties not specified in the request body will be unchanged. + /// + /// + /// The Project resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. /// - internal async global::System.Threading.Tasks.Task ProjectsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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( Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + var projectName = _match.Groups["projectName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "/projects/" + + projectName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ProjectsUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// update properties for a Project resource. Properties not specified in the request body will be unchanged. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Project resource. + /// Json string supplied to the ProjectsUpdate 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsDelete_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task ProjectsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { + var apiVersion = @"2025-07-01"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); - await eventListener.AssertNotNull(nameof(projectName),projectName); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "/projects/" + + global::System.Uri.EscapeDataString(projectName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ProjectsUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets a Project resource. + /// + /// update properties for a Project resource. Properties not specified in the request body will be unchanged. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Project 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). + /// Json string supplied to the ProjectsUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsGet(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -4520,76 +9144,136 @@ public partial class StorageMover + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ProjectsGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.ProjectsUpdateWithResult_Call (request, eventListener,sender); } } - /// Gets a Project 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). + /// + /// update properties for a Project resource. Properties not specified in the request body will be unchanged. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The name of the Project resource. + /// The Project resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ProjectsUpdateWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // 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.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var storageMoverName = _match.Groups["storageMoverName"].Value; - var projectName = _match.Groups["projectName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StorageMover/storageMovers/" - + storageMoverName + + global::System.Uri.EscapeDataString(storageMoverName) + "/projects/" - + projectName + + global::System.Uri.EscapeDataString(projectName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ProjectsGet_Call(request,onOk,onDefault,eventListener,sender); + return await this.ProjectsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 @@ -4599,7 +9283,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectsGet_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ProjectsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4610,6 +9294,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4617,13 +9302,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4639,18 +9324,19 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// The name of the Project resource. + /// The Project resource. /// 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 ProjectsGet_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ProjectsUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -4661,22 +9347,26 @@ public partial class StorageMover await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); await eventListener.AssertNotNull(nameof(projectName),projectName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Lists all Projects in a Storage Mover. + /// update a top-level Storage Mover resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. + /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsList(string subscriptionId, string resourceGroupName, string storageMoverName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversCreateOrUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -4690,7 +9380,6 @@ public partial class StorageMover + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StorageMover/storageMovers/" + global::System.Uri.EscapeDataString(storageMoverName) - + "/projects" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4699,26 +9388,32 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectsList_Call(request,onOk,onDefault,eventListener,sender); + await this.StorageMoversCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists all Projects in a Storage Mover. + /// update a top-level Storage Mover resource. /// + /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -4726,10 +9421,10 @@ public partial class StorageMover { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}'"); } // replace URI parameters with values from identity @@ -4744,7 +9439,6 @@ public partial class StorageMover + resourceGroupName + "/providers/Microsoft.StorageMover/storageMovers/" + storageMoverName - + "/projects" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4753,96 +9447,81 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ProjectsList_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 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsList_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ProjectList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 name of the resource group. The name is case insensitive. - /// The name of the Storage Mover resource. + // 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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageMoversCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// update a top-level Storage Mover resource. + /// + /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. /// - internal async global::System.Threading.Tasks.Task ProjectsList_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task StorageMoversCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2025-07-01"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageMoversCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// - /// Updates properties for a Project resource. Properties not specified in the request body will be unchanged. - /// + /// update a top-level Storage Mover resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. - /// The name of the Project resource. - /// The Project resource. + /// Json string supplied to the StorageMoversCreateOrUpdate 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). @@ -4851,7 +9530,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ProjectsUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string storageMoverName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -4865,8 +9544,6 @@ public partial class StorageMover + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StorageMover/storageMovers/" + global::System.Uri.EscapeDataString(storageMoverName) - + "/projects/" - + global::System.Uri.EscapeDataString(projectName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4875,83 +9552,175 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ProjectsUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.StorageMoversCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// - /// Updates properties for a Project resource. Properties not specified in the request body will be unchanged. - /// - /// - /// The Project 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). + /// update a top-level Storage Mover resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// Json string supplied to the StorageMoversCreateOrUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ProjectsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)/projects/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}'"); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var storageMoverName = _match.Groups["storageMoverName"].Value; - var projectName = _match.Groups["projectName"].Value; + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageMoversCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update a top-level Storage Mover resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StorageMover/storageMovers/" - + storageMoverName - + "/projects/" - + projectName + + global::System.Uri.EscapeDataString(storageMoverName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ProjectsUpdate_Call(request,onOk,onDefault,eventListener,sender); + return await this.StorageMoversCreateOrUpdateWithResult_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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMover.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 @@ -4961,7 +9730,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ProjectsUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StorageMoversCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4972,6 +9741,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4979,13 +9749,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Project.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMover.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5001,19 +9771,18 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. - /// The name of the Project resource. - /// The Project resource. + /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. /// 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 ProjectsUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, string projectName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StorageMoversCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -5023,18 +9792,17 @@ public partial class StorageMover await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); - await eventListener.AssertNotNull(nameof(projectName),projectName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Creates or updates a top-level Storage Mover resource. + /// Deletes a Storage Mover resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. - /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -5042,7 +9810,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StorageMoversCreateOrUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversDelete(string subscriptionId, string resourceGroupName, string storageMoverName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -5064,23 +9832,19 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StorageMoversCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.StorageMoversDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// Creates or updates a top-level Storage Mover resource. + /// Deletes a Storage Mover resource. /// - /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -5088,7 +9852,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StorageMoversCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -5122,40 +9886,131 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StorageMoversCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.StorageMoversDelete_Call (request, onOk,onNoContent,onDefault,eventListener,sender); } } - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + /// 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 204 (NoContent). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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( Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5163,13 +10018,19 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMover.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5185,18 +10046,17 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. - /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. /// 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 StorageMoversCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StorageMoversDelete_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -5206,17 +10066,14 @@ public partial class StorageMover await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Deletes a Storage Mover resource. + /// Gets a Storage Mover resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -5224,7 +10081,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StorageMoversDelete(string subscriptionId, string resourceGroupName, string storageMoverName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversGet(string subscriptionId, string resourceGroupName, string storageMoverName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -5246,19 +10103,18 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StorageMoversDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.StorageMoversGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes a Storage Mover resource. + /// Gets a Storage Mover resource. /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -5266,7 +10122,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StorageMoversDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -5300,134 +10156,189 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StorageMoversDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.StorageMoversGet_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 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// Gets a Storage Mover resource. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { + var apiVersion = @"2025-07-01"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}'"); + } - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get); + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // 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(); - await waiting; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageMoversGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets a Storage Mover resource. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversGetWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // drop the old response - _response?.Dispose(); + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageMoversGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: { - var error = false; - try { - if( Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException(_response); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMover.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + default: { - continue; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } } - // 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), Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversGet_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5435,19 +10346,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMover.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5463,7 +10368,7 @@ public partial class StorageMover } /// - /// 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. @@ -5473,7 +10378,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task StorageMoversDelete_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StorageMoversGet_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -5486,10 +10391,49 @@ public partial class StorageMover } } - /// Gets a Storage Mover resource. + /// Lists all Storage Movers in a resource group. + /// The ID of the target subscription. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversList(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageMoversList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all Storage Movers in a subscription. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the Storage Mover 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). @@ -5498,7 +10442,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StorageMoversGet(string subscriptionId, string resourceGroupName, string storageMoverName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -5508,10 +10452,7 @@ public partial class StorageMover var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StorageMover/storageMovers/" - + global::System.Uri.EscapeDataString(storageMoverName) + + "/providers/Microsoft.StorageMover/storageMovers" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5525,11 +10466,11 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StorageMoversGet_Call(request,onOk,onDefault,eventListener,sender); + await this.StorageMoversListBySubscription_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets a Storage Mover resource. + /// Lists all Storage Movers 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 @@ -5539,7 +10480,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StorageMoversGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -5547,24 +10488,19 @@ public partial class StorageMover { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers$", 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.StorageMover/storageMovers/{storageMoverName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StorageMover/storageMovers'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var storageMoverName = _match.Groups["storageMoverName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StorageMover/storageMovers/" - + storageMoverName + + "/providers/Microsoft.StorageMover/storageMovers" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5578,11 +10514,155 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StorageMoversGet_Call(request,onOk,onDefault,eventListener,sender); + await this.StorageMoversListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all Storage Movers in a subscription. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StorageMover/storageMovers'"); + } + + // 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.StorageMover/storageMovers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageMoversListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all Storage Movers in a subscription. + /// The ID of the target subscription. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-07-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.StorageMover/storageMovers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageMoversListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 @@ -5592,7 +10672,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task StorageMoversGet_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StorageMoversListBySubscription_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5603,6 +10683,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5610,13 +10691,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMover.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5632,32 +10713,25 @@ public partial class StorageMover } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the Storage Mover resource. /// 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 StorageMoversGet_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StorageMoversListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(storageMoverName),storageMoverName); } } /// Lists all Storage Movers in a resource group. - /// The ID of the target subscription. - /// 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). @@ -5666,18 +10740,29 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task StorageMoversList(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // 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.StorageMover/storageMovers$", 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.StorageMover/storageMovers'"); + } + + // 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/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.StorageMover/storageMovers" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) @@ -5692,97 +10777,159 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StorageMoversList_Call(request,onOk,onDefault,eventListener,sender); + await this.StorageMoversList_Call (request, onOk,onDefault,eventListener,sender); } } - /// Lists all Storage Movers in a subscription. - /// The ID of the target 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). + /// Lists all Storage Movers in a resource group. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // 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.StorageMover/storageMovers$", 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.StorageMover/storageMovers'"); + } + + // 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/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + "/providers/Microsoft.StorageMover/storageMovers" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.StorageMoversListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + return await this.StorageMoversListWithResult_Call (request, eventListener,sender); } } - /// Lists all Storage Movers 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). + /// Lists all Storage Movers in a resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversListWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // 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.StorageMover/storageMovers$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StorageMover/storageMovers'"); - } - - // 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 + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StorageMover/storageMovers" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.StorageMoversListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + return await this.StorageMoversListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 @@ -5792,7 +10939,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task StorageMoversListBySubscription_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StorageMoversList_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5803,6 +10950,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5810,13 +10958,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5832,34 +10980,93 @@ public partial class StorageMover } /// - /// 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 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 StorageMoversListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StorageMoversList_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); } } - /// Lists all Storage Movers in a resource group. + /// + /// update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// The Storage Mover 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-07-01"; + // 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.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageMoversUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. + /// /// + /// The Storage Mover 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -5867,22 +11074,24 @@ public partial class StorageMover { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)$", 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.StorageMover/storageMovers'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.StorageMover/storageMovers" + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5891,102 +11100,142 @@ public partial class StorageMover // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StorageMoversList_Call(request,onOk,onDefault,eventListener,sender); + await this.StorageMoversUpdate_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 200 (OK). - /// a delegate that is called when the remote service returns default (any response code not handled - /// elsewhere). + /// + /// update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. + /// + /// + /// The Storage Mover resource. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. /// - internal async global::System.Threading.Tasks.Task StorageMoversList_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2025-07-01"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverList.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StorageMover/storageMovers/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}'"); } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var storageMoverName = _match.Groups["storageMoverName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StorageMover/storageMovers/" + + storageMoverName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StorageMoversUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. + /// Json string supplied to the StorageMoversUpdate 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversList_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task StorageMoversUpdateViaJsonString(string subscriptionId, string resourceGroupName, string storageMoverName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { + var apiVersion = @"2025-07-01"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StorageMover/storageMovers/" + + global::System.Uri.EscapeDataString(storageMoverName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StorageMoversUpdate_Call (request, onOk,onDefault,eventListener,sender); } } /// - /// Updates properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. + /// update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the Storage Mover resource. - /// The Storage Mover 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). + /// Json string supplied to the StorageMoversUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversUpdate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { var apiVersion = @"2025-07-01"; // Constant Parameters @@ -6004,84 +11253,133 @@ public partial class StorageMover + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.StorageMoversUpdate_Call(request,onOk,onDefault,eventListener,sender); + return await this.StorageMoversUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Updates properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. + /// update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. /// - /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Storage Mover resource. /// The Storage Mover 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StorageMoversUpdateWithResult(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2025-07-01"; // 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.StorageMover/storageMovers/(?[^/]+)$", 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.StorageMover/storageMovers/{storageMoverName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var storageMoverName = _match.Groups["storageMoverName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StorageMover/storageMovers/" - + storageMoverName + + global::System.Uri.EscapeDataString(storageMoverName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.StorageMoversUpdate_Call(request,onOk,onDefault,eventListener,sender); + return await this.StorageMoversUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 StorageMoversUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMover.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 @@ -6091,7 +11389,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task StorageMoversUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StorageMoversUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6102,6 +11400,7 @@ public partial class StorageMover await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -6109,13 +11408,13 @@ public partial class StorageMover case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMover.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMover.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6142,7 +11441,7 @@ public partial class StorageMover /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task StorageMoversUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StorageMoversUpdate_Validate(string subscriptionId, string resourceGroupName, string storageMoverName, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ActionType.Completer.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ActionType.Completer.cs deleted file mode 100644 index d3effc1080eb..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ActionType.Completer.cs +++ /dev/null @@ -1,37 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// - /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionTypeTypeConverter))] - public partial struct ActionType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Internal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Internal'", "Internal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Internal"); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ActionType.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ActionType.TypeConverter.cs deleted file mode 100644 index a98536aef460..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ActionType.TypeConverter.cs +++ /dev/null @@ -1,61 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// - /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - /// - public partial class ActionTypeTypeConverter : - 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) => true; - - /// - /// 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 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) => ActionType.CreateFrom(sourceValue); - - /// 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/StorageMover/StorageMover.Autorest/generated/api/Support/ActionType.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ActionType.cs deleted file mode 100644 index f390ade2b38c..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ActionType.cs +++ /dev/null @@ -1,98 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// - /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - /// - public partial struct ActionType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType Internal = @"Internal"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ActionType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to ActionType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ActionType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ActionType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ActionType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ActionType && Equals((ActionType)obj); - } - - /// Returns hashCode for enum ActionType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for ActionType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ActionType - /// the value to convert to an instance of . - - public static implicit operator ActionType(string value) - { - return new ActionType(value); - } - - /// Implicit operator to convert ActionType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType e) - { - return e._value; - } - - /// Overriding != operator for enum ActionType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ActionType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ActionType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/AgentStatus.Completer.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/AgentStatus.Completer.cs deleted file mode 100644 index 201f3457a9d6..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/AgentStatus.Completer.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The Agent status. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatusTypeConverter))] - public partial struct AgentStatus : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Registering".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Registering'", "Registering", global::System.Management.Automation.CompletionResultType.ParameterValue, "Registering"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Offline".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Offline'", "Offline", global::System.Management.Automation.CompletionResultType.ParameterValue, "Offline"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Online".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Online'", "Online", global::System.Management.Automation.CompletionResultType.ParameterValue, "Online"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Executing".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Executing'", "Executing", global::System.Management.Automation.CompletionResultType.ParameterValue, "Executing"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "RequiresAttention".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'RequiresAttention'", "RequiresAttention", global::System.Management.Automation.CompletionResultType.ParameterValue, "RequiresAttention"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unregistering".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Unregistering'", "Unregistering", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unregistering"); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/AgentStatus.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/AgentStatus.TypeConverter.cs deleted file mode 100644 index 1160adf06107..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/AgentStatus.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The Agent status. - public partial class AgentStatusTypeConverter : - 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) => true; - - /// - /// 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 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) => AgentStatus.CreateFrom(sourceValue); - - /// 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/StorageMover/StorageMover.Autorest/generated/api/Support/AgentStatus.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/AgentStatus.cs deleted file mode 100644 index e3e334a1d747..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/AgentStatus.cs +++ /dev/null @@ -1,106 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The Agent status. - public partial struct AgentStatus : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus Executing = @"Executing"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus Offline = @"Offline"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus Online = @"Online"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus Registering = @"Registering"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus RequiresAttention = @"RequiresAttention"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus Unregistering = @"Unregistering"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private AgentStatus(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to AgentStatus - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new AgentStatus(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type AgentStatus - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type AgentStatus (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is AgentStatus && Equals((AgentStatus)obj); - } - - /// Returns hashCode for enum AgentStatus - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for AgentStatus - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to AgentStatus - /// the value to convert to an instance of . - - public static implicit operator AgentStatus(string value) - { - return new AgentStatus(value); - } - - /// Implicit operator to convert AgentStatus to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus e) - { - return e._value; - } - - /// Overriding != operator for enum AgentStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum AgentStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.AgentStatus e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CopyMode.Completer.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CopyMode.Completer.cs deleted file mode 100644 index b017261db991..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CopyMode.Completer.cs +++ /dev/null @@ -1,39 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// Strategy to use for copy. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyModeTypeConverter))] - public partial struct CopyMode : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Additive".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Additive'", "Additive", global::System.Management.Automation.CompletionResultType.ParameterValue, "Additive"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Mirror".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Mirror'", "Mirror", global::System.Management.Automation.CompletionResultType.ParameterValue, "Mirror"); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CopyMode.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CopyMode.TypeConverter.cs deleted file mode 100644 index 9c7dac32cf6f..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CopyMode.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// Strategy to use for copy. - public partial class CopyModeTypeConverter : - 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) => true; - - /// - /// 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 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) => CopyMode.CreateFrom(sourceValue); - - /// 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/StorageMover/StorageMover.Autorest/generated/api/Support/CopyMode.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CopyMode.cs deleted file mode 100644 index 68cdff7cae2a..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CopyMode.cs +++ /dev/null @@ -1,98 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// Strategy to use for copy. - public partial struct CopyMode : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode Additive = @"Additive"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode Mirror = @"Mirror"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private CopyMode(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to CopyMode - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new CopyMode(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type CopyMode - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type CopyMode (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is CopyMode && Equals((CopyMode)obj); - } - - /// Returns hashCode for enum CopyMode - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for CopyMode - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to CopyMode - /// the value to convert to an instance of . - - public static implicit operator CopyMode(string value) - { - return new CopyMode(value); - } - - /// Implicit operator to convert CopyMode to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode e) - { - return e._value; - } - - /// Overriding != operator for enum CopyMode - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum CopyMode - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CreatedByType.Completer.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CreatedByType.Completer.cs deleted file mode 100644 index 54cd12f626d5..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CreatedByType.Completer.cs +++ /dev/null @@ -1,47 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The type of identity that created the resource. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByTypeTypeConverter))] - public partial struct CreatedByType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "User".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'User'", "User", global::System.Management.Automation.CompletionResultType.ParameterValue, "User"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Application".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Application'", "Application", global::System.Management.Automation.CompletionResultType.ParameterValue, "Application"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "ManagedIdentity".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'ManagedIdentity'", "ManagedIdentity", global::System.Management.Automation.CompletionResultType.ParameterValue, "ManagedIdentity"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Key".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Key'", "Key", global::System.Management.Automation.CompletionResultType.ParameterValue, "Key"); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs deleted file mode 100644 index 1df881fabd3e..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The type of identity that created the resource. - public partial class CreatedByTypeTypeConverter : - 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) => true; - - /// - /// 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 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) => CreatedByType.CreateFrom(sourceValue); - - /// 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/StorageMover/StorageMover.Autorest/generated/api/Support/CreatedByType.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CreatedByType.cs deleted file mode 100644 index 0fb9534751df..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/CreatedByType.cs +++ /dev/null @@ -1,102 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The type of identity that created the resource. - public partial struct CreatedByType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType Application = @"Application"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType Key = @"Key"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType ManagedIdentity = @"ManagedIdentity"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType User = @"User"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to CreatedByType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new CreatedByType(global::System.Convert.ToString(value)); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private CreatedByType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type CreatedByType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type CreatedByType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is CreatedByType && Equals((CreatedByType)obj); - } - - /// Returns hashCode for enum CreatedByType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for CreatedByType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to CreatedByType - /// the value to convert to an instance of . - - public static implicit operator CreatedByType(string value) - { - return new CreatedByType(value); - } - - /// Implicit operator to convert CreatedByType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType e) - { - return e._value; - } - - /// Overriding != operator for enum CreatedByType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum CreatedByType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CreatedByType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/DayOfWeek.Completer.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/DayOfWeek.Completer.cs deleted file mode 100644 index fedbd9b5c73b..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/DayOfWeek.Completer.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The day of week. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeekTypeConverter))] - public partial struct DayOfWeek : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Monday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Monday'", "Monday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Monday"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Tuesday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Tuesday'", "Tuesday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Tuesday"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Wednesday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Wednesday'", "Wednesday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Wednesday"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Thursday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Thursday'", "Thursday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Thursday"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Friday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Friday'", "Friday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Friday"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Saturday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Saturday'", "Saturday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Saturday"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Sunday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Sunday'", "Sunday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Sunday"); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/DayOfWeek.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/DayOfWeek.TypeConverter.cs deleted file mode 100644 index 82b55044f502..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/DayOfWeek.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The day of week. - public partial class DayOfWeekTypeConverter : - 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) => true; - - /// - /// 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 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) => DayOfWeek.CreateFrom(sourceValue); - - /// 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/StorageMover/StorageMover.Autorest/generated/api/Support/DayOfWeek.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/DayOfWeek.cs deleted file mode 100644 index aabeff2c7185..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/DayOfWeek.cs +++ /dev/null @@ -1,108 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The day of week. - public partial struct DayOfWeek : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek Friday = @"Friday"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek Monday = @"Monday"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek Saturday = @"Saturday"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek Sunday = @"Sunday"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek Thursday = @"Thursday"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek Tuesday = @"Tuesday"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek Wednesday = @"Wednesday"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to DayOfWeek - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new DayOfWeek(global::System.Convert.ToString(value)); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private DayOfWeek(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type DayOfWeek - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type DayOfWeek (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is DayOfWeek && Equals((DayOfWeek)obj); - } - - /// Returns hashCode for enum DayOfWeek - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for DayOfWeek - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to DayOfWeek - /// the value to convert to an instance of . - - public static implicit operator DayOfWeek(string value) - { - return new DayOfWeek(value); - } - - /// Implicit operator to convert DayOfWeek to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek e) - { - return e._value; - } - - /// Overriding != operator for enum DayOfWeek - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum DayOfWeek - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.DayOfWeek e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/EndpointType.Completer.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/EndpointType.Completer.cs deleted file mode 100644 index 29a81f5ccd54..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/EndpointType.Completer.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The Endpoint resource type. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointTypeTypeConverter))] - public partial struct EndpointType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "AzureStorageBlobContainer".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'AzureStorageBlobContainer'", "AzureStorageBlobContainer", global::System.Management.Automation.CompletionResultType.ParameterValue, "AzureStorageBlobContainer"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "NfsMount".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'NfsMount'", "NfsMount", global::System.Management.Automation.CompletionResultType.ParameterValue, "NfsMount"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "AzureStorageSmbFileShare".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'AzureStorageSmbFileShare'", "AzureStorageSmbFileShare", global::System.Management.Automation.CompletionResultType.ParameterValue, "AzureStorageSmbFileShare"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SmbMount".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SmbMount'", "SmbMount", global::System.Management.Automation.CompletionResultType.ParameterValue, "SmbMount"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "AzureMultiCloudConnector".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'AzureMultiCloudConnector'", "AzureMultiCloudConnector", global::System.Management.Automation.CompletionResultType.ParameterValue, "AzureMultiCloudConnector"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "AzureStorageNfsFileShare".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'AzureStorageNfsFileShare'", "AzureStorageNfsFileShare", global::System.Management.Automation.CompletionResultType.ParameterValue, "AzureStorageNfsFileShare"); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/EndpointType.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/EndpointType.TypeConverter.cs deleted file mode 100644 index 187a4e229103..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/EndpointType.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The Endpoint resource type. - public partial class EndpointTypeTypeConverter : - 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) => true; - - /// - /// 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 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) => EndpointType.CreateFrom(sourceValue); - - /// 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/StorageMover/StorageMover.Autorest/generated/api/Support/EndpointType.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/EndpointType.cs deleted file mode 100644 index 9e12812352cb..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/EndpointType.cs +++ /dev/null @@ -1,106 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The Endpoint resource type. - public partial struct EndpointType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType AzureMultiCloudConnector = @"AzureMultiCloudConnector"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType AzureStorageBlobContainer = @"AzureStorageBlobContainer"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType AzureStorageNfsFileShare = @"AzureStorageNfsFileShare"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType AzureStorageSmbFileShare = @"AzureStorageSmbFileShare"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType NfsMount = @"NfsMount"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType SmbMount = @"SmbMount"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to EndpointType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new EndpointType(global::System.Convert.ToString(value)); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private EndpointType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type EndpointType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type EndpointType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is EndpointType && Equals((EndpointType)obj); - } - - /// Returns hashCode for enum EndpointType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for EndpointType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to EndpointType - /// the value to convert to an instance of . - - public static implicit operator EndpointType(string value) - { - return new EndpointType(value); - } - - /// Implicit operator to convert EndpointType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType e) - { - return e._value; - } - - /// Overriding != operator for enum EndpointType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum EndpointType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.EndpointType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunScanStatus.Completer.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunScanStatus.Completer.cs deleted file mode 100644 index 61de6727858c..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunScanStatus.Completer.cs +++ /dev/null @@ -1,43 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The status of Agent's scanning of source. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatusTypeConverter))] - public partial struct JobRunScanStatus : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "NotStarted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'NotStarted'", "NotStarted", global::System.Management.Automation.CompletionResultType.ParameterValue, "NotStarted"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Scanning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Scanning'", "Scanning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Scanning"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Completed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Completed'", "Completed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Completed"); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunScanStatus.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunScanStatus.TypeConverter.cs deleted file mode 100644 index d791b4fed1ea..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunScanStatus.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The status of Agent's scanning of source. - public partial class JobRunScanStatusTypeConverter : - 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) => true; - - /// - /// 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 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) => JobRunScanStatus.CreateFrom(sourceValue); - - /// 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/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunScanStatus.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunScanStatus.cs deleted file mode 100644 index 5c86b64b8d16..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunScanStatus.cs +++ /dev/null @@ -1,100 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The status of Agent's scanning of source. - public partial struct JobRunScanStatus : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus Completed = @"Completed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus NotStarted = @"NotStarted"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus Scanning = @"Scanning"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to JobRunScanStatus - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new JobRunScanStatus(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type JobRunScanStatus - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type JobRunScanStatus (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is JobRunScanStatus && Equals((JobRunScanStatus)obj); - } - - /// Returns hashCode for enum JobRunScanStatus - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private JobRunScanStatus(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for JobRunScanStatus - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to JobRunScanStatus - /// the value to convert to an instance of . - - public static implicit operator JobRunScanStatus(string value) - { - return new JobRunScanStatus(value); - } - - /// Implicit operator to convert JobRunScanStatus to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus e) - { - return e._value; - } - - /// Overriding != operator for enum JobRunScanStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum JobRunScanStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunScanStatus e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunStatus.Completer.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunStatus.Completer.cs deleted file mode 100644 index c2a73c65e14b..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunStatus.Completer.cs +++ /dev/null @@ -1,67 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The current status of the Job Run in a non-terminal state, if exists. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatusTypeConverter))] - public partial struct JobRunStatus : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Queued".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Queued'", "Queued", global::System.Management.Automation.CompletionResultType.ParameterValue, "Queued"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Started".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Started'", "Started", global::System.Management.Automation.CompletionResultType.ParameterValue, "Started"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Running".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Running'", "Running", global::System.Management.Automation.CompletionResultType.ParameterValue, "Running"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "CancelRequested".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'CancelRequested'", "CancelRequested", global::System.Management.Automation.CompletionResultType.ParameterValue, "CancelRequested"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceling".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Canceling'", "Canceling", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceling"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "PausedByBandwidthManagement".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'PausedByBandwidthManagement'", "PausedByBandwidthManagement", global::System.Management.Automation.CompletionResultType.ParameterValue, "PausedByBandwidthManagement"); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunStatus.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunStatus.TypeConverter.cs deleted file mode 100644 index cc0d40823d06..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunStatus.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The current status of the Job Run in a non-terminal state, if exists. - public partial class JobRunStatusTypeConverter : - 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) => true; - - /// - /// 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 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) => JobRunStatus.CreateFrom(sourceValue); - - /// 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/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunStatus.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunStatus.cs deleted file mode 100644 index fc3622e1b308..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobRunStatus.cs +++ /dev/null @@ -1,112 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The current status of the Job Run in a non-terminal state, if exists. - public partial struct JobRunStatus : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus CancelRequested = @"CancelRequested"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus Canceled = @"Canceled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus Canceling = @"Canceling"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus Failed = @"Failed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus PausedByBandwidthManagement = @"PausedByBandwidthManagement"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus Queued = @"Queued"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus Running = @"Running"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus Started = @"Started"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus Succeeded = @"Succeeded"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to JobRunStatus - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new JobRunStatus(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type JobRunStatus - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type JobRunStatus (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is JobRunStatus && Equals((JobRunStatus)obj); - } - - /// Returns hashCode for enum JobRunStatus - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private JobRunStatus(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for JobRunStatus - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to JobRunStatus - /// the value to convert to an instance of . - - public static implicit operator JobRunStatus(string value) - { - return new JobRunStatus(value); - } - - /// Implicit operator to convert JobRunStatus to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus e) - { - return e._value; - } - - /// Overriding != operator for enum JobRunStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum JobRunStatus - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobRunStatus e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobType.Completer.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobType.Completer.cs deleted file mode 100644 index c70a9de2e163..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobType.Completer.cs +++ /dev/null @@ -1,39 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The type of the Job. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobTypeTypeConverter))] - public partial struct JobType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "OnPremToCloud".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'OnPremToCloud'", "OnPremToCloud", global::System.Management.Automation.CompletionResultType.ParameterValue, "OnPremToCloud"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "CloudToCloud".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'CloudToCloud'", "CloudToCloud", global::System.Management.Automation.CompletionResultType.ParameterValue, "CloudToCloud"); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobType.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobType.TypeConverter.cs deleted file mode 100644 index 6b1d50c4f26b..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobType.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The type of the Job. - public partial class JobTypeTypeConverter : - 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) => true; - - /// - /// 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 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) => JobType.CreateFrom(sourceValue); - - /// 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/StorageMover/StorageMover.Autorest/generated/api/Support/JobType.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobType.cs deleted file mode 100644 index 2ba078a62580..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/JobType.cs +++ /dev/null @@ -1,98 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The type of the Job. - public partial struct JobType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType CloudToCloud = @"CloudToCloud"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType OnPremToCloud = @"OnPremToCloud"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to JobType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new JobType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type JobType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type JobType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is JobType && Equals((JobType)obj); - } - - /// Returns hashCode for enum JobType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private JobType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for JobType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to JobType - /// the value to convert to an instance of . - - public static implicit operator JobType(string value) - { - return new JobType(value); - } - - /// Implicit operator to convert JobType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType e) - { - return e._value; - } - - /// Overriding != operator for enum JobType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum JobType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ManagedServiceIdentityType.Completer.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ManagedServiceIdentityType.Completer.cs deleted file mode 100644 index d3431a98f48e..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ManagedServiceIdentityType.Completer.cs +++ /dev/null @@ -1,49 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// - /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityTypeTypeConverter))] - public partial struct ManagedServiceIdentityType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "None".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'None'", "None", global::System.Management.Automation.CompletionResultType.ParameterValue, "None"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SystemAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SystemAssigned'", "SystemAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "SystemAssigned"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "UserAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'UserAssigned'", "UserAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "UserAssigned"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SystemAssigned,UserAssigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SystemAssigned,UserAssigned'", "SystemAssigned,UserAssigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "SystemAssigned,UserAssigned"); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ManagedServiceIdentityType.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ManagedServiceIdentityType.TypeConverter.cs deleted file mode 100644 index 0485458d9b89..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ManagedServiceIdentityType.TypeConverter.cs +++ /dev/null @@ -1,61 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// - /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - /// - public partial class ManagedServiceIdentityTypeTypeConverter : - 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) => true; - - /// - /// 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 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) => ManagedServiceIdentityType.CreateFrom(sourceValue); - - /// 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/StorageMover/StorageMover.Autorest/generated/api/Support/ManagedServiceIdentityType.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ManagedServiceIdentityType.cs deleted file mode 100644 index 75b46912a913..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ManagedServiceIdentityType.cs +++ /dev/null @@ -1,106 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// - /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - /// - public partial struct ManagedServiceIdentityType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType None = @"None"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType SystemAssigned = @"SystemAssigned"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType SystemAssignedUserAssigned = @"SystemAssigned,UserAssigned"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType UserAssigned = @"UserAssigned"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// Conversion from arbitrary object to ManagedServiceIdentityType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ManagedServiceIdentityType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ManagedServiceIdentityType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ManagedServiceIdentityType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ManagedServiceIdentityType && Equals((ManagedServiceIdentityType)obj); - } - - /// Returns hashCode for enum ManagedServiceIdentityType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ManagedServiceIdentityType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for ManagedServiceIdentityType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ManagedServiceIdentityType - /// the value to convert to an instance of . - - public static implicit operator ManagedServiceIdentityType(string value) - { - return new ManagedServiceIdentityType(value); - } - - /// Implicit operator to convert ManagedServiceIdentityType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType e) - { - return e._value; - } - - /// Overriding != operator for enum ManagedServiceIdentityType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ManagedServiceIdentityType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/NfsVersion.Completer.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/NfsVersion.Completer.cs deleted file mode 100644 index e28a23ff0783..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/NfsVersion.Completer.cs +++ /dev/null @@ -1,43 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The NFS protocol version. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersionTypeConverter))] - public partial struct NfsVersion : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "NFSauto".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'NFSauto'", "NFSauto", global::System.Management.Automation.CompletionResultType.ParameterValue, "NFSauto"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "NFSv3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'NFSv3'", "NFSv3", global::System.Management.Automation.CompletionResultType.ParameterValue, "NFSv3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "NFSv4".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'NFSv4'", "NFSv4", global::System.Management.Automation.CompletionResultType.ParameterValue, "NFSv4"); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/NfsVersion.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/NfsVersion.TypeConverter.cs deleted file mode 100644 index 0722389359a7..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/NfsVersion.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The NFS protocol version. - public partial class NfsVersionTypeConverter : - 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) => true; - - /// - /// 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 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) => NfsVersion.CreateFrom(sourceValue); - - /// 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/StorageMover/StorageMover.Autorest/generated/api/Support/NfsVersion.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/NfsVersion.cs deleted file mode 100644 index 9116648355aa..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/NfsVersion.cs +++ /dev/null @@ -1,100 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The NFS protocol version. - public partial struct NfsVersion : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion NfSauto = @"NFSauto"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion NfSv3 = @"NFSv3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion NfSv4 = @"NFSv4"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to NfsVersion - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new NfsVersion(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type NfsVersion - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type NfsVersion (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is NfsVersion && Equals((NfsVersion)obj); - } - - /// Returns hashCode for enum NfsVersion - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private NfsVersion(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for NfsVersion - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to NfsVersion - /// the value to convert to an instance of . - - public static implicit operator NfsVersion(string value) - { - return new NfsVersion(value); - } - - /// Implicit operator to convert NfsVersion to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion e) - { - return e._value; - } - - /// Overriding != operator for enum NfsVersion - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum NfsVersion - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.NfsVersion e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/Origin.Completer.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/Origin.Completer.cs deleted file mode 100644 index a1ea6cf6f45c..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/Origin.Completer.cs +++ /dev/null @@ -1,46 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// - /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is - /// "user,system" - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.OriginTypeConverter))] - public partial struct Origin : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "user".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'user'", "user", global::System.Management.Automation.CompletionResultType.ParameterValue, "user"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "system".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'system'", "system", global::System.Management.Automation.CompletionResultType.ParameterValue, "system"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "user,system".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'user,system'", "user,system", global::System.Management.Automation.CompletionResultType.ParameterValue, "user,system"); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/Origin.TypeConverter.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/Origin.TypeConverter.cs deleted file mode 100644 index 1668e9fd5961..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/Origin.TypeConverter.cs +++ /dev/null @@ -1,62 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// - /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is - /// "user,system" - /// - public partial class OriginTypeConverter : - 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) => true; - - /// - /// 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 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) => Origin.CreateFrom(sourceValue); - - /// 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/StorageMover/StorageMover.Autorest/generated/api/Support/Origin.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/Origin.cs deleted file mode 100644 index 72c46b5e0549..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/Origin.cs +++ /dev/null @@ -1,103 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// - /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is - /// "user,system" - /// - public partial struct Origin : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin System = @"system"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin User = @"user"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin UserSystem = @"user,system"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to Origin - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new Origin(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type Origin - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type Origin (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is Origin && Equals((Origin)obj); - } - - /// Returns hashCode for enum Origin - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private Origin(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for Origin - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to Origin - /// the value to convert to an instance of . - - public static implicit operator Origin(string value) - { - return new Origin(value); - } - - /// Implicit operator to convert Origin to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin e) - { - return e._value; - } - - /// Overriding != operator for enum Origin - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum Origin - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.Origin e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ProvisioningState.cs b/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ProvisioningState.cs deleted file mode 100644 index c025b7b78241..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/api/Support/ProvisioningState.cs +++ /dev/null @@ -1,102 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support -{ - - /// The provisioning state of a resource. - public partial struct ProvisioningState : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState Canceled = @"Canceled"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState Deleting = @"Deleting"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState Failed = @"Failed"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState Succeeded = @"Succeeded"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to ProvisioningState - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ProvisioningState(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ProvisioningState - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ProvisioningState (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ProvisioningState && Equals((ProvisioningState)obj); - } - - /// Returns hashCode for enum ProvisioningState - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ProvisioningState(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for ProvisioningState - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ProvisioningState - /// the value to convert to an instance of . - - public static implicit operator ProvisioningState(string value) - { - return new ProvisioningState(value); - } - - /// Implicit operator to convert ProvisioningState to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState e) - { - return e._value; - } - - /// Overriding != operator for enum ProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ProvisioningState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverAgent_Get.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverAgent_Get.cs index 4dc5fb39a153..0d82e59e4288 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverAgent_Get.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverAgent_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Gets an Agent resource. @@ -13,13 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverAgent_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent", "15.0.0", "2.0.0", "2025/11/03", DeprecatedOutputProperties=new string[] {"UploadLimitScheduleWeeklyRecurrence"}, NewOutputProperties=new string[] {"UploadLimitScheduleWeeklyRecurrence"}, ChangeDescription="The type of the property UploadLimitScheduleWeeklyRecurrence will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets an Agent resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverAgent_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +37,26 @@ public partial class GetAzStorageMoverAgent_Get : global::System.Management.Auto /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -53,6 +70,9 @@ public partial class GetAzStorageMoverAgent_Get : global::System.Management.Auto [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -94,7 +114,7 @@ public partial class GetAzStorageMoverAgent_Get : global::System.Management.Auto /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -154,7 +174,8 @@ public partial class GetAzStorageMoverAgent_Get : global::System.Management.Auto [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -163,24 +184,24 @@ public partial class GetAzStorageMoverAgent_Get : global::System.Management.Auto /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent /// 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); + 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) @@ -203,6 +224,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -224,7 +250,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverAgent_Get() { @@ -275,8 +301,33 @@ public GetAzStorageMoverAgent_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -329,7 +380,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -350,7 +401,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -388,12 +439,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,15 +461,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name }) + 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 } }); @@ -428,12 +479,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,8 +496,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverAgent_GetViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverAgent_GetViaIdentity.cs index 35c21f4c6923..589746582c24 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverAgent_GetViaIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverAgent_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Gets an Agent resource. @@ -13,13 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverAgent_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent", "15.0.0", "2.0.0", "2025/11/03", DeprecatedOutputProperties=new string[] {"UploadLimitScheduleWeeklyRecurrence"}, NewOutputProperties=new string[] {"UploadLimitScheduleWeeklyRecurrence"}, ChangeDescription="The type of the property UploadLimitScheduleWeeklyRecurrence will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets an Agent resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverAgent_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +37,26 @@ public partial class GetAzStorageMoverAgent_GetViaIdentity : global::System.Mana /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -53,6 +70,9 @@ public partial class GetAzStorageMoverAgent_GetViaIdentity : global::System.Mana [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -87,7 +107,7 @@ public partial class GetAzStorageMoverAgent_GetViaIdentity : global::System.Mana /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -110,24 +130,24 @@ public partial class GetAzStorageMoverAgent_GetViaIdentity : global::System.Mana /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent /// 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); + 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) @@ -150,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -171,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverAgent_GetViaIdentity() { @@ -222,8 +247,33 @@ public GetAzStorageMoverAgent_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -276,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -318,7 +368,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -356,12 +406,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -378,7 +428,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 } @@ -396,12 +446,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,8 +463,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverAgent_GetViaIdentityStorageMover.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverAgent_GetViaIdentityStorageMover.cs new file mode 100644 index 000000000000..439df835213c --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverAgent_GetViaIdentityStorageMover.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// Gets an Agent resource. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverAgent_GetViaIdentityStorageMover")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets an Agent resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}", ApiVersion = "2025-07-01")] + public partial class GetAzStorageMoverAgent_GetViaIdentityStorageMover : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Agent resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Agent resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Agent resource.", + SerializedName = @"agentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("AgentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 GetAzStorageMoverAgent_GetViaIdentityStorageMover() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/agents/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.AgentsGetViaIdentity(StorageMoverInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.AgentsGet(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverAgent_List.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverAgent_List.cs index f4a9b7d45424..948eba00c1d9 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverAgent_List.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverAgent_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Lists all Agents in a Storage Mover. @@ -13,13 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverAgent_List")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent", "15.0.0", "2.0.0", "2025/11/03", DeprecatedOutputProperties=new string[] {"UploadLimitScheduleWeeklyRecurrence"}, NewOutputProperties=new string[] {"UploadLimitScheduleWeeklyRecurrence"}, ChangeDescription="The type of the property UploadLimitScheduleWeeklyRecurrence will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Lists all Agents in a Storage Mover.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverAgent_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +37,32 @@ public partial class GetAzStorageMoverAgent_List : global::System.Management.Aut /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -59,6 +76,9 @@ public partial class GetAzStorageMoverAgent_List : global::System.Management.Aut [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -85,7 +105,7 @@ public partial class GetAzStorageMoverAgent_List : global::System.Management.Aut /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -145,7 +165,8 @@ public partial class GetAzStorageMoverAgent_List : global::System.Management.Aut [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -154,24 +175,24 @@ public partial class GetAzStorageMoverAgent_List : global::System.Management.Aut /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentList /// 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); + 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) @@ -194,6 +215,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -215,7 +241,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverAgent_List() { @@ -266,8 +292,33 @@ public GetAzStorageMoverAgent_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -320,7 +371,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -341,7 +392,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -379,12 +430,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -401,15 +452,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName }) + 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 } }); @@ -419,12 +470,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentList /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -436,15 +487,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentList + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverEndpoint_Get.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverEndpoint_Get.cs index e2212f308877..285f31c9f563 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverEndpoint_Get.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverEndpoint_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Gets an Endpoint resource. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverEndpoint_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets an Endpoint resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverEndpoint_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStorageMoverEndpoint_Get : global::System.Management.A /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStorageMoverEndpoint_Get : global::System.Management.A [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -93,7 +114,7 @@ public partial class GetAzStorageMoverEndpoint_Get : global::System.Management.A /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -153,7 +174,8 @@ public partial class GetAzStorageMoverEndpoint_Get : global::System.Management.A [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -162,24 +184,24 @@ public partial class GetAzStorageMoverEndpoint_Get : global::System.Management.A /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint /// 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); + 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) @@ -202,6 +224,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -223,7 +250,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverEndpoint_Get() { @@ -274,8 +301,33 @@ public GetAzStorageMoverEndpoint_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -328,7 +380,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -349,7 +401,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -387,12 +439,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -409,15 +461,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name }) + 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 } }); @@ -427,12 +479,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -444,8 +496,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverEndpoint_GetViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverEndpoint_GetViaIdentity.cs index 7d5f4d8c4630..7c25a9c2c58f 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverEndpoint_GetViaIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverEndpoint_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Gets an Endpoint resource. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverEndpoint_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets an Endpoint resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverEndpoint_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStorageMoverEndpoint_GetViaIdentity : global::System.M /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStorageMoverEndpoint_GetViaIdentity : global::System.M [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -86,7 +107,7 @@ public partial class GetAzStorageMoverEndpoint_GetViaIdentity : global::System.M /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -109,24 +130,24 @@ public partial class GetAzStorageMoverEndpoint_GetViaIdentity : global::System.M /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint /// 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); + 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) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverEndpoint_GetViaIdentity() { @@ -221,8 +247,33 @@ public GetAzStorageMoverEndpoint_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -317,7 +368,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -355,12 +406,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -377,7 +428,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 } @@ -395,12 +446,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,8 +463,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverEndpoint_GetViaIdentityStorageMover.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverEndpoint_GetViaIdentityStorageMover.cs new file mode 100644 index 000000000000..91ed45236952 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverEndpoint_GetViaIdentityStorageMover.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// Gets an Endpoint resource. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverEndpoint_GetViaIdentityStorageMover")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets an Endpoint resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}", ApiVersion = "2025-07-01")] + public partial class GetAzStorageMoverEndpoint_GetViaIdentityStorageMover : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Endpoint resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Endpoint resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Endpoint resource.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EndpointName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 GetAzStorageMoverEndpoint_GetViaIdentityStorageMover() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/endpoints/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EndpointsGetViaIdentity(StorageMoverInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.EndpointsGet(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverEndpoint_List.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverEndpoint_List.cs index d448ad8f5813..e57ab588e8e8 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverEndpoint_List.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverEndpoint_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Lists all Endpoints in a Storage Mover. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverEndpoint_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Lists all Endpoints in a Storage Mover.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverEndpoint_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzStorageMoverEndpoint_List : global::System.Management. /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzStorageMoverEndpoint_List : global::System.Management. [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -84,7 +105,7 @@ public partial class GetAzStorageMoverEndpoint_List : global::System.Management. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -144,7 +165,8 @@ public partial class GetAzStorageMoverEndpoint_List : global::System.Management. [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -153,24 +175,24 @@ public partial class GetAzStorageMoverEndpoint_List : global::System.Management. /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointList /// 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); + 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) @@ -193,6 +215,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -214,7 +241,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverEndpoint_List() { @@ -265,8 +292,33 @@ public GetAzStorageMoverEndpoint_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -319,7 +371,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -340,7 +392,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -378,12 +430,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -400,15 +452,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName }) + 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 } }); @@ -418,12 +470,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointList /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -435,15 +487,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointList + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_Get.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_Get.cs index 93d05590149f..5be4d2a0b221 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_Get.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Gets a Job Definition resource. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverJobDefinition_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets a Job Definition resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverJobDefinition_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStorageMoverJobDefinition_Get : global::System.Managem /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStorageMoverJobDefinition_Get : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -93,7 +114,7 @@ public partial class GetAzStorageMoverJobDefinition_Get : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } /// Backing field for property. private string _projectName; @@ -167,7 +188,8 @@ public partial class GetAzStorageMoverJobDefinition_Get : global::System.Managem [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -176,24 +198,24 @@ public partial class GetAzStorageMoverJobDefinition_Get : global::System.Managem /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition /// 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); + 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) @@ -216,6 +238,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -237,7 +264,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverJobDefinition_Get() { @@ -288,8 +315,33 @@ public GetAzStorageMoverJobDefinition_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -342,7 +394,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -363,7 +415,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,ProjectName=ProjectName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,ProjectName=ProjectName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -401,12 +453,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,15 +475,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, Name=Name }) + 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 } }); @@ -441,12 +493,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -458,8 +510,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_GetViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_GetViaIdentity.cs index 8bdc142f84c2..0aa4b176f202 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_GetViaIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Gets a Job Definition resource. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverJobDefinition_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets a Job Definition resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverJobDefinition_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStorageMoverJobDefinition_GetViaIdentity : global::Sys /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStorageMoverJobDefinition_GetViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -86,7 +107,7 @@ public partial class GetAzStorageMoverJobDefinition_GetViaIdentity : global::Sys /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -109,24 +130,24 @@ public partial class GetAzStorageMoverJobDefinition_GetViaIdentity : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition /// 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); + 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) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverJobDefinition_GetViaIdentity() { @@ -221,8 +247,33 @@ public GetAzStorageMoverJobDefinition_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -321,7 +372,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -359,12 +410,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -381,7 +432,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 } @@ -399,12 +450,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -416,8 +467,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_GetViaIdentityProject.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_GetViaIdentityProject.cs new file mode 100644 index 000000000000..a88c3291f47c --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_GetViaIdentityProject.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// Gets a Job Definition resource. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverJobDefinition_GetViaIdentityProject")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets a Job Definition resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] + public partial class GetAzStorageMoverJobDefinition_GetViaIdentityProject : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("JobDefinitionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _projectInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity ProjectInputObject { get => this._projectInputObject; set => this._projectInputObject = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 GetAzStorageMoverJobDefinition_GetViaIdentityProject() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ProjectInputObject?.Id != null) + { + this.ProjectInputObject.Id += $"/jobDefinitions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.JobDefinitionsGetViaIdentity(ProjectInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ProjectInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + await this.Client.JobDefinitionsGet(ProjectInputObject.SubscriptionId ?? null, ProjectInputObject.ResourceGroupName ?? null, ProjectInputObject.StorageMoverName ?? null, ProjectInputObject.ProjectName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_GetViaIdentityStorageMover.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_GetViaIdentityStorageMover.cs new file mode 100644 index 000000000000..52fdbccb9523 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_GetViaIdentityStorageMover.cs @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// Gets a Job Definition resource. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverJobDefinition_GetViaIdentityStorageMover")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets a Job Definition resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] + public partial class GetAzStorageMoverJobDefinition_GetViaIdentityStorageMover : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("JobDefinitionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 GetAzStorageMoverJobDefinition_GetViaIdentityStorageMover() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/projects/{(global::System.Uri.EscapeDataString(this.ProjectName.ToString()))}/jobDefinitions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.JobDefinitionsGetViaIdentity(StorageMoverInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.JobDefinitionsGet(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, ProjectName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProjectName=ProjectName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_List.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_List.cs index 52d9e7403f82..1b9025815ef8 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_List.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobDefinition_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Lists all Job Definitions in a Project. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverJobDefinition_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Lists all Job Definitions in a Project.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverJobDefinition_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzStorageMoverJobDefinition_List : global::System.Manage /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzStorageMoverJobDefinition_List : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -84,7 +105,7 @@ public partial class GetAzStorageMoverJobDefinition_List : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } /// Backing field for property. private string _projectName; @@ -158,7 +179,8 @@ public partial class GetAzStorageMoverJobDefinition_List : global::System.Manage [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -167,24 +189,24 @@ public partial class GetAzStorageMoverJobDefinition_List : global::System.Manage /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionList /// 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); + 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) @@ -207,6 +229,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -228,7 +255,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverJobDefinition_List() { @@ -279,8 +306,33 @@ public GetAzStorageMoverJobDefinition_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -333,7 +385,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -354,7 +406,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,ProjectName=ProjectName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,ProjectName=ProjectName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -392,12 +444,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -414,15 +466,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName }) + 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 } }); @@ -432,12 +484,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionList /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -449,15 +501,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionList + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_Get.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_Get.cs index bb8795c2f0a6..dc8a76e8f76e 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_Get.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Gets a Job Run resource. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns/{jobRunName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverJobRun_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets a Job Run resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns/{jobRunName}", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverJobRun_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStorageMoverJobRun_Get : global::System.Management.Aut /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStorageMoverJobRun_Get : global::System.Management.Aut [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -107,7 +128,7 @@ public partial class GetAzStorageMoverJobRun_Get : global::System.Management.Aut /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } /// Backing field for property. private string _projectName; @@ -181,7 +202,8 @@ public partial class GetAzStorageMoverJobRun_Get : global::System.Management.Aut [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -190,24 +212,24 @@ public partial class GetAzStorageMoverJobRun_Get : global::System.Management.Aut /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun /// 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); + 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) @@ -230,6 +252,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -251,7 +278,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverJobRun_Get() { @@ -302,8 +329,33 @@ public GetAzStorageMoverJobRun_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -356,7 +408,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -377,7 +429,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,ProjectName=ProjectName,JobDefinitionName=JobDefinitionName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,ProjectName=ProjectName,JobDefinitionName=JobDefinitionName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -415,12 +467,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -437,15 +489,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, JobDefinitionName=JobDefinitionName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, JobDefinitionName=JobDefinitionName, Name=Name }) + 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 } }); @@ -455,12 +507,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -472,8 +524,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_GetViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_GetViaIdentity.cs index 9810e6771e80..b79ccd4a53ae 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_GetViaIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Gets a Job Run resource. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns/{jobRunName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverJobRun_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets a Job Run resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns/{jobRunName}", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverJobRun_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStorageMoverJobRun_GetViaIdentity : global::System.Man /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStorageMoverJobRun_GetViaIdentity : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -86,7 +107,7 @@ public partial class GetAzStorageMoverJobRun_GetViaIdentity : global::System.Man /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -109,24 +130,24 @@ public partial class GetAzStorageMoverJobRun_GetViaIdentity : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun /// 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); + 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) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverJobRun_GetViaIdentity() { @@ -221,8 +247,33 @@ public GetAzStorageMoverJobRun_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -325,7 +376,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -363,12 +414,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -385,7 +436,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 } @@ -403,12 +454,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -420,8 +471,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_GetViaIdentityJobDefinition.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_GetViaIdentityJobDefinition.cs new file mode 100644 index 000000000000..cb287069b3bd --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_GetViaIdentityJobDefinition.cs @@ -0,0 +1,509 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// Gets a Job Run resource. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns/{jobRunName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverJobRun_GetViaIdentityJobDefinition")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets a Job Run resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns/{jobRunName}", ApiVersion = "2025-07-01")] + public partial class GetAzStorageMoverJobRun_GetViaIdentityJobDefinition : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _jobDefinitionInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity JobDefinitionInputObject { get => this._jobDefinitionInputObject; set => this._jobDefinitionInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Job Run resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Run resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Run resource.", + SerializedName = @"jobRunName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("JobRunName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 GetAzStorageMoverJobRun_GetViaIdentityJobDefinition() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (JobDefinitionInputObject?.Id != null) + { + this.JobDefinitionInputObject.Id += $"/jobRuns/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.JobRunsGetViaIdentity(JobDefinitionInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == JobDefinitionInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("JobDefinitionInputObject has null value for JobDefinitionInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, JobDefinitionInputObject) ); + } + if (null == JobDefinitionInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("JobDefinitionInputObject has null value for JobDefinitionInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, JobDefinitionInputObject) ); + } + if (null == JobDefinitionInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("JobDefinitionInputObject has null value for JobDefinitionInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, JobDefinitionInputObject) ); + } + if (null == JobDefinitionInputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("JobDefinitionInputObject has null value for JobDefinitionInputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, JobDefinitionInputObject) ); + } + if (null == JobDefinitionInputObject.JobDefinitionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("JobDefinitionInputObject has null value for JobDefinitionInputObject.JobDefinitionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, JobDefinitionInputObject) ); + } + await this.Client.JobRunsGet(JobDefinitionInputObject.SubscriptionId ?? null, JobDefinitionInputObject.ResourceGroupName ?? null, JobDefinitionInputObject.StorageMoverName ?? null, JobDefinitionInputObject.ProjectName ?? null, JobDefinitionInputObject.JobDefinitionName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_GetViaIdentityProject.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_GetViaIdentityProject.cs new file mode 100644 index 000000000000..4be8f80c2ea0 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_GetViaIdentityProject.cs @@ -0,0 +1,519 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// Gets a Job Run resource. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns/{jobRunName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverJobRun_GetViaIdentityProject")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets a Job Run resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns/{jobRunName}", ApiVersion = "2025-07-01")] + public partial class GetAzStorageMoverJobRun_GetViaIdentityProject : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 _jobDefinitionName; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string JobDefinitionName { get => this._jobDefinitionName; set => this._jobDefinitionName = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Job Run resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Run resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Run resource.", + SerializedName = @"jobRunName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("JobRunName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _projectInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity ProjectInputObject { get => this._projectInputObject; set => this._projectInputObject = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 GetAzStorageMoverJobRun_GetViaIdentityProject() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ProjectInputObject?.Id != null) + { + this.ProjectInputObject.Id += $"/jobDefinitions/{(global::System.Uri.EscapeDataString(this.JobDefinitionName.ToString()))}/jobRuns/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.JobRunsGetViaIdentity(ProjectInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ProjectInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + await this.Client.JobRunsGet(ProjectInputObject.SubscriptionId ?? null, ProjectInputObject.ResourceGroupName ?? null, ProjectInputObject.StorageMoverName ?? null, ProjectInputObject.ProjectName ?? null, JobDefinitionName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { JobDefinitionName=JobDefinitionName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_GetViaIdentityStorageMover.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_GetViaIdentityStorageMover.cs new file mode 100644 index 000000000000..a19e33875635 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_GetViaIdentityStorageMover.cs @@ -0,0 +1,529 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// Gets a Job Run resource. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns/{jobRunName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverJobRun_GetViaIdentityStorageMover")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets a Job Run resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns/{jobRunName}", ApiVersion = "2025-07-01")] + public partial class GetAzStorageMoverJobRun_GetViaIdentityStorageMover : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 _jobDefinitionName; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string JobDefinitionName { get => this._jobDefinitionName; set => this._jobDefinitionName = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Job Run resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Run resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Run resource.", + SerializedName = @"jobRunName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("JobRunName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 GetAzStorageMoverJobRun_GetViaIdentityStorageMover() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/projects/{(global::System.Uri.EscapeDataString(this.ProjectName.ToString()))}/jobDefinitions/{(global::System.Uri.EscapeDataString(this.JobDefinitionName.ToString()))}/jobRuns/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.JobRunsGetViaIdentity(StorageMoverInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.JobRunsGet(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, ProjectName, JobDefinitionName, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProjectName=ProjectName,JobDefinitionName=JobDefinitionName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_List.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_List.cs index 04ad9aad0462..875f235f5a54 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_List.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverJobRun_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Lists all Job Runs in a Job Definition. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverJobRun_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRun))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRun))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Lists all Job Runs in a Job Definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/jobRuns", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverJobRun_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzStorageMoverJobRun_List : global::System.Management.Au /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzStorageMoverJobRun_List : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -98,7 +119,7 @@ public partial class GetAzStorageMoverJobRun_List : global::System.Management.Au /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } /// Backing field for property. private string _projectName; @@ -172,7 +193,8 @@ public partial class GetAzStorageMoverJobRun_List : global::System.Management.Au [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -181,24 +203,24 @@ public partial class GetAzStorageMoverJobRun_List : global::System.Management.Au /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunList /// 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); + 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) @@ -221,6 +243,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -242,7 +269,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverJobRun_List() { @@ -293,8 +320,33 @@ public GetAzStorageMoverJobRun_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -347,7 +399,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -368,7 +420,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,ProjectName=ProjectName,JobDefinitionName=JobDefinitionName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,ProjectName=ProjectName,JobDefinitionName=JobDefinitionName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -406,12 +458,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -428,15 +480,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, JobDefinitionName=JobDefinitionName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, JobDefinitionName=JobDefinitionName }) + 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 } }); @@ -446,12 +498,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunList /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -463,15 +515,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunList + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverOperation_List.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverOperation_List.cs index 20bd96db8430..0a8b4e14c051 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverOperation_List.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverOperation_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// List the operations for the provider @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverOperation_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"List the operations for the provider")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/providers/Microsoft.StorageMover/operations", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverOperation_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +38,32 @@ public partial class GetAzStorageMoverOperation_List : global::System.Management /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -59,6 +77,9 @@ public partial class GetAzStorageMoverOperation_List : global::System.Management [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -85,7 +106,7 @@ public partial class GetAzStorageMoverOperation_List : global::System.Management /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -108,24 +129,24 @@ public partial class GetAzStorageMoverOperation_List : global::System.Management /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResult /// 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); + 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) @@ -148,6 +169,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -169,7 +195,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverOperation_List() { @@ -220,8 +246,33 @@ public GetAzStorageMoverOperation_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -274,7 +325,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -292,7 +343,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -330,12 +381,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -352,7 +403,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 } @@ -370,12 +421,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperationListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -387,15 +438,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperationListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverProject_Get.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverProject_Get.cs index 7f09f7fa8930..af27bf3d37b6 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverProject_Get.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverProject_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Gets a Project resource. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverProject_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets a Project resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverProject_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStorageMoverProject_Get : global::System.Management.Au /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStorageMoverProject_Get : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -93,7 +114,7 @@ public partial class GetAzStorageMoverProject_Get : global::System.Management.Au /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -153,7 +174,8 @@ public partial class GetAzStorageMoverProject_Get : global::System.Management.Au [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -162,24 +184,24 @@ public partial class GetAzStorageMoverProject_Get : global::System.Management.Au /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject /// 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); + 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) @@ -202,6 +224,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -223,7 +250,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverProject_Get() { @@ -274,8 +301,33 @@ public GetAzStorageMoverProject_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -328,7 +380,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -349,7 +401,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -387,12 +439,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -409,15 +461,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name }) + 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 } }); @@ -427,12 +479,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -444,8 +496,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverProject_GetViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverProject_GetViaIdentity.cs index 9a7a09b6a21d..ad780c3a4b95 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverProject_GetViaIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverProject_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Gets a Project resource. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverProject_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets a Project resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverProject_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStorageMoverProject_GetViaIdentity : global::System.Ma /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStorageMoverProject_GetViaIdentity : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -86,7 +107,7 @@ public partial class GetAzStorageMoverProject_GetViaIdentity : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -109,24 +130,24 @@ public partial class GetAzStorageMoverProject_GetViaIdentity : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject /// 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); + 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) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverProject_GetViaIdentity() { @@ -221,8 +247,33 @@ public GetAzStorageMoverProject_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -317,7 +368,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -355,12 +406,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -377,7 +428,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 } @@ -395,12 +446,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -412,8 +463,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverProject_GetViaIdentityStorageMover.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverProject_GetViaIdentityStorageMover.cs new file mode 100644 index 000000000000..871db45779a5 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverProject_GetViaIdentityStorageMover.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// Gets a Project resource. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverProject_GetViaIdentityStorageMover")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets a Project resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] + public partial class GetAzStorageMoverProject_GetViaIdentityStorageMover : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProjectName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 GetAzStorageMoverProject_GetViaIdentityStorageMover() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/projects/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ProjectsGetViaIdentity(StorageMoverInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.ProjectsGet(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverProject_List.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverProject_List.cs index 1b5e18c63d82..2df1676f4cc8 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverProject_List.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMoverProject_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Lists all Projects in a Storage Mover. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMoverProject_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Lists all Projects in a Storage Mover.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects", ApiVersion = "2025-07-01")] public partial class GetAzStorageMoverProject_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzStorageMoverProject_List : global::System.Management.A /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzStorageMoverProject_List : global::System.Management.A [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -84,7 +105,7 @@ public partial class GetAzStorageMoverProject_List : global::System.Management.A /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -144,7 +165,8 @@ public partial class GetAzStorageMoverProject_List : global::System.Management.A [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -153,24 +175,24 @@ public partial class GetAzStorageMoverProject_List : global::System.Management.A /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectList /// 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); + 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) @@ -193,6 +215,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -214,7 +241,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMoverProject_List() { @@ -265,8 +292,33 @@ public GetAzStorageMoverProject_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -319,7 +371,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -340,7 +392,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -378,12 +430,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -400,15 +452,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName }) + 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 } }); @@ -418,12 +470,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectList /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -435,15 +487,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectList + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_Get.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_Get.cs index c0cf305881ab..a18e134a7076 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_Get.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Gets a Storage Mover resource. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMover_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets a Storage Mover resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}", ApiVersion = "2025-07-01")] public partial class GetAzStorageMover_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStorageMover_Get : global::System.Management.Automatio /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStorageMover_Get : global::System.Management.Automatio [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -93,7 +114,7 @@ public partial class GetAzStorageMover_Get : global::System.Management.Automatio /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -139,7 +160,8 @@ public partial class GetAzStorageMover_Get : global::System.Management.Automatio [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -148,24 +170,24 @@ public partial class GetAzStorageMover_Get : global::System.Management.Automatio /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover /// 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); + 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) @@ -188,6 +210,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -209,7 +236,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMover_Get() { @@ -260,8 +287,33 @@ public GetAzStorageMover_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -314,7 +366,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -335,7 +387,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -373,12 +425,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -395,15 +447,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + 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 } }); @@ -413,12 +465,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -430,8 +482,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_GetViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_GetViaIdentity.cs index bab871c7d2aa..07567b635d2b 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_GetViaIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Gets a Storage Mover resource. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMover_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Gets a Storage Mover resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}", ApiVersion = "2025-07-01")] public partial class GetAzStorageMover_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStorageMover_GetViaIdentity : global::System.Managemen /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStorageMover_GetViaIdentity : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -86,7 +107,7 @@ public partial class GetAzStorageMover_GetViaIdentity : global::System.Managemen /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -109,24 +130,24 @@ public partial class GetAzStorageMover_GetViaIdentity : global::System.Managemen /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover /// 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); + 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) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMover_GetViaIdentity() { @@ -221,8 +247,33 @@ public GetAzStorageMover_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -313,7 +364,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -351,12 +402,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -373,7 +424,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 } @@ -391,12 +442,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -408,8 +459,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_List.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_List.cs index f4e7e20844a9..2e17cb517797 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_List.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Lists all Storage Movers in a subscription. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.StorageMover/storageMovers" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMover_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Lists all Storage Movers in a subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.StorageMover/storageMovers", ApiVersion = "2025-07-01")] public partial class GetAzStorageMover_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzStorageMover_List : global::System.Management.Automati /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzStorageMover_List : global::System.Management.Automati [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -84,7 +105,7 @@ public partial class GetAzStorageMover_List : global::System.Management.Automati /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -116,7 +137,8 @@ public partial class GetAzStorageMover_List : global::System.Management.Automati [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -125,24 +147,24 @@ public partial class GetAzStorageMover_List : global::System.Management.Automati /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverList /// 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); + 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) @@ -165,6 +187,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -186,7 +213,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMover_List() { @@ -237,8 +264,33 @@ public GetAzStorageMover_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -291,7 +343,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -312,7 +364,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -350,12 +402,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -372,15 +424,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId }) + 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 } }); @@ -390,12 +442,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverList /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -407,15 +459,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverList + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_List1.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_List1.cs index 6ea5fde13842..e9fa367de99d 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_List1.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/GetAzStorageMover_List1.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Lists all Storage Movers in a resource group. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStorageMover_List1")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Lists all Storage Movers in a resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers", ApiVersion = "2025-07-01")] public partial class GetAzStorageMover_List1 : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzStorageMover_List1 : global::System.Management.Automat /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzStorageMover_List1 : global::System.Management.Automat [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -84,7 +105,7 @@ public partial class GetAzStorageMover_List1 : global::System.Management.Automat /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -130,7 +151,8 @@ public partial class GetAzStorageMover_List1 : global::System.Management.Automat [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -139,24 +161,24 @@ public partial class GetAzStorageMover_List1 : global::System.Management.Automat /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverList /// 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); + 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) @@ -179,6 +201,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -200,7 +227,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStorageMover_List1() { @@ -251,8 +278,33 @@ public GetAzStorageMover_List1() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -305,7 +357,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -326,7 +378,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -364,12 +416,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -386,15 +438,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + 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 } }); @@ -404,12 +456,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverList + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverList /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -421,15 +473,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverList + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverEndpoint_CreateExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverEndpoint_CreateExpanded.cs index 07bc400ec0d8..a931c01882da 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverEndpoint_CreateExpanded.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverEndpoint_CreateExpanded.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// - /// Creates or updates an Endpoint resource, which represents a data transfer source or destination. + /// create an Endpoint resource, which represents a data transfer source or destination. /// /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMoverEndpoint_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Creates or updates an Endpoint resource, which represents a data transfer source or destination.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create an Endpoint resource, which represents a data transfer source or destination.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}", ApiVersion = "2025-07-01")] public partial class NewAzStorageMoverEndpoint_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -40,13 +43,28 @@ public partial class NewAzStorageMoverEndpoint_CreateExpanded : global::System.M /// /// The Endpoint resource, which contains information about file sources and targets. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint _endpointBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Endpoint(); + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint _endpointBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Endpoint(); + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -60,6 +78,9 @@ public partial class NewAzStorageMoverEndpoint_CreateExpanded : global::System.M [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -82,25 +103,9 @@ public partial class NewAzStorageMoverEndpoint_CreateExpanded : global::System.M ReadOnly = false, Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType))] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType IdentityType { get => _endpointBody.IdentityType ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType)""); set => _endpointBody.IdentityType = value; } - - /// - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities IdentityUserAssignedIdentity { get => _endpointBody.IdentityUserAssignedIdentity ?? null /* object */; set => _endpointBody.IdentityUserAssignedIdentity = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + public string IdentityType { get => _endpointBody.IdentityType ?? null; set => _endpointBody.IdentityType = value; } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -131,7 +136,7 @@ public partial class NewAzStorageMoverEndpoint_CreateExpanded : global::System.M /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } /// The resource specific properties for the Storage Mover resource. [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The resource specific properties for the Storage Mover resource.")] @@ -141,8 +146,8 @@ public partial class NewAzStorageMoverEndpoint_CreateExpanded : global::System.M ReadOnly = false, Description = @"The resource specific properties for the Storage Mover resource.", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties Property { get => _endpointBody.Property ?? null /* object */; set => _endpointBody.Property = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties Property { get => _endpointBody.Property ?? null /* object */; set => _endpointBody.Property = 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")] @@ -202,33 +207,42 @@ public partial class NewAzStorageMoverEndpoint_CreateExpanded : global::System.M [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + /// + /// The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in + /// the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'")] + [global::System.Management.Automation.AllowEmptyCollection] + public string[] UserAssignedIdentity { 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint /// 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); + 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) @@ -251,6 +265,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -315,8 +334,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -326,7 +370,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStorageMoverEndpoint_CreateExpanded() { @@ -380,7 +424,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -393,12 +437,21 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EndpointsCreateOrUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _endpointBody, onOk, onDefault, this, Pipeline); + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate UserAssignedIdentity + _endpointBody.IdentityUserAssignedIdentity.Clear(); + foreach( var id in this.UserAssignedIdentity ) + { + _endpointBody.IdentityUserAssignedIdentity.Add(id, new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentity()); + } + } + await this.Client.EndpointsCreateOrUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _endpointBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name,body=_endpointBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -436,12 +489,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -458,15 +511,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=_endpointBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=_endpointBody }) + 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 } }); @@ -476,12 +529,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -493,8 +546,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverEndpoint_CreateViaIdentityStorageMoverExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverEndpoint_CreateViaIdentityStorageMoverExpanded.cs new file mode 100644 index 000000000000..380dec61f14a --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverEndpoint_CreateViaIdentityStorageMoverExpanded.cs @@ -0,0 +1,564 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// create an Endpoint resource, which represents a data transfer source or destination. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMoverEndpoint_CreateViaIdentityStorageMoverExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create an Endpoint resource, which represents a data transfer source or destination.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}", ApiVersion = "2025-07-01")] + public partial class NewAzStorageMoverEndpoint_CreateViaIdentityStorageMoverExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); + + /// + /// The Endpoint resource, which contains information about file sources and targets. + /// + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint _endpointBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Endpoint(); + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + public string IdentityType { get => _endpointBody.IdentityType ?? null; set => _endpointBody.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Endpoint resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Endpoint resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Endpoint resource.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EndpointName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// The resource specific properties for the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The resource specific properties for the Storage Mover resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The resource specific properties for the Storage Mover resource.", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties Property { get => _endpointBody.Property ?? null /* object */; set => _endpointBody.Property = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = value; } + + /// + /// The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in + /// the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'")] + [global::System.Management.Automation.AllowEmptyCollection] + public string[] UserAssignedIdentity { 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 NewAzStorageMoverEndpoint_CreateViaIdentityStorageMoverExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/endpoints/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate UserAssignedIdentity + _endpointBody.IdentityUserAssignedIdentity.Clear(); + foreach( var id in this.UserAssignedIdentity ) + { + _endpointBody.IdentityUserAssignedIdentity.Add(id, new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentity()); + } + } + await this.Client.EndpointsCreateOrUpdateViaIdentity(StorageMoverInputObject.Id, _endpointBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate UserAssignedIdentity + _endpointBody.IdentityUserAssignedIdentity.Clear(); + foreach( var id in this.UserAssignedIdentity ) + { + _endpointBody.IdentityUserAssignedIdentity.Add(id, new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentity()); + } + } + await this.Client.EndpointsCreateOrUpdate(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, Name, _endpointBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverEndpoint_CreateViaJsonFilePath.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverEndpoint_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..d8edbb616fe3 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverEndpoint_CreateViaJsonFilePath.cs @@ -0,0 +1,541 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// create an Endpoint resource, which represents a data transfer source or destination. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMoverEndpoint_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create an Endpoint resource, which represents a data transfer source or destination.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class NewAzStorageMoverEndpoint_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Endpoint resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Endpoint resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Endpoint resource.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EndpointName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _storageMoverName; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 NewAzStorageMoverEndpoint_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverEndpoint_CreateViaJsonString.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverEndpoint_CreateViaJsonString.cs new file mode 100644 index 000000000000..2ee507852c11 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverEndpoint_CreateViaJsonString.cs @@ -0,0 +1,539 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// create an Endpoint resource, which represents a data transfer source or destination. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMoverEndpoint_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create an Endpoint resource, which represents a data transfer source or destination.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class NewAzStorageMoverEndpoint_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Endpoint resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Endpoint resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Endpoint resource.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EndpointName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _storageMoverName; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 NewAzStorageMoverEndpoint_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_Create.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_Create.cs deleted file mode 100644 index e88b0f2a5bef..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_Create.cs +++ /dev/null @@ -1,482 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - using System; - - /// - /// Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer. - /// - /// - /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMoverJobDefinition_Create", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ParameterSetBreakingChange(new string[] {"Create"}, "15.0.0", "2.0.0", "2025/11/03", ChangeDescription="The parameter set Create will be removed. Suggest to use CreateExpanded and CreateViaJsonString instead.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] - public partial class NewAzStorageMoverJobDefinition_Create : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener - { - /// 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(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition _jobDefinition; - - /// The Job Definition resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Job Definition resource.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Job Definition resource.", - SerializedName = @"jobDefinition", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition JobDefinition { get => this._jobDefinition; set => this._jobDefinition = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the Job Definition resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Job Definition resource.", - SerializedName = @"jobDefinitionName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("JobDefinitionName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } - - /// Backing field for property. - private string _projectName; - - /// The name of the Project resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Project resource.", - SerializedName = @"projectName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _storageMoverName; - - /// The name of the Storage Mover resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Storage Mover resource.", - SerializedName = @"storageMoverName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public NewAzStorageMoverJobDefinition_Create() - { - - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'JobDefinitionsCreateOrUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.JobDefinitionsCreateOrUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, ProjectName, Name, JobDefinition, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,ProjectName=ProjectName,Name=Name,body=JobDefinition}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, Name=Name, body=JobDefinition }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, Name=Name, body=JobDefinition }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateExpanded.cs index f59aa9dd49da..46309fa7a90c 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateExpanded.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// - /// Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer. + /// create a Job Definition resource, which contains configuration for a single unit of managed data transfer. /// /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMoverJobDefinition_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Creates or updates a Job Definition resource, which contains configuration for a single unit of managed data transfer.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create a Job Definition resource, which contains configuration for a single unit of managed data transfer.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] public partial class NewAzStorageMoverJobDefinition_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,8 +39,20 @@ public partial class NewAzStorageMoverJobDefinition_CreateExpanded : global::Sys /// 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; + /// The Job Definition resource. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition _jobDefinitionBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinition(); + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition _jobDefinitionBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinition(); + + /// + /// 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; /// Name of the Agent to assign for new Job Runs of this Job Definition. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of the Agent to assign for new Job Runs of this Job Definition.")] @@ -55,6 +70,9 @@ public partial class NewAzStorageMoverJobDefinition_CreateExpanded : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -66,9 +84,9 @@ public partial class NewAzStorageMoverJobDefinition_CreateExpanded : global::Sys ReadOnly = false, Description = @"Strategy to use for copy.", SerializedName = @"copyMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode))] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode CopyMode { get => _jobDefinitionBody.CopyMode; set => _jobDefinitionBody.CopyMode = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] + public string CopyMode { get => _jobDefinitionBody.CopyMode ?? null; set => _jobDefinitionBody.CopyMode = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -94,6 +112,9 @@ public partial class NewAzStorageMoverJobDefinition_CreateExpanded : global::Sys PossibleTypes = new [] { typeof(string) })] public string Description { get => _jobDefinitionBody.Description ?? null; set => _jobDefinitionBody.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] @@ -117,9 +138,9 @@ public partial class NewAzStorageMoverJobDefinition_CreateExpanded : global::Sys ReadOnly = false, Description = @"The type of the Job.", SerializedName = @"jobType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType))] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType JobType { get => _jobDefinitionBody.JobType ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.JobType)""); set => _jobDefinitionBody.JobType = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("OnPremToCloud", "CloudToCloud")] + public string JobType { get => _jobDefinitionBody.JobType ?? null; set => _jobDefinitionBody.JobType = value; } /// /// cancellation delegate. Stops the cmdlet when called. @@ -147,7 +168,7 @@ public partial class NewAzStorageMoverJobDefinition_CreateExpanded : global::Sys /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } /// Backing field for property. private string _projectName; @@ -243,7 +264,8 @@ public partial class NewAzStorageMoverJobDefinition_CreateExpanded : global::Sys [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -274,24 +296,24 @@ public partial class NewAzStorageMoverJobDefinition_CreateExpanded : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition /// 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); + 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) @@ -314,6 +336,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -378,8 +405,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -389,7 +441,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStorageMoverJobDefinition_CreateExpanded() { @@ -443,7 +495,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -456,12 +508,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.JobDefinitionsCreateOrUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, ProjectName, Name, _jobDefinitionBody, onOk, onDefault, this, Pipeline); + await this.Client.JobDefinitionsCreateOrUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, ProjectName, Name, _jobDefinitionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,ProjectName=ProjectName,Name=Name,body=_jobDefinitionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,ProjectName=ProjectName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -499,12 +551,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -521,15 +573,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, Name=Name, body=_jobDefinitionBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, Name=Name, body=_jobDefinitionBody }) + 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 } }); @@ -539,12 +591,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -556,8 +608,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateViaIdentityProjectExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateViaIdentityProjectExpanded.cs new file mode 100644 index 000000000000..23136ff197bb --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateViaIdentityProjectExpanded.cs @@ -0,0 +1,607 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// create a Job Definition resource, which contains configuration for a single unit of managed data transfer. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMoverJobDefinition_CreateViaIdentityProjectExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create a Job Definition resource, which contains configuration for a single unit of managed data transfer.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] + public partial class NewAzStorageMoverJobDefinition_CreateViaIdentityProjectExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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; + + /// The Job Definition resource. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition _jobDefinitionBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinition(); + + /// + /// 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; + + /// Name of the Agent to assign for new Job Runs of this Job Definition. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of the Agent to assign for new Job Runs of this Job Definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the Agent to assign for new Job Runs of this Job Definition.", + SerializedName = @"agentName", + PossibleTypes = new [] { typeof(string) })] + public string AgentName { get => _jobDefinitionBody.AgentName ?? null; set => _jobDefinitionBody.AgentName = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; + + /// Strategy to use for copy. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Strategy to use for copy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Strategy to use for copy.", + SerializedName = @"copyMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] + public string CopyMode { get => _jobDefinitionBody.CopyMode ?? null; set => _jobDefinitionBody.CopyMode = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for + /// migrating data between cloud to cloud. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _jobDefinitionBody.Description ?? null; set => _jobDefinitionBody.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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; } } + + /// The type of the Job. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The type of the Job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of the Job.", + SerializedName = @"jobType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("OnPremToCloud", "CloudToCloud")] + public string JobType { get => _jobDefinitionBody.JobType ?? null; set => _jobDefinitionBody.JobType = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("JobDefinitionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _projectInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity ProjectInputObject { get => this._projectInputObject; set => this._projectInputObject = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The name of the source Endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the source Endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the source Endpoint.", + SerializedName = @"sourceName", + PossibleTypes = new [] { typeof(string) })] + public string SourceName { get => _jobDefinitionBody.SourceName ?? null; set => _jobDefinitionBody.SourceName = value; } + + /// The subpath to use when reading from the source Endpoint. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The subpath to use when reading from the source Endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The subpath to use when reading from the source Endpoint.", + SerializedName = @"sourceSubpath", + PossibleTypes = new [] { typeof(string) })] + public string SourceSubpath { get => _jobDefinitionBody.SourceSubpath ?? null; set => _jobDefinitionBody.SourceSubpath = value; } + + /// The name of the target Endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the target Endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the target Endpoint.", + SerializedName = @"targetName", + PossibleTypes = new [] { typeof(string) })] + public string TargetName { get => _jobDefinitionBody.TargetName ?? null; set => _jobDefinitionBody.TargetName = value; } + + /// The subpath to use when writing to the target Endpoint. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The subpath to use when writing to the target Endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The subpath to use when writing to the target Endpoint.", + SerializedName = @"targetSubpath", + PossibleTypes = new [] { typeof(string) })] + public string TargetSubpath { get => _jobDefinitionBody.TargetSubpath ?? null; set => _jobDefinitionBody.TargetSubpath = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 NewAzStorageMoverJobDefinition_CreateViaIdentityProjectExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'JobDefinitionsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ProjectInputObject?.Id != null) + { + this.ProjectInputObject.Id += $"/jobDefinitions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.JobDefinitionsCreateOrUpdateViaIdentity(ProjectInputObject.Id, _jobDefinitionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ProjectInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + await this.Client.JobDefinitionsCreateOrUpdate(ProjectInputObject.SubscriptionId ?? null, ProjectInputObject.ResourceGroupName ?? null, ProjectInputObject.StorageMoverName ?? null, ProjectInputObject.ProjectName ?? null, Name, _jobDefinitionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateViaIdentityStorageMoverExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateViaIdentityStorageMoverExpanded.cs new file mode 100644 index 000000000000..bd17f8ac41a7 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateViaIdentityStorageMoverExpanded.cs @@ -0,0 +1,617 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// create a Job Definition resource, which contains configuration for a single unit of managed data transfer. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMoverJobDefinition_CreateViaIdentityStorageMoverExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create a Job Definition resource, which contains configuration for a single unit of managed data transfer.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] + public partial class NewAzStorageMoverJobDefinition_CreateViaIdentityStorageMoverExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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; + + /// The Job Definition resource. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition _jobDefinitionBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinition(); + + /// + /// 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; + + /// Name of the Agent to assign for new Job Runs of this Job Definition. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of the Agent to assign for new Job Runs of this Job Definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the Agent to assign for new Job Runs of this Job Definition.", + SerializedName = @"agentName", + PossibleTypes = new [] { typeof(string) })] + public string AgentName { get => _jobDefinitionBody.AgentName ?? null; set => _jobDefinitionBody.AgentName = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; + + /// Strategy to use for copy. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Strategy to use for copy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Strategy to use for copy.", + SerializedName = @"copyMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] + public string CopyMode { get => _jobDefinitionBody.CopyMode ?? null; set => _jobDefinitionBody.CopyMode = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for + /// migrating data between cloud to cloud. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A description for the Job Definition. OnPremToCloud is for migrating data from on-premises to cloud. CloudToCloud is for migrating data between cloud to cloud.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _jobDefinitionBody.Description ?? null; set => _jobDefinitionBody.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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; } } + + /// The type of the Job. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The type of the Job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of the Job.", + SerializedName = @"jobType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("OnPremToCloud", "CloudToCloud")] + public string JobType { get => _jobDefinitionBody.JobType ?? null; set => _jobDefinitionBody.JobType = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("JobDefinitionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The name of the source Endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the source Endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the source Endpoint.", + SerializedName = @"sourceName", + PossibleTypes = new [] { typeof(string) })] + public string SourceName { get => _jobDefinitionBody.SourceName ?? null; set => _jobDefinitionBody.SourceName = value; } + + /// The subpath to use when reading from the source Endpoint. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The subpath to use when reading from the source Endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The subpath to use when reading from the source Endpoint.", + SerializedName = @"sourceSubpath", + PossibleTypes = new [] { typeof(string) })] + public string SourceSubpath { get => _jobDefinitionBody.SourceSubpath ?? null; set => _jobDefinitionBody.SourceSubpath = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = value; } + + /// The name of the target Endpoint. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the target Endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the target Endpoint.", + SerializedName = @"targetName", + PossibleTypes = new [] { typeof(string) })] + public string TargetName { get => _jobDefinitionBody.TargetName ?? null; set => _jobDefinitionBody.TargetName = value; } + + /// The subpath to use when writing to the target Endpoint. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The subpath to use when writing to the target Endpoint.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The subpath to use when writing to the target Endpoint.", + SerializedName = @"targetSubpath", + PossibleTypes = new [] { typeof(string) })] + public string TargetSubpath { get => _jobDefinitionBody.TargetSubpath ?? null; set => _jobDefinitionBody.TargetSubpath = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 NewAzStorageMoverJobDefinition_CreateViaIdentityStorageMoverExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'JobDefinitionsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/projects/{(global::System.Uri.EscapeDataString(this.ProjectName.ToString()))}/jobDefinitions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.JobDefinitionsCreateOrUpdateViaIdentity(StorageMoverInputObject.Id, _jobDefinitionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.JobDefinitionsCreateOrUpdate(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, ProjectName, Name, _jobDefinitionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProjectName=ProjectName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateViaJsonFilePath.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..7bcb1e90210e --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateViaJsonFilePath.cs @@ -0,0 +1,554 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// create a Job Definition resource, which contains configuration for a single unit of managed data transfer. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMoverJobDefinition_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create a Job Definition resource, which contains configuration for a single unit of managed data transfer.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class NewAzStorageMoverJobDefinition_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("JobDefinitionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _storageMoverName; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 NewAzStorageMoverJobDefinition_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'JobDefinitionsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.JobDefinitionsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, StorageMoverName, ProjectName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,ProjectName=ProjectName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateViaJsonString.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateViaJsonString.cs new file mode 100644 index 000000000000..0a262e30a84e --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverJobDefinition_CreateViaJsonString.cs @@ -0,0 +1,552 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// create a Job Definition resource, which contains configuration for a single unit of managed data transfer. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMoverJobDefinition_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create a Job Definition resource, which contains configuration for a single unit of managed data transfer.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class NewAzStorageMoverJobDefinition_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("JobDefinitionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _storageMoverName; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 NewAzStorageMoverJobDefinition_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'JobDefinitionsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.JobDefinitionsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, StorageMoverName, ProjectName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,ProjectName=ProjectName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_Create.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_Create.cs deleted file mode 100644 index 485b89fefe4c..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_Create.cs +++ /dev/null @@ -1,468 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - using System; - - /// - /// Creates or updates a Project resource, which is a logical grouping of related jobs. - /// - /// - /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMoverProject_Create", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ParameterSetBreakingChange(new string[] {"Create"}, "15.0.0", "2.0.0", "2025/11/03", ChangeDescription="The parameter set Create will be removed. Suggest to use CreateExpanded and CreateViaJsonString instead.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Creates or updates a Project resource, which is a logical grouping of related jobs.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] - public partial class NewAzStorageMoverProject_Create : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener - { - /// 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(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the Project resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Project resource.", - SerializedName = @"projectName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("ProjectName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject _project; - - /// The Project resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Project resource.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Project resource.", - SerializedName = @"project", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject Project { get => this._project; set => this._project = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _storageMoverName; - - /// The name of the Storage Mover resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Storage Mover resource.", - SerializedName = @"storageMoverName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public NewAzStorageMoverProject_Create() - { - - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'ProjectsCreateOrUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ProjectsCreateOrUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, Name, Project, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name,body=Project}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=Project }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=Project }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_CreateExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_CreateExpanded.cs index ba6103ee1a1a..4beac1632438 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_CreateExpanded.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_CreateExpanded.cs @@ -6,21 +6,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; - /// - /// Creates or updates a Project resource, which is a logical grouping of related jobs. - /// + /// create a Project resource, which is a logical grouping of related jobs. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMoverProject_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Creates or updates a Project resource, which is a logical grouping of related jobs.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create a Project resource, which is a logical grouping of related jobs.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] public partial class NewAzStorageMoverProject_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,14 +37,29 @@ public partial class NewAzStorageMoverProject_CreateExpanded : global::System.Ma /// 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; + /// The Project resource. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject _projectBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.Project(); + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject _projectBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Project(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -68,6 +84,9 @@ public partial class NewAzStorageMoverProject_CreateExpanded : global::System.Ma PossibleTypes = new [] { typeof(string) })] public string Description { get => _projectBody.Description ?? null; set => _projectBody.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] @@ -109,7 +128,7 @@ public partial class NewAzStorageMoverProject_CreateExpanded : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -169,7 +188,8 @@ public partial class NewAzStorageMoverProject_CreateExpanded : global::System.Ma [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -178,24 +198,24 @@ public partial class NewAzStorageMoverProject_CreateExpanded : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject /// 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); + 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) @@ -218,6 +238,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -282,8 +307,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -293,7 +343,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStorageMoverProject_CreateExpanded() { @@ -347,7 +397,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -360,12 +410,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ProjectsCreateOrUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _projectBody, onOk, onDefault, this, Pipeline); + await this.Client.ProjectsCreateOrUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _projectBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name,body=_projectBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -403,12 +453,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -425,15 +475,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=_projectBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=_projectBody }) + 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 } }); @@ -443,12 +493,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -460,8 +510,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_CreateViaIdentityStorageMoverExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_CreateViaIdentityStorageMoverExpanded.cs new file mode 100644 index 000000000000..aafd2325bc57 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_CreateViaIdentityStorageMoverExpanded.cs @@ -0,0 +1,519 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// create a Project resource, which is a logical grouping of related jobs. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMoverProject_CreateViaIdentityStorageMoverExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create a Project resource, which is a logical grouping of related jobs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] + public partial class NewAzStorageMoverProject_CreateViaIdentityStorageMoverExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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; + + /// The Project resource. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject _projectBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Project(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// A description for the Project. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A description for the Project.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A description for the Project.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _projectBody.Description ?? null; set => _projectBody.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProjectName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 NewAzStorageMoverProject_CreateViaIdentityStorageMoverExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/projects/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ProjectsCreateOrUpdateViaIdentity(StorageMoverInputObject.Id, _projectBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.ProjectsCreateOrUpdate(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, Name, _projectBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_CreateViaJsonFilePath.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..d0e0edb97ae5 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_CreateViaJsonFilePath.cs @@ -0,0 +1,538 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// create a Project resource, which is a logical grouping of related jobs. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMoverProject_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create a Project resource, which is a logical grouping of related jobs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class NewAzStorageMoverProject_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProjectName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _storageMoverName; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 NewAzStorageMoverProject_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_CreateViaJsonString.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_CreateViaJsonString.cs new file mode 100644 index 000000000000..487897d6b3c0 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMoverProject_CreateViaJsonString.cs @@ -0,0 +1,536 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// create a Project resource, which is a logical grouping of related jobs. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMoverProject_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create a Project resource, which is a logical grouping of related jobs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class NewAzStorageMoverProject_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProjectName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _storageMoverName; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 NewAzStorageMoverProject_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectsCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMover_Create.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMover_Create.cs deleted file mode 100644 index 0642974ee108..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMover_Create.cs +++ /dev/null @@ -1,453 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - using System; - - /// Creates or updates a top-level Storage Mover resource. - /// - /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMover_Create", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Creates or updates a top-level Storage Mover resource.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}", ApiVersion = "2025-07-01")] - public partial class NewAzStorageMover_Create : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener - { - /// 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(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the Storage Mover resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Storage Mover resource.", - SerializedName = @"storageMoverName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("StorageMoverName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover _storageMover; - - /// - /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints.", - SerializedName = @"storageMover", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover StorageMover { get => this._storageMover; set => this._storageMover = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public NewAzStorageMover_Create() - { - - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'StorageMoversCreateOrUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StorageMoversCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, StorageMover, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,Name=Name,body=StorageMover}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=StorageMover }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=StorageMover }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMover_CreateExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMover_CreateExpanded.cs index 5b157a1f0b76..f07e00904aa1 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMover_CreateExpanded.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMover_CreateExpanded.cs @@ -6,19 +6,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; - /// Creates or updates a top-level Storage Mover resource. + /// create a top-level Storage Mover resource. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMover_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Creates or updates a top-level Storage Mover resource.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create a top-level Storage Mover resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}", ApiVersion = "2025-07-01")] public partial class NewAzStorageMover_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,16 +37,31 @@ public partial class NewAzStorageMover_CreateExpanded : global::System.Managemen /// 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; + /// /// The Storage Mover resource, which is a container for a group of Agents, Projects, and Endpoints. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover _storageMoverBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMover(); + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover _storageMoverBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMover(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -68,6 +86,9 @@ public partial class NewAzStorageMover_CreateExpanded : global::System.Managemen PossibleTypes = new [] { typeof(string) })] public string Description { get => _storageMoverBody.Description ?? null; set => _storageMoverBody.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] @@ -120,7 +141,7 @@ public partial class NewAzStorageMover_CreateExpanded : global::System.Managemen /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -166,7 +187,8 @@ public partial class NewAzStorageMover_CreateExpanded : global::System.Managemen [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -179,32 +201,32 @@ public partial class NewAzStorageMover_CreateExpanded : global::System.Managemen ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.ITrackedResourceTags Tag { get => _storageMoverBody.Tag ?? null /* object */; set => _storageMoverBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ITrackedResourceTags Tag { get => _storageMoverBody.Tag ?? null /* object */; set => _storageMoverBody.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover /// 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); + 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) @@ -227,6 +249,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -291,8 +318,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -302,7 +354,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStorageMover_CreateExpanded() { @@ -356,7 +408,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -369,12 +421,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StorageMoversCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, _storageMoverBody, onOk, onDefault, this, Pipeline); + await this.Client.StorageMoversCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, _storageMoverBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,Name=Name,body=_storageMoverBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -412,12 +464,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -434,15 +486,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_storageMoverBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_storageMoverBody }) + 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 } }); @@ -452,12 +504,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -469,8 +521,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMover_CreateViaJsonFilePath.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMover_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..b6f140af03bf --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMover_CreateViaJsonFilePath.cs @@ -0,0 +1,524 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// create a top-level Storage Mover resource. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMover_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create a top-level Storage Mover resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class NewAzStorageMover_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("StorageMoverName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 NewAzStorageMover_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StorageMoversCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageMoversCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMover_CreateViaJsonString.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMover_CreateViaJsonString.cs new file mode 100644 index 000000000000..34295a6023fe --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/NewAzStorageMover_CreateViaJsonString.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// create a top-level Storage Mover resource. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStorageMover_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"create a top-level Storage Mover resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class NewAzStorageMover_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("StorageMoverName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 NewAzStorageMover_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StorageMoversCreateOrUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageMoversCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverAgent_Delete.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverAgent_Delete.cs index a3c7e5e6274f..d6f9a5caa0ef 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverAgent_Delete.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverAgent_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Deletes an Agent resource. @@ -19,7 +21,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}", ApiVersion = "2025-07-01")] public partial class RemoveAzStorageMoverAgent_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,6 +38,9 @@ public partial class RemoveAzStorageMoverAgent_Delete : global::System.Managemen /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] @@ -45,6 +51,9 @@ public partial class RemoveAzStorageMoverAgent_Delete : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -58,6 +67,9 @@ public partial class RemoveAzStorageMoverAgent_Delete : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -114,7 +126,7 @@ public partial class RemoveAzStorageMoverAgent_Delete : global::System.Managemen /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -174,7 +186,8 @@ public partial class RemoveAzStorageMoverAgent_Delete : global::System.Managemen [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -183,12 +196,12 @@ public partial class RemoveAzStorageMoverAgent_Delete : global::System.Managemen /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 @@ -319,11 +332,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -335,10 +373,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -406,7 +460,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -424,7 +478,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -437,7 +491,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStorageMoverAgent_Delete() { @@ -470,12 +524,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -492,15 +546,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name }) + 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 } }); @@ -525,7 +579,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -549,7 +603,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverAgent_DeleteViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverAgent_DeleteViaIdentity.cs index 683d2189348f..7e26e7623d4b 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverAgent_DeleteViaIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverAgent_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Deletes an Agent resource. @@ -19,7 +21,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}", ApiVersion = "2025-07-01")] public partial class RemoveAzStorageMoverAgent_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,6 +38,9 @@ public partial class RemoveAzStorageMoverAgent_DeleteViaIdentity : global::Syste /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] @@ -45,6 +51,9 @@ public partial class RemoveAzStorageMoverAgent_DeleteViaIdentity : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -58,6 +67,9 @@ public partial class RemoveAzStorageMoverAgent_DeleteViaIdentity : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -107,7 +119,7 @@ public partial class RemoveAzStorageMoverAgent_DeleteViaIdentity : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -130,12 +142,12 @@ public partial class RemoveAzStorageMoverAgent_DeleteViaIdentity : global::Syste /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 @@ -262,11 +274,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -278,10 +315,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -349,7 +402,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -391,7 +444,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -404,7 +457,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStorageMoverAgent_DeleteViaIdentity() { @@ -437,12 +490,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -459,7 +512,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 } @@ -492,7 +545,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -516,7 +569,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverAgent_DeleteViaIdentityStorageMover.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverAgent_DeleteViaIdentityStorageMover.cs new file mode 100644 index 000000000000..c8fdbf1b1b74 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverAgent_DeleteViaIdentityStorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// Deletes an Agent resource. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzStorageMoverAgent_DeleteViaIdentityStorageMover", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Deletes an Agent resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}", ApiVersion = "2025-07-01")] + public partial class RemoveAzStorageMoverAgent_DeleteViaIdentityStorageMover : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Agent resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Agent resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Agent resource.", + SerializedName = @"agentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("AgentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzStorageMoverAgent_DeleteViaIdentityStorageMover + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets.RemoveAzStorageMoverAgent_DeleteViaIdentityStorageMover Clone() + { + var clone = new RemoveAzStorageMoverAgent_DeleteViaIdentityStorageMover(); + 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (true) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/agents/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.AgentsDeleteViaIdentity(StorageMoverInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.AgentsDelete(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzStorageMoverAgent_DeleteViaIdentityStorageMover() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverEndpoint_Delete.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverEndpoint_Delete.cs index 77672ccdc54d..12648452a9e0 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverEndpoint_Delete.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverEndpoint_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Deletes an Endpoint resource. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}", ApiVersion = "2025-07-01")] public partial class RemoveAzStorageMoverEndpoint_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +37,9 @@ public partial class RemoveAzStorageMoverEndpoint_Delete : global::System.Manage /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] @@ -44,6 +50,9 @@ public partial class RemoveAzStorageMoverEndpoint_Delete : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -57,6 +66,9 @@ public partial class RemoveAzStorageMoverEndpoint_Delete : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -113,7 +125,7 @@ public partial class RemoveAzStorageMoverEndpoint_Delete : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -173,7 +185,8 @@ public partial class RemoveAzStorageMoverEndpoint_Delete : global::System.Manage [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -182,12 +195,12 @@ public partial class RemoveAzStorageMoverEndpoint_Delete : global::System.Manage /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 @@ -318,11 +331,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -334,10 +372,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -405,7 +459,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -423,7 +477,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -436,7 +490,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStorageMoverEndpoint_Delete() { @@ -469,12 +523,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -491,15 +545,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name }) + 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 } }); @@ -524,7 +578,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -548,7 +602,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverEndpoint_DeleteViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverEndpoint_DeleteViaIdentity.cs index 46040fd6e8b2..786262713c0a 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverEndpoint_DeleteViaIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverEndpoint_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Deletes an Endpoint resource. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}", ApiVersion = "2025-07-01")] public partial class RemoveAzStorageMoverEndpoint_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +37,9 @@ public partial class RemoveAzStorageMoverEndpoint_DeleteViaIdentity : global::Sy /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] @@ -44,6 +50,9 @@ public partial class RemoveAzStorageMoverEndpoint_DeleteViaIdentity : global::Sy [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -57,6 +66,9 @@ public partial class RemoveAzStorageMoverEndpoint_DeleteViaIdentity : global::Sy [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -106,7 +118,7 @@ public partial class RemoveAzStorageMoverEndpoint_DeleteViaIdentity : global::Sy /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -129,12 +141,12 @@ public partial class RemoveAzStorageMoverEndpoint_DeleteViaIdentity : global::Sy /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 @@ -261,11 +273,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -277,10 +314,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -348,7 +401,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -390,7 +443,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -403,7 +456,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStorageMoverEndpoint_DeleteViaIdentity() { @@ -436,12 +489,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -458,7 +511,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 } @@ -491,7 +544,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -515,7 +568,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverEndpoint_DeleteViaIdentityStorageMover.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverEndpoint_DeleteViaIdentityStorageMover.cs new file mode 100644 index 000000000000..9544728a0ff9 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverEndpoint_DeleteViaIdentityStorageMover.cs @@ -0,0 +1,593 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// Deletes an Endpoint resource. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzStorageMoverEndpoint_DeleteViaIdentityStorageMover", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Deletes an Endpoint resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}", ApiVersion = "2025-07-01")] + public partial class RemoveAzStorageMoverEndpoint_DeleteViaIdentityStorageMover : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Endpoint resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Endpoint resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Endpoint resource.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EndpointName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzStorageMoverEndpoint_DeleteViaIdentityStorageMover + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets.RemoveAzStorageMoverEndpoint_DeleteViaIdentityStorageMover Clone() + { + var clone = new RemoveAzStorageMoverEndpoint_DeleteViaIdentityStorageMover(); + 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/endpoints/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.EndpointsDeleteViaIdentity(StorageMoverInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.EndpointsDelete(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzStorageMoverEndpoint_DeleteViaIdentityStorageMover() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverJobDefinition_Delete.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverJobDefinition_Delete.cs index 822b0408ee52..07e5152ee1a3 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverJobDefinition_Delete.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverJobDefinition_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Deletes a Job Definition resource. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] public partial class RemoveAzStorageMoverJobDefinition_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +37,9 @@ public partial class RemoveAzStorageMoverJobDefinition_Delete : global::System.M /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] @@ -44,6 +50,9 @@ public partial class RemoveAzStorageMoverJobDefinition_Delete : global::System.M [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -57,6 +66,9 @@ public partial class RemoveAzStorageMoverJobDefinition_Delete : global::System.M [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -113,7 +125,7 @@ public partial class RemoveAzStorageMoverJobDefinition_Delete : global::System.M /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } /// Backing field for property. private string _projectName; @@ -187,7 +199,8 @@ public partial class RemoveAzStorageMoverJobDefinition_Delete : global::System.M [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -196,12 +209,12 @@ public partial class RemoveAzStorageMoverJobDefinition_Delete : global::System.M /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 @@ -333,11 +346,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -349,10 +387,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -420,7 +474,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -438,7 +492,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,ProjectName=ProjectName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,ProjectName=ProjectName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -451,7 +505,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStorageMoverJobDefinition_Delete() { @@ -484,12 +538,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -506,15 +560,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, Name=Name }) + 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 } }); @@ -539,7 +593,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -563,7 +617,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverJobDefinition_DeleteViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverJobDefinition_DeleteViaIdentity.cs index 5933792a0a34..6b1f0e912b91 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverJobDefinition_DeleteViaIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverJobDefinition_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Deletes a Job Definition resource. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] public partial class RemoveAzStorageMoverJobDefinition_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +37,9 @@ public partial class RemoveAzStorageMoverJobDefinition_DeleteViaIdentity : globa /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] @@ -44,6 +50,9 @@ public partial class RemoveAzStorageMoverJobDefinition_DeleteViaIdentity : globa [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -57,6 +66,9 @@ public partial class RemoveAzStorageMoverJobDefinition_DeleteViaIdentity : globa [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -106,7 +118,7 @@ public partial class RemoveAzStorageMoverJobDefinition_DeleteViaIdentity : globa /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -129,12 +141,12 @@ public partial class RemoveAzStorageMoverJobDefinition_DeleteViaIdentity : globa /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 @@ -261,11 +273,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -277,10 +314,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -348,7 +401,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -394,7 +447,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -407,7 +460,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStorageMoverJobDefinition_DeleteViaIdentity() { @@ -440,12 +493,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -462,7 +515,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 } @@ -495,7 +548,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -519,7 +572,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverJobDefinition_DeleteViaIdentityProject.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverJobDefinition_DeleteViaIdentityProject.cs new file mode 100644 index 000000000000..cc4b97ef0132 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverJobDefinition_DeleteViaIdentityProject.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// Deletes a Job Definition resource. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzStorageMoverJobDefinition_DeleteViaIdentityProject", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Deletes a Job Definition resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] + public partial class RemoveAzStorageMoverJobDefinition_DeleteViaIdentityProject : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("JobDefinitionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _projectInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity ProjectInputObject { get => this._projectInputObject; set => this._projectInputObject = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzStorageMoverJobDefinition_DeleteViaIdentityProject + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets.RemoveAzStorageMoverJobDefinition_DeleteViaIdentityProject Clone() + { + var clone = new RemoveAzStorageMoverJobDefinition_DeleteViaIdentityProject(); + 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'JobDefinitionsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ProjectInputObject?.Id != null) + { + this.ProjectInputObject.Id += $"/jobDefinitions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.JobDefinitionsDeleteViaIdentity(ProjectInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ProjectInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + await this.Client.JobDefinitionsDelete(ProjectInputObject.SubscriptionId ?? null, ProjectInputObject.ResourceGroupName ?? null, ProjectInputObject.StorageMoverName ?? null, ProjectInputObject.ProjectName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzStorageMoverJobDefinition_DeleteViaIdentityProject() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverJobDefinition_DeleteViaIdentityStorageMover.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverJobDefinition_DeleteViaIdentityStorageMover.cs new file mode 100644 index 000000000000..49d32765cfcf --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverJobDefinition_DeleteViaIdentityStorageMover.cs @@ -0,0 +1,609 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// Deletes a Job Definition resource. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzStorageMoverJobDefinition_DeleteViaIdentityStorageMover", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Deletes a Job Definition resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] + public partial class RemoveAzStorageMoverJobDefinition_DeleteViaIdentityStorageMover : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("JobDefinitionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzStorageMoverJobDefinition_DeleteViaIdentityStorageMover + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets.RemoveAzStorageMoverJobDefinition_DeleteViaIdentityStorageMover Clone() + { + var clone = new RemoveAzStorageMoverJobDefinition_DeleteViaIdentityStorageMover(); + 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.ProjectName = this.ProjectName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'JobDefinitionsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/projects/{(global::System.Uri.EscapeDataString(this.ProjectName.ToString()))}/jobDefinitions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.JobDefinitionsDeleteViaIdentity(StorageMoverInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.JobDefinitionsDelete(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, ProjectName, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProjectName=ProjectName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public RemoveAzStorageMoverJobDefinition_DeleteViaIdentityStorageMover() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverProject_Delete.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverProject_Delete.cs index e59d9b32b719..3dacddf3412b 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverProject_Delete.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverProject_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Deletes a Project resource. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] public partial class RemoveAzStorageMoverProject_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +37,9 @@ public partial class RemoveAzStorageMoverProject_Delete : global::System.Managem /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] @@ -44,6 +50,9 @@ public partial class RemoveAzStorageMoverProject_Delete : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -57,6 +66,9 @@ public partial class RemoveAzStorageMoverProject_Delete : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -113,7 +125,7 @@ public partial class RemoveAzStorageMoverProject_Delete : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -173,7 +185,8 @@ public partial class RemoveAzStorageMoverProject_Delete : global::System.Managem [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -182,12 +195,12 @@ public partial class RemoveAzStorageMoverProject_Delete : global::System.Managem /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 @@ -318,11 +331,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -334,10 +372,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -405,7 +459,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -423,7 +477,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -436,7 +490,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStorageMoverProject_Delete() { @@ -469,12 +523,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -491,15 +545,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name }) + 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 } }); @@ -524,7 +578,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -548,7 +602,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverProject_DeleteViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverProject_DeleteViaIdentity.cs index 05af58e85cfe..1f43e83d4c5c 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverProject_DeleteViaIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverProject_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Deletes a Project resource. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] public partial class RemoveAzStorageMoverProject_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +37,9 @@ public partial class RemoveAzStorageMoverProject_DeleteViaIdentity : global::Sys /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] @@ -44,6 +50,9 @@ public partial class RemoveAzStorageMoverProject_DeleteViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -57,6 +66,9 @@ public partial class RemoveAzStorageMoverProject_DeleteViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -106,7 +118,7 @@ public partial class RemoveAzStorageMoverProject_DeleteViaIdentity : global::Sys /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -129,12 +141,12 @@ public partial class RemoveAzStorageMoverProject_DeleteViaIdentity : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 @@ -261,11 +273,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -277,10 +314,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -348,7 +401,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -390,7 +443,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -403,7 +456,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStorageMoverProject_DeleteViaIdentity() { @@ -436,12 +489,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -458,7 +511,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 } @@ -491,7 +544,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -515,7 +568,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverProject_DeleteViaIdentityStorageMover.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverProject_DeleteViaIdentityStorageMover.cs new file mode 100644 index 000000000000..c07dcb370c64 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMoverProject_DeleteViaIdentityStorageMover.cs @@ -0,0 +1,593 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// Deletes a Project resource. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzStorageMoverProject_DeleteViaIdentityStorageMover", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Deletes a Project resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] + public partial class RemoveAzStorageMoverProject_DeleteViaIdentityStorageMover : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProjectName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzStorageMoverProject_DeleteViaIdentityStorageMover + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets.RemoveAzStorageMoverProject_DeleteViaIdentityStorageMover Clone() + { + var clone = new RemoveAzStorageMoverProject_DeleteViaIdentityStorageMover(); + 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/projects/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ProjectsDeleteViaIdentity(StorageMoverInputObject.Id, onOk, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.ProjectsDelete(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, Name, onOk, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzStorageMoverProject_DeleteViaIdentityStorageMover() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMover_Delete.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMover_Delete.cs index e83566ea009f..1538c8a41dfc 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMover_Delete.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMover_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Deletes a Storage Mover resource. @@ -19,7 +21,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}", ApiVersion = "2025-07-01")] public partial class RemoveAzStorageMover_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,6 +38,9 @@ public partial class RemoveAzStorageMover_Delete : global::System.Management.Aut /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] @@ -45,6 +51,9 @@ public partial class RemoveAzStorageMover_Delete : global::System.Management.Aut [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -58,6 +67,9 @@ public partial class RemoveAzStorageMover_Delete : global::System.Management.Aut [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -114,7 +126,7 @@ public partial class RemoveAzStorageMover_Delete : global::System.Management.Aut /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -160,7 +172,8 @@ public partial class RemoveAzStorageMover_Delete : global::System.Management.Aut [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -169,12 +182,12 @@ public partial class RemoveAzStorageMover_Delete : global::System.Management.Aut /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 @@ -304,11 +317,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -320,10 +358,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -391,7 +445,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -409,7 +463,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -422,7 +476,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStorageMover_Delete() { @@ -455,12 +509,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -477,15 +531,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + 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 } }); @@ -510,7 +564,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -534,7 +588,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMover_DeleteViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMover_DeleteViaIdentity.cs index 97a75ed8d1dd..1055eb4876bb 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMover_DeleteViaIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/RemoveAzStorageMover_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Deletes a Storage Mover resource. @@ -19,7 +21,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}", ApiVersion = "2025-07-01")] public partial class RemoveAzStorageMover_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,6 +38,9 @@ public partial class RemoveAzStorageMover_DeleteViaIdentity : global::System.Man /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] @@ -45,6 +51,9 @@ public partial class RemoveAzStorageMover_DeleteViaIdentity : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -58,6 +67,9 @@ public partial class RemoveAzStorageMover_DeleteViaIdentity : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -107,7 +119,7 @@ public partial class RemoveAzStorageMover_DeleteViaIdentity : global::System.Man /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -130,12 +142,12 @@ public partial class RemoveAzStorageMover_DeleteViaIdentity : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 @@ -262,11 +274,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -278,10 +315,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -349,7 +402,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -387,7 +440,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -400,7 +453,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStorageMover_DeleteViaIdentity() { @@ -433,12 +486,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -455,7 +508,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 } @@ -488,7 +541,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -512,7 +565,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StartAzStorageMoverJobDefinition_Start.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StartAzStorageMoverJobDefinition_Start.cs index 0812652f7eae..80cf3bf4024b 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StartAzStorageMoverJobDefinition_Start.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StartAzStorageMoverJobDefinition_Start.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// - /// Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. + /// start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. /// /// /// [OpenAPI] StartJob=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/startJob" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzStorageMoverJobDefinition_Start", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(string))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/startJob", ApiVersion = "2025-07-01")] public partial class StartAzStorageMoverJobDefinition_Start : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class StartAzStorageMoverJobDefinition_Start : global::System.Man /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class StartAzStorageMoverJobDefinition_Start : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -94,7 +115,7 @@ public partial class StartAzStorageMoverJobDefinition_Start : global::System.Man /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } /// Backing field for property. private string _projectName; @@ -168,7 +189,8 @@ public partial class StartAzStorageMoverJobDefinition_Start : global::System.Man [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -177,24 +199,24 @@ public partial class StartAzStorageMoverJobDefinition_Start : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId /// 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); + 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) @@ -217,6 +239,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -281,8 +308,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -338,7 +390,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -356,7 +408,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,ProjectName=ProjectName,JobDefinitionName=JobDefinitionName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,ProjectName=ProjectName,JobDefinitionName=JobDefinitionName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -369,7 +421,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public StartAzStorageMoverJobDefinition_Start() { @@ -402,12 +454,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -424,15 +476,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, JobDefinitionName=JobDefinitionName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, JobDefinitionName=JobDefinitionName }) + 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 } }); @@ -442,12 +494,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -459,8 +511,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId - WriteObject((await response).JobRunResourceId1); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StartAzStorageMoverJobDefinition_StartViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StartAzStorageMoverJobDefinition_StartViaIdentity.cs index 9f0700e0024c..746dcc0b5f29 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StartAzStorageMoverJobDefinition_StartViaIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StartAzStorageMoverJobDefinition_StartViaIdentity.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// - /// Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. + /// start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. /// /// /// [OpenAPI] StartJob=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/startJob" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzStorageMoverJobDefinition_StartViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(string))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Creates a new Job Run resource for the specified Job Definition and passes it to the Agent for execution.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/startJob", ApiVersion = "2025-07-01")] public partial class StartAzStorageMoverJobDefinition_StartViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,11 +39,26 @@ public partial class StartAzStorageMoverJobDefinition_StartViaIdentity : global: /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -54,6 +72,9 @@ public partial class StartAzStorageMoverJobDefinition_StartViaIdentity : global: [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -88,7 +109,7 @@ public partial class StartAzStorageMoverJobDefinition_StartViaIdentity : global: /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -111,24 +132,24 @@ public partial class StartAzStorageMoverJobDefinition_StartViaIdentity : global: /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId /// 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); + 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) @@ -151,6 +172,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -215,8 +241,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -272,7 +323,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -318,7 +369,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -331,7 +382,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public StartAzStorageMoverJobDefinition_StartViaIdentity() { @@ -364,12 +415,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -386,7 +437,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 } @@ -404,12 +455,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -421,8 +472,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId - WriteObject((await response).JobRunResourceId1); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StartAzStorageMoverJobDefinition_StartViaIdentityProject.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StartAzStorageMoverJobDefinition_StartViaIdentityProject.cs new file mode 100644 index 000000000000..6fc8110d07ab --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StartAzStorageMoverJobDefinition_StartViaIdentityProject.cs @@ -0,0 +1,509 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. + /// + /// + /// [OpenAPI] StartJob=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/startJob" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzStorageMoverJobDefinition_StartViaIdentityProject", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/startJob", ApiVersion = "2025-07-01")] + public partial class StartAzStorageMoverJobDefinition_StartViaIdentityProject : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 _jobDefinitionName; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string JobDefinitionName { get => this._jobDefinitionName; set => this._jobDefinitionName = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _projectInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity ProjectInputObject { get => this._projectInputObject; set => this._projectInputObject = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'JobDefinitionsStartJob' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ProjectInputObject?.Id != null) + { + this.ProjectInputObject.Id += $"/jobDefinitions/{(global::System.Uri.EscapeDataString(this.JobDefinitionName.ToString()))}"; + await this.Client.JobDefinitionsStartJobViaIdentity(ProjectInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ProjectInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + await this.Client.JobDefinitionsStartJob(ProjectInputObject.SubscriptionId ?? null, ProjectInputObject.ResourceGroupName ?? null, ProjectInputObject.StorageMoverName ?? null, ProjectInputObject.ProjectName ?? null, JobDefinitionName, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { JobDefinitionName=JobDefinitionName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public StartAzStorageMoverJobDefinition_StartViaIdentityProject() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/StartAzStorageMoverJobDefinition_StartViaIdentityStorageMover.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StartAzStorageMoverJobDefinition_StartViaIdentityStorageMover.cs new file mode 100644 index 000000000000..206e8f60063a --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StartAzStorageMoverJobDefinition_StartViaIdentityStorageMover.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution. + /// + /// + /// [OpenAPI] StartJob=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/startJob" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzStorageMoverJobDefinition_StartViaIdentityStorageMover", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"start a new Job Run resource for the specified Job Definition and passes it to the Agent for execution.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/startJob", ApiVersion = "2025-07-01")] + public partial class StartAzStorageMoverJobDefinition_StartViaIdentityStorageMover : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 _jobDefinitionName; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string JobDefinitionName { get => this._jobDefinitionName; set => this._jobDefinitionName = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'JobDefinitionsStartJob' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/projects/{(global::System.Uri.EscapeDataString(this.ProjectName.ToString()))}/jobDefinitions/{(global::System.Uri.EscapeDataString(this.JobDefinitionName.ToString()))}"; + await this.Client.JobDefinitionsStartJobViaIdentity(StorageMoverInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.JobDefinitionsStartJob(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, ProjectName, JobDefinitionName, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProjectName=ProjectName,JobDefinitionName=JobDefinitionName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public StartAzStorageMoverJobDefinition_StartViaIdentityStorageMover() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/StopAzStorageMoverJobDefinition_Stop.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StopAzStorageMoverJobDefinition_Stop.cs index 63717c340e30..b687bb534b85 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StopAzStorageMoverJobDefinition_Stop.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StopAzStorageMoverJobDefinition_Stop.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Requests the Agent of any active instance of this Job Definition to stop. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] StopJob=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/stopJob" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Stop, @"AzStorageMoverJobDefinition_Stop", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(string))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Requests the Agent of any active instance of this Job Definition to stop.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/stopJob", ApiVersion = "2025-07-01")] public partial class StopAzStorageMoverJobDefinition_Stop : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class StopAzStorageMoverJobDefinition_Stop : global::System.Manag /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class StopAzStorageMoverJobDefinition_Stop : global::System.Manag [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -92,7 +113,7 @@ public partial class StopAzStorageMoverJobDefinition_Stop : global::System.Manag /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } /// Backing field for property. private string _projectName; @@ -166,7 +187,8 @@ public partial class StopAzStorageMoverJobDefinition_Stop : global::System.Manag [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -175,24 +197,24 @@ public partial class StopAzStorageMoverJobDefinition_Stop : global::System.Manag /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId /// 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); + 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) @@ -215,6 +237,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -279,8 +306,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -336,7 +388,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -354,7 +406,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,ProjectName=ProjectName,JobDefinitionName=JobDefinitionName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,ProjectName=ProjectName,JobDefinitionName=JobDefinitionName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -367,7 +419,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public StopAzStorageMoverJobDefinition_Stop() { @@ -400,12 +452,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -422,15 +474,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, JobDefinitionName=JobDefinitionName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, JobDefinitionName=JobDefinitionName }) + 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 } }); @@ -440,12 +492,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -457,8 +509,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId - WriteObject((await response).JobRunResourceId1); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StopAzStorageMoverJobDefinition_StopViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StopAzStorageMoverJobDefinition_StopViaIdentity.cs index 0dca50aece03..17bed067b07c 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StopAzStorageMoverJobDefinition_StopViaIdentity.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StopAzStorageMoverJobDefinition_StopViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// Requests the Agent of any active instance of this Job Definition to stop. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets /// [OpenAPI] StopJob=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/stopJob" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Stop, @"AzStorageMoverJobDefinition_StopViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(string))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId))] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Requests the Agent of any active instance of this Job Definition to stop.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/stopJob", ApiVersion = "2025-07-01")] public partial class StopAzStorageMoverJobDefinition_StopViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class StopAzStorageMoverJobDefinition_StopViaIdentity : global::S /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class StopAzStorageMoverJobDefinition_StopViaIdentity : global::S [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -86,7 +107,7 @@ public partial class StopAzStorageMoverJobDefinition_StopViaIdentity : global::S /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -109,24 +130,24 @@ public partial class StopAzStorageMoverJobDefinition_StopViaIdentity : global::S /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId /// 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); + 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) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -213,8 +239,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -270,7 +321,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -316,7 +367,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -329,7 +380,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public StopAzStorageMoverJobDefinition_StopViaIdentity() { @@ -362,12 +413,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -384,7 +435,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 } @@ -402,12 +453,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -419,8 +470,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobRunResourceId - WriteObject((await response).JobRunResourceId1); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StopAzStorageMoverJobDefinition_StopViaIdentityProject.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StopAzStorageMoverJobDefinition_StopViaIdentityProject.cs new file mode 100644 index 000000000000..53820bdfa734 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StopAzStorageMoverJobDefinition_StopViaIdentityProject.cs @@ -0,0 +1,507 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// Requests the Agent of any active instance of this Job Definition to stop. + /// + /// [OpenAPI] StopJob=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/stopJob" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Stop, @"AzStorageMoverJobDefinition_StopViaIdentityProject", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Requests the Agent of any active instance of this Job Definition to stop.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/stopJob", ApiVersion = "2025-07-01")] + public partial class StopAzStorageMoverJobDefinition_StopViaIdentityProject : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 _jobDefinitionName; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string JobDefinitionName { get => this._jobDefinitionName; set => this._jobDefinitionName = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _projectInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity ProjectInputObject { get => this._projectInputObject; set => this._projectInputObject = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'JobDefinitionsStopJob' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ProjectInputObject?.Id != null) + { + this.ProjectInputObject.Id += $"/jobDefinitions/{(global::System.Uri.EscapeDataString(this.JobDefinitionName.ToString()))}"; + await this.Client.JobDefinitionsStopJobViaIdentity(ProjectInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ProjectInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + await this.Client.JobDefinitionsStopJob(ProjectInputObject.SubscriptionId ?? null, ProjectInputObject.ResourceGroupName ?? null, ProjectInputObject.StorageMoverName ?? null, ProjectInputObject.ProjectName ?? null, JobDefinitionName, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { JobDefinitionName=JobDefinitionName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public StopAzStorageMoverJobDefinition_StopViaIdentityProject() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/StopAzStorageMoverJobDefinition_StopViaIdentityStorageMover.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StopAzStorageMoverJobDefinition_StopViaIdentityStorageMover.cs new file mode 100644 index 000000000000..0e772bab953d --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/StopAzStorageMoverJobDefinition_StopViaIdentityStorageMover.cs @@ -0,0 +1,517 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// Requests the Agent of any active instance of this Job Definition to stop. + /// + /// [OpenAPI] StopJob=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/stopJob" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Stop, @"AzStorageMoverJobDefinition_StopViaIdentityStorageMover", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Requests the Agent of any active instance of this Job Definition to stop.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}/stopJob", ApiVersion = "2025-07-01")] + public partial class StopAzStorageMoverJobDefinition_StopViaIdentityStorageMover : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 _jobDefinitionName; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string JobDefinitionName { get => this._jobDefinitionName; set => this._jobDefinitionName = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'JobDefinitionsStopJob' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/projects/{(global::System.Uri.EscapeDataString(this.ProjectName.ToString()))}/jobDefinitions/{(global::System.Uri.EscapeDataString(this.JobDefinitionName.ToString()))}"; + await this.Client.JobDefinitionsStopJobViaIdentity(StorageMoverInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.JobDefinitionsStopJob(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, ProjectName, JobDefinitionName, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProjectName=ProjectName,JobDefinitionName=JobDefinitionName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public StopAzStorageMoverJobDefinition_StopViaIdentityStorageMover() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobRunResourceId + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_Update.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_Update.cs deleted file mode 100644 index cffd7e5babb1..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_Update.cs +++ /dev/null @@ -1,467 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - using System; - - /// Creates or updates an Agent resource. - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverAgent_Update", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ParameterSetBreakingChange(new string[] {"Update"}, "15.0.0", "2.0.0", "2025/11/03", ChangeDescription="The parameter set Update and UpdateViaIdentity will be removed. Suggest to use UpdateExpanded, UpdateViaIdentityExpanded and UpdateViaJsonString instead.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent", "15.0.0", "2.0.0", "2025/11/03", DeprecatedOutputProperties=new string[] {"UploadLimitScheduleWeeklyRecurrence"}, NewOutputProperties=new string[] {"UploadLimitScheduleWeeklyRecurrence"}, ChangeDescription="The type of the property UploadLimitScheduleWeeklyRecurrence will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Creates or updates an Agent resource.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}", ApiVersion = "2025-07-01")] - public partial class UpdateAzStorageMoverAgent_Update : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener - { - /// 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(); - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters _agent; - - /// The Agent resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Agent resource.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Agent resource.", - SerializedName = @"agent", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters Agent { get => this._agent; set => this._agent = value; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the Agent resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Agent resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Agent resource.", - SerializedName = @"agentName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("AgentName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _storageMoverName; - - /// The name of the Storage Mover resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Storage Mover resource.", - SerializedName = @"storageMoverName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'AgentsUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.AgentsUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, Name, Agent, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name,body=Agent}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public UpdateAzStorageMoverAgent_Update() - { - - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=Agent }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=Agent }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateExpanded.cs index 866ee8ed0409..8c6eea7e6da3 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateExpanded.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateExpanded.cs @@ -6,20 +6,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; - /// Creates or updates an Agent resource. + /// update an Agent resource. /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverAgent_UpdateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent", "15.0.0", "2.0.0", "2025/11/03", DeprecatedOutputProperties=new string[] {"UploadLimitScheduleWeeklyRecurrence"}, NewOutputProperties=new string[] {"UploadLimitScheduleWeeklyRecurrence"}, ChangeDescription="The type of the property UploadLimitScheduleWeeklyRecurrence will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Creates or updates an Agent resource.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update an Agent resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}", ApiVersion = "2025-07-01")] public partial class UpdateAzStorageMoverAgent_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -31,18 +33,33 @@ public partial class UpdateAzStorageMoverAgent_UpdateExpanded : global::System.M private string __processRecordId; /// The Agent resource. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters _agentBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentUpdateParameters(); + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters _agentBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentUpdateParameters(); /// /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -67,6 +84,9 @@ public partial class UpdateAzStorageMoverAgent_UpdateExpanded : global::System.M PossibleTypes = new [] { typeof(string) })] public string Description { get => _agentBody.Description ?? null; set => _agentBody.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] @@ -108,7 +128,7 @@ public partial class UpdateAzStorageMoverAgent_UpdateExpanded : global::System.M /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -168,7 +188,8 @@ public partial class UpdateAzStorageMoverAgent_UpdateExpanded : global::System.M [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -181,32 +202,32 @@ public partial class UpdateAzStorageMoverAgent_UpdateExpanded : global::System.M ReadOnly = false, Description = @"The set of weekly repeating recurrences of the WAN-link upload limit schedule.", SerializedName = @"weeklyRecurrences", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get => _agentBody.UploadLimitScheduleWeeklyRecurrence ?? null /* arrayOf */; set => _agentBody.UploadLimitScheduleWeeklyRecurrence = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence) })] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get => _agentBody.UploadLimitScheduleWeeklyRecurrence?.ToArray() ?? null /* fixedArrayOf */; set => _agentBody.UploadLimitScheduleWeeklyRecurrence = (value != null ? new System.Collections.Generic.List(value) : null); } /// /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent /// 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); + 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) @@ -229,6 +250,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -293,8 +319,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -350,7 +401,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -363,12 +414,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.AgentsUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _agentBody, onOk, onDefault, this, Pipeline); + await this.Client.AgentsUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _agentBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name,body=_agentBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -388,7 +439,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStorageMoverAgent_UpdateExpanded() { @@ -414,12 +465,12 @@ public UpdateAzStorageMoverAgent_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -436,15 +487,15 @@ public UpdateAzStorageMoverAgent_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=_agentBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=_agentBody }) + 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 } }); @@ -454,12 +505,12 @@ public UpdateAzStorageMoverAgent_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -471,8 +522,26 @@ public UpdateAzStorageMoverAgent_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaIdentity.cs deleted file mode 100644 index c07c50c0e929..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaIdentity.cs +++ /dev/null @@ -1,438 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - using System; - - /// Creates or updates an Agent resource. - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverAgent_UpdateViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ParameterSetBreakingChange(new string[] {"UpdateViaIdentity"}, "15.0.0", "2.0.0", "2025/11/03", ChangeDescription="The parameter set Update and UpdateViaIdentity will be removed. Suggest to use UpdateExpanded, UpdateViaIdentityExpanded and UpdateViaJsonString instead.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent", "15.0.0", "2.0.0", "2025/11/03", DeprecatedOutputProperties=new string[] {"UploadLimitScheduleWeeklyRecurrence"}, NewOutputProperties=new string[] {"UploadLimitScheduleWeeklyRecurrence"}, ChangeDescription="The type of the property UploadLimitScheduleWeeklyRecurrence will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Creates or updates an Agent resource.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}", ApiVersion = "2025-07-01")] - public partial class UpdateAzStorageMoverAgent_UpdateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener - { - /// 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(); - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters _agent; - - /// The Agent resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Agent resource.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Agent resource.", - SerializedName = @"agent", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters Agent { get => this._agent; set => this._agent = value; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'AgentsUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.AgentsUpdateViaIdentity(InputObject.Id, Agent, 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.StorageMoverName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.AgentName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AgentName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.AgentsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StorageMoverName ?? null, InputObject.AgentName ?? null, Agent, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Agent}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public UpdateAzStorageMoverAgent_UpdateViaIdentity() - { - - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Agent }) - { - 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 { body=Agent }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaIdentityExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaIdentityExpanded.cs index 515548c85743..1e03e4d60a49 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaIdentityExpanded.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaIdentityExpanded.cs @@ -6,20 +6,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; - /// Creates or updates an Agent resource. + /// update an Agent resource. /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverAgent_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent", "15.0.0", "2.0.0", "2025/11/03", DeprecatedOutputProperties=new string[] {"UploadLimitScheduleWeeklyRecurrence"}, NewOutputProperties=new string[] {"UploadLimitScheduleWeeklyRecurrence"}, ChangeDescription="The type of the property UploadLimitScheduleWeeklyRecurrence will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Creates or updates an Agent resource.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update an Agent resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}", ApiVersion = "2025-07-01")] public partial class UpdateAzStorageMoverAgent_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -31,18 +33,33 @@ public partial class UpdateAzStorageMoverAgent_UpdateViaIdentityExpanded : globa private string __processRecordId; /// The Agent resource. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgentUpdateParameters _agentBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.AgentUpdateParameters(); + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters _agentBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentUpdateParameters(); /// /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -67,6 +84,9 @@ public partial class UpdateAzStorageMoverAgent_UpdateViaIdentityExpanded : globa PossibleTypes = new [] { typeof(string) })] public string Description { get => _agentBody.Description ?? null; set => _agentBody.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] @@ -101,7 +121,7 @@ public partial class UpdateAzStorageMoverAgent_UpdateViaIdentityExpanded : globa /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -128,32 +148,32 @@ public partial class UpdateAzStorageMoverAgent_UpdateViaIdentityExpanded : globa ReadOnly = false, Description = @"The set of weekly repeating recurrences of the WAN-link upload limit schedule.", SerializedName = @"weeklyRecurrences", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get => _agentBody.UploadLimitScheduleWeeklyRecurrence ?? null /* arrayOf */; set => _agentBody.UploadLimitScheduleWeeklyRecurrence = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence) })] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get => _agentBody.UploadLimitScheduleWeeklyRecurrence?.ToArray() ?? null /* fixedArrayOf */; set => _agentBody.UploadLimitScheduleWeeklyRecurrence = (value != null ? new System.Collections.Generic.List(value) : null); } /// /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent /// 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); + 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) @@ -176,6 +196,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -240,8 +265,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -297,7 +347,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -312,7 +362,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.AgentsUpdateViaIdentity(InputObject.Id, _agentBody, onOk, onDefault, this, Pipeline); + await this.Client.AgentsUpdateViaIdentity(InputObject.Id, _agentBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); } else { @@ -333,13 +383,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.AgentName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.AgentsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StorageMoverName ?? null, InputObject.AgentName ?? null, _agentBody, onOk, onDefault, this, Pipeline); + await this.Client.AgentsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StorageMoverName ?? null, InputObject.AgentName ?? null, _agentBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_agentBody}) + 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 } }); @@ -359,7 +409,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStorageMoverAgent_UpdateViaIdentityExpanded() { @@ -385,12 +435,12 @@ public UpdateAzStorageMoverAgent_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -407,15 +457,15 @@ public UpdateAzStorageMoverAgent_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_agentBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { body=_agentBody }) + 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 } }); @@ -425,12 +475,12 @@ public UpdateAzStorageMoverAgent_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -442,8 +492,26 @@ public UpdateAzStorageMoverAgent_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IAgent - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaIdentityStorageMoverExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaIdentityStorageMoverExpanded.cs new file mode 100644 index 000000000000..b6ccfcc21b69 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaIdentityStorageMoverExpanded.cs @@ -0,0 +1,531 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// update an Agent resource. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverAgent_UpdateViaIdentityStorageMoverExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update an Agent resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}", ApiVersion = "2025-07-01")] + public partial class UpdateAzStorageMoverAgent_UpdateViaIdentityStorageMoverExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Agent resource. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgentUpdateParameters _agentBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.AgentUpdateParameters(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// A description for the Agent. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A description for the Agent.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A description for the Agent.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _agentBody.Description ?? null; set => _agentBody.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Agent resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Agent resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Agent resource.", + SerializedName = @"agentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("AgentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = value; } + + /// The set of weekly repeating recurrences of the WAN-link upload limit schedule. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The set of weekly repeating recurrences of the WAN-link upload limit schedule.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The set of weekly repeating recurrences of the WAN-link upload limit schedule.", + SerializedName = @"weeklyRecurrences", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence) })] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IUploadLimitWeeklyRecurrence[] UploadLimitScheduleWeeklyRecurrence { get => _agentBody.UploadLimitScheduleWeeklyRecurrence?.ToArray() ?? null /* fixedArrayOf */; set => _agentBody.UploadLimitScheduleWeeklyRecurrence = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AgentsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/agents/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.AgentsUpdateViaIdentity(StorageMoverInputObject.Id, _agentBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.AgentsUpdate(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, Name, _agentBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public UpdateAzStorageMoverAgent_UpdateViaIdentityStorageMoverExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaJsonFilePath.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..2b21a70cebf0 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaJsonFilePath.cs @@ -0,0 +1,538 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// update an Agent resource. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverAgent_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update an Agent resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class UpdateAzStorageMoverAgent_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Agent resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Agent resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Agent resource.", + SerializedName = @"agentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("AgentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _storageMoverName; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AgentsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AgentsUpdateViaJsonString(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStorageMoverAgent_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaJsonString.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaJsonString.cs new file mode 100644 index 000000000000..43c08c08cd61 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverAgent_UpdateViaJsonString.cs @@ -0,0 +1,536 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// update an Agent resource. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverAgent_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update an Agent resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/agents/{agentName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class UpdateAzStorageMoverAgent_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Agent resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Agent resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Agent resource.", + SerializedName = @"agentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("AgentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _storageMoverName; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AgentsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AgentsUpdateViaJsonString(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStorageMoverAgent_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IAgent + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateExpanded.cs index d3244972f971..3855a2238824 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateExpanded.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateExpanded.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// - /// Updates properties for an Endpoint resource. Properties not specified in the request body will be unchanged. + /// update properties for an Endpoint resource. Properties not specified in the request body will be unchanged. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverEndpoint_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Updates properties for an Endpoint resource. Properties not specified in the request body will be unchanged.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for an Endpoint resource. Properties not specified in the request body will be unchanged.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}", ApiVersion = "2025-07-01")] public partial class UpdateAzStorageMoverEndpoint_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,13 +41,28 @@ public partial class UpdateAzStorageMoverEndpoint_UpdateExpanded : global::Syste private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// The Endpoint resource. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParameters _endpointBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateParameters(); + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters _endpointBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateParameters(); + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class UpdateAzStorageMoverEndpoint_UpdateExpanded : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -80,25 +101,9 @@ public partial class UpdateAzStorageMoverEndpoint_UpdateExpanded : global::Syste ReadOnly = false, Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType))] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType IdentityType { get => _endpointBody.IdentityType ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType)""); set => _endpointBody.IdentityType = value; } - - /// - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities IdentityUserAssignedIdentity { get => _endpointBody.IdentityUserAssignedIdentity ?? null /* object */; set => _endpointBody.IdentityUserAssignedIdentity = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + public string IdentityType { get => _endpointBody.IdentityType ?? null; set => _endpointBody.IdentityType = value; } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -129,7 +134,7 @@ public partial class UpdateAzStorageMoverEndpoint_UpdateExpanded : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } /// /// The Endpoint resource, which contains information about file sources and targets. @@ -141,8 +146,8 @@ public partial class UpdateAzStorageMoverEndpoint_UpdateExpanded : global::Syste ReadOnly = false, Description = @"The Endpoint resource, which contains information about file sources and targets.", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties Property { get => _endpointBody.Property ?? null /* object */; set => _endpointBody.Property = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties Property { get => _endpointBody.Property ?? null /* object */; set => _endpointBody.Property = 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")] @@ -202,33 +207,42 @@ public partial class UpdateAzStorageMoverEndpoint_UpdateExpanded : global::Syste [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + /// + /// The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in + /// the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'")] + [global::System.Management.Automation.AllowEmptyCollection] + public string[] UserAssignedIdentity { 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint /// 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); + 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) @@ -251,6 +265,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -315,8 +334,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -372,7 +416,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -385,12 +429,21 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.EndpointsUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _endpointBody, onOk, onDefault, this, Pipeline); + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate UserAssignedIdentity + _endpointBody.IdentityUserAssignedIdentity.Clear(); + foreach( var id in this.UserAssignedIdentity ) + { + _endpointBody.IdentityUserAssignedIdentity.Add(id, new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentity()); + } + } + await this.Client.EndpointsUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _endpointBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name,body=_endpointBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -410,7 +463,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStorageMoverEndpoint_UpdateExpanded() { @@ -436,12 +489,12 @@ public UpdateAzStorageMoverEndpoint_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -458,15 +511,15 @@ public UpdateAzStorageMoverEndpoint_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=_endpointBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=_endpointBody }) + 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 } }); @@ -476,12 +529,12 @@ public UpdateAzStorageMoverEndpoint_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -493,8 +546,26 @@ public UpdateAzStorageMoverEndpoint_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded.cs index d0f5bd6f4a55..37225aa6595c 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// - /// Updates properties for an Endpoint resource. Properties not specified in the request body will be unchanged. + /// update properties for an Endpoint resource. Properties not specified in the request body will be unchanged. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverEndpoint_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Updates properties for an Endpoint resource. Properties not specified in the request body will be unchanged.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for an Endpoint resource. Properties not specified in the request body will be unchanged.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}", ApiVersion = "2025-07-01")] public partial class UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,13 +41,28 @@ public partial class UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded : gl private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// The Endpoint resource. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateParameters _endpointBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.EndpointBaseUpdateParameters(); + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters _endpointBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateParameters(); + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded : gl [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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] @@ -80,25 +101,9 @@ public partial class UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded : gl ReadOnly = false, Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType))] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType IdentityType { get => _endpointBody.IdentityType ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType)""); set => _endpointBody.IdentityType = value; } - - /// - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IUserAssignedIdentities IdentityUserAssignedIdentity { get => _endpointBody.IdentityUserAssignedIdentity ?? null /* object */; set => _endpointBody.IdentityUserAssignedIdentity = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + public string IdentityType { get => _endpointBody.IdentityType ?? null; set => _endpointBody.IdentityType = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _inputObject; @@ -122,7 +127,7 @@ public partial class UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded : gl /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } /// /// The Endpoint resource, which contains information about file sources and targets. @@ -134,8 +139,8 @@ public partial class UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded : gl ReadOnly = false, Description = @"The Endpoint resource, which contains information about file sources and targets.", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties Property { get => _endpointBody.Property ?? null /* object */; set => _endpointBody.Property = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties Property { get => _endpointBody.Property ?? null /* object */; set => _endpointBody.Property = 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")] @@ -153,29 +158,37 @@ public partial class UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded : gl [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// + /// The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in + /// the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'")] + [global::System.Management.Automation.AllowEmptyCollection] + public string[] UserAssignedIdentity { 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint /// 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); + 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) @@ -198,6 +211,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -262,8 +280,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -319,7 +362,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -334,7 +377,16 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.EndpointsUpdateViaIdentity(InputObject.Id, _endpointBody, onOk, onDefault, this, Pipeline); + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate UserAssignedIdentity + _endpointBody.IdentityUserAssignedIdentity.Clear(); + foreach( var id in this.UserAssignedIdentity ) + { + _endpointBody.IdentityUserAssignedIdentity.Add(id, new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentity()); + } + } + await this.Client.EndpointsUpdateViaIdentity(InputObject.Id, _endpointBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); } else { @@ -355,13 +407,22 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.EndpointName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.EndpointsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StorageMoverName ?? null, InputObject.EndpointName ?? null, _endpointBody, onOk, onDefault, this, Pipeline); + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate UserAssignedIdentity + _endpointBody.IdentityUserAssignedIdentity.Clear(); + foreach( var id in this.UserAssignedIdentity ) + { + _endpointBody.IdentityUserAssignedIdentity.Add(id, new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentity()); + } + } + await this.Client.EndpointsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StorageMoverName ?? null, InputObject.EndpointName ?? null, _endpointBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_endpointBody}) + 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 } }); @@ -381,7 +442,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded() { @@ -407,12 +468,12 @@ public UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -429,15 +490,15 @@ public UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_endpointBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { body=_endpointBody }) + 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 } }); @@ -447,12 +508,12 @@ public UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -464,8 +525,26 @@ public UpdateAzStorageMoverEndpoint_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateViaIdentityStorageMoverExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateViaIdentityStorageMoverExpanded.cs new file mode 100644 index 000000000000..5a2cf485320b --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateViaIdentityStorageMoverExpanded.cs @@ -0,0 +1,564 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// update properties for an Endpoint resource. Properties not specified in the request body will be unchanged. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverEndpoint_UpdateViaIdentityStorageMoverExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for an Endpoint resource. Properties not specified in the request body will be unchanged.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}", ApiVersion = "2025-07-01")] + public partial class UpdateAzStorageMoverEndpoint_UpdateViaIdentityStorageMoverExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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(); + + /// The Endpoint resource. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateParameters _endpointBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.EndpointBaseUpdateParameters(); + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + public string IdentityType { get => _endpointBody.IdentityType ?? null; set => _endpointBody.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Endpoint resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Endpoint resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Endpoint resource.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EndpointName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// + /// The Endpoint resource, which contains information about file sources and targets. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Endpoint resource, which contains information about file sources and targets.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Endpoint resource, which contains information about file sources and targets.", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties Property { get => _endpointBody.Property ?? null /* object */; set => _endpointBody.Property = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = value; } + + /// + /// The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in + /// the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'")] + [global::System.Management.Automation.AllowEmptyCollection] + public string[] UserAssignedIdentity { 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/endpoints/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate UserAssignedIdentity + _endpointBody.IdentityUserAssignedIdentity.Clear(); + foreach( var id in this.UserAssignedIdentity ) + { + _endpointBody.IdentityUserAssignedIdentity.Add(id, new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentity()); + } + } + await this.Client.EndpointsUpdateViaIdentity(StorageMoverInputObject.Id, _endpointBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate UserAssignedIdentity + _endpointBody.IdentityUserAssignedIdentity.Clear(); + foreach( var id in this.UserAssignedIdentity ) + { + _endpointBody.IdentityUserAssignedIdentity.Add(id, new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.UserAssignedIdentity()); + } + } + await this.Client.EndpointsUpdate(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, Name, _endpointBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public UpdateAzStorageMoverEndpoint_UpdateViaIdentityStorageMoverExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateViaJsonFilePath.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..d7b2105604be --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateViaJsonFilePath.cs @@ -0,0 +1,541 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// update properties for an Endpoint resource. Properties not specified in the request body will be unchanged. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverEndpoint_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for an Endpoint resource. Properties not specified in the request body will be unchanged.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class UpdateAzStorageMoverEndpoint_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Endpoint resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Endpoint resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Endpoint resource.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EndpointName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _storageMoverName; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsUpdateViaJsonString(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStorageMoverEndpoint_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateViaJsonString.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateViaJsonString.cs new file mode 100644 index 000000000000..3920dbe517dc --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverEndpoint_UpdateViaJsonString.cs @@ -0,0 +1,539 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// update properties for an Endpoint resource. Properties not specified in the request body will be unchanged. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverEndpoint_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for an Endpoint resource. Properties not specified in the request body will be unchanged.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/endpoints/{endpointName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class UpdateAzStorageMoverEndpoint_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Endpoint resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Endpoint resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Endpoint resource.", + SerializedName = @"endpointName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("EndpointName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _storageMoverName; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'EndpointsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.EndpointsUpdateViaJsonString(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStorageMoverEndpoint_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_Update.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_Update.cs deleted file mode 100644 index 3ab15bae2842..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_Update.cs +++ /dev/null @@ -1,482 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - using System; - - /// - /// Updates properties for a Job Definition resource. Properties not specified in the request body will be unchanged. - /// - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverJobDefinition_Update", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ParameterSetBreakingChange(new string[] {"Update"}, "15.0.0", "2.0.0", "2025/11/03", ChangeDescription="The parameter set Update and UpdateViaIdentity will be removed. Suggest to use UpdateExpanded, UpdateViaIdentityExpanded and UpdateViaJsonString instead.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Updates properties for a Job Definition resource. Properties not specified in the request body will be unchanged.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] - public partial class UpdateAzStorageMoverJobDefinition_Update : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener - { - /// 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(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters _jobDefinition; - - /// The Job Definition resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Job Definition resource.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Job Definition resource.", - SerializedName = @"jobDefinition", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters JobDefinition { get => this._jobDefinition; set => this._jobDefinition = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the Job Definition resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Job Definition resource.", - SerializedName = @"jobDefinitionName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("JobDefinitionName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } - - /// Backing field for property. - private string _projectName; - - /// The name of the Project resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Project resource.", - SerializedName = @"projectName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _storageMoverName; - - /// The name of the Storage Mover resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Storage Mover resource.", - SerializedName = @"storageMoverName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'JobDefinitionsUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.JobDefinitionsUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, ProjectName, Name, JobDefinition, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,ProjectName=ProjectName,Name=Name,body=JobDefinition}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public UpdateAzStorageMoverJobDefinition_Update() - { - - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, Name=Name, body=JobDefinition }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, Name=Name, body=JobDefinition }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateExpanded.cs index 1986001ac618..153eeb342909 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateExpanded.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// - /// Updates properties for a Job Definition resource. Properties not specified in the request body will be unchanged. + /// update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverJobDefinition_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Updates properties for a Job Definition resource. Properties not specified in the request body will be unchanged.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for a Job Definition resource. Properties not specified in the request body will be unchanged.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] public partial class UpdateAzStorageMoverJobDefinition_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,8 +39,20 @@ public partial class UpdateAzStorageMoverJobDefinition_UpdateExpanded : global:: /// 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; + /// The Job Definition resource. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters _jobDefinitionBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionUpdateParameters(); + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters _jobDefinitionBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionUpdateParameters(); + + /// + /// 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; /// Name of the Agent to assign for new Job Runs of this Job Definition. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of the Agent to assign for new Job Runs of this Job Definition.")] @@ -55,6 +70,9 @@ public partial class UpdateAzStorageMoverJobDefinition_UpdateExpanded : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -66,9 +84,9 @@ public partial class UpdateAzStorageMoverJobDefinition_UpdateExpanded : global:: ReadOnly = false, Description = @"Strategy to use for copy.", SerializedName = @"copyMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode))] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode CopyMode { get => _jobDefinitionBody.CopyMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode)""); set => _jobDefinitionBody.CopyMode = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] + public string CopyMode { get => _jobDefinitionBody.CopyMode ?? null; set => _jobDefinitionBody.CopyMode = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -91,6 +109,9 @@ public partial class UpdateAzStorageMoverJobDefinition_UpdateExpanded : global:: PossibleTypes = new [] { typeof(string) })] public string Description { get => _jobDefinitionBody.Description ?? null; set => _jobDefinitionBody.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] @@ -132,7 +153,7 @@ public partial class UpdateAzStorageMoverJobDefinition_UpdateExpanded : global:: /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } /// Backing field for property. private string _projectName; @@ -206,7 +227,8 @@ public partial class UpdateAzStorageMoverJobDefinition_UpdateExpanded : global:: [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -215,24 +237,24 @@ public partial class UpdateAzStorageMoverJobDefinition_UpdateExpanded : global:: /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition /// 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); + 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) @@ -255,6 +277,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -319,8 +346,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -376,7 +428,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -389,12 +441,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.JobDefinitionsUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, ProjectName, Name, _jobDefinitionBody, onOk, onDefault, this, Pipeline); + await this.Client.JobDefinitionsUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, ProjectName, Name, _jobDefinitionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,ProjectName=ProjectName,Name=Name,body=_jobDefinitionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,ProjectName=ProjectName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -414,7 +466,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStorageMoverJobDefinition_UpdateExpanded() { @@ -440,12 +492,12 @@ public UpdateAzStorageMoverJobDefinition_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -462,15 +514,15 @@ public UpdateAzStorageMoverJobDefinition_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, Name=Name, body=_jobDefinitionBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, ProjectName=ProjectName, Name=Name, body=_jobDefinitionBody }) + 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 } }); @@ -480,12 +532,12 @@ public UpdateAzStorageMoverJobDefinition_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -497,8 +549,26 @@ public UpdateAzStorageMoverJobDefinition_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaIdentity.cs deleted file mode 100644 index dc68a138c147..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaIdentity.cs +++ /dev/null @@ -1,443 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - using System; - - /// - /// Updates properties for a Job Definition resource. Properties not specified in the request body will be unchanged. - /// - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverJobDefinition_UpdateViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ParameterSetBreakingChange(new string[] {"UpdateViaIdentity"}, "15.0.0", "2.0.0", "2025/11/03", ChangeDescription="The parameter set Update and UpdateViaIdentity will be removed. Suggest to use UpdateExpanded, UpdateViaIdentityExpanded and UpdateViaJsonString instead.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Updates properties for a Job Definition resource. Properties not specified in the request body will be unchanged.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] - public partial class UpdateAzStorageMoverJobDefinition_UpdateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener - { - /// 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(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity 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; } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters _jobDefinition; - - /// The Job Definition resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Job Definition resource.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Job Definition resource.", - SerializedName = @"jobDefinition", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters JobDefinition { get => this._jobDefinition; set => this._jobDefinition = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'JobDefinitionsUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.JobDefinitionsUpdateViaIdentity(InputObject.Id, JobDefinition, 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.StorageMoverName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.ProjectName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.JobDefinitionName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.JobDefinitionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.JobDefinitionsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StorageMoverName ?? null, InputObject.ProjectName ?? null, InputObject.JobDefinitionName ?? null, JobDefinition, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=JobDefinition}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public UpdateAzStorageMoverJobDefinition_UpdateViaIdentity() - { - - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=JobDefinition }) - { - 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 { body=JobDefinition }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded.cs index e293385de217..4444bbeb173b 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// - /// Updates properties for a Job Definition resource. Properties not specified in the request body will be unchanged. + /// update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverJobDefinition_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Updates properties for a Job Definition resource. Properties not specified in the request body will be unchanged.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for a Job Definition resource. Properties not specified in the request body will be unchanged.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] public partial class UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,8 +39,20 @@ public partial class UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded /// 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; + /// The Job Definition resource. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinitionUpdateParameters _jobDefinitionBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.JobDefinitionUpdateParameters(); + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters _jobDefinitionBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionUpdateParameters(); + + /// + /// 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; /// Name of the Agent to assign for new Job Runs of this Job Definition. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of the Agent to assign for new Job Runs of this Job Definition.")] @@ -55,6 +70,9 @@ public partial class UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -66,9 +84,9 @@ public partial class UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded ReadOnly = false, Description = @"Strategy to use for copy.", SerializedName = @"copyMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode))] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode CopyMode { get => _jobDefinitionBody.CopyMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.CopyMode)""); set => _jobDefinitionBody.CopyMode = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] + public string CopyMode { get => _jobDefinitionBody.CopyMode ?? null; set => _jobDefinitionBody.CopyMode = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -91,6 +109,9 @@ public partial class UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded PossibleTypes = new [] { typeof(string) })] public string Description { get => _jobDefinitionBody.Description ?? null; set => _jobDefinitionBody.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] @@ -125,7 +146,7 @@ public partial class UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -148,24 +169,24 @@ public partial class UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition /// 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); + 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) @@ -188,6 +209,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -252,8 +278,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -309,7 +360,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -324,7 +375,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.JobDefinitionsUpdateViaIdentity(InputObject.Id, _jobDefinitionBody, onOk, onDefault, this, Pipeline); + await this.Client.JobDefinitionsUpdateViaIdentity(InputObject.Id, _jobDefinitionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); } else { @@ -349,13 +400,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.JobDefinitionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.JobDefinitionsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StorageMoverName ?? null, InputObject.ProjectName ?? null, InputObject.JobDefinitionName ?? null, _jobDefinitionBody, onOk, onDefault, this, Pipeline); + await this.Client.JobDefinitionsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StorageMoverName ?? null, InputObject.ProjectName ?? null, InputObject.JobDefinitionName ?? null, _jobDefinitionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_jobDefinitionBody}) + 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 } }); @@ -375,7 +426,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded() { @@ -401,12 +452,12 @@ public UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,15 +474,15 @@ public UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_jobDefinitionBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { body=_jobDefinitionBody }) + 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 } }); @@ -441,12 +492,12 @@ public UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -458,8 +509,26 @@ public UpdateAzStorageMoverJobDefinition_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IJobDefinition - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaIdentityProjectExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaIdentityProjectExpanded.cs new file mode 100644 index 000000000000..b694d66abb7d --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaIdentityProjectExpanded.cs @@ -0,0 +1,548 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverJobDefinition_UpdateViaIdentityProjectExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for a Job Definition resource. Properties not specified in the request body will be unchanged.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] + public partial class UpdateAzStorageMoverJobDefinition_UpdateViaIdentityProjectExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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; + + /// The Job Definition resource. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters _jobDefinitionBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionUpdateParameters(); + + /// + /// 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; + + /// Name of the Agent to assign for new Job Runs of this Job Definition. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of the Agent to assign for new Job Runs of this Job Definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the Agent to assign for new Job Runs of this Job Definition.", + SerializedName = @"agentName", + PossibleTypes = new [] { typeof(string) })] + public string AgentName { get => _jobDefinitionBody.AgentName ?? null; set => _jobDefinitionBody.AgentName = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; + + /// Strategy to use for copy. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Strategy to use for copy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Strategy to use for copy.", + SerializedName = @"copyMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] + public string CopyMode { get => _jobDefinitionBody.CopyMode ?? null; set => _jobDefinitionBody.CopyMode = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// A description for the Job Definition. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A description for the Job Definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A description for the Job Definition.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _jobDefinitionBody.Description ?? null; set => _jobDefinitionBody.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("JobDefinitionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _projectInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity ProjectInputObject { get => this._projectInputObject; set => this._projectInputObject = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'JobDefinitionsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (ProjectInputObject?.Id != null) + { + this.ProjectInputObject.Id += $"/jobDefinitions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.JobDefinitionsUpdateViaIdentity(ProjectInputObject.Id, _jobDefinitionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == ProjectInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + if (null == ProjectInputObject.ProjectName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("ProjectInputObject has null value for ProjectInputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, ProjectInputObject) ); + } + await this.Client.JobDefinitionsUpdate(ProjectInputObject.SubscriptionId ?? null, ProjectInputObject.ResourceGroupName ?? null, ProjectInputObject.StorageMoverName ?? null, ProjectInputObject.ProjectName ?? null, Name, _jobDefinitionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public UpdateAzStorageMoverJobDefinition_UpdateViaIdentityProjectExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaIdentityStorageMoverExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaIdentityStorageMoverExpanded.cs new file mode 100644 index 000000000000..55e4106d48b6 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaIdentityStorageMoverExpanded.cs @@ -0,0 +1,558 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverJobDefinition_UpdateViaIdentityStorageMoverExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for a Job Definition resource. Properties not specified in the request body will be unchanged.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] + public partial class UpdateAzStorageMoverJobDefinition_UpdateViaIdentityStorageMoverExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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; + + /// The Job Definition resource. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinitionUpdateParameters _jobDefinitionBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.JobDefinitionUpdateParameters(); + + /// + /// 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; + + /// Name of the Agent to assign for new Job Runs of this Job Definition. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of the Agent to assign for new Job Runs of this Job Definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the Agent to assign for new Job Runs of this Job Definition.", + SerializedName = @"agentName", + PossibleTypes = new [] { typeof(string) })] + public string AgentName { get => _jobDefinitionBody.AgentName ?? null; set => _jobDefinitionBody.AgentName = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; + + /// Strategy to use for copy. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Strategy to use for copy.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Strategy to use for copy.", + SerializedName = @"copyMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("Additive", "Mirror")] + public string CopyMode { get => _jobDefinitionBody.CopyMode ?? null; set => _jobDefinitionBody.CopyMode = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// A description for the Job Definition. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A description for the Job Definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A description for the Job Definition.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _jobDefinitionBody.Description ?? null; set => _jobDefinitionBody.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("JobDefinitionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'JobDefinitionsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/projects/{(global::System.Uri.EscapeDataString(this.ProjectName.ToString()))}/jobDefinitions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.JobDefinitionsUpdateViaIdentity(StorageMoverInputObject.Id, _jobDefinitionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.JobDefinitionsUpdate(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, ProjectName, Name, _jobDefinitionBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ProjectName=ProjectName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStorageMoverJobDefinition_UpdateViaIdentityStorageMoverExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaJsonFilePath.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..190fa2d265b0 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaJsonFilePath.cs @@ -0,0 +1,554 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverJobDefinition_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for a Job Definition resource. Properties not specified in the request body will be unchanged.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class UpdateAzStorageMoverJobDefinition_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("JobDefinitionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _storageMoverName; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'JobDefinitionsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.JobDefinitionsUpdateViaJsonString(SubscriptionId, ResourceGroupName, StorageMoverName, ProjectName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,ProjectName=ProjectName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStorageMoverJobDefinition_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaJsonString.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaJsonString.cs new file mode 100644 index 000000000000..55e4ec76f85d --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverJobDefinition_UpdateViaJsonString.cs @@ -0,0 +1,552 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// update properties for a Job Definition resource. Properties not specified in the request body will be unchanged. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverJobDefinition_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for a Job Definition resource. Properties not specified in the request body will be unchanged.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}/jobDefinitions/{jobDefinitionName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class UpdateAzStorageMoverJobDefinition_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Job Definition resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Job Definition resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Job Definition resource.", + SerializedName = @"jobDefinitionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("JobDefinitionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _projectName; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ProjectName { get => this._projectName; set => this._projectName = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _storageMoverName; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'JobDefinitionsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.JobDefinitionsUpdateViaJsonString(SubscriptionId, ResourceGroupName, StorageMoverName, ProjectName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,ProjectName=ProjectName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStorageMoverJobDefinition_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IJobDefinition + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_Update.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_Update.cs deleted file mode 100644 index 698e08eb9d9e..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_Update.cs +++ /dev/null @@ -1,468 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - using System; - - /// - /// Updates properties for a Project resource. Properties not specified in the request body will be unchanged. - /// - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverProject_Update", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ParameterSetBreakingChange(new string[] {"Update"}, "15.0.0", "2.0.0", "2025/11/03", ChangeDescription="The parameter set Update and UpdateViaIdentity will be removed. Suggest to use UpdateExpanded, UpdateViaIdentityExpanded and UpdateViaJsonString instead.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Updates properties for a Project resource. Properties not specified in the request body will be unchanged.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] - public partial class UpdateAzStorageMoverProject_Update : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener - { - /// 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(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the Project resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Project resource.", - SerializedName = @"projectName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("ProjectName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters _project; - - /// The Project resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Project resource.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Project resource.", - SerializedName = @"project", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters Project { get => this._project; set => this._project = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _storageMoverName; - - /// The name of the Storage Mover resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Storage Mover resource.", - SerializedName = @"storageMoverName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'ProjectsUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ProjectsUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, Name, Project, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name,body=Project}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public UpdateAzStorageMoverProject_Update() - { - - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=Project }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=Project }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateExpanded.cs index 6308fffe9e07..ce5427c33915 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateExpanded.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// - /// Updates properties for a Project resource. Properties not specified in the request body will be unchanged. + /// update properties for a Project resource. Properties not specified in the request body will be unchanged. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverProject_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Updates properties for a Project resource. Properties not specified in the request body will be unchanged.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for a Project resource. Properties not specified in the request body will be unchanged.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] public partial class UpdateAzStorageMoverProject_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,14 +39,29 @@ public partial class UpdateAzStorageMoverProject_UpdateExpanded : global::System /// 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; + /// The Project resource. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters _projectBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ProjectUpdateParameters(); + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters _projectBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectUpdateParameters(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -68,6 +86,9 @@ public partial class UpdateAzStorageMoverProject_UpdateExpanded : global::System PossibleTypes = new [] { typeof(string) })] public string Description { get => _projectBody.Description ?? null; set => _projectBody.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] @@ -109,7 +130,7 @@ public partial class UpdateAzStorageMoverProject_UpdateExpanded : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -169,7 +190,8 @@ public partial class UpdateAzStorageMoverProject_UpdateExpanded : global::System [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -178,24 +200,24 @@ public partial class UpdateAzStorageMoverProject_UpdateExpanded : global::System /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject /// 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); + 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) @@ -218,6 +240,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -282,8 +309,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -339,7 +391,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -352,12 +404,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ProjectsUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _projectBody, onOk, onDefault, this, Pipeline); + await this.Client.ProjectsUpdate(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _projectBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name,body=_projectBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,StorageMoverName=StorageMoverName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -377,7 +429,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStorageMoverProject_UpdateExpanded() { @@ -403,12 +455,12 @@ public UpdateAzStorageMoverProject_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -425,15 +477,15 @@ public UpdateAzStorageMoverProject_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=_projectBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, StorageMoverName=StorageMoverName, Name=Name, body=_projectBody }) + 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 } }); @@ -443,12 +495,12 @@ public UpdateAzStorageMoverProject_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -460,8 +512,26 @@ public UpdateAzStorageMoverProject_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaIdentity.cs deleted file mode 100644 index 918623473def..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaIdentity.cs +++ /dev/null @@ -1,439 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - using System; - - /// - /// Updates properties for a Project resource. Properties not specified in the request body will be unchanged. - /// - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverProject_UpdateViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ParameterSetBreakingChange(new string[] {"UpdateViaIdentity"}, "15.0.0", "2.0.0", "2025/11/03", ChangeDescription="The parameter set Update and UpdateViaIdentity will be removed. Suggest to use UpdateExpanded, UpdateViaIdentityExpanded and UpdateViaJsonString instead.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Updates properties for a Project resource. Properties not specified in the request body will be unchanged.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] - public partial class UpdateAzStorageMoverProject_UpdateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener - { - /// 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(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters _project; - - /// The Project resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Project resource.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Project resource.", - SerializedName = @"project", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters Project { get => this._project; set => this._project = 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'ProjectsUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.ProjectsUpdateViaIdentity(InputObject.Id, Project, 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.StorageMoverName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.ProjectName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.ProjectsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StorageMoverName ?? null, InputObject.ProjectName ?? null, Project, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Project}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public UpdateAzStorageMoverProject_UpdateViaIdentity() - { - - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Project }) - { - 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 { body=Project }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaIdentityExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaIdentityExpanded.cs index f9797df30426..f3f533b707e1 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaIdentityExpanded.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaIdentityExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// - /// Updates properties for a Project resource. Properties not specified in the request body will be unchanged. + /// update properties for a Project resource. Properties not specified in the request body will be unchanged. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverProject_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Updates properties for a Project resource. Properties not specified in the request body will be unchanged.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for a Project resource. Properties not specified in the request body will be unchanged.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] public partial class UpdateAzStorageMoverProject_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,14 +39,29 @@ public partial class UpdateAzStorageMoverProject_UpdateViaIdentityExpanded : glo /// 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; + /// The Project resource. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProjectUpdateParameters _projectBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.ProjectUpdateParameters(); + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters _projectBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectUpdateParameters(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -68,6 +86,9 @@ public partial class UpdateAzStorageMoverProject_UpdateViaIdentityExpanded : glo PossibleTypes = new [] { typeof(string) })] public string Description { get => _projectBody.Description ?? null; set => _projectBody.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] @@ -102,7 +123,7 @@ public partial class UpdateAzStorageMoverProject_UpdateViaIdentityExpanded : glo /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -125,24 +146,24 @@ public partial class UpdateAzStorageMoverProject_UpdateViaIdentityExpanded : glo /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject /// 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); + 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) @@ -165,6 +186,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -229,8 +255,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -286,7 +337,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -301,7 +352,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.ProjectsUpdateViaIdentity(InputObject.Id, _projectBody, onOk, onDefault, this, Pipeline); + await this.Client.ProjectsUpdateViaIdentity(InputObject.Id, _projectBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); } else { @@ -322,13 +373,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ProjectName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.ProjectsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StorageMoverName ?? null, InputObject.ProjectName ?? null, _projectBody, onOk, onDefault, this, Pipeline); + await this.Client.ProjectsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StorageMoverName ?? null, InputObject.ProjectName ?? null, _projectBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_projectBody}) + 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 } }); @@ -348,7 +399,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStorageMoverProject_UpdateViaIdentityExpanded() { @@ -374,12 +425,12 @@ public UpdateAzStorageMoverProject_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -396,15 +447,15 @@ public UpdateAzStorageMoverProject_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_projectBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { body=_projectBody }) + 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 } }); @@ -414,12 +465,12 @@ public UpdateAzStorageMoverProject_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -431,8 +482,26 @@ public UpdateAzStorageMoverProject_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IProject - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaIdentityStorageMoverExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaIdentityStorageMoverExpanded.cs new file mode 100644 index 000000000000..eb31c3e06b10 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaIdentityStorageMoverExpanded.cs @@ -0,0 +1,521 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// update properties for a Project resource. Properties not specified in the request body will be unchanged. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverProject_UpdateViaIdentityStorageMoverExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for a Project resource. Properties not specified in the request body will be unchanged.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] + public partial class UpdateAzStorageMoverProject_UpdateViaIdentityStorageMoverExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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; + + /// The Project resource. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProjectUpdateParameters _projectBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.ProjectUpdateParameters(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// A description for the Project. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A description for the Project.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A description for the Project.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _projectBody.Description ?? null; set => _projectBody.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProjectName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _storageMoverInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity StorageMoverInputObject { get => this._storageMoverInputObject; set => this._storageMoverInputObject = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StorageMoverInputObject?.Id != null) + { + this.StorageMoverInputObject.Id += $"/projects/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.ProjectsUpdateViaIdentity(StorageMoverInputObject.Id, _projectBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StorageMoverInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + if (null == StorageMoverInputObject.StorageMoverName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StorageMoverInputObject has null value for StorageMoverInputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StorageMoverInputObject) ); + } + await this.Client.ProjectsUpdate(StorageMoverInputObject.SubscriptionId ?? null, StorageMoverInputObject.ResourceGroupName ?? null, StorageMoverInputObject.StorageMoverName ?? null, Name, _projectBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public UpdateAzStorageMoverProject_UpdateViaIdentityStorageMoverExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaJsonFilePath.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..7f347e044f34 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaJsonFilePath.cs @@ -0,0 +1,540 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// update properties for a Project resource. Properties not specified in the request body will be unchanged. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverProject_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for a Project resource. Properties not specified in the request body will be unchanged.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class UpdateAzStorageMoverProject_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProjectName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _storageMoverName; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectsUpdateViaJsonString(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStorageMoverProject_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaJsonString.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaJsonString.cs new file mode 100644 index 000000000000..585bbf5a3186 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMoverProject_UpdateViaJsonString.cs @@ -0,0 +1,538 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// update properties for a Project resource. Properties not specified in the request body will be unchanged. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMoverProject_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for a Project resource. Properties not specified in the request body will be unchanged.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}/projects/{projectName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class UpdateAzStorageMoverProject_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Project resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Project resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Project resource.", + SerializedName = @"projectName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ProjectName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _storageMoverName; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string StorageMoverName { get => this._storageMoverName; set => this._storageMoverName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ProjectsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ProjectsUpdateViaJsonString(SubscriptionId, ResourceGroupName, StorageMoverName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,StorageMoverName=StorageMoverName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStorageMoverProject_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IProject + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_Update.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_Update.cs deleted file mode 100644 index 19ea069b4966..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_Update.cs +++ /dev/null @@ -1,454 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - using System; - - /// - /// Updates properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. - /// - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMover_Update", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ParameterSetBreakingChange(new string[] {"Update"}, "15.0.0", "2.0.0", "2025/11/03", ChangeDescription="The parameter set Update and UpdateViaIdentity will be removed. Suggest to use UpdateExpanded, UpdateViaIdentityExpanded and UpdateViaJsonString instead.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Updates properties for a Storage Mover resource. Properties not specified in the request body will be unchanged.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}", ApiVersion = "2025-07-01")] - public partial class UpdateAzStorageMover_Update : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener - { - /// 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(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the Storage Mover resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the Storage Mover resource.", - SerializedName = @"storageMoverName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("StorageMoverName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters _storageMover; - - /// The Storage Mover resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Storage Mover resource.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Storage Mover resource.", - SerializedName = @"storageMover", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters StorageMover { get => this._storageMover; set => this._storageMover = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'StorageMoversUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StorageMoversUpdate(SubscriptionId, ResourceGroupName, Name, StorageMover, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,Name=Name,body=StorageMover}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public UpdateAzStorageMover_Update() - { - - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=StorageMover }) - { - 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=StorageMover }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateExpanded.cs index 03d66d90c3f0..6bf3c6db1270 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateExpanded.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// - /// Updates properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. + /// update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMover_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Updates properties for a Storage Mover resource. Properties not specified in the request body will be unchanged.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}", ApiVersion = "2025-07-01")] public partial class UpdateAzStorageMover_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,14 +39,29 @@ public partial class UpdateAzStorageMover_UpdateExpanded : global::System.Manage /// 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; + /// The Storage Mover resource. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters _storageMoverBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverUpdateParameters(); + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters _storageMoverBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverUpdateParameters(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -68,6 +86,9 @@ public partial class UpdateAzStorageMover_UpdateExpanded : global::System.Manage PossibleTypes = new [] { typeof(string) })] public string Description { get => _storageMoverBody.Description ?? null; set => _storageMoverBody.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] @@ -109,7 +130,7 @@ public partial class UpdateAzStorageMover_UpdateExpanded : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -155,7 +176,8 @@ public partial class UpdateAzStorageMover_UpdateExpanded : global::System.Manage [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -168,32 +190,32 @@ public partial class UpdateAzStorageMover_UpdateExpanded : global::System.Manage ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags Tag { get => _storageMoverBody.Tag ?? null /* object */; set => _storageMoverBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags Tag { get => _storageMoverBody.Tag ?? null /* object */; set => _storageMoverBody.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover /// 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); + 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) @@ -216,6 +238,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -280,8 +307,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -337,7 +389,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -350,12 +402,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StorageMoversUpdate(SubscriptionId, ResourceGroupName, Name, _storageMoverBody, onOk, onDefault, this, Pipeline); + await this.Client.StorageMoversUpdate(SubscriptionId, ResourceGroupName, Name, _storageMoverBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,Name=Name,body=_storageMoverBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -375,7 +427,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStorageMover_UpdateExpanded() { @@ -401,12 +453,12 @@ public UpdateAzStorageMover_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -423,15 +475,15 @@ public UpdateAzStorageMover_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_storageMoverBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_storageMoverBody }) + 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 } }); @@ -441,12 +493,12 @@ public UpdateAzStorageMover_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -458,8 +510,26 @@ public UpdateAzStorageMover_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateViaIdentity.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateViaIdentity.cs deleted file mode 100644 index aa32112427ea..000000000000 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateViaIdentity.cs +++ /dev/null @@ -1,435 +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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; - using System; - - /// - /// Updates properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. - /// - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMover_UpdateViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.ParameterSetBreakingChange(new string[] {"UpdateViaIdentity"}, "15.0.0", "2.0.0", "2025/11/03", ChangeDescription="The parameter set Update and UpdateViaIdentity will be removed. Suggest to use UpdateExpanded, UpdateViaIdentityExpanded and UpdateViaJsonString instead.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Updates properties for a Storage Mover resource. Properties not specified in the request body will be unchanged.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}", ApiVersion = "2025-07-01")] - public partial class UpdateAzStorageMover_UpdateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener - { - /// 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(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters _storageMover; - - /// The Storage Mover resource. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The Storage Mover resource.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The Storage Mover resource.", - SerializedName = @"storageMover", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters StorageMover { get => this._storageMover; set => this._storageMover = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'StorageMoversUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.StorageMoversUpdateViaIdentity(InputObject.Id, StorageMover, 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.StorageMoverName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.StorageMoversUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StorageMoverName ?? null, StorageMover, onOk, onDefault, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=StorageMover}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public UpdateAzStorageMover_UpdateViaIdentity() - { - - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=StorageMover }) - { - 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 { body=StorageMover }) - { - 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateViaIdentityExpanded.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateViaIdentityExpanded.cs index 20ea31f1164e..4107c1b23289 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateViaIdentityExpanded.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateViaIdentityExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; using System; /// - /// Updates properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. + /// update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMover_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"Updates properties for a Storage Mover resource. Properties not specified in the request body will be unchanged.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}", ApiVersion = "2025-07-01")] public partial class UpdateAzStorageMover_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,14 +39,29 @@ public partial class UpdateAzStorageMover_UpdateViaIdentityExpanded : global::Sy /// 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; + /// The Storage Mover resource. - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParameters _storageMoverBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.StorageMoverUpdateParameters(); + private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParameters _storageMoverBody = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.StorageMoverUpdateParameters(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.ClientAPI; @@ -68,6 +86,9 @@ public partial class UpdateAzStorageMover_UpdateViaIdentityExpanded : global::Sy PossibleTypes = new [] { typeof(string) })] public string Description { get => _storageMoverBody.Description ?? null; set => _storageMoverBody.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] @@ -102,7 +123,7 @@ public partial class UpdateAzStorageMover_UpdateViaIdentityExpanded : global::Sy /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] @@ -129,32 +150,32 @@ public partial class UpdateAzStorageMover_UpdateViaIdentityExpanded : global::Sy ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMoverUpdateParametersTags Tag { get => _storageMoverBody.Tag ?? null /* object */; set => _storageMoverBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverUpdateParametersTags Tag { get => _storageMoverBody.Tag ?? null /* object */; set => _storageMoverBody.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover /// 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); + 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) @@ -177,6 +198,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -241,8 +267,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -298,7 +349,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -313,7 +364,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.StorageMoversUpdateViaIdentity(InputObject.Id, _storageMoverBody, onOk, onDefault, this, Pipeline); + await this.Client.StorageMoversUpdateViaIdentity(InputObject.Id, _storageMoverBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); } else { @@ -330,13 +381,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.StorageMoverName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.StorageMoversUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StorageMoverName ?? null, _storageMoverBody, onOk, onDefault, this, Pipeline); + await this.Client.StorageMoversUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.StorageMoverName ?? null, _storageMoverBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_storageMoverBody}) + 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 } }); @@ -356,7 +407,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStorageMover_UpdateViaIdentityExpanded() { @@ -382,12 +433,12 @@ public UpdateAzStorageMover_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IErrorResponse + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -404,15 +455,15 @@ public UpdateAzStorageMover_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_storageMoverBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 { body=_storageMoverBody }) + 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 } }); @@ -422,12 +473,12 @@ public UpdateAzStorageMover_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -439,8 +490,26 @@ public UpdateAzStorageMover_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IStorageMover - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + 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; + } + } } } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateViaJsonFilePath.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..e333519c5463 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateViaJsonFilePath.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMover_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class UpdateAzStorageMover_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("StorageMoverName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StorageMoversUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageMoversUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStorageMover_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + 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/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateViaJsonString.cs b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateViaJsonString.cs new file mode 100644 index 000000000000..27dff8478ddb --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/cmdlets/UpdateAzStorageMover_UpdateViaJsonString.cs @@ -0,0 +1,524 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets; + using System; + + /// + /// update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStorageMover_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Description(@"update properties for a Storage Mover resource. Properties not specified in the request body will be unchanged.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers/{storageMoverName}", ApiVersion = "2025-07-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.NotSuggestDefaultParameterSet] + public partial class UpdateAzStorageMover_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the Storage Mover resource. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Storage Mover resource.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Storage Mover resource.", + SerializedName = @"storageMoverName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("StorageMoverName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StorageMoversUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StorageMoversUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStorageMover_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMover + 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/StorageMover/StorageMover.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs new file mode 100644 index 000000000000..e53c186e46d1 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover +{ + using System; + using System.Collections.Generic; + using System.Text; + + [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)] + public class ExternalDocsAttribute : Attribute + { + + public string Description { get; } + + public string Url { get; } + + public ExternalDocsAttribute(string url) + { + Url = url; + } + + public ExternalDocsAttribute(string url, string description) + { + Url = url; + Description = description; + } + } +} diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs new file mode 100644 index 000000000000..44f9f625baea --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover +{ + public class PSArgumentCompleterAttribute : ArgumentCompleterAttribute + { + internal string[] ResourceTypes; + + public PSArgumentCompleterAttribute(params string[] argumentList) : base(CreateScriptBlock(argumentList)) + { + ResourceTypes = argumentList; + } + + public static ScriptBlock CreateScriptBlock(string[] resourceTypes) + { + List outputResourceTypes = new List(); + foreach (string resourceType in resourceTypes) + { + if (resourceType.Contains(" ")) + { + outputResourceTypes.Add("\'\'" + resourceType + "\'\'"); + } + else + { + outputResourceTypes.Add(resourceType); + } + } + string scriptResourceTypeList = "'" + String.Join("' , '", outputResourceTypes) + "'"; + string script = "param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)\n" + + String.Format("$values = {0}\n", scriptResourceTypeList) + + "$values | Where-Object { $_ -Like \"$wordToComplete*\" -or $_ -Like \"'$wordToComplete*\" } | Sort-Object | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }"; + ScriptBlock scriptBlock = ScriptBlock.Create(script); + return scriptBlock; + } + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs index bcd103991b9f..bf4bfd2d4cc1 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs @@ -20,11 +20,13 @@ public class ExportFormatPs1xml : PSCmdlet public string FilePath { get; set; } private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; private const string PropertiesExcludedForTableview = @"Id,Type"; private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + private static string SelectedBySuffix = @"#Multiple"; + protected override void ProcessRecord() { try @@ -76,7 +78,7 @@ private static View CreateViewModel(ViewParameters viewParameters) Name = viewParameters.Type.FullName, ViewSelectedBy = new ViewSelectedBy { - TypeName = viewParameters.Type.FullName + TypeName = string.Concat(viewParameters.Type.FullName, SelectedBySuffix) }, TableControl = new TableControl { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs index 066fdd6c26d5..6f92e8a26256 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs @@ -24,7 +24,7 @@ public class ExportModelSurface : PSCmdlet public bool UseExpandedFormat { get; set; } private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; protected override void ProcessRecord() { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index 0d68e2da2aeb..bed38bb65b97 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -70,9 +70,8 @@ protected override void ProcessRecord() var variantGroups = profileGroups.SelectMany(pg => pg.Variants .GroupBy(v => new { v.CmdletName, v.IsInternal }) .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), - Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) + Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) .ToArray(); - var license = new StringBuilder(); license.Append(@" # ---------------------------------------------------------------------------------- @@ -114,6 +113,7 @@ protected override void ProcessRecord() sb.Append("param("); sb.Append($"{(parameterGroups.Any() ? Environment.NewLine : String.Empty)}"); + foreach (var parameterGroup in parameterGroups) { var parameters = parameterGroup.HasAllVariants ? parameterGroup.Parameters.Take(1) : parameterGroup.Parameters; diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index 5cb9d5f7ecfe..5e8e54b4359e 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -137,7 +137,7 @@ protected override void ProcessRecord() } else { - var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().Append("*").ToPsList(); + var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().ToPsList(); sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}"); } @@ -148,8 +148,10 @@ protected override void ProcessRecord() } else { - var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().Append("*").ToPsList(); - sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().ToPsList(); + if (!String.IsNullOrEmpty(aliasesList)) { + sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + } } // CmdletsToExport diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs index 0f60d60f959a..252584cce9ac 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs @@ -12,50 +12,96 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell { - [Cmdlet(VerbsData.Export, "TestStub")] - [DoNotExport] - public class ExportTestStub : PSCmdlet - { - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ModuleName { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ExportsFolder { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string OutputFolder { get; set; } - - [Parameter] - public SwitchParameter IncludeGenerated { get; set; } - - protected override void ProcessRecord() + [Cmdlet(VerbsData.Export, "TestStub")] + [DoNotExport] + public class ExportTestStub : PSCmdlet { - try - { - if (!Directory.Exists(ExportsFolder)) - { - throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); - } + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } - var exportDirectories = Directory.GetDirectories(ExportsFolder); - if (!exportDirectories.Any()) - { - exportDirectories = new[] { ExportsFolder }; - } - var utilFile = Path.Combine(OutputFolder, "utils.ps1"); - if (!File.Exists(utilFile)) + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeGenerated { get; set; } + + protected override void ProcessRecord() { - var sc = new StringBuilder(); - sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + /*var loadEnvFile = Path.Combine(OutputFolder, "loadEnv.ps1"); + if (!File.Exists(loadEnvFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@" +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json +}"); + File.WriteAllText(loadEnvFile, sc.ToString()); + }*/ + var utilFile = Path.Combine(OutputFolder, "utils.ps1"); + if (!File.Exists(utilFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { if ($allChars) { return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) } else { return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) } } +function Start-TestSleep { + [CmdletBinding(DefaultParameterSetName = 'SleepBySeconds')] + param( + [parameter(Mandatory = $true, Position = 0, ParameterSetName = 'SleepBySeconds')] + [ValidateRange(0.0, 2147483.0)] + [double] $Seconds, + + [parameter(Mandatory = $true, ParameterSetName = 'SleepByMilliseconds')] + [ValidateRange('NonNegative')] + [Alias('ms')] + [int] $Milliseconds + ) + + if ($TestMode -ne 'playback') { + switch ($PSCmdlet.ParameterSetName) { + 'SleepBySeconds' { + Start-Sleep -Seconds $Seconds + } + 'SleepByMilliseconds' { + Start-Sleep -Milliseconds $Milliseconds + } + } + } +} + $env = @{} if ($UsePreviousConfigForRecord) { $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json @@ -80,37 +126,40 @@ function cleanupEnv() { # Clean resources you create for testing } "); - File.WriteAllText(utilFile, sc.ToString()); - } - foreach (var exportDirectory in exportDirectories) - { - var outputFolder = OutputFolder; - if (exportDirectory != ExportsFolder) - { - outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); - Directory.CreateDirectory(outputFolder); - } - - var variantGroups = GetScriptCmdlets(exportDirectory) - .SelectMany(fi => fi.ToVariants()) - .Where(v => !v.IsDoNotExport) - .GroupBy(v => v.CmdletName) - .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) - .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); - - foreach (var variantGroup in variantGroups) - { - var sb = new StringBuilder(); - sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); - sb.AppendLine(@"{ + File.WriteAllText(utilFile, sc.ToString()); + } + + + + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var variantGroups = GetScriptCmdlets(exportDirectory) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .GroupBy(v => v.CmdletName) + .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) + .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); + + foreach (var variantGroup in variantGroups) + { + var sb = new StringBuilder(); + sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); + sb.AppendLine(@"{ $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath)" -); - sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); - sb.AppendLine(@" $currentPath = $PSScriptRoot + ); + sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); + sb.AppendLine(@" $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File $currentPath = Split-Path -Path $currentPath -Parent @@ -120,29 +169,29 @@ function cleanupEnv() { "); - sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); - var variants = variantGroup.Variants - .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) - .ToList(); + sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); + var variants = variantGroup.Variants + .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) + .ToList(); - foreach (var variant in variants) + foreach (var variant in variants) + { + sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); + sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); + var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; + sb.AppendLine($"{Indent}}}{variantSeparator}"); + } + sb.AppendLine("}"); + + File.WriteAllText(variantGroup.FilePath, sb.ToString()); + } + } + } + catch (Exception ee) { - sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); - sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); - var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; - sb.AppendLine($"{Indent}}}{variantSeparator}"); + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; } - sb.AppendLine("}"); - - File.WriteAllText(variantGroup.FilePath, sb.ToString()); - } } - } - catch (Exception ee) - { - Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); - throw ee; - } } - } } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index dcdd9995295f..ae57bd5a4e03 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -94,7 +94,7 @@ public static void WriteMarkdowns(IEnumerable variantGroups, PsMod sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); foreach (var relatedLink in markdownInfo.RelatedLinks) { - sb.Append($"{relatedLink}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"[{relatedLink}]({relatedLink}){Environment.NewLine}{Environment.NewLine}"); } File.WriteAllText(Path.Combine(docsFolder, $"{markdownInfo.CmdletName}.md"), sb.ToString()); diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs index 665a52928db0..d7897a09d5b6 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs @@ -36,14 +36,23 @@ internal class PsHelpInfo public object Role { get; } public string NonTerminatingErrors { get; } + public static string CapitalizeFirstLetter(string text) + { + if (string.IsNullOrEmpty(text)) + return text; + + return char.ToUpper(text[0]) + text.Substring(1); + } + public PsHelpInfo(PSObject helpObject = null) { helpObject = helpObject ?? new PSObject(); CmdletName = helpObject.GetProperty("Name").NullIfEmpty() ?? helpObject.GetNestedProperty("details", "name"); ModuleName = helpObject.GetProperty("ModuleName"); - Synopsis = helpObject.GetProperty("Synopsis"); + Synopsis = CapitalizeFirstLetter(helpObject.GetProperty("Synopsis")); Description = helpObject.GetProperty("description").EmptyIfNull().ToDescriptionText().NullIfEmpty() ?? helpObject.GetNestedProperty("details", "description").EmptyIfNull().ToDescriptionText(); + Description = CapitalizeFirstLetter(Description); AlertText = helpObject.GetNestedProperty("alertSet", "alert").EmptyIfNull().ToDescriptionText(); Category = helpObject.GetProperty("Category"); HasCommonParameters = helpObject.GetProperty("CommonParameters").ToNullableBool(); diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs index 5a411c630659..7676ec080e66 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs @@ -31,7 +31,7 @@ internal class MarkdownHelpInfo public string[] Inputs { get; } public string[] Outputs { get; } public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } - public string[] RelatedLinks { get; } + public MarkdownRelatedLinkInfo[] RelatedLinks { get; } public bool SupportsShouldProcess { get; } public bool SupportsPaging { get; } @@ -67,7 +67,11 @@ public MarkdownHelpInfo(VariantGroup variantGroup, string examplesFolder, string ComplexInterfaceInfos = variantGroup.ComplexInterfaceInfos; OnlineVersion = commentInfo.OnlineVersion; - RelatedLinks = commentInfo.RelatedLinks; + + var relatedLinkLists = new List(); + relatedLinkLists.AddRange(commentInfo.RelatedLinks?.Select(link => new MarkdownRelatedLinkInfo(link))); + relatedLinkLists.AddRange(variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Distinct()?.Select(link => new MarkdownRelatedLinkInfo(link.Url, link.Description))); + RelatedLinks = relatedLinkLists?.ToArray(); SupportsShouldProcess = variantGroup.SupportsShouldProcess; SupportsPaging = variantGroup.SupportsPaging; @@ -218,14 +222,45 @@ public MarkdownParameterHelpInfo(PsParameterHelpInfo[] parameterHelpInfos, Param } } + internal class MarkdownRelatedLinkInfo + { + public string Url { get; } + public string Description { get; } + + public MarkdownRelatedLinkInfo(string url) + { + Url = url; + } + + public MarkdownRelatedLinkInfo(string url, string description) + { + Url = url; + Description = description; + } + + public override string ToString() + { + if (string.IsNullOrEmpty(Description)) + { + return Url; + } + else + { + return $@"[{Description}]({Url})"; + + } + + } + } + internal static class MarkdownTypesExtensions { public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Output, exampleInfo.Remarks); public static MarkdownExampleHelpInfo[] DefaultExampleHelpInfos = { - new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), - new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), }; public static MarkdownParameterHelpInfo[] SupportsShouldProcessParameters = diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index b8b7534438fa..472d25f1232d 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -121,6 +121,21 @@ public override string ToString() => CompleterInfo != null : String.Empty; } + internal class PSArgumentCompleterOutput : ArgumentCompleterOutput + { + public PSArgumentCompleterInfo PSArgumentCompleterInfo { get; } + + public PSArgumentCompleterOutput(PSArgumentCompleterInfo completerInfo) : base(completerInfo) + { + PSArgumentCompleterInfo = completerInfo; + } + + + public override string ToString() => PSArgumentCompleterInfo != null + ? $"{Indent}[{typeof(PSArgumentCompleterAttribute)}({(PSArgumentCompleterInfo.IsTypeCompleter ? $"[{PSArgumentCompleterInfo.Type.Unwrap().ToPsType()}]" : $"{PSArgumentCompleterInfo.ResourceTypes?.Select(r => $"\"{r}\"")?.JoinIgnoreEmpty(", ")}")})]{Environment.NewLine}" + : String.Empty; + } + internal class DefaultInfoOutput { public bool HasDefaultInfo { get; } @@ -173,6 +188,7 @@ internal class BaseOutput public VariantGroup VariantGroup { get; } protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public BaseOutput(VariantGroup variantGroup) { VariantGroup = variantGroup; @@ -200,6 +216,21 @@ public string GetProcessCustomAttributesAtRuntime() {Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; } + private string GetLoginVerification() + { + if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + { + return $@" +{Indent}{Indent}$context = Get-AzContext +{Indent}{Indent}if (-not $context -and -not $testPlayback) {{ +{Indent}{Indent}{Indent}Write-Error ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" +{Indent}{Indent}{Indent}exit +{Indent}{Indent}}} +"; + } + return ""; + } + private string GetTelemetry() { if (!VariantGroup.IsInternal && IsAzure) @@ -232,10 +263,16 @@ public override string ToString() => $@"begin {{ {Indent}{Indent}{Indent}$PSBoundParameters['OutBuffer'] = 1 {Indent}{Indent}}} {Indent}{Indent}$parameterSet = $PSCmdlet.ParameterSetName -{GetTelemetry()} +{Indent}{Indent} +{Indent}{Indent}$testPlayback = $false +{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }} +{GetLoginVerification()}{GetTelemetry()} {GetParameterSetToCmdletMapping()}{GetDefaultValuesStatements()} {GetProcessCustomAttributesAtRuntime()} {Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) +{Indent}{Indent}if ($wrappedCmd -eq $null) {{ +{Indent}{Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) +{Indent}{Indent}}} {Indent}{Indent}$scriptCmd = {{& $wrappedCmd @PSBoundParameters}} {Indent}{Indent}$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) {Indent}{Indent}$steppablePipeline.Begin($PSCmdlet) @@ -269,13 +306,16 @@ private string GetDefaultValuesStatements() var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); var parameterName = defaultInfo.ParameterGroup.ParameterName; sb.AppendLine(); + var setCondition = " "; + if (!String.IsNullOrEmpty(defaultInfo.SetCondition)) + { + setCondition = $" -and {defaultInfo.SetCondition}"; + } //Yabo: this is bad to hard code the subscription id, but autorest load input README.md reversely (entry readme -> required readme), there are no other way to //override default value set in required readme if ("SubscriptionId".Equals(parameterName)) { - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); - sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); - sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }}"); + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); sb.AppendLine($"{Indent}{Indent}{Indent}if ($testPlayback) {{"); sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')"); sb.AppendLine($"{Indent}{Indent}{Indent}}} else {{"); @@ -285,13 +325,15 @@ private string GetDefaultValuesStatements() } else { - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); sb.Append($"{Indent}{Indent}}}"); } + } return sb.ToString(); } + } internal class ProcessOutput : BaseOutput @@ -381,6 +423,8 @@ public override string ToString() var notesText = !String.IsNullOrEmpty(notes) ? $"{Environment.NewLine}.Notes{Environment.NewLine}{ComplexParameterHeader}{notes}" : String.Empty; var relatedLinks = String.Join(Environment.NewLine, CommentInfo.RelatedLinks.Select(l => $".Link{Environment.NewLine}{l}")); var relatedLinksText = !String.IsNullOrEmpty(relatedLinks) ? $"{Environment.NewLine}{relatedLinks}" : String.Empty; + var externalUrls = String.Join(Environment.NewLine, CommentInfo.ExternalUrls.Select(l => $".Link{Environment.NewLine}{l}")); + var externalUrlsText = !String.IsNullOrEmpty(externalUrls) ? $"{Environment.NewLine}{externalUrls}" : String.Empty; var examples = ""; foreach (var example in VariantGroup.HelpInfo.Examples) { @@ -393,7 +437,7 @@ public override string ToString() {CommentInfo.Description.ToDescriptionFormat(false)} {examples}{inputsText}{outputsText}{notesText} .Link -{CommentInfo.OnlineVersion}{relatedLinksText} +{CommentInfo.OnlineVersion}{relatedLinksText}{externalUrlsText} #> "; } @@ -587,7 +631,9 @@ public static string ToSyntaxTypeName(this Type type) public static AllowEmptyArrayOutput ToAllowEmptyArray(this bool hasAllowEmptyArray) => new AllowEmptyArrayOutput(hasAllowEmptyArray); - public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => new ArgumentCompleterOutput(completerInfo); + public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => (completerInfo is PSArgumentCompleterInfo psArgumentCompleterInfo) ? psArgumentCompleterInfo.ToArgumentCompleterOutput() : new ArgumentCompleterOutput(completerInfo); + + public static PSArgumentCompleterOutput ToArgumentCompleterOutput(this PSArgumentCompleterInfo completerInfo) => new PSArgumentCompleterOutput(completerInfo); public static DefaultInfoOutput ToDefaultInfoOutput(this ParameterGroup parameterGroup) => new DefaultInfoOutput(parameterGroup); diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs index 1a9e24b1dfb5..88f478c293f8 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -31,7 +31,7 @@ internal class VariantGroup { public string ModuleName { get; } - public string RootModuleName {get => @"";} + public string RootModuleName { get => @""; } public string CmdletName { get; } public string CmdletVerb { get; } public string CmdletNoun { get; } @@ -49,7 +49,7 @@ internal class VariantGroup public PsHelpInfo HelpInfo { get; } public bool IsGenerated { get; } public bool IsInternal { get; } - + public bool IsModelCmdlet { get; } public string OutputFolder { get; } public string FileName { get; } public string FilePath { get; } @@ -84,7 +84,7 @@ public VariantGroup(string moduleName, string cmdletName, Variant[] variants, st HelpInfo = Variants.Select(v => v.HelpInfo).FirstOrDefault() ?? new PsHelpInfo(); IsGenerated = Variants.All(v => v.Attributes.OfType().Any()); IsInternal = isInternal; - + IsModelCmdlet = Variants.All(v => v.IsModelCmdlet); OutputFolder = outputFolder; FileName = $"{CmdletName}{(isTest ? ".Tests" : String.Empty)}.ps1"; FilePath = Path.Combine(OutputFolder, FileName); @@ -101,12 +101,23 @@ private string DetermineDefaultParameterSetName() if (String.IsNullOrEmpty(defaultParameterSet)) { var variantParamCountGroups = Variants + .Where(v => !v.IsNotSuggestDefaultParameterSet) .Select(v => ( variant: v.VariantName, paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) .GroupBy(vpc => vpc.isSimple) .ToArray(); + if (variantParamCountGroups.Length == 0) + { + variantParamCountGroups = Variants + .Select(v => ( + variant: v.VariantName, + paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), + isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) + .GroupBy(vpc => vpc.isSimple) + .ToArray(); + } var variantParameterCounts = (variantParamCountGroups.Any(g => g.Key) ? variantParamCountGroups.Where(g => g.Key) : variantParamCountGroups).SelectMany(g => g).ToArray(); var smallestParameterCount = variantParameterCounts.Min(vpc => vpc.paramCount); defaultParameterSet = variantParameterCounts.First(vpc => vpc.paramCount == smallestParameterCount).variant; @@ -134,7 +145,9 @@ internal class Variant public Parameter[] Parameters { get; } public Parameter[] CmdletOnlyParameters { get; } public bool IsInternal { get; } + public bool IsModelCmdlet { get; } public bool IsDoNotExport { get; } + public bool IsNotSuggestDefaultParameterSet { get; } public string[] Profiles { get; } public Variant(string cmdletName, string variantName, CommandInfo info, CommandMetadata metadata, bool hasParameterSets = false, PsHelpInfo helpInfo = null) @@ -155,6 +168,8 @@ public Variant(string cmdletName, string variantName, CommandInfo info, CommandM Parameters = this.ToParameters().OrderBy(p => p.OrderCategory).ThenByDescending(p => p.IsMandatory).ToArray(); IsInternal = Attributes.OfType().Any(); IsDoNotExport = Attributes.OfType().Any(); + IsModelCmdlet = Attributes.OfType().Any(); + IsNotSuggestDefaultParameterSet = Attributes.OfType().Any(); CmdletOnlyParameters = Parameters.Where(p => !p.Categories.Any(c => c == ParameterCategory.Azure || c == ParameterCategory.Runtime)).ToArray(); Profiles = Attributes.OfType().SelectMany(pa => pa.Profiles).ToArray(); } @@ -210,6 +225,7 @@ public ParameterGroup(string parameterName, Parameter[] parameters, string[] all HasValidateNotNull = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); HasAllowEmptyArray = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); CompleterInfo = Parameters.Select(p => p.CompleterInfoAttribute).FirstOrDefault()?.ToCompleterInfo() + ?? Parameters.Select(p => p.PSArgumentCompleterAttribute).FirstOrDefault()?.ToPSArgumentCompleterInfo() ?? Parameters.Select(p => p.ArgumentCompleterAttribute).FirstOrDefault()?.ToCompleterInfo(); DefaultInfo = Parameters.Select(p => p.DefaultInfoAttribute).FirstOrDefault()?.ToDefaultInfo(this) ?? Parameters.Select(p => p.DefaultValueAttribute).FirstOrDefault(dv => dv != null)?.ToDefaultInfo(this); @@ -244,7 +260,6 @@ internal class Parameter public ParameterMetadata Metadata { get; } public PsParameterHelpInfo HelpInfo { get; } public Type ParameterType { get; } - public Attribute[] Attributes { get; } public ParameterCategory[] Categories { get; } public ParameterCategory OrderCategory { get; } @@ -254,6 +269,7 @@ internal class Parameter public bool SupportsWildcards { get; } public CompleterInfoAttribute CompleterInfoAttribute { get; } public ArgumentCompleterAttribute ArgumentCompleterAttribute { get; } + public PSArgumentCompleterAttribute PSArgumentCompleterAttribute { get; } public bool ValueFromPipeline { get; } public bool ValueFromPipelineByPropertyName { get; } @@ -286,7 +302,8 @@ public Parameter(string variantName, string parameterName, ParameterMetadata met } SupportsWildcards = Attributes.OfType().Any(); CompleterInfoAttribute = Attributes.OfType().FirstOrDefault(); - ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + PSArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(attr => !attr.GetType().Equals(typeof(PSArgumentCompleterAttribute))); ValueFromPipeline = ParameterAttribute.ValueFromPipeline; ValueFromPipelineByPropertyName = ParameterAttribute.ValueFromPipelineByPropertyName; @@ -295,10 +312,10 @@ public Parameter(string variantName, string parameterName, ParameterMetadata met IsMandatory = ParameterAttribute.Mandatory; var complexParameterName = ParameterName.ToUpperInvariant(); - var complexMessage = $"{Environment.NewLine}To construct, see NOTES section for {complexParameterName} properties and create a hash table."; + var complexMessage = $"{Environment.NewLine}"; var description = ParameterAttribute.HelpMessage.NullIfEmpty() ?? HelpInfo.Description.NullIfEmpty() ?? InfoAttribute?.Description.NullIfEmpty() ?? String.Empty; // Remove the complex type message as it will be reinserted if this is a complex type - description = description.NormalizeNewLines().Replace(complexMessage, String.Empty).Replace(complexMessage.ToPsSingleLine(), String.Empty); + description = description.NormalizeNewLines(); // Make an InfoAttribute for processing only if one isn't provided InfoAttribute = Attributes.OfType().FirstOrDefault() ?? new InfoAttribute { PossibleTypes = new[] { ParameterType.Unwrap() }, Required = IsMandatory }; // Set the description if the InfoAttribute does not have one since they are exported without a description @@ -318,7 +335,7 @@ internal class ComplexInterfaceInfo public bool Required { get; } public bool ReadOnly { get; } public string Description { get; } - + public ComplexInterfaceInfo[] NestedInfos { get; } public bool IsComplexInterface { get; } @@ -335,7 +352,7 @@ public ComplexInterfaceInfo(string name, Type type, InfoAttribute infoAttribute, var unwrappedType = Type.Unwrap(); var hasBeenSeen = seenTypes?.Contains(unwrappedType) ?? false; (seenTypes ?? (seenTypes = new List())).Add(unwrappedType); - NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[]{} : + NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[] { } : unwrappedType.GetInterfaces() .Concat(InfoAttribute.PossibleTypes) .SelectMany(pt => pt.GetProperties() @@ -366,6 +383,7 @@ internal class CommentInfo public string OnlineVersion { get; } public string[] RelatedLinks { get; } + public string[] ExternalUrls { get; } private const string HelpLinkPrefix = @"https://learn.microsoft.com/powershell/module/"; @@ -374,6 +392,7 @@ public CommentInfo(VariantGroup variantGroup) var helpInfo = variantGroup.HelpInfo; Description = variantGroup.Variants.SelectMany(v => v.Attributes).OfType().FirstOrDefault()?.Description.NullIfEmpty() ?? helpInfo.Description.EmptyIfNull(); + Description = PsHelpInfo.CapitalizeFirstLetter(Description); // If there is no Synopsis, PowerShell may put in the Syntax string as the Synopsis. This seems unintended, so we remove the Synopsis in this situation. var synopsis = helpInfo.Synopsis.EmptyIfNull().Trim().StartsWith(variantGroup.CmdletName) ? String.Empty : helpInfo.Synopsis; Synopsis = synopsis.NullIfEmpty() ?? Description; @@ -391,6 +410,9 @@ public CommentInfo(VariantGroup variantGroup) var moduleName = variantGroup.RootModuleName == "" ? variantGroup.ModuleName.ToLowerInvariant() : variantGroup.RootModuleName.ToLowerInvariant(); OnlineVersion = helpInfo.OnlineVersion?.Uri.NullIfEmpty() ?? $@"{HelpLinkPrefix}{moduleName}/{variantGroup.CmdletName.ToLowerInvariant()}"; RelatedLinks = helpInfo.RelatedLinks.Select(rl => rl.Text).ToArray(); + + // Get external urls from attribute + ExternalUrls = variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Select(e => e.Url)?.Distinct()?.ToArray(); } } @@ -420,11 +442,22 @@ public CompleterInfo(ArgumentCompleterAttribute completerAttribute) } } + internal class PSArgumentCompleterInfo : CompleterInfo + { + public string[] ResourceTypes { get; } + + public PSArgumentCompleterInfo(PSArgumentCompleterAttribute completerAttribute) : base(completerAttribute) + { + ResourceTypes = completerAttribute.ResourceTypes; + } + } + internal class DefaultInfo { public string Name { get; } public string Description { get; } public string Script { get; } + public string SetCondition { get; } public ParameterGroup ParameterGroup { get; } public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) @@ -432,6 +465,7 @@ public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterG Name = infoAttribute.Name; Description = infoAttribute.Description; Script = infoAttribute.Script; + SetCondition = infoAttribute.SetCondition; ParameterGroup = parameterGroup; } @@ -479,7 +513,8 @@ public static Parameter[] ToParameters(this Variant variant) parameterHelp = parameterHelp.Where(ph => (!ph.ParameterSetNames.Any() || ph.ParameterSetNames.Any(psn => psn == variant.VariantName || psn == AllParameterSets)) && ph.Name != "IncludeTotalCount"); } var result = parameters.Select(p => new Parameter(variant.VariantName, p.Key, p.Value, parameterHelp.FirstOrDefault(ph => ph.Name == p.Key))); - if (variant.SupportsPaging) { + if (variant.SupportsPaging) + { // If supportsPaging is set, we will need to add First and Skip parameters since they are treated as common parameters which as not contained on Metadata>parameters variant.Info.Parameters["First"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Gets only the first 'n' objects."; variant.Info.Parameters["Skip"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Ignores the first 'n' objects and then gets the remaining objects."; @@ -507,7 +542,7 @@ public static ComplexInterfaceInfo ToComplexInterfaceInfo(this InfoAttribute inf public static CompleterInfo ToCompleterInfo(this CompleterInfoAttribute infoAttribute) => new CompleterInfo(infoAttribute); public static CompleterInfo ToCompleterInfo(this ArgumentCompleterAttribute completerAttribute) => new CompleterInfo(completerAttribute); - + public static PSArgumentCompleterInfo ToPSArgumentCompleterInfo(this PSArgumentCompleterAttribute completerAttribute) => new PSArgumentCompleterInfo(completerAttribute); public static DefaultInfo ToDefaultInfo(this DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) => new DefaultInfo(infoAttribute, parameterGroup); public static DefaultInfo ToDefaultInfo(this PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) => new DefaultInfo(defaultValueAttribute, parameterGroup); } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/PsAttributes.cs index b15d0e573c2f..548aa022562c 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/PsAttributes.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/PsAttributes.cs @@ -22,6 +22,11 @@ public class DoNotExportAttribute : Attribute { } + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] + public class ModelCmdletAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Class)] public class InternalExportAttribute : Attribute { @@ -55,6 +60,11 @@ public class HttpPathAttribute : Attribute public string ApiVersion { get; set; } } + [AttributeUsage(AttributeTargets.Class)] + public class NotSuggestDefaultParameterSetAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] public class CategoryAttribute : Attribute { @@ -109,6 +119,11 @@ public enum PropertyOrigin Inlined } + [AttributeUsage(AttributeTargets.Property)] + public class ConstantAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Property)] public class FormatTableAttribute : Attribute { diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/PsExtensions.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/PsExtensions.cs index 68fbc38d4a4a..061fef9cf8d1 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/PsExtensions.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/PsExtensions.cs @@ -13,6 +13,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PowerShell { internal static class PsExtensions { + public static PSObject AddMultipleTypeNameIntoPSObject(this object obj, string multipleTag = "#Multiple") + { + var psObj = new PSObject(obj); + psObj.TypeNames.Insert(0, $"{psObj.TypeNames[0]}{multipleTag}"); + return psObj; + } + // https://stackoverflow.com/a/863944/294804 // https://stackoverflow.com/a/4452598/294804 // https://stackoverflow.com/a/28701974/294804 diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/PsHelpers.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/PsHelpers.cs index 790662041cdc..563dbfaceab2 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/PsHelpers.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/BuildTime/PsHelpers.cs @@ -67,7 +67,7 @@ public static IEnumerable GetScriptHelpInfo(params string[] modulePath public static IEnumerable GetModuleCmdletsAndHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) { - var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => + var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => $@"(Get-Command -Module (Import-Module '{mp}' -PassThru) | Where-Object {{ $_.CommandType -ne 'Alias' }} | ForEach-Object {{ @{{ CommandInfo = $_; HelpInfo = ( invoke-command {{ try {{ Get-Help -Name $_.Name -Full }} catch{{ '' }} }} ) }} }})" )); return (cmdlet?.RunScript(getCmdletAndHelp) ?? RunScript(getCmdletAndHelp)) @@ -88,7 +88,7 @@ public static Guid ReadGuidFromPsd1(string psd1Path) if (File.Exists(psd1Path)) { var currentGuid = File.ReadAllLines(psd1Path) - .FirstOrDefault(l => l.StartsWith(GuidStart))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) + .FirstOrDefault(l => l.TrimStart().StartsWith(GuidStart.TrimStart()))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) .LastOrDefault()?.Replace("'", String.Empty); guid = currentGuid != null ? Guid.Parse(currentGuid) : guid; } diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/Context.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/Context.cs new file mode 100644 index 000000000000..0b082ff17326 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/Context.cs @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Extensions; + + /// + /// The IContext Interface defines the communication mechanism for input customization. + /// + /// + /// In the context, we will have client, pipeline, PSBoundParameters, default EventListener, Cancellation. + /// + public interface IContext + { + System.Management.Automation.InvocationInfo InvocationInformation { get; set; } + System.Threading.CancellationTokenSource CancellationTokenSource { get; set; } + System.Collections.Generic.IDictionary ExtensibleParameters { get; } + HttpPipeline Pipeline { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StorageMover.StorageMover Client { get; } + } +} diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/Events.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/Events.cs index f3cbfeb9fd68..9f4c27644470 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/Events.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/Events.cs @@ -22,6 +22,6 @@ public static partial class Events public const string FollowingNextLink = nameof(FollowingNextLink); public const string DelayBeforePolling = nameof(DelayBeforePolling); public const string Polling = nameof(Polling); - + public const string Progress = nameof(Progress); } -} \ No newline at end of file +} diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/ISendAsync.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/ISendAsync.cs index 94a461bf1977..dd912dc788ad 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/ISendAsync.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/ISendAsync.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime using System.Threading.Tasks; using System.Collections; using System.Linq; + using System; + /// /// The interface for sending an HTTP request across the wire. @@ -70,6 +72,7 @@ public interface ISendAsyncTerminalFactory public partial class HttpPipeline : ISendAsync { + private const int DefaultMaxRetry = 3; private ISendAsync pipeline; private ISendAsyncTerminalFactory terminal; private List steps = new List(); @@ -92,6 +95,111 @@ public HttpPipeline(ISendAsyncTerminalFactory terminalStep) /// public HttpPipeline Clone() => new HttpPipeline(terminal) { steps = this.steps.ToList(), pipeline = this.pipeline }; + private bool shouldRetry429(HttpResponseMessage response) + { + if (response.StatusCode == (System.Net.HttpStatusCode)429) + { + var retryAfter = response.Headers.RetryAfter; + if (retryAfter != null && retryAfter.Delta.HasValue) + { + return true; + } + } + return false; + } + /// + /// The step to handle 429 response with retry-after header. + /// + public async Task Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = int.MaxValue; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES_FOR_429")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES_FOR_429")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetry429(response) && count++ < retryCount) + { + request = await cloneRequest.CloneWithContent(); + var retryAfter = response.Headers.RetryAfter; + await Task.Delay(retryAfter.Delta.Value, callback.Token); + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code 429 after waiting {retryAfter.Delta.Value.TotalSeconds} seconds."); + response = await next.SendAsync(request, callback); + } + return response; + } + + private bool shouldRetryError(HttpResponseMessage response) + { + if (response.StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + if (response.StatusCode != System.Net.HttpStatusCode.NotImplemented && + response.StatusCode != System.Net.HttpStatusCode.HttpVersionNotSupported) + { + return true; + } + } + else if (response.StatusCode == System.Net.HttpStatusCode.RequestTimeout) + { + return true; + } + else if (response.StatusCode == (System.Net.HttpStatusCode)429 && response.Headers.RetryAfter == null) + { + return true; + } + return false; + } + + /// + /// Returns true if status code in HttpRequestExceptionWithStatus exception is greater + /// than or equal to 500 and not NotImplemented (501) or HttpVersionNotSupported (505). + /// Or it's 429 (TOO MANY REQUESTS) without Retry-After header. + /// + public async Task RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = DefaultMaxRetry; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetryError(response) && count++ < retryCount) + { + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code {response.StatusCode}"); + request = await cloneRequest.CloneWithContent(); + response = await next.SendAsync(request, callback); + } + return response; + } + public ISendAsyncTerminalFactory TerminalFactory { get => terminal; @@ -117,6 +225,11 @@ public ISendAsync Pipeline // create the pipeline from scratch. var next = terminal.Create(); + if (Convert.ToBoolean(@"true")) + { + next = (new SendAsyncFactory(Retry429)).Create(next) ?? next; + next = (new SendAsyncFactory(RetryError)).Create(next) ?? next; + } foreach (var factory in steps) { // skip factories that return null. diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/InfoAttribute.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/InfoAttribute.cs index 43e77732ac2c..a49e9d0f5f74 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/InfoAttribute.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/InfoAttribute.cs @@ -11,6 +11,9 @@ public class InfoAttribute : Attribute { public bool Required { get; set; } = false; public bool ReadOnly { get; set; } = false; + public bool Read { get; set; } = true; + public bool Create { get; set; } = true; + public bool Update { get; set; } = true; public Type[] PossibleTypes { get; set; } = new Type[0]; public string Description { get; set; } = ""; public string SerializedName { get; set; } = ""; @@ -30,5 +33,6 @@ public class DefaultInfoAttribute : Attribute public string Script { get; set; } = ""; public string Name { get; set; } = ""; public string Description { get; set; } = ""; + public string SetCondition { get; set; } = ""; } } \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/InputHandler.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/InputHandler.cs new file mode 100644 index 000000000000..0dc758203707 --- /dev/null +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/InputHandler.cs @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Cmdlets +{ + public abstract class InputHandler + { + protected InputHandler NextHandler = null; + + public void SetNextHandler(InputHandler nextHandler) + { + this.NextHandler = nextHandler; + } + + public abstract void Process(Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.IContext context); + } +} \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/MessageAttribute.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/MessageAttribute.cs index 60627de09e40..d45232334dde 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/MessageAttribute.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/MessageAttribute.cs @@ -16,9 +16,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime public class GenericBreakingChangeAttribute : Attribute { private string _message; - //A dexcription of what the change is about, non mandatory + //A description of what the change is about, non mandatory public string ChangeDescription { get; set; } = null; + //Name of the module that is being deprecated + public string moduleName { get; set; } = String.IsNullOrEmpty(@"") ? @"Az.StorageMover" : @""; + //The version the change is effective from, non mandatory public string DeprecateByVersion { get; } public string DeprecateByAzVersion { get; } @@ -82,7 +85,7 @@ public void PrintCustomAttributeInfo(Action writeOutput) } writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion)); - writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.moduleName, this.DeprecateByVersion)); if (OldWay != null && NewWay != null) { @@ -191,11 +194,11 @@ public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this( this.IsEstimatedGaDateSet = true; } } - + public void PrintCustomAttributeInfo(Action writeOutput) { writeOutput(this._message); - + if (IsEstimatedGaDateSet) { writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString())); diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs index 79755a222936..2b2e84edf459 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs @@ -21,6 +21,11 @@ internal XNodeArray(params JsonNode[] values) items = new List(values); } + internal XNodeArray(System.Collections.Generic.List values) + { + items = new List(values); + } + public override JsonNode this[int index] => items[index]; internal override JsonType? ElementType => null; diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/Properties/Resources.resx b/generated/StorageMover/StorageMover.Autorest/generated/runtime/Properties/Resources.resx index a08a2e50172b..4ef90b70573d 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/Properties/Resources.resx +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/Properties/Resources.resx @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can -- The change is expected to take effect from version : '{0}' +- The change is expected to take effect in '{0}' from version : '{1}' ```powershell diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/SerializationMode.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/SerializationMode.cs index e4de6b4c4ae4..829ebdb08408 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/SerializationMode.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/SerializationMode.cs @@ -9,8 +9,10 @@ public enum SerializationMode { None = 0, IncludeHeaders = 1 << 0, - IncludeReadOnly = 1 << 1, - - IncludeAll = IncludeHeaders | IncludeReadOnly + IncludeRead = 1 << 1, + IncludeCreate = 1 << 2, + IncludeUpdate = 1 << 3, + IncludeAll = IncludeHeaders | IncludeRead | IncludeCreate | IncludeUpdate, + IncludeCreateOrUpdate = IncludeCreate | IncludeUpdate } } \ No newline at end of file diff --git a/generated/StorageMover/StorageMover.Autorest/generated/runtime/TypeConverterExtensions.cs b/generated/StorageMover/StorageMover.Autorest/generated/runtime/TypeConverterExtensions.cs index 2a15b76d1fd3..1e7af6bb225d 100644 --- a/generated/StorageMover/StorageMover.Autorest/generated/runtime/TypeConverterExtensions.cs +++ b/generated/StorageMover/StorageMover.Autorest/generated/runtime/TypeConverterExtensions.cs @@ -62,6 +62,56 @@ internal static T[] SelectToArray(object source, System.Func return result.ToArray(); } + internal static System.Collections.Generic.List SelectToList(object source, System.Func converter) + { + // null begets null + if (source == null) + { + return null; + } + + // single values and strings are just encapsulated in the array. + if (source is string || !(source is System.Collections.IEnumerable)) + { + try + { + return new T[] { (T)converter(source) }.ToList(); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + return new T[0].ToList(); // empty result if couldn't convert. + } + + var result = new System.Collections.Generic.List(); + foreach (var each in (System.Collections.IEnumerable)source) + { + try + { + result.Add((T)converter(each)); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + } + return result; + } internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.Generic.IDictionary dictionary) { if (null != dictionary) diff --git a/generated/StorageMover/StorageMover.Autorest/internal/Get-AzStorageMoverOperation.ps1 b/generated/StorageMover/StorageMover.Autorest/internal/Get-AzStorageMoverOperation.ps1 index 1475f12c8013..210353fb772f 100644 --- a/generated/StorageMover/StorageMover.Autorest/internal/Get-AzStorageMoverOperation.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/internal/Get-AzStorageMoverOperation.ps1 @@ -25,12 +25,12 @@ List the operations for the provider {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation .Link https://learn.microsoft.com/powershell/module/az.storagemover/get-azstoragemoveroperation #> function Get-AzStorageMoverOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -89,12 +89,18 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ List = 'Az.StorageMover.private\Get-AzStorageMoverOperation_List'; } $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) diff --git a/generated/StorageMover/StorageMover.Autorest/internal/New-AzStorageMoverEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/internal/New-AzStorageMoverEndpoint.ps1 index 892380e290f2..851676ca2089 100644 --- a/generated/StorageMover/StorageMover.Autorest/internal/New-AzStorageMoverEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/internal/New-AzStorageMoverEndpoint.ps1 @@ -16,30 +16,43 @@ <# .Synopsis -Creates or updates an Endpoint resource, which represents a data transfer source or destination. +Create an Endpoint resource, which represents a data transfer source or destination. .Description -Creates or updates an Endpoint resource, which represents a data transfer source or destination. +Create an Endpoint resource, which represents a data transfer source or destination. .Example {{ Add code here }} .Example {{ Add code here }} +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .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. PROPERTY : The resource specific properties for the Storage Mover resource. - EndpointType : The Endpoint resource type. [Description ]: A description for the Endpoint. + [EndpointType ]: The Endpoint resource type. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoverendpoint #> function New-AzStorageMoverEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] +[CmdletBinding(DefaultParameterSetName='CreateViaIdentityStorageMoverExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('EndpointName')] @@ -48,48 +61,73 @@ param( # The name of the Endpoint resource. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${StorageMoverName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties] # The resource specific properties for the Storage Mover resource. - # To construct, see NOTES section for PROPERTY properties and create a hash table. ${Property}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). ${IdentityType}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String[]] + # The array of user assigned identities associated with the resource. + # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' + ${UserAssignedIdentity}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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. - ${IdentityUserAssignedIdentity}, + [System.String] + # Json string supplied to the Create operation + ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -147,13 +185,17 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ CreateExpanded = 'Az.StorageMover.private\New-AzStorageMoverEndpoint_CreateExpanded'; + CreateViaIdentityStorageMoverExpanded = 'Az.StorageMover.private\New-AzStorageMoverEndpoint_CreateViaIdentityStorageMoverExpanded'; + CreateViaJsonFilePath = 'Az.StorageMover.private\New-AzStorageMoverEndpoint_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StorageMover.private\New-AzStorageMoverEndpoint_CreateViaJsonString'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -162,6 +204,9 @@ begin { } $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) diff --git a/generated/StorageMover/StorageMover.Autorest/internal/ProxyCmdletDefinitions.ps1 b/generated/StorageMover/StorageMover.Autorest/internal/ProxyCmdletDefinitions.ps1 index 2c282d8398e2..96037ba2214c 100644 --- a/generated/StorageMover/StorageMover.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -25,12 +25,12 @@ List the operations for the provider {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation .Link https://learn.microsoft.com/powershell/module/az.storagemover/get-azstoragemoveroperation #> function Get-AzStorageMoverOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.IOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -89,12 +89,18 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ List = 'Az.StorageMover.private\Get-AzStorageMoverOperation_List'; } $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) @@ -126,30 +132,43 @@ end { <# .Synopsis -Creates or updates an Endpoint resource, which represents a data transfer source or destination. +Create an Endpoint resource, which represents a data transfer source or destination. .Description -Creates or updates an Endpoint resource, which represents a data transfer source or destination. +Create an Endpoint resource, which represents a data transfer source or destination. .Example {{ Add code here }} .Example {{ Add code here }} +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .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. PROPERTY : The resource specific properties for the Storage Mover resource. - EndpointType : The Endpoint resource type. [Description ]: A description for the Endpoint. + [EndpointType ]: The Endpoint resource type. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/new-azstoragemoverendpoint #> function New-AzStorageMoverEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] -[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] +[CmdletBinding(DefaultParameterSetName='CreateViaIdentityStorageMoverExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('EndpointName')] @@ -158,48 +177,73 @@ param( # The name of the Endpoint resource. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${StorageMoverName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseProperties] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseProperties] # The resource specific properties for the Storage Mover resource. - # To construct, see NOTES section for PROPERTY properties and create a hash table. ${Property}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType])] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). ${IdentityType}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStorageMoverExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String[]] + # The array of user assigned identities associated with the resource. + # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' + ${UserAssignedIdentity}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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. - ${IdentityUserAssignedIdentity}, + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -257,13 +301,17 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ CreateExpanded = 'Az.StorageMover.private\New-AzStorageMoverEndpoint_CreateExpanded'; + CreateViaIdentityStorageMoverExpanded = 'Az.StorageMover.private\New-AzStorageMoverEndpoint_CreateViaIdentityStorageMoverExpanded'; + CreateViaJsonFilePath = 'Az.StorageMover.private\New-AzStorageMoverEndpoint_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StorageMover.private\New-AzStorageMoverEndpoint_CreateViaJsonString'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -272,6 +320,9 @@ begin { } $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) @@ -330,6 +381,17 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/remove-azstoragemoveragent #> @@ -338,6 +400,7 @@ function Remove-AzStorageMoverAgent { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory)] [Alias('AgentName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -368,9 +431,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -445,14 +513,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Delete = 'Az.StorageMover.private\Remove-AzStorageMoverAgent_Delete'; DeleteViaIdentity = 'Az.StorageMover.private\Remove-AzStorageMoverAgent_DeleteViaIdentity'; + DeleteViaIdentityStorageMover = 'Az.StorageMover.private\Remove-AzStorageMoverAgent_DeleteViaIdentityStorageMover'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -461,6 +531,9 @@ begin { } $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) @@ -549,7 +622,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -626,14 +698,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Delete = 'Az.StorageMover.private\Remove-AzStorageMover_Delete'; DeleteViaIdentity = 'Az.StorageMover.private\Remove-AzStorageMover_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -642,6 +715,9 @@ begin { } $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) @@ -673,10 +749,10 @@ end { <# .Synopsis -Updates properties for an Endpoint resource. +Update properties for an Endpoint resource. Properties not specified in the request body will be unchanged. .Description -Updates properties for an Endpoint resource. +Update properties for an Endpoint resource. Properties not specified in the request body will be unchanged. .Example {{ Add code here }} @@ -686,7 +762,7 @@ Properties not specified in the request body will be unchanged. .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Notes COMPLEX PARAMETER PROPERTIES @@ -704,16 +780,30 @@ INPUTOBJECT : Identity Parameter [SubscriptionId ]: The ID of the target subscription. PROPERTY : The Endpoint resource, which contains information about file sources and targets. - EndpointType : The Endpoint resource type. + EndpointType : The Endpoint resource type. [Description ]: A description for the Endpoint. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemoverendpoint #> function Update-AzStorageMoverEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('EndpointName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -721,6 +811,8 @@ param( ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. @@ -728,12 +820,16 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${StorageMoverName}, [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -744,32 +840,53 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType])] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). ${IdentityType}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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. - ${IdentityUserAssignedIdentity}, - - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties] # The Endpoint resource, which contains information about file sources and targets. - # To construct, see NOTES section for PROPERTY properties and create a hash table. ${Property}, + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String[]] + # The array of user assigned identities associated with the resource. + # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' + ${UserAssignedIdentity}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -826,14 +943,18 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ UpdateExpanded = 'Az.StorageMover.private\Update-AzStorageMoverEndpoint_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.StorageMover.private\Update-AzStorageMoverEndpoint_UpdateViaIdentityExpanded'; + UpdateViaIdentityStorageMoverExpanded = 'Az.StorageMover.private\Update-AzStorageMoverEndpoint_UpdateViaIdentityStorageMoverExpanded'; + UpdateViaJsonFilePath = 'Az.StorageMover.private\Update-AzStorageMoverEndpoint_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StorageMover.private\Update-AzStorageMoverEndpoint_UpdateViaJsonString'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -842,6 +963,9 @@ begin { } $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) diff --git a/generated/StorageMover/StorageMover.Autorest/internal/Remove-AzStorageMover.ps1 b/generated/StorageMover/StorageMover.Autorest/internal/Remove-AzStorageMover.ps1 index c1d9957106f6..8ae04323b4c6 100644 --- a/generated/StorageMover/StorageMover.Autorest/internal/Remove-AzStorageMover.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/internal/Remove-AzStorageMover.ps1 @@ -73,7 +73,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -150,14 +149,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Delete = 'Az.StorageMover.private\Remove-AzStorageMover_Delete'; DeleteViaIdentity = 'Az.StorageMover.private\Remove-AzStorageMover_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -166,6 +166,9 @@ begin { } $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) diff --git a/generated/StorageMover/StorageMover.Autorest/internal/Remove-AzStorageMoverAgent.ps1 b/generated/StorageMover/StorageMover.Autorest/internal/Remove-AzStorageMoverAgent.ps1 index a525f3146177..97835fac05ec 100644 --- a/generated/StorageMover/StorageMover.Autorest/internal/Remove-AzStorageMoverAgent.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/internal/Remove-AzStorageMoverAgent.ps1 @@ -43,6 +43,17 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [StorageMoverName ]: The name of the Storage Mover resource. [SubscriptionId ]: The ID of the target subscription. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/remove-azstoragemoveragent #> @@ -51,6 +62,7 @@ function Remove-AzStorageMoverAgent { [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory)] [Alias('AgentName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -81,9 +93,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityStorageMover', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -158,14 +175,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Delete = 'Az.StorageMover.private\Remove-AzStorageMoverAgent_Delete'; DeleteViaIdentity = 'Az.StorageMover.private\Remove-AzStorageMoverAgent_DeleteViaIdentity'; + DeleteViaIdentityStorageMover = 'Az.StorageMover.private\Remove-AzStorageMoverAgent_DeleteViaIdentityStorageMover'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -174,6 +193,9 @@ begin { } $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) diff --git a/generated/StorageMover/StorageMover.Autorest/internal/Update-AzStorageMoverEndpoint.ps1 b/generated/StorageMover/StorageMover.Autorest/internal/Update-AzStorageMoverEndpoint.ps1 index eb9331cb01b0..c094a4c7fbc8 100644 --- a/generated/StorageMover/StorageMover.Autorest/internal/Update-AzStorageMoverEndpoint.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/internal/Update-AzStorageMoverEndpoint.ps1 @@ -16,10 +16,10 @@ <# .Synopsis -Updates properties for an Endpoint resource. +Update properties for an Endpoint resource. Properties not specified in the request body will be unchanged. .Description -Updates properties for an Endpoint resource. +Update properties for an Endpoint resource. Properties not specified in the request body will be unchanged. .Example {{ Add code here }} @@ -29,7 +29,7 @@ Properties not specified in the request body will be unchanged. .Inputs Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint +Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint .Notes COMPLEX PARAMETER PROPERTIES @@ -47,16 +47,30 @@ INPUTOBJECT : Identity Parameter [SubscriptionId ]: The ID of the target subscription. PROPERTY : The Endpoint resource, which contains information about file sources and targets. - EndpointType : The Endpoint resource type. + EndpointType : The Endpoint resource type. [Description ]: A description for the Endpoint. + +STORAGEMOVERINPUTOBJECT : Identity Parameter + [AgentName ]: The name of the Agent resource. + [EndpointName ]: The name of the Endpoint resource. + [Id ]: Resource identity path + [JobDefinitionName ]: The name of the Job Definition resource. + [JobRunName ]: The name of the Job Run resource. + [ProjectName ]: The name of the Project resource. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [StorageMoverName ]: The name of the Storage Mover resource. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.storagemover/update-azstoragemoverendpoint #> function Update-AzStorageMoverEndpoint { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpoint])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpoint])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('EndpointName')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] @@ -64,6 +78,8 @@ param( ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the resource group. @@ -71,12 +87,16 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [System.String] # The name of the Storage Mover resource. ${StorageMoverName}, [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -87,32 +107,53 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType])] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IStorageMoverIdentity] + # Identity Parameter + ${StorageMoverInputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Support.ManagedServiceIdentityType] + [System.String] # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). ${IdentityType}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api30.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. - ${IdentityUserAssignedIdentity}, - - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.Api20250701.IEndpointBaseUpdateProperties] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Models.IEndpointBaseUpdateProperties] # The Endpoint resource, which contains information about file sources and targets. - # To construct, see NOTES section for PROPERTY properties and create a hash table. ${Property}, + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStorageMoverExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String[]] + # The array of user assigned identities associated with the resource. + # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' + ${UserAssignedIdentity}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -169,14 +210,18 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ UpdateExpanded = 'Az.StorageMover.private\Update-AzStorageMoverEndpoint_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.StorageMover.private\Update-AzStorageMoverEndpoint_UpdateViaIdentityExpanded'; + UpdateViaIdentityStorageMoverExpanded = 'Az.StorageMover.private\Update-AzStorageMoverEndpoint_UpdateViaIdentityStorageMoverExpanded'; + UpdateViaJsonFilePath = 'Az.StorageMover.private\Update-AzStorageMoverEndpoint_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StorageMover.private\Update-AzStorageMoverEndpoint_UpdateViaJsonString'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StorageMover.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -185,6 +230,9 @@ begin { } $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) diff --git a/generated/StorageMover/StorageMover.Autorest/test-module.ps1 b/generated/StorageMover/StorageMover.Autorest/test-module.ps1 index d4ef938eac0a..08542669d8c9 100644 --- a/generated/StorageMover/StorageMover.Autorest/test-module.ps1 +++ b/generated/StorageMover/StorageMover.Autorest/test-module.ps1 @@ -12,17 +12,17 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) +param([switch]$NotIsolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) $ErrorActionPreference = 'Stop' -if(-not $Isolated) +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' if ($PSBoundParameters.ContainsKey("TestName")) { $PSBoundParameters["TestName"] = $PSBoundParameters["TestName"] -join "," } $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path - & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } @@ -34,7 +34,7 @@ if ($PSBoundParameters.ContainsKey("TestName") -and ($TestName.count -eq 1) -and $ProgressPreference = 'SilentlyContinue' $baseName = $PSScriptRoot.BaseName $requireResourceModule = (($baseName -ne "Resources") -and ($Record.IsPresent -or $Live.IsPresent)) -. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule +. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule . ("$PSScriptRoot\test\utils.ps1") if ($requireResourceModule) @@ -95,4 +95,4 @@ try } } -Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file +Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/Az.StreamAnalytics.format.ps1xml b/generated/StreamAnalytics/StreamAnalytics.Autorest/Az.StreamAnalytics.format.ps1xml index 9bb0aad09807..0af70901200c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/Az.StreamAnalytics.format.ps1xml +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/Az.StreamAnalytics.format.ps1xml @@ -2,399 +2,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamAnalyticsIdentity - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamAnalyticsIdentity - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ClusterName - - - FunctionName - - - InputName - - - JobName - - - Location - - - OutputName - - - ResourceGroupName - - - SubscriptionId - - - TransformationName - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ErrorAutoGenerated - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ErrorAutoGenerated - - - - - - - - - - - - - - - - - - Code - - - Message - - - Target - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ErrorDetails - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ErrorDetails - - - - - - - - - - - - - - - - - - Code - - - Message - - - Target - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.Resource - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.Resource - - - - - - - - - - - - Name - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResource - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResource - - - - - - - - - - - - - - - Name - - - Location - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResourceTags - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResourceTags - - - - - - - - - - - - Item - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.Cluster - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.Cluster - - - - - - - - - - - - - - - - - - Location - - - Name - - - Etag - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterJob - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterJob - - - - - - - - - - - - - - - JobState - - - StreamingUnit - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterJobListResult - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterJobListResult - - - - - - - - - - - - NextLink - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterListResult - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterListResult - - - - - - - - - - - - NextLink - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterProperties - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterProperties - - - - - - - - - - - - - - - - - - - - - - - - CapacityAllocated - - - CapacityAssigned - - - ClusterId - - - CreatedDate - - - ProvisioningState - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterSku - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterSku - - - - - - - - - - - - - - - Capacity - - - Name - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureDataLakeStoreOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureDataLakeStoreOutputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureDataLakeStoreOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureDataLakeStoreOutputDataSourceProperties#Multiple @@ -462,9 +72,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureFunctionOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureFunctionOutputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureFunctionOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureFunctionOutputDataSourceProperties#Multiple @@ -508,9 +118,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionBindingProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionBindingProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionBindingProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionBindingProperties#Multiple @@ -548,9 +158,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionBindingRetrievalProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionBindingRetrievalProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionBindingRetrievalProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionBindingRetrievalProperties#Multiple @@ -576,9 +186,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters#Multiple @@ -598,9 +208,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceInputColumn + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceInputColumn - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceInputColumn + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceInputColumn#Multiple @@ -632,9 +242,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceInputs + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceInputs - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceInputs + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceInputs#Multiple @@ -654,9 +264,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceOutputColumn + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceOutputColumn - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceOutputColumn + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceOutputColumn#Multiple @@ -688,9 +298,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionBindingProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionBindingProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionBindingProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionBindingProperties#Multiple @@ -722,9 +332,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionBindingRetrievalProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionBindingRetrievalProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionBindingRetrievalProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionBindingRetrievalProperties#Multiple @@ -750,9 +360,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters#Multiple @@ -772,9 +382,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputColumn + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputColumn - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputColumn + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputColumn#Multiple @@ -806,9 +416,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputs + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputs - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputs + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputs#Multiple @@ -828,9 +438,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioOutputColumn + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioOutputColumn - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioOutputColumn + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioOutputColumn#Multiple @@ -856,9 +466,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlDatabaseDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlDatabaseDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlDatabaseDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlDatabaseDataSourceProperties#Multiple @@ -920,9 +530,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlDatabaseOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlDatabaseOutputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlDatabaseOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlDatabaseOutputDataSourceProperties#Multiple @@ -984,9 +594,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlReferenceInputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlReferenceInputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlReferenceInputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlReferenceInputDataSourceProperties#Multiple @@ -1054,9 +664,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSynapseDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSynapseDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSynapseDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSynapseDataSourceProperties#Multiple @@ -1100,9 +710,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSynapseOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSynapseOutputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSynapseOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSynapseOutputDataSourceProperties#Multiple @@ -1146,9 +756,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureTableOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureTableOutputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureTableOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureTableOutputDataSourceProperties#Multiple @@ -1161,9 +771,6 @@ - - - @@ -1186,9 +793,6 @@ BatchSize - - ColumnsToRemove - PartitionKey @@ -1204,9 +808,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobDataSourceProperties#Multiple @@ -1244,9 +848,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobOutputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobOutputDataSourceProperties#Multiple @@ -1290,9 +894,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobReferenceInputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobReferenceInputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobReferenceInputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobReferenceInputDataSourceProperties#Multiple @@ -1330,9 +934,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobStreamInputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobStreamInputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobStreamInputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobStreamInputDataSourceProperties#Multiple @@ -1349,26 +953,212 @@ - + + + + + + + + Container + + + DateFormat + + + PathPattern + + + TimeFormat + + + SourcePartitionCount + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Cluster + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Cluster#Multiple + + + + + + + + + + + + + + + + + + + + + Location + + + Name + + + Etag + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterJob + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterJob#Multiple + + + + + + + + + + + + + + + JobState + + + StreamingUnit + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterJobListResult + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterJobListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterListResult + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterProperties + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + CapacityAllocated + + + CapacityAssigned + + + ClusterId + + + CreatedDate + + + ProvisioningState + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterSku + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterSku#Multiple + + + + + + + + - Container - - - DateFormat - - - PathPattern - - - TimeFormat + Capacity - SourcePartitionCount + Name @@ -1376,9 +1166,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionBindingProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionBindingProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionBindingProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionBindingProperties#Multiple @@ -1416,9 +1206,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionBindingRetrievalProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionBindingRetrievalProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionBindingRetrievalProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionBindingRetrievalProperties#Multiple @@ -1444,9 +1234,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionRetrieveDefaultDefinitionParameters + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionRetrieveDefaultDefinitionParameters - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionRetrieveDefaultDefinitionParameters + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionRetrieveDefaultDefinitionParameters#Multiple @@ -1466,9 +1256,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CsvSerializationProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CsvSerializationProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CsvSerializationProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CsvSerializationProperties#Multiple @@ -1494,9 +1284,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CustomClrSerializationProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CustomClrSerializationProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CustomClrSerializationProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CustomClrSerializationProperties#Multiple @@ -1522,9 +1312,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticCondition + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticCondition - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticCondition + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticCondition#Multiple @@ -1556,9 +1346,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DocumentDbOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DocumentDbOutputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DocumentDbOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DocumentDbOutputDataSourceProperties#Multiple @@ -1608,9 +1398,77 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ErrorResponse + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error1 + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error1#Multiple + + + + + + + + + + + + + + + + + + Code + + + Message + + + Target + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ErrorDetails + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ErrorDetails#Multiple + + + + + + + + + + + + + + + + + + Code + + + Message + + + Target + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ErrorResponse - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ErrorResponse + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ErrorResponse#Multiple @@ -1636,9 +1494,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubDataSourceProperties#Multiple @@ -1682,9 +1540,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubOutputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubOutputDataSourceProperties#Multiple @@ -1706,9 +1564,6 @@ - - - @@ -1731,18 +1586,15 @@ PartitionKey - - PropertyColumn - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubStreamInputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubStreamInputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubStreamInputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubStreamInputDataSourceProperties#Multiple @@ -1792,9 +1644,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.External + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.External - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.External + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.External#Multiple @@ -1820,9 +1672,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Function + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Function + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function#Multiple @@ -1832,6 +1684,9 @@ + + + @@ -1842,15 +1697,18 @@ ETag + + ResourceGroupName + - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionInput + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionInput - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionInput + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionInput#Multiple @@ -1876,9 +1734,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionListResult + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionListResult - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionListResult + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionListResult#Multiple @@ -1898,9 +1756,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionOutput + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionOutput - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionOutput + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionOutput#Multiple @@ -1920,9 +1778,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionRetrieveDefaultDefinitionParameters + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionRetrieveDefaultDefinitionParameters - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionRetrieveDefaultDefinitionParameters + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionRetrieveDefaultDefinitionParameters#Multiple @@ -1942,9 +1800,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Identity + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Identity - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Identity + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Identity#Multiple @@ -1970,9 +1828,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Input + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Input + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input#Multiple @@ -1982,6 +1840,9 @@ + + + @@ -1992,15 +1853,18 @@ ETag + + ResourceGroupName + - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputListResult + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputListResult - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputListResult + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputListResult#Multiple @@ -2020,9 +1884,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputProperties#Multiple @@ -2042,9 +1906,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IoTHubStreamInputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IoTHubStreamInputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IoTHubStreamInputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IoTHubStreamInputDataSourceProperties#Multiple @@ -2088,9 +1952,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionBindingProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionBindingProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionBindingProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionBindingProperties#Multiple @@ -2110,9 +1974,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionBindingRetrievalProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionBindingRetrievalProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionBindingRetrievalProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionBindingRetrievalProperties#Multiple @@ -2138,9 +2002,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionRetrieveDefaultDefinitionParameters + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionRetrieveDefaultDefinitionParameters - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionRetrieveDefaultDefinitionParameters + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionRetrieveDefaultDefinitionParameters#Multiple @@ -2160,9 +2024,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JobStorageAccount + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JobStorageAccount - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JobStorageAccount + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JobStorageAccount#Multiple @@ -2194,9 +2058,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JsonSerializationProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JsonSerializationProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JsonSerializationProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JsonSerializationProperties#Multiple @@ -2222,9 +2086,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OAuthBasedDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OAuthBasedDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OAuthBasedDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OAuthBasedDataSourceProperties#Multiple @@ -2256,9 +2120,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Operation + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Operation - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Operation + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Operation#Multiple @@ -2278,9 +2142,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OperationDisplay + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OperationDisplay - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OperationDisplay + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OperationDisplay#Multiple @@ -2318,9 +2182,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OperationListResult + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OperationListResult - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OperationListResult + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OperationListResult#Multiple @@ -2340,9 +2204,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Output + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Output + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output#Multiple @@ -2352,6 +2216,9 @@ + + + @@ -2362,15 +2229,18 @@ ETag + + ResourceGroupName + - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputListResult + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputListResult - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputListResult + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputListResult#Multiple @@ -2390,9 +2260,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputProperties#Multiple @@ -2418,9 +2288,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.PowerBiOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.PowerBiOutputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.PowerBiOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.PowerBiOutputDataSourceProperties#Multiple @@ -2482,9 +2352,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ReferenceInputProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ReferenceInputProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ReferenceInputProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ReferenceInputProperties#Multiple @@ -2504,9 +2374,31 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ResourceTestStatus + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Resource + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Resource#Multiple + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ResourceTestStatus - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ResourceTestStatus + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ResourceTestStatus#Multiple @@ -2526,9 +2418,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusDataSourceProperties#Multiple @@ -2566,9 +2458,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourceProperties#Multiple @@ -2584,9 +2476,6 @@ - - - @@ -2606,9 +2495,6 @@ SharedAccessPolicyName - - PropertyColumn - QueueName @@ -2618,9 +2504,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns#Multiple @@ -2640,9 +2526,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourceProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourceProperties#Multiple @@ -2658,9 +2544,6 @@ - - - @@ -2680,9 +2563,6 @@ SharedAccessPolicyName - - PropertyColumn - TopicName @@ -2692,9 +2572,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns#Multiple @@ -2714,9 +2594,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StartStreamingJobParameters + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StartStreamingJobParameters - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StartStreamingJobParameters + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StartStreamingJobParameters#Multiple @@ -2742,9 +2622,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccount + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccount - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccount + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccount#Multiple @@ -2770,9 +2650,79 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJob + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamAnalyticsIdentity + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamAnalyticsIdentity#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ClusterName + + + FunctionName + + + InputName + + + JobName + + + Location + + + OutputName + + + ResourceGroupName + + + SubscriptionId + + + TransformationName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJob - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJob + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJob#Multiple @@ -2785,6 +2735,9 @@ + + + @@ -2798,15 +2751,18 @@ ETag + + ResourceGroupName + - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobListResult + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobListResult - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobListResult + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobListResult#Multiple @@ -2826,9 +2782,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobProperties#Multiple @@ -2932,9 +2888,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobSku + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobSku - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobSku + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobSku#Multiple @@ -2954,9 +2910,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamInputProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamInputProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamInputProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamInputProperties#Multiple @@ -2976,9 +2932,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubResource + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubResource - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubResource + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubResource#Multiple @@ -2998,9 +2954,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubscriptionQuota + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubscriptionQuota - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubscriptionQuota + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubscriptionQuota#Multiple @@ -3020,9 +2976,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubscriptionQuotaProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubscriptionQuotaProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubscriptionQuotaProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubscriptionQuotaProperties#Multiple @@ -3048,9 +3004,59 @@ - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Transformation + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResource + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResource#Multiple + + + + + + + + + + + + + + + Name + + + Location + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResourceTags + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResourceTags#Multiple + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Transformation + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation#Multiple @@ -3060,6 +3066,9 @@ + + + @@ -3070,15 +3079,18 @@ ETag + + ResourceGroupName + - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.TransformationProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TransformationProperties - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.TransformationProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TransformationProperties#Multiple diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/Az.StreamAnalytics.psd1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/Az.StreamAnalytics.psd1 index 565c883bea01..419fedfa1ae6 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/Az.StreamAnalytics.psd1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/Az.StreamAnalytics.psd1 @@ -11,8 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.StreamAnalytics.private.dll' FormatsToProcess = './Az.StreamAnalytics.format.ps1xml' - FunctionsToExport = 'Get-AzStreamAnalyticsCluster', 'Get-AzStreamAnalyticsClusterStreamingJob', 'Get-AzStreamAnalyticsDefaultFunctionDefinition', 'Get-AzStreamAnalyticsFunction', 'Get-AzStreamAnalyticsInput', 'Get-AzStreamAnalyticsJob', 'Get-AzStreamAnalyticsOutput', 'Get-AzStreamAnalyticsQuota', 'Get-AzStreamAnalyticsTransformation', 'New-AzStreamAnalyticsCluster', 'New-AzStreamAnalyticsFunction', 'New-AzStreamAnalyticsInput', 'New-AzStreamAnalyticsJob', 'New-AzStreamAnalyticsOutput', 'New-AzStreamAnalyticsTransformation', 'Remove-AzStreamAnalyticsCluster', 'Remove-AzStreamAnalyticsFunction', 'Remove-AzStreamAnalyticsInput', 'Remove-AzStreamAnalyticsJob', 'Remove-AzStreamAnalyticsOutput', 'Start-AzStreamAnalyticsJob', 'Stop-AzStreamAnalyticsJob', 'Test-AzStreamAnalyticsFunction', 'Test-AzStreamAnalyticsInput', 'Test-AzStreamAnalyticsOutput', 'Update-AzStreamAnalyticsCluster', 'Update-AzStreamAnalyticsFunction', 'Update-AzStreamAnalyticsInput', 'Update-AzStreamAnalyticsJob', 'Update-AzStreamAnalyticsOutput', 'Update-AzStreamAnalyticsTransformation', '*' - AliasesToExport = '*' + FunctionsToExport = 'Get-AzStreamAnalyticsCluster', 'Get-AzStreamAnalyticsClusterStreamingJob', 'Get-AzStreamAnalyticsDefaultFunctionDefinition', 'Get-AzStreamAnalyticsFunction', 'Get-AzStreamAnalyticsInput', 'Get-AzStreamAnalyticsJob', 'Get-AzStreamAnalyticsOutput', 'Get-AzStreamAnalyticsQuota', 'Get-AzStreamAnalyticsTransformation', 'New-AzStreamAnalyticsCluster', 'New-AzStreamAnalyticsFunction', 'New-AzStreamAnalyticsInput', 'New-AzStreamAnalyticsJob', 'New-AzStreamAnalyticsOutput', 'New-AzStreamAnalyticsTransformation', 'Remove-AzStreamAnalyticsCluster', 'Remove-AzStreamAnalyticsFunction', 'Remove-AzStreamAnalyticsInput', 'Remove-AzStreamAnalyticsJob', 'Remove-AzStreamAnalyticsOutput', 'Start-AzStreamAnalyticsJob', 'Stop-AzStreamAnalyticsJob', 'Test-AzStreamAnalyticsFunction', 'Test-AzStreamAnalyticsInput', 'Test-AzStreamAnalyticsOutput', 'Update-AzStreamAnalyticsCluster', 'Update-AzStreamAnalyticsFunction', 'Update-AzStreamAnalyticsInput', 'Update-AzStreamAnalyticsJob', 'Update-AzStreamAnalyticsOutput', 'Update-AzStreamAnalyticsTransformation' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'StreamAnalytics' diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/check-dependencies.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/check-dependencies.ps1 index c29591c7bfe1..90ca9867ae40 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/check-dependencies.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/check-dependencies.ps1 @@ -12,13 +12,13 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources) +param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources) $ErrorActionPreference = 'Stop' -if(-not $Isolated) { +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path - & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsCluster.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsCluster.ps1 index d63f36da3855..f4657b2393ef 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsCluster.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsCluster.ps1 @@ -31,7 +31,7 @@ Get-AzStreamAnalyticsCluster -ResourceGroupName pwshaz-rg-test -Name sac-m-test0 .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster .Notes COMPLEX PARAMETER PROPERTIES @@ -52,7 +52,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticscluster #> function Get-AzStreamAnalyticsCluster { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -83,7 +83,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -142,6 +141,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -166,9 +174,7 @@ begin { List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsCluster_List'; List1 = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsCluster_List1'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -182,6 +188,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsClusterStreamingJob.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsClusterStreamingJob.ps1 index 87a48c55462c..1e371a3acc6a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsClusterStreamingJob.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsClusterStreamingJob.ps1 @@ -23,12 +23,12 @@ Lists all of the streaming jobs in the given cluster. Get-AzStreamAnalyticsClusterStreamingJob -ResourceGroupName pwshaz-rg-test -ClusterName sac-m-test01 .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsclusterstreamingjob #> function Get-AzStreamAnalyticsClusterStreamingJob { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -107,6 +107,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -128,9 +137,7 @@ begin { $mapping = @{ List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsClusterStreamingJob_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -144,6 +151,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsDefaultFunctionDefinition.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsDefaultFunctionDefinition.ps1 index f8f390fcce99..765cccb7f21e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsDefaultFunctionDefinition.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsDefaultFunctionDefinition.ps1 @@ -23,16 +23,16 @@ Retrieves the default definition of a function based on the parameters specified Get-AzStreamAnalyticsDefaultFunctionDefinition -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name mlsfunction-01 -BindingType Microsoft.MachineLearningServices -Endpoint "http://875da830-4d5f-44f1-b221-718a5f26a21d.eastus.azurecontainer.io/score"-UdfType Scalar .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsdefaultfunctiondefinition #> function Get-AzStreamAnalyticsDefaultFunctionDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction])] [CmdletBinding(DefaultParameterSetName='RetrieveExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -70,7 +70,7 @@ param( ${Endpoint}, [Parameter(Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -139,6 +139,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -160,9 +169,7 @@ begin { $mapping = @{ RetrieveExpanded = 'Az.StreamAnalytics.custom\Get-AzStreamAnalyticsDefaultFunctionDefinition'; } - if (('RetrieveExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('RetrieveExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -176,6 +183,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsFunction.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsFunction.ps1 index 3d913edada33..0d17d1eb5591 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsFunction.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsFunction.ps1 @@ -29,7 +29,7 @@ New-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-01 .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Notes COMPLEX PARAMETER PROPERTIES @@ -46,11 +46,23 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsfunction #> function Get-AzStreamAnalyticsFunction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -61,6 +73,7 @@ param( ${JobName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory)] [Alias('FunctionName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -87,9 +100,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Query')] [System.String] @@ -155,6 +173,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -176,11 +203,10 @@ begin { $mapping = @{ Get = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsFunction_Get'; GetViaIdentity = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsFunction_GetViaIdentity'; + GetViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsFunction_GetViaIdentityStreamingjob'; List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsFunction_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -194,6 +220,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsInput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsInput.ps1 index 3f0c8ca0ad36..96fe47ad99be 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsInput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsInput.ps1 @@ -29,7 +29,7 @@ New-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-01-po .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Notes COMPLEX PARAMETER PROPERTIES @@ -46,11 +46,23 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsinput #> function Get-AzStreamAnalyticsInput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -61,6 +73,7 @@ param( ${JobName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory)] [Alias('InputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -87,9 +100,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Query')] [System.String] @@ -155,6 +173,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -176,11 +203,10 @@ begin { $mapping = @{ Get = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsInput_Get'; GetViaIdentity = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsInput_GetViaIdentity'; + GetViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsInput_GetViaIdentityStreamingjob'; List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsInput_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -194,6 +220,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsJob.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsJob.ps1 index 808cdf68ed19..200e48561c86 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsJob.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsJob.ps1 @@ -31,7 +31,7 @@ New-AzStreamAnalyticsJob -ResourceGroupName lucas-rg-test -Name sajob-02-pwsh -L .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob .Notes COMPLEX PARAMETER PROPERTIES @@ -52,7 +52,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsjob #> function Get-AzStreamAnalyticsJob { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -82,7 +82,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -149,6 +148,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -173,9 +181,7 @@ begin { List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsJob_List'; List1 = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsJob_List1'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -189,6 +195,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsOutput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsOutput.ps1 index a28ed9addce8..2e72c3cb3a18 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsOutput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsOutput.ps1 @@ -24,12 +24,12 @@ Get-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-02-p .Example Get-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name output-01 .Example -New-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-portal -Name output-05 -File .\test\template-json\StroageAccount.json | Get-AzStreamAnalyticsOutput +New-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-portal -Name output-05 -File .\test\template-json\StorageAccount.json | Get-AzStreamAnalyticsOutput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Notes COMPLEX PARAMETER PROPERTIES @@ -46,11 +46,23 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsoutput #> function Get-AzStreamAnalyticsOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -61,6 +73,7 @@ param( ${JobName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory)] [Alias('OutputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -87,9 +100,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Query')] [System.String] @@ -155,6 +173,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -176,11 +203,10 @@ begin { $mapping = @{ Get = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsOutput_Get'; GetViaIdentity = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsOutput_GetViaIdentity'; + GetViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsOutput_GetViaIdentityStreamingjob'; List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsOutput_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -194,6 +220,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsQuota.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsQuota.ps1 index 2191d50fe1ac..7643bf042d45 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsQuota.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsQuota.ps1 @@ -23,12 +23,12 @@ Retrieves the subscription's current quota information in a particular region. Get-AzStreamAnalyticsQuota -Location 'WestCentralUS' .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsquota #> function Get-AzStreamAnalyticsQuota { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -101,6 +101,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -122,9 +131,7 @@ begin { $mapping = @{ List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsQuota_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -138,6 +145,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsTransformation.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsTransformation.ps1 index 00ee7664325d..6eeaf05b4399 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsTransformation.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Get-AzStreamAnalyticsTransformation.ps1 @@ -27,7 +27,7 @@ New-AzStreamAnalyticsTransformation -ResourceGroupName azure-rg-test -JobName sa .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation .Notes COMPLEX PARAMETER PROPERTIES @@ -44,11 +44,23 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticstransformation #> function Get-AzStreamAnalyticsTransformation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -58,6 +70,7 @@ param( ${JobName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory)] [Alias('TransformationName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -82,9 +95,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -141,6 +159,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -162,10 +189,9 @@ begin { $mapping = @{ Get = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsTransformation_Get'; GetViaIdentity = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsTransformation_GetViaIdentity'; + GetViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsTransformation_GetViaIdentityStreamingjob'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -179,6 +205,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsCluster.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsCluster.ps1 index b274fc8cfbdd..95aa81186134 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsCluster.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsCluster.ps1 @@ -16,19 +16,19 @@ <# .Synopsis -Creates a Stream Analytics Cluster or replaces an already existing cluster. +Create a Stream Analytics Cluster or replaces an already existing cluster. .Description -Creates a Stream Analytics Cluster or replaces an already existing cluster. +Create a Stream Analytics Cluster or replaces an already existing cluster. .Example New-AzStreamAnalyticsCluster -ResourceGroupName pwshaz-rg-test -Name sac-ps-test01 -Location "West Central US" -SkuName "Default" -SkuCapacity 36 .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticscluster #> function New-AzStreamAnalyticsCluster { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -67,13 +67,13 @@ param( # Other values will result in a 412 Pre-condition Failed response. ${IfNoneMatch}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Int32] # Denotes the number of streaming units the cluster can support. @@ -81,21 +81,33 @@ param( # Required on PUT (CreateOrUpdate) requests. ${SkuCapacity}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName])] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Default")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName] + [System.String] # Specifies the SKU name of the cluster. # Required on PUT (CreateOrUpdate) requests. ${SkuName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -164,6 +176,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -184,10 +205,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsCluster_CreateExpanded'; + CreateViaJsonFilePath = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsCluster_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsCluster_CreateViaJsonString'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -201,6 +222,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsFunction.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsFunction.ps1 index fe950408ffad..439360310a4e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsFunction.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsFunction.ps1 @@ -25,16 +25,16 @@ New-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-02 New-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name function-01 -File .\test\template-json\MachineLearningServices.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsfunction #> function New-AzStreamAnalyticsFunction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction])] [CmdletBinding(DefaultParameterSetName='Create', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -141,6 +141,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -162,9 +171,7 @@ begin { $mapping = @{ Create = 'Az.StreamAnalytics.custom\New-AzStreamAnalyticsFunction'; } - if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -178,6 +185,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsInput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsInput.ps1 index ccbe0a51b335..206fb4a10371 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsInput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsInput.ps1 @@ -25,16 +25,16 @@ New-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-02-pw New-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name input-01 -File .\test\template-json\IotHub.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsinput #> function New-AzStreamAnalyticsInput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput])] [CmdletBinding(DefaultParameterSetName='Create', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -140,6 +140,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -161,9 +170,7 @@ begin { $mapping = @{ Create = 'Az.StreamAnalytics.custom\New-AzStreamAnalyticsInput'; } - if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -177,6 +184,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsJob.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsJob.ps1 index bba1c3032549..2d45b8218c53 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsJob.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsJob.ps1 @@ -22,17 +22,17 @@ Creates a streaming job or replaces an already existing streaming job. .Example New-AzStreamAnalyticsJob -ResourceGroupName azure-rg-test -Name sajob-02-pwsh -Location westcentralus -SkuName Standard -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsjob #> function New-AzStreamAnalyticsJob { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -77,17 +77,17 @@ param( ${Location}, [Parameter(Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Standard")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName] + [System.String] # The name of the SKU. # Required on PUT (CreateOrReplace) requests. ${SkuName}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("1.0")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel] + [System.String] # Controls certain runtime behaviors of the streaming job. ${CompatibilityLevel}, @@ -114,16 +114,16 @@ param( ${EventsOutOfOrderMaxDelayInSecond}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Adjust", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy] + [System.String] # Indicates the policy to apply to events that arrive out of order in the input event stream. ${EventsOutOfOrderPolicy}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Stop", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy] + [System.String] # Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size). ${OutputErrorPolicy}, @@ -135,7 +135,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -207,6 +207,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -228,9 +237,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.StreamAnalytics.custom\New-AzStreamAnalyticsJob'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -244,6 +251,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsOutput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsOutput.ps1 index a4dee88b0dd8..28d5c24f9e9e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsOutput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsOutput.ps1 @@ -20,19 +20,19 @@ Creates an output or replaces an already existing output under an existing strea .Description Creates an output or replaces an already existing output under an existing streaming job. .Example -New-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name output-01 -File .\test\template-json\StroageAccount.json +New-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name output-01 -File .\test\template-json\StorageAccount.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsoutput #> function New-AzStreamAnalyticsOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput])] [CmdletBinding(DefaultParameterSetName='Create', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -138,6 +138,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -159,9 +168,7 @@ begin { $mapping = @{ Create = 'Az.StreamAnalytics.custom\New-AzStreamAnalyticsOutput'; } - if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -175,6 +182,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsTransformation.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsTransformation.ps1 index fd27b5578357..c938bc7973f5 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsTransformation.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/New-AzStreamAnalyticsTransformation.ps1 @@ -16,27 +16,39 @@ <# .Synopsis -Creates a transformation or replaces an already existing transformation under an existing streaming job. +Create a transformation or replaces an already existing transformation under an existing streaming job. .Description -Creates a transformation or replaces an already existing transformation under an existing streaming job. +Create a transformation or replaces an already existing transformation under an existing streaming job. .Example New-AzStreamAnalyticsTransformation -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name tranf-01 -StreamingUnit 6 -Query "Select Id, Name from input-01" +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation +.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. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticstransformation #> function New-AzStreamAnalyticsTransformation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] - [System.String] - # The name of the streaming job. - ${JobName}, - [Parameter(Mandatory)] [Alias('TransformationName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] @@ -44,20 +56,38 @@ param( # The name of the transformation. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [System.String] + # The name of the streaming job. + ${JobName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -73,7 +103,8 @@ param( # Other values will result in a 412 Pre-condition Failed response. ${IfNoneMatch}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # Specifies the query that will be run in the streaming job. @@ -81,12 +112,25 @@ param( # Required on PUT (CreateOrReplace) requests. ${Query}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Int32] # Specifies the number of streaming units that the streaming job uses. ${StreamingUnit}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -143,6 +187,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -163,10 +216,11 @@ begin { $mapping = @{ CreateExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsTransformation_CreateExpanded'; + CreateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsTransformation_CreateViaIdentityStreamingjobExpanded'; + CreateViaJsonFilePath = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsTransformation_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsTransformation_CreateViaJsonString'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -180,6 +234,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/ProxyCmdletDefinitions.ps1 index 3496843dd091..20fd50d87361 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -23,12 +23,12 @@ Lists all of the streaming jobs in the given cluster. Get-AzStreamAnalyticsClusterStreamingJob -ResourceGroupName pwshaz-rg-test -ClusterName sac-m-test01 .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsclusterstreamingjob #> function Get-AzStreamAnalyticsClusterStreamingJob { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -107,6 +107,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -128,9 +137,7 @@ begin { $mapping = @{ List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsClusterStreamingJob_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -144,6 +151,9 @@ begin { [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) @@ -204,7 +214,7 @@ Get-AzStreamAnalyticsCluster -ResourceGroupName pwshaz-rg-test -Name sac-m-test0 .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster .Notes COMPLEX PARAMETER PROPERTIES @@ -225,7 +235,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticscluster #> function Get-AzStreamAnalyticsCluster { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -256,7 +266,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -315,6 +324,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -339,9 +357,7 @@ begin { List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsCluster_List'; List1 = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsCluster_List1'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -355,6 +371,9 @@ begin { [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) @@ -413,7 +432,7 @@ New-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-01 .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Notes COMPLEX PARAMETER PROPERTIES @@ -430,11 +449,23 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsfunction #> function Get-AzStreamAnalyticsFunction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -445,6 +476,7 @@ param( ${JobName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory)] [Alias('FunctionName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -471,9 +503,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Query')] [System.String] @@ -539,6 +576,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -560,11 +606,10 @@ begin { $mapping = @{ Get = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsFunction_Get'; GetViaIdentity = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsFunction_GetViaIdentity'; + GetViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsFunction_GetViaIdentityStreamingjob'; List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsFunction_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -578,6 +623,9 @@ begin { [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) @@ -636,7 +684,7 @@ New-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-01-po .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Notes COMPLEX PARAMETER PROPERTIES @@ -653,11 +701,23 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsinput #> function Get-AzStreamAnalyticsInput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -668,6 +728,7 @@ param( ${JobName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory)] [Alias('InputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -694,9 +755,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Query')] [System.String] @@ -762,6 +828,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -783,11 +858,10 @@ begin { $mapping = @{ Get = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsInput_Get'; GetViaIdentity = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsInput_GetViaIdentity'; + GetViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsInput_GetViaIdentityStreamingjob'; List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsInput_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -801,6 +875,9 @@ begin { [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) @@ -861,7 +938,7 @@ New-AzStreamAnalyticsJob -ResourceGroupName lucas-rg-test -Name sajob-02-pwsh -L .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob .Notes COMPLEX PARAMETER PROPERTIES @@ -882,7 +959,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsjob #> function Get-AzStreamAnalyticsJob { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob])] [CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -912,7 +989,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -979,6 +1055,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -1003,9 +1088,7 @@ begin { List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsJob_List'; List1 = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsJob_List1'; } - if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1019,6 +1102,9 @@ begin { [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) @@ -1072,12 +1158,12 @@ Get-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-02-p .Example Get-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name output-01 .Example -New-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-portal -Name output-05 -File .\test\template-json\StroageAccount.json | Get-AzStreamAnalyticsOutput +New-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-portal -Name output-05 -File .\test\template-json\StorageAccount.json | Get-AzStreamAnalyticsOutput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Notes COMPLEX PARAMETER PROPERTIES @@ -1094,11 +1180,23 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsoutput #> function Get-AzStreamAnalyticsOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -1109,6 +1207,7 @@ param( ${JobName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory)] [Alias('OutputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -1135,9 +1234,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Query')] [System.String] @@ -1203,6 +1307,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -1224,11 +1337,10 @@ begin { $mapping = @{ Get = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsOutput_Get'; GetViaIdentity = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsOutput_GetViaIdentity'; + GetViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsOutput_GetViaIdentityStreamingjob'; List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsOutput_List'; } - if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1242,6 +1354,9 @@ begin { [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) @@ -1294,12 +1409,12 @@ Retrieves the subscription's current quota information in a particular region. Get-AzStreamAnalyticsQuota -Location 'WestCentralUS' .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsquota #> function Get-AzStreamAnalyticsQuota { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] @@ -1372,6 +1487,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -1393,9 +1517,7 @@ begin { $mapping = @{ List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsQuota_List'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1409,6 +1531,9 @@ begin { [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) @@ -1465,7 +1590,7 @@ New-AzStreamAnalyticsTransformation -ResourceGroupName azure-rg-test -JobName sa .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation .Notes COMPLEX PARAMETER PROPERTIES @@ -1482,11 +1607,23 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticstransformation #> function Get-AzStreamAnalyticsTransformation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -1496,6 +1633,7 @@ param( ${JobName}, [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory)] [Alias('TransformationName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -1520,9 +1658,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='GetViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1579,6 +1722,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -1600,10 +1752,9 @@ begin { $mapping = @{ Get = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsTransformation_Get'; GetViaIdentity = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsTransformation_GetViaIdentity'; + GetViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsTransformation_GetViaIdentityStreamingjob'; } - if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1617,6 +1768,9 @@ begin { [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) @@ -1662,19 +1816,19 @@ end { <# .Synopsis -Creates a Stream Analytics Cluster or replaces an already existing cluster. +Create a Stream Analytics Cluster or replaces an already existing cluster. .Description -Creates a Stream Analytics Cluster or replaces an already existing cluster. +Create a Stream Analytics Cluster or replaces an already existing cluster. .Example New-AzStreamAnalyticsCluster -ResourceGroupName pwshaz-rg-test -Name sac-ps-test01 -Location "West Central US" -SkuName "Default" -SkuCapacity 36 .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticscluster #> function New-AzStreamAnalyticsCluster { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -1713,13 +1867,13 @@ param( # Other values will result in a 412 Pre-condition Failed response. ${IfNoneMatch}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Int32] # Denotes the number of streaming units the cluster can support. @@ -1727,21 +1881,33 @@ param( # Required on PUT (CreateOrUpdate) requests. ${SkuCapacity}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName])] + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Default")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName] + [System.String] # Specifies the SKU name of the cluster. # Required on PUT (CreateOrUpdate) requests. ${SkuName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1810,6 +1976,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -1830,10 +2005,10 @@ begin { $mapping = @{ CreateExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsCluster_CreateExpanded'; + CreateViaJsonFilePath = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsCluster_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsCluster_CreateViaJsonString'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1847,6 +2022,9 @@ begin { [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) @@ -1892,27 +2070,39 @@ end { <# .Synopsis -Creates a transformation or replaces an already existing transformation under an existing streaming job. +Create a transformation or replaces an already existing transformation under an existing streaming job. .Description -Creates a transformation or replaces an already existing transformation under an existing streaming job. +Create a transformation or replaces an already existing transformation under an existing streaming job. .Example New-AzStreamAnalyticsTransformation -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name tranf-01 -StreamingUnit 6 -Query "Select Id, Name from input-01" +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation +.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. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticstransformation #> function New-AzStreamAnalyticsTransformation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] - [System.String] - # The name of the streaming job. - ${JobName}, - [Parameter(Mandatory)] [Alias('TransformationName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] @@ -1920,20 +2110,38 @@ param( # The name of the transformation. ${Name}, - [Parameter(Mandatory)] + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [System.String] + # The name of the streaming job. + ${JobName}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -1949,7 +2157,8 @@ param( # Other values will result in a 412 Pre-condition Failed response. ${IfNoneMatch}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # Specifies the query that will be run in the streaming job. @@ -1957,12 +2166,25 @@ param( # Required on PUT (CreateOrReplace) requests. ${Query}, - [Parameter()] + [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Int32] # Specifies the number of streaming units that the streaming job uses. ${StreamingUnit}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2019,6 +2241,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -2039,10 +2270,11 @@ begin { $mapping = @{ CreateExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsTransformation_CreateExpanded'; + CreateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsTransformation_CreateViaIdentityStreamingjobExpanded'; + CreateViaJsonFilePath = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsTransformation_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsTransformation_CreateViaJsonString'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2056,6 +2288,9 @@ begin { [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) @@ -2163,7 +2398,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -2240,6 +2474,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -2262,9 +2505,7 @@ begin { Delete = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsCluster_Delete'; DeleteViaIdentity = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsCluster_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2278,6 +2519,9 @@ begin { [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) @@ -2353,6 +2597,18 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/remove-azstreamanalyticsfunction #> @@ -2367,6 +2623,7 @@ param( ${JobName}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStreamingjob', Mandatory)] [Alias('FunctionName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -2391,9 +2648,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2456,6 +2718,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -2477,10 +2748,9 @@ begin { $mapping = @{ Delete = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsFunction_Delete'; DeleteViaIdentity = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsFunction_DeleteViaIdentity'; + DeleteViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsFunction_DeleteViaIdentityStreamingjob'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2494,6 +2764,9 @@ begin { [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) @@ -2569,6 +2842,18 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/remove-azstreamanalyticsinput #> @@ -2583,6 +2868,7 @@ param( ${JobName}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStreamingjob', Mandatory)] [Alias('InputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -2607,9 +2893,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2672,6 +2963,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -2693,10 +2993,9 @@ begin { $mapping = @{ Delete = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsInput_Delete'; DeleteViaIdentity = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsInput_DeleteViaIdentity'; + DeleteViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsInput_DeleteViaIdentityStreamingjob'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2710,6 +3009,9 @@ begin { [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) @@ -2816,7 +3118,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -2893,6 +3194,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -2915,9 +3225,7 @@ begin { Delete = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsJob_Delete'; DeleteViaIdentity = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsJob_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2931,6 +3239,9 @@ begin { [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) @@ -3006,6 +3317,18 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/remove-azstreamanalyticsoutput #> @@ -3020,6 +3343,7 @@ param( ${JobName}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStreamingjob', Mandatory)] [Alias('OutputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -3044,9 +3368,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3109,6 +3438,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -3130,10 +3468,9 @@ begin { $mapping = @{ Delete = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsOutput_Delete'; DeleteViaIdentity = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsOutput_DeleteViaIdentity'; + DeleteViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsOutput_DeleteViaIdentityStreamingjob'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3147,6 +3484,9 @@ begin { [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) @@ -3232,12 +3572,16 @@ function Start-AzStreamAnalyticsJob { [CmdletBinding(DefaultParameterSetName='StartExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='StartExpanded', Mandatory)] + [Parameter(ParameterSetName='StartViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='StartViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. ${Name}, [Parameter(ParameterSetName='StartExpanded', Mandatory)] + [Parameter(ParameterSetName='StartViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='StartViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -3245,6 +3589,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='StartExpanded')] + [Parameter(ParameterSetName='StartViaJsonFilePath')] + [Parameter(ParameterSetName='StartViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -3255,23 +3601,36 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode])] + [Parameter(ParameterSetName='StartExpanded')] + [Parameter(ParameterSetName='StartViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode] + [System.String] # Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time. ${OutputStartMode}, - [Parameter()] + [Parameter(ParameterSetName='StartExpanded')] + [Parameter(ParameterSetName='StartViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.DateTime] # Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. # This property must have a value if outputStartMode is set to CustomTime. ${OutputStartTime}, + [Parameter(ParameterSetName='StartViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Start operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='StartViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Start operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3346,6 +3705,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -3367,10 +3735,10 @@ begin { $mapping = @{ StartExpanded = 'Az.StreamAnalytics.private\Start-AzStreamAnalyticsJob_StartExpanded'; StartViaIdentityExpanded = 'Az.StreamAnalytics.private\Start-AzStreamAnalyticsJob_StartViaIdentityExpanded'; + StartViaJsonFilePath = 'Az.StreamAnalytics.private\Start-AzStreamAnalyticsJob_StartViaJsonFilePath'; + StartViaJsonString = 'Az.StreamAnalytics.private\Start-AzStreamAnalyticsJob_StartViaJsonString'; } - if (('StartExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('StartExpanded', 'StartViaJsonFilePath', 'StartViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3384,6 +3752,9 @@ begin { [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) @@ -3492,7 +3863,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -3569,6 +3939,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -3591,9 +3970,7 @@ begin { Stop = 'Az.StreamAnalytics.private\Stop-AzStreamAnalyticsJob_Stop'; StopViaIdentity = 'Az.StreamAnalytics.private\Stop-AzStreamAnalyticsJob_StopViaIdentity'; } - if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3607,6 +3984,9 @@ begin { [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) @@ -3652,11 +4032,11 @@ end { <# .Synopsis -Updates an existing cluster. +Update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without affecting the rest of the cluster definition. .Description -Updates an existing cluster. +Update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without affecting the rest of the cluster definition. .Example @@ -3668,7 +4048,7 @@ Update-AzStreamAnalyticsCluster -InputObject $sac -Tag @{'key2'=2;'key3'=3} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster .Notes COMPLEX PARAMETER PROPERTIES @@ -3689,10 +4069,12 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticscluster #> function Update-AzStreamAnalyticsCluster { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('ClusterName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -3700,6 +4082,8 @@ param( ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -3707,6 +4091,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -3717,7 +4103,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -3728,13 +4113,8 @@ param( # Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. ${IfMatch}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Int32] # Denotes the number of streaming units the cluster can support. @@ -3742,21 +4122,35 @@ param( # Required on PUT (CreateOrUpdate) requests. ${SkuCapacity}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName])] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Default")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName] + [System.String] # Specifies the SKU name of the cluster. # Required on PUT (CreateOrUpdate) requests. ${SkuName}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3825,6 +4219,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -3846,10 +4249,10 @@ begin { $mapping = @{ UpdateExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsCluster_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsCluster_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsCluster_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsCluster_UpdateViaJsonString'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3863,6 +4266,9 @@ begin { [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) @@ -3908,11 +4314,11 @@ end { <# .Synopsis -Updates an existing transformation under an existing streaming job. +Update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition. .Description -Updates an existing transformation under an existing streaming job. +Update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition. .Example @@ -3923,7 +4329,7 @@ Get-AzStreamAnalyticsTransformation -ResourceGroupName azure-rg-test -JobName sa .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation .Notes COMPLEX PARAMETER PROPERTIES @@ -3940,20 +4346,37 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticstransformation #> function Update-AzStreamAnalyticsTransformation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. ${JobName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('TransformationName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -3961,6 +4384,8 @@ param( ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -3968,6 +4393,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -3978,9 +4405,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -3989,7 +4421,9 @@ param( # Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. ${IfMatch}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # Specifies the query that will be run in the streaming job. @@ -3997,12 +4431,26 @@ param( # Required on PUT (CreateOrReplace) requests. ${Query}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Int32] # Specifies the number of streaming units that the streaming job uses. ${StreamingUnit}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -4059,6 +4507,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -4080,10 +4537,11 @@ begin { $mapping = @{ UpdateExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsTransformation_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsTransformation_UpdateViaIdentityExpanded'; + UpdateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsTransformation_UpdateViaIdentityStreamingjobExpanded'; + UpdateViaJsonFilePath = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsTransformation_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsTransformation_UpdateViaJsonString'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -4097,6 +4555,9 @@ begin { [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) @@ -4149,16 +4610,16 @@ Retrieves the default definition of a function based on the parameters specified Get-AzStreamAnalyticsDefaultFunctionDefinition -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name mlsfunction-01 -BindingType Microsoft.MachineLearningServices -Endpoint "http://875da830-4d5f-44f1-b221-718a5f26a21d.eastus.azurecontainer.io/score"-UdfType Scalar .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsdefaultfunctiondefinition #> function Get-AzStreamAnalyticsDefaultFunctionDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction])] [CmdletBinding(DefaultParameterSetName='RetrieveExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -4196,7 +4657,7 @@ param( ${Endpoint}, [Parameter(Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -4265,6 +4726,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -4286,9 +4756,7 @@ begin { $mapping = @{ RetrieveExpanded = 'Az.StreamAnalytics.custom\Get-AzStreamAnalyticsDefaultFunctionDefinition'; } - if (('RetrieveExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('RetrieveExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -4302,6 +4770,9 @@ begin { [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) @@ -4356,16 +4827,16 @@ New-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-02 New-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name function-01 -File .\test\template-json\MachineLearningServices.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsfunction #> function New-AzStreamAnalyticsFunction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction])] [CmdletBinding(DefaultParameterSetName='Create', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -4472,6 +4943,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -4493,9 +4973,7 @@ begin { $mapping = @{ Create = 'Az.StreamAnalytics.custom\New-AzStreamAnalyticsFunction'; } - if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -4509,6 +4987,9 @@ begin { [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) @@ -4563,16 +5044,16 @@ New-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-02-pw New-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name input-01 -File .\test\template-json\IotHub.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsinput #> function New-AzStreamAnalyticsInput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput])] [CmdletBinding(DefaultParameterSetName='Create', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -4678,6 +5159,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -4699,9 +5189,7 @@ begin { $mapping = @{ Create = 'Az.StreamAnalytics.custom\New-AzStreamAnalyticsInput'; } - if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -4715,6 +5203,9 @@ begin { [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) @@ -4766,17 +5257,17 @@ Creates a streaming job or replaces an already existing streaming job. .Example New-AzStreamAnalyticsJob -ResourceGroupName azure-rg-test -Name sajob-02-pwsh -Location westcentralus -SkuName Standard -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsjob #> function New-AzStreamAnalyticsJob { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -4821,17 +5312,17 @@ param( ${Location}, [Parameter(Mandatory)] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Standard")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName] + [System.String] # The name of the SKU. # Required on PUT (CreateOrReplace) requests. ${SkuName}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("1.0")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel] + [System.String] # Controls certain runtime behaviors of the streaming job. ${CompatibilityLevel}, @@ -4858,16 +5349,16 @@ param( ${EventsOutOfOrderMaxDelayInSecond}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Adjust", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy] + [System.String] # Indicates the policy to apply to events that arrive out of order in the input event stream. ${EventsOutOfOrderPolicy}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Stop", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy] + [System.String] # Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size). ${OutputErrorPolicy}, @@ -4879,7 +5370,7 @@ param( [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -4951,6 +5442,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -4972,9 +5472,7 @@ begin { $mapping = @{ CreateExpanded = 'Az.StreamAnalytics.custom\New-AzStreamAnalyticsJob'; } - if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -4988,6 +5486,9 @@ begin { [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) @@ -5037,19 +5538,19 @@ Creates an output or replaces an already existing output under an existing strea .Description Creates an output or replaces an already existing output under an existing streaming job. .Example -New-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name output-01 -File .\test\template-json\StroageAccount.json +New-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name output-01 -File .\test\template-json\StorageAccount.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsoutput #> function New-AzStreamAnalyticsOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput])] [CmdletBinding(DefaultParameterSetName='Create', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -5155,6 +5656,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -5176,9 +5686,7 @@ begin { $mapping = @{ Create = 'Az.StreamAnalytics.custom\New-AzStreamAnalyticsOutput'; } - if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Create') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -5192,6 +5700,9 @@ begin { [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) @@ -5246,16 +5757,16 @@ This can range from testing the connection to the underlying web service behind Test-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name mlsfunction-01 .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/test-azstreamanalyticsfunction #> function Test-AzStreamAnalyticsFunction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus])] [CmdletBinding(DefaultParameterSetName='TestExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -5346,6 +5857,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -5367,9 +5887,7 @@ begin { $mapping = @{ TestExpanded = 'Az.StreamAnalytics.custom\Test-AzStreamAnalyticsFunction'; } - if (('TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -5383,6 +5901,9 @@ begin { [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) @@ -5435,16 +5956,16 @@ Tests whether an input’s datasource is reachable and usable by the Azure Strea Test-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name input-01 .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/test-azstreamanalyticsinput #> function Test-AzStreamAnalyticsInput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus])] [CmdletBinding(DefaultParameterSetName='TestExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -5535,6 +6056,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -5556,9 +6086,7 @@ begin { $mapping = @{ TestExpanded = 'Az.StreamAnalytics.custom\Test-AzStreamAnalyticsInput'; } - if (('TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -5572,6 +6100,9 @@ begin { [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) @@ -5624,16 +6155,16 @@ Tests whether an output’s datasource is reachable and usable by the Azure Stre Test-AzStreamAnalyticsOutput -ResourceGroupName lucas-rg-test -JobName sajob-01-pwsh -Name output-01 .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/test-azstreamanalyticsoutput #> function Test-AzStreamAnalyticsOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus])] [CmdletBinding(DefaultParameterSetName='TestExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -5724,6 +6255,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -5745,9 +6285,7 @@ begin { $mapping = @{ TestExpanded = 'Az.StreamAnalytics.custom\Test-AzStreamAnalyticsOutput'; } - if (('TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -5761,6 +6299,9 @@ begin { [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) @@ -5821,13 +6362,13 @@ Get-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-01 .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the cluster. [FunctionName ]: The name of the function. [Id ]: Resource identity path @@ -5842,7 +6383,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsfunction #> function Update-AzStreamAnalyticsFunction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction])] [CmdletBinding(DefaultParameterSetName='Update', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -5949,6 +6490,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -5971,9 +6521,7 @@ begin { Update = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsFunction'; UpdateViaIdentity = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsFunction'; } - if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -5987,6 +6535,9 @@ begin { [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) @@ -6049,13 +6600,13 @@ Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdenti .Inputs System.String .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the cluster. [FunctionName ]: The name of the function. [Id ]: Resource identity path @@ -6070,7 +6621,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsinput #> function Update-AzStreamAnalyticsInput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput])] [CmdletBinding(DefaultParameterSetName='Update', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -6176,6 +6727,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -6198,9 +6758,7 @@ begin { Update = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsInput'; UpdateViaIdentity = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsInput'; } - if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -6214,6 +6772,9 @@ begin { [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) @@ -6270,13 +6831,13 @@ Get-AzStreamAnalyticsJob -ResourceGroupName azure-rg-test -Name sajob-01-pwsh | .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the cluster. [FunctionName ]: The name of the function. [Id ]: Resource identity path @@ -6291,7 +6852,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsjob #> function Update-AzStreamAnalyticsJob { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -6359,22 +6920,22 @@ param( ${EventsOutOfOrderMaxDelayInSecond}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Adjust", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy] + [System.String] # Indicates the policy to apply to events that arrive out of order in the input event stream. ${EventsOutOfOrderPolicy}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Stop", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy] + [System.String] # Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size). ${OutputErrorPolicy}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -6452,6 +7013,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -6474,9 +7044,7 @@ begin { UpdateExpanded = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsJob'; UpdateViaIdentityExpanded = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsJob'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -6490,6 +7058,9 @@ begin { [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) @@ -6543,22 +7114,22 @@ Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. .Example -Update-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01 -File .\test\template-json\StroageAccount.json +Update-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01 -File .\test\template-json\StorageAccount.json .Example -Get-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01| Update-AzStreamAnalyticsOutput -File .\test\template-json\StroageAccount.json +Get-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01| Update-AzStreamAnalyticsOutput -File .\test\template-json\StorageAccount.json .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Inputs System.String .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the cluster. [FunctionName ]: The name of the function. [Id ]: Resource identity path @@ -6573,7 +7144,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsoutput #> function Update-AzStreamAnalyticsOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput])] [CmdletBinding(DefaultParameterSetName='Update', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -6679,6 +7250,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -6701,9 +7281,7 @@ begin { Update = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsOutput'; UpdateViaIdentity = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsOutput'; } - if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -6717,6 +7295,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsCluster.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsCluster.ps1 index bcabcfb10600..b82e5a3c1acc 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsCluster.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsCluster.ps1 @@ -78,7 +78,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -155,6 +154,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -177,9 +185,7 @@ begin { Delete = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsCluster_Delete'; DeleteViaIdentity = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsCluster_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -193,6 +199,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsFunction.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsFunction.ps1 index 14c08138d9b3..779f2142d3f3 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsFunction.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsFunction.ps1 @@ -46,6 +46,18 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/remove-azstreamanalyticsfunction #> @@ -60,6 +72,7 @@ param( ${JobName}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStreamingjob', Mandatory)] [Alias('FunctionName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -84,9 +97,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -149,6 +167,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -170,10 +197,9 @@ begin { $mapping = @{ Delete = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsFunction_Delete'; DeleteViaIdentity = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsFunction_DeleteViaIdentity'; + DeleteViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsFunction_DeleteViaIdentityStreamingjob'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -187,6 +213,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsInput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsInput.ps1 index 1b3fa0285620..fdee73bd22c0 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsInput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsInput.ps1 @@ -46,6 +46,18 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/remove-azstreamanalyticsinput #> @@ -60,6 +72,7 @@ param( ${JobName}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStreamingjob', Mandatory)] [Alias('InputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -84,9 +97,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -149,6 +167,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -170,10 +197,9 @@ begin { $mapping = @{ Delete = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsInput_Delete'; DeleteViaIdentity = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsInput_DeleteViaIdentity'; + DeleteViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsInput_DeleteViaIdentityStreamingjob'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -187,6 +213,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsJob.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsJob.ps1 index 9f775c51d26f..108277a4f215 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsJob.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsJob.ps1 @@ -77,7 +77,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -154,6 +153,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -176,9 +184,7 @@ begin { Delete = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsJob_Delete'; DeleteViaIdentity = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsJob_DeleteViaIdentity'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -192,6 +198,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsOutput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsOutput.ps1 index a914f015aefd..194602a17d7f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsOutput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Remove-AzStreamAnalyticsOutput.ps1 @@ -46,6 +46,18 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/remove-azstreamanalyticsoutput #> @@ -60,6 +72,7 @@ param( ${JobName}, [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityStreamingjob', Mandatory)] [Alias('OutputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -84,9 +97,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -149,6 +167,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -170,10 +197,9 @@ begin { $mapping = @{ Delete = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsOutput_Delete'; DeleteViaIdentity = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsOutput_DeleteViaIdentity'; + DeleteViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Remove-AzStreamAnalyticsOutput_DeleteViaIdentityStreamingjob'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -187,6 +213,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Start-AzStreamAnalyticsJob.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Start-AzStreamAnalyticsJob.ps1 index 92b4b4ad1fcd..cf77b2dad952 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Start-AzStreamAnalyticsJob.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Start-AzStreamAnalyticsJob.ps1 @@ -56,12 +56,16 @@ function Start-AzStreamAnalyticsJob { [CmdletBinding(DefaultParameterSetName='StartExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='StartExpanded', Mandatory)] + [Parameter(ParameterSetName='StartViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='StartViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. ${Name}, [Parameter(ParameterSetName='StartExpanded', Mandatory)] + [Parameter(ParameterSetName='StartViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='StartViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -69,6 +73,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='StartExpanded')] + [Parameter(ParameterSetName='StartViaJsonFilePath')] + [Parameter(ParameterSetName='StartViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -79,23 +85,36 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode])] + [Parameter(ParameterSetName='StartExpanded')] + [Parameter(ParameterSetName='StartViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode] + [System.String] # Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time. ${OutputStartMode}, - [Parameter()] + [Parameter(ParameterSetName='StartExpanded')] + [Parameter(ParameterSetName='StartViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.DateTime] # Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. # This property must have a value if outputStartMode is set to CustomTime. ${OutputStartTime}, + [Parameter(ParameterSetName='StartViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Start operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='StartViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Start operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -170,6 +189,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -191,10 +219,10 @@ begin { $mapping = @{ StartExpanded = 'Az.StreamAnalytics.private\Start-AzStreamAnalyticsJob_StartExpanded'; StartViaIdentityExpanded = 'Az.StreamAnalytics.private\Start-AzStreamAnalyticsJob_StartViaIdentityExpanded'; + StartViaJsonFilePath = 'Az.StreamAnalytics.private\Start-AzStreamAnalyticsJob_StartViaJsonFilePath'; + StartViaJsonString = 'Az.StreamAnalytics.private\Start-AzStreamAnalyticsJob_StartViaJsonString'; } - if (('StartExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('StartExpanded', 'StartViaJsonFilePath', 'StartViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -208,6 +236,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Stop-AzStreamAnalyticsJob.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Stop-AzStreamAnalyticsJob.ps1 index f761d4b06955..5898bef0e204 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Stop-AzStreamAnalyticsJob.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Stop-AzStreamAnalyticsJob.ps1 @@ -79,7 +79,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -156,6 +155,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -178,9 +186,7 @@ begin { Stop = 'Az.StreamAnalytics.private\Stop-AzStreamAnalyticsJob_Stop'; StopViaIdentity = 'Az.StreamAnalytics.private\Stop-AzStreamAnalyticsJob_StopViaIdentity'; } - if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -194,6 +200,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Test-AzStreamAnalyticsFunction.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Test-AzStreamAnalyticsFunction.ps1 index 577ee707ee34..002bb430d566 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Test-AzStreamAnalyticsFunction.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Test-AzStreamAnalyticsFunction.ps1 @@ -25,16 +25,16 @@ This can range from testing the connection to the underlying web service behind Test-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name mlsfunction-01 .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/test-azstreamanalyticsfunction #> function Test-AzStreamAnalyticsFunction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus])] [CmdletBinding(DefaultParameterSetName='TestExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -125,6 +125,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -146,9 +155,7 @@ begin { $mapping = @{ TestExpanded = 'Az.StreamAnalytics.custom\Test-AzStreamAnalyticsFunction'; } - if (('TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -162,6 +169,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Test-AzStreamAnalyticsInput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Test-AzStreamAnalyticsInput.ps1 index 863dbaf6b990..a0c76776d163 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Test-AzStreamAnalyticsInput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Test-AzStreamAnalyticsInput.ps1 @@ -23,16 +23,16 @@ Tests whether an input’s datasource is reachable and usable by the Azure Strea Test-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name input-01 .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/test-azstreamanalyticsinput #> function Test-AzStreamAnalyticsInput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus])] [CmdletBinding(DefaultParameterSetName='TestExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -123,6 +123,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -144,9 +153,7 @@ begin { $mapping = @{ TestExpanded = 'Az.StreamAnalytics.custom\Test-AzStreamAnalyticsInput'; } - if (('TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -160,6 +167,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Test-AzStreamAnalyticsOutput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Test-AzStreamAnalyticsOutput.ps1 index f373ce36e578..d34a3473d6b2 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Test-AzStreamAnalyticsOutput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Test-AzStreamAnalyticsOutput.ps1 @@ -23,16 +23,16 @@ Tests whether an output’s datasource is reachable and usable by the Azure Stre Test-AzStreamAnalyticsOutput -ResourceGroupName lucas-rg-test -JobName sajob-01-pwsh -Name output-01 .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/test-azstreamanalyticsoutput #> function Test-AzStreamAnalyticsOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus])] [CmdletBinding(DefaultParameterSetName='TestExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -123,6 +123,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -144,9 +153,7 @@ begin { $mapping = @{ TestExpanded = 'Az.StreamAnalytics.custom\Test-AzStreamAnalyticsOutput'; } - if (('TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -160,6 +167,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsCluster.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsCluster.ps1 index 2dc3f9a04924..e25678b04b15 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsCluster.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsCluster.ps1 @@ -16,11 +16,11 @@ <# .Synopsis -Updates an existing cluster. +Update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without affecting the rest of the cluster definition. .Description -Updates an existing cluster. +Update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without affecting the rest of the cluster definition. .Example @@ -32,7 +32,7 @@ Update-AzStreamAnalyticsCluster -InputObject $sac -Tag @{'key2'=2;'key3'=3} .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster .Notes COMPLEX PARAMETER PROPERTIES @@ -53,10 +53,12 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticscluster #> function Update-AzStreamAnalyticsCluster { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('ClusterName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -64,6 +66,8 @@ param( ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -71,6 +75,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -81,7 +87,6 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -92,13 +97,8 @@ param( # Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. ${IfMatch}, - [Parameter()] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Int32] # Denotes the number of streaming units the cluster can support. @@ -106,21 +106,35 @@ param( # Required on PUT (CreateOrUpdate) requests. ${SkuCapacity}, - [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName])] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Default")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName] + [System.String] # Specifies the SKU name of the cluster. # Required on PUT (CreateOrUpdate) requests. ${SkuName}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -189,6 +203,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -210,10 +233,10 @@ begin { $mapping = @{ UpdateExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsCluster_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsCluster_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsCluster_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsCluster_UpdateViaJsonString'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -227,6 +250,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsFunction.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsFunction.ps1 index beaec9496230..82ad18c4ceac 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsFunction.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsFunction.ps1 @@ -31,13 +31,13 @@ Get-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-01 .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the cluster. [FunctionName ]: The name of the function. [Id ]: Resource identity path @@ -52,7 +52,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsfunction #> function Update-AzStreamAnalyticsFunction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction])] [CmdletBinding(DefaultParameterSetName='Update', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -159,6 +159,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -181,9 +190,7 @@ begin { Update = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsFunction'; UpdateViaIdentity = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsFunction'; } - if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -197,6 +204,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsInput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsInput.ps1 index 24c5fb92eae1..85a0d1e27c97 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsInput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsInput.ps1 @@ -33,13 +33,13 @@ Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdenti .Inputs System.String .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the cluster. [FunctionName ]: The name of the function. [Id ]: Resource identity path @@ -54,7 +54,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsinput #> function Update-AzStreamAnalyticsInput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput])] [CmdletBinding(DefaultParameterSetName='Update', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -160,6 +160,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -182,9 +191,7 @@ begin { Update = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsInput'; UpdateViaIdentity = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsInput'; } - if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -198,6 +205,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsJob.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsJob.ps1 index bae4c6ed4919..12a3954070da 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsJob.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsJob.ps1 @@ -27,13 +27,13 @@ Get-AzStreamAnalyticsJob -ResourceGroupName azure-rg-test -Name sajob-01-pwsh | .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the cluster. [FunctionName ]: The name of the function. [Id ]: Resource identity path @@ -48,7 +48,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsjob #> function Update-AzStreamAnalyticsJob { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -116,22 +116,22 @@ param( ${EventsOutOfOrderMaxDelayInSecond}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Adjust", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy] + [System.String] # Indicates the policy to apply to events that arrive out of order in the input event stream. ${EventsOutOfOrderPolicy}, [Parameter()] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Stop", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy] + [System.String] # Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size). ${OutputErrorPolicy}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, @@ -209,6 +209,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -231,9 +240,7 @@ begin { UpdateExpanded = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsJob'; UpdateViaIdentityExpanded = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsJob'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -247,6 +254,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsOutput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsOutput.ps1 index 484c550c2f6a..23d719e6cbcc 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsOutput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsOutput.ps1 @@ -24,22 +24,22 @@ Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. .Example -Update-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01 -File .\test\template-json\StroageAccount.json +Update-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01 -File .\test\template-json\StorageAccount.json .Example -Get-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01| Update-AzStreamAnalyticsOutput -File .\test\template-json\StroageAccount.json +Get-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01| Update-AzStreamAnalyticsOutput -File .\test\template-json\StorageAccount.json .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Inputs System.String .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .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 +INPUTOBJECT : Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. [ClusterName ]: The name of the cluster. [FunctionName ]: The name of the function. [Id ]: Resource identity path @@ -54,7 +54,7 @@ INPUTOBJECT : Identity Parameter https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsoutput #> function Update-AzStreamAnalyticsOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput])] [CmdletBinding(DefaultParameterSetName='Update', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] @@ -160,6 +160,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -182,9 +191,7 @@ begin { Update = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsOutput'; UpdateViaIdentity = 'Az.StreamAnalytics.custom\Update-AzStreamAnalyticsOutput'; } - if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Update') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -198,6 +205,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsTransformation.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsTransformation.ps1 index 87af4e89612c..d202234072dd 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsTransformation.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/exports/Update-AzStreamAnalyticsTransformation.ps1 @@ -16,11 +16,11 @@ <# .Synopsis -Updates an existing transformation under an existing streaming job. +Update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition. .Description -Updates an existing transformation under an existing streaming job. +Update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition. .Example @@ -31,7 +31,7 @@ Get-AzStreamAnalyticsTransformation -ResourceGroupName azure-rg-test -JobName sa .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation .Notes COMPLEX PARAMETER PROPERTIES @@ -48,20 +48,37 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticstransformation #> function Update-AzStreamAnalyticsTransformation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. ${JobName}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('TransformationName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -69,6 +86,8 @@ param( ${Name}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -76,6 +95,8 @@ param( ${ResourceGroupName}, [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -86,9 +107,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -97,7 +123,9 @@ param( # Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. ${IfMatch}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # Specifies the query that will be run in the streaming job. @@ -105,12 +133,26 @@ param( # Required on PUT (CreateOrReplace) requests. ${Query}, - [Parameter()] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Int32] # Specifies the number of streaming units that the streaming job uses. ${StreamingUnit}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -167,6 +209,15 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() @@ -188,10 +239,11 @@ begin { $mapping = @{ UpdateExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsTransformation_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsTransformation_UpdateViaIdentityExpanded'; + UpdateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsTransformation_UpdateViaIdentityStreamingjobExpanded'; + UpdateViaJsonFilePath = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsTransformation_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsTransformation_UpdateViaJsonString'; } - if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -205,6 +257,9 @@ begin { [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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generate-info.json b/generated/StreamAnalytics/StreamAnalytics.Autorest/generate-info.json index 04ef7e3e6d71..cee8e4ce66fe 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generate-info.json +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "905725a5-6580-4579-8f3f-3ad0add5bf24" + "generate_Id": "81660fcf-a260-4ae9-8cf8-84ffaaba6699" } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/Module.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/Module.cs index 78dfa8cec9b7..aded03dcf57c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/Module.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/Module.cs @@ -28,12 +28,20 @@ public partial class Module public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler(); + private static bool _init = false; + + private static readonly global::System.Object _initLock = new global::System.Object(); + + private static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module _instance; + /// the ISendAsync pipeline instance private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline _pipeline; /// the ISendAsync pipeline instance (when proxy is enabled) private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline _pipelineWithProxy; + private static readonly global::System.Object _singletonLock = new global::System.Object(); + public bool _useProxy = false; public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy(); @@ -56,11 +64,8 @@ public partial class Module /// The delegate to get the telemetry info. public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } - /// Backing field for property. - private static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module _instance; - /// the singleton of this module class - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module()); + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } } /// The Name of this module public string Name => @"Az.StreamAnalytics"; @@ -125,9 +130,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline C /// Initialization steps performed after the module is loaded. public void Init() { - OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); - OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); - CustomInit(); + if (_init == false) + { + lock (_initLock) { + if (_init == false) { + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); + CustomInit(); + _init = true; + } + } + } } /// Creates the module instance. diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AggregateFunctionProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AggregateFunctionProperties.PowerShell.cs new file mode 100644 index 000000000000..442b5709628b --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AggregateFunctionProperties.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with an aggregate function. + [System.ComponentModel.TypeConverter(typeof(AggregateFunctionPropertiesTypeConverter))] + public partial class AggregateFunctionProperties + { + + /// + /// 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 AggregateFunctionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionConfigurationTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AggregateFunctionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionConfigurationTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAggregateFunctionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AggregateFunctionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAggregateFunctionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AggregateFunctionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAggregateFunctionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with an aggregate function. + [System.ComponentModel.TypeConverter(typeof(AggregateFunctionPropertiesTypeConverter))] + public partial interface IAggregateFunctionProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AggregateFunctionProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AggregateFunctionProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AggregateFunctionProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AggregateFunctionProperties.TypeConverter.cs index c04cb6abc2c7..93e339c42e96 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AggregateFunctionProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AggregateFunctionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAggregateFunctionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAggregateFunctionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAggregateFunctionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAggregateFunctionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AggregateFunctionProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AggregateFunctionProperties.cs new file mode 100644 index 000000000000..142ed9a74899 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AggregateFunctionProperties.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with an aggregate function. + public partial class AggregateFunctionProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAggregateFunctionProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAggregateFunctionPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties __functionProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionProperties(); + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration Property { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)__functionProperties).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)__functionProperties).Property = value ?? null /* model class */; } + + /// Indicates the type of function. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Aggregate"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)__functionProperties).Type = "Aggregate"; } + + /// Creates an new instance. + public AggregateFunctionProperties() + { + this.__functionProperties.Type = "Aggregate"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__functionProperties), __functionProperties); + await eventListener.AssertObjectIsValid(nameof(__functionProperties), __functionProperties); + } + } + /// The properties that are associated with an aggregate function. + public partial interface IAggregateFunctionProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties + { + + } + /// The properties that are associated with an aggregate function. + internal partial interface IAggregateFunctionPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AggregateFunctionProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AggregateFunctionProperties.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AggregateFunctionProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AggregateFunctionProperties.json.cs index dc60549cddb3..fb15f186b365 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AggregateFunctionProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AggregateFunctionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,18 +65,18 @@ internal AggregateFunctionProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamAn { return; } - __functionProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionProperties(json); + __functionProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionProperties(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAggregateFunctionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAggregateFunctionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAggregateFunctionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAggregateFunctionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAggregateFunctionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAggregateFunctionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AggregateFunctionProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Any.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Any.PowerShell.cs index 41902b5c8fae..f627b91e5e88 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Any.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Any.PowerShell.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - /// Any object + /// Anything [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] public partial class Any { @@ -54,6 +54,14 @@ public partial class Any 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 . @@ -125,8 +133,20 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAny Des /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } } - /// Any object + /// Anything [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] public partial interface IAny diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Any.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Any.cs index bc8e7230b9d6..c6d4d37d6d85 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Any.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Any.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - /// Any object + /// Anything public partial class Any : Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAny, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAnyInternal @@ -19,13 +19,13 @@ public Any() } } - /// Any object + /// Anything public partial interface IAny : Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable { } - /// Any object + /// Anything internal partial interface IAnyInternal { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Any.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Any.json.cs index c73525e6e61f..5c7489b7af96 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Any.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Any.json.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - /// Any object + /// Anything public partial class Any { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AggregateFunctionProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AggregateFunctionProperties.PowerShell.cs deleted file mode 100644 index c6da2685126a..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AggregateFunctionProperties.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with an aggregate function. - [System.ComponentModel.TypeConverter(typeof(AggregateFunctionPropertiesTypeConverter))] - public partial class AggregateFunctionProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AggregateFunctionProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionConfigurationTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AggregateFunctionProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionConfigurationTypeConverter.ConvertFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAggregateFunctionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AggregateFunctionProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAggregateFunctionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AggregateFunctionProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAggregateFunctionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with an aggregate function. - [System.ComponentModel.TypeConverter(typeof(AggregateFunctionPropertiesTypeConverter))] - public partial interface IAggregateFunctionProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AggregateFunctionProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AggregateFunctionProperties.cs deleted file mode 100644 index 57e0bebf31ab..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AggregateFunctionProperties.cs +++ /dev/null @@ -1,60 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with an aggregate function. - public partial class AggregateFunctionProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAggregateFunctionProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAggregateFunctionPropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties __functionProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionProperties(); - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration Property { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)__functionProperties).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)__functionProperties).Property = value ?? null /* model class */; } - - /// Indicates the type of function. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)__functionProperties).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)__functionProperties).Type = value ; } - - /// Creates an new instance. - public AggregateFunctionProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__functionProperties), __functionProperties); - await eventListener.AssertObjectIsValid(nameof(__functionProperties), __functionProperties); - } - } - /// The properties that are associated with an aggregate function. - public partial interface IAggregateFunctionProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties - { - - } - /// The properties that are associated with an aggregate function. - internal partial interface IAggregateFunctionPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AvroSerialization.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AvroSerialization.PowerShell.cs deleted file mode 100644 index 637f9dc19f32..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AvroSerialization.PowerShell.cs +++ /dev/null @@ -1,156 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// Describes how data from an input is serialized or how data is serialized when written to an output in Avro format. - /// - [System.ComponentModel.TypeConverter(typeof(AvroSerializationTypeConverter))] - public partial class AvroSerialization - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AvroSerialization(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAvroSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAvroSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AvroSerialization(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAvroSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAvroSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAvroSerialization DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AvroSerialization(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAvroSerialization DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AvroSerialization(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAvroSerialization FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes how data from an input is serialized or how data is serialized when written to an output in Avro format. - [System.ComponentModel.TypeConverter(typeof(AvroSerializationTypeConverter))] - public partial interface IAvroSerialization - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSource.PowerShell.cs deleted file mode 100644 index eb84f55091a3..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSource.PowerShell.cs +++ /dev/null @@ -1,228 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes an Azure Data Lake Store output data source. - [System.ComponentModel.TypeConverter(typeof(AzureDataLakeStoreOutputDataSourceTypeConverter))] - public partial class AzureDataLakeStoreOutputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureDataLakeStoreOutputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureDataLakeStoreOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("RefreshToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).RefreshToken, global::System.Convert.ToString); - } - if (content.Contains("TokenUserPrincipalName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); - } - if (content.Contains("TokenUserDisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserDisplayName, global::System.Convert.ToString); - } - if (content.Contains("AccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).AccountName, global::System.Convert.ToString); - } - if (content.Contains("TenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TenantId, global::System.Convert.ToString); - } - if (content.Contains("FilePathPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).FilePathPrefix = (string) content.GetValueForProperty("FilePathPrefix",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).FilePathPrefix, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TimeFormat, 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 AzureDataLakeStoreOutputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureDataLakeStoreOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("RefreshToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).RefreshToken, global::System.Convert.ToString); - } - if (content.Contains("TokenUserPrincipalName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); - } - if (content.Contains("TokenUserDisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserDisplayName, global::System.Convert.ToString); - } - if (content.Contains("AccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).AccountName, global::System.Convert.ToString); - } - if (content.Contains("TenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TenantId, global::System.Convert.ToString); - } - if (content.Contains("FilePathPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).FilePathPrefix = (string) content.GetValueForProperty("FilePathPrefix",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).FilePathPrefix, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal)this).TimeFormat, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureDataLakeStoreOutputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureDataLakeStoreOutputDataSource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes an Azure Data Lake Store output data source. - [System.ComponentModel.TypeConverter(typeof(AzureDataLakeStoreOutputDataSourceTypeConverter))] - public partial interface IAzureDataLakeStoreOutputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSourceProperties.PowerShell.cs deleted file mode 100644 index e51f7aec1dce..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,213 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with an Azure Data Lake Store. - [System.ComponentModel.TypeConverter(typeof(AzureDataLakeStoreOutputDataSourcePropertiesTypeConverter))] - public partial class AzureDataLakeStoreOutputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureDataLakeStoreOutputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AccountName, global::System.Convert.ToString); - } - if (content.Contains("TenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TenantId, global::System.Convert.ToString); - } - if (content.Contains("FilePathPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).FilePathPrefix = (string) content.GetValueForProperty("FilePathPrefix",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).FilePathPrefix, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TimeFormat, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("RefreshToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken, global::System.Convert.ToString); - } - if (content.Contains("TokenUserPrincipalName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); - } - if (content.Contains("TokenUserDisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName, 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 AzureDataLakeStoreOutputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AccountName, global::System.Convert.ToString); - } - if (content.Contains("TenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TenantId, global::System.Convert.ToString); - } - if (content.Contains("FilePathPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).FilePathPrefix = (string) content.GetValueForProperty("FilePathPrefix",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).FilePathPrefix, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TimeFormat, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("RefreshToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken, global::System.Convert.ToString); - } - if (content.Contains("TokenUserPrincipalName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); - } - if (content.Contains("TokenUserDisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureDataLakeStoreOutputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureDataLakeStoreOutputDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from - /// a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with an Azure Data Lake Store. - [System.ComponentModel.TypeConverter(typeof(AzureDataLakeStoreOutputDataSourcePropertiesTypeConverter))] - public partial interface IAzureDataLakeStoreOutputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSource.PowerShell.cs deleted file mode 100644 index 269965f791d1..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSource.PowerShell.cs +++ /dev/null @@ -1,194 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Defines the metadata of AzureFunctionOutputDataSource - [System.ComponentModel.TypeConverter(typeof(AzureFunctionOutputDataSourceTypeConverter))] - public partial class AzureFunctionOutputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureFunctionOutputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureFunctionOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("FunctionAppName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).FunctionAppName = (string) content.GetValueForProperty("FunctionAppName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).FunctionAppName, global::System.Convert.ToString); - } - if (content.Contains("FunctionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).FunctionName = (string) content.GetValueForProperty("FunctionName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).FunctionName, global::System.Convert.ToString); - } - if (content.Contains("ApiKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).ApiKey, global::System.Convert.ToString); - } - if (content.Contains("MaxBatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).MaxBatchSize = (float?) content.GetValueForProperty("MaxBatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).MaxBatchSize, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("MaxBatchCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureFunctionOutputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureFunctionOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("FunctionAppName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).FunctionAppName = (string) content.GetValueForProperty("FunctionAppName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).FunctionAppName, global::System.Convert.ToString); - } - if (content.Contains("FunctionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).FunctionName = (string) content.GetValueForProperty("FunctionName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).FunctionName, global::System.Convert.ToString); - } - if (content.Contains("ApiKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).ApiKey, global::System.Convert.ToString); - } - if (content.Contains("MaxBatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).MaxBatchSize = (float?) content.GetValueForProperty("MaxBatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).MaxBatchSize, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("MaxBatchCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureFunctionOutputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureFunctionOutputDataSource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Defines the metadata of AzureFunctionOutputDataSource - [System.ComponentModel.TypeConverter(typeof(AzureFunctionOutputDataSourceTypeConverter))] - public partial interface IAzureFunctionOutputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSource.cs deleted file mode 100644 index e3ba5a295025..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSource.cs +++ /dev/null @@ -1,169 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Defines the metadata of AzureFunctionOutputDataSource - public partial class AzureFunctionOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(); - - /// - /// If you want to use an Azure Function from another subscription, you can do so by providing the key to access your function. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ApiKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)Property).ApiKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)Property).ApiKey = value ?? null; } - - /// The name of your Azure Functions app. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string FunctionAppName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)Property).FunctionAppName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)Property).FunctionAppName = value ?? null; } - - /// The name of the function in your Azure Functions app. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string FunctionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)Property).FunctionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)Property).FunctionName = value ?? null; } - - /// - /// A property that lets you specify the maximum number of events in each batch that's sent to Azure Functions. The default - /// value is 100. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public float? MaxBatchCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)Property).MaxBatchCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)Property).MaxBatchCount = value ?? default(float); } - - /// - /// A property that lets you set the maximum size for each output batch that's sent to your Azure function. The input unit - /// is in bytes. By default, this value is 262,144 bytes (256 KB). - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public float? MaxBatchSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)Property).MaxBatchSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)Property).MaxBatchSize = value ?? default(float); } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureFunctionOutputDataSourceProperties()); set { {_property = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceProperties _property; - - /// - /// The properties that are associated with a Azure Function output. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureFunctionOutputDataSourceProperties()); set => this._property = value; } - - /// - /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type = value ; } - - /// Creates an new instance. - public AzureFunctionOutputDataSource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); - await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); - } - } - /// Defines the metadata of AzureFunctionOutputDataSource - public partial interface IAzureFunctionOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource - { - /// - /// If you want to use an Azure Function from another subscription, you can do so by providing the key to access your function. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"If you want to use an Azure Function from another subscription, you can do so by providing the key to access your function.", - SerializedName = @"apiKey", - PossibleTypes = new [] { typeof(string) })] - string ApiKey { get; set; } - /// The name of your Azure Functions app. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of your Azure Functions app.", - SerializedName = @"functionAppName", - PossibleTypes = new [] { typeof(string) })] - string FunctionAppName { get; set; } - /// The name of the function in your Azure Functions app. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the function in your Azure Functions app.", - SerializedName = @"functionName", - PossibleTypes = new [] { typeof(string) })] - string FunctionName { get; set; } - /// - /// A property that lets you specify the maximum number of events in each batch that's sent to Azure Functions. The default - /// value is 100. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A property that lets you specify the maximum number of events in each batch that's sent to Azure Functions. The default value is 100.", - SerializedName = @"maxBatchCount", - PossibleTypes = new [] { typeof(float) })] - float? MaxBatchCount { get; set; } - /// - /// A property that lets you set the maximum size for each output batch that's sent to your Azure function. The input unit - /// is in bytes. By default, this value is 262,144 bytes (256 KB). - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A property that lets you set the maximum size for each output batch that's sent to your Azure function. The input unit is in bytes. By default, this value is 262,144 bytes (256 KB).", - SerializedName = @"maxBatchSize", - PossibleTypes = new [] { typeof(float) })] - float? MaxBatchSize { get; set; } - - } - /// Defines the metadata of AzureFunctionOutputDataSource - internal partial interface IAzureFunctionOutputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal - { - /// - /// If you want to use an Azure Function from another subscription, you can do so by providing the key to access your function. - /// - string ApiKey { get; set; } - /// The name of your Azure Functions app. - string FunctionAppName { get; set; } - /// The name of the function in your Azure Functions app. - string FunctionName { get; set; } - /// - /// A property that lets you specify the maximum number of events in each batch that's sent to Azure Functions. The default - /// value is 100. - /// - float? MaxBatchCount { get; set; } - /// - /// A property that lets you set the maximum size for each output batch that's sent to your Azure function. The input unit - /// is in bytes. By default, this value is 262,144 bytes (256 KB). - /// - float? MaxBatchSize { get; set; } - /// - /// The properties that are associated with a Azure Function output. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceProperties Property { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSourceProperties.PowerShell.cs deleted file mode 100644 index 6c0efb4acd2d..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,181 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with a DocumentDB output. - [System.ComponentModel.TypeConverter(typeof(AzureFunctionOutputDataSourcePropertiesTypeConverter))] - public partial class AzureFunctionOutputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureFunctionOutputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("FunctionAppName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionAppName = (string) content.GetValueForProperty("FunctionAppName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionAppName, global::System.Convert.ToString); - } - if (content.Contains("FunctionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionName = (string) content.GetValueForProperty("FunctionName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionName, global::System.Convert.ToString); - } - if (content.Contains("ApiKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).ApiKey, global::System.Convert.ToString); - } - if (content.Contains("MaxBatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchSize = (float?) content.GetValueForProperty("MaxBatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchSize, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("MaxBatchCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureFunctionOutputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("FunctionAppName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionAppName = (string) content.GetValueForProperty("FunctionAppName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionAppName, global::System.Convert.ToString); - } - if (content.Contains("FunctionName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionName = (string) content.GetValueForProperty("FunctionName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionName, global::System.Convert.ToString); - } - if (content.Contains("ApiKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).ApiKey, global::System.Convert.ToString); - } - if (content.Contains("MaxBatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchSize = (float?) content.GetValueForProperty("MaxBatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchSize, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("MaxBatchCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureFunctionOutputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureFunctionOutputDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json - /// string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with a DocumentDB output. - [System.ComponentModel.TypeConverter(typeof(AzureFunctionOutputDataSourcePropertiesTypeConverter))] - public partial interface IAzureFunctionOutputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBinding.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBinding.PowerShell.cs deleted file mode 100644 index 3a84e3112e61..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBinding.PowerShell.cs +++ /dev/null @@ -1,205 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The binding to an Azure Machine Learning web service. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionBindingTypeConverter))] - public partial class AzureMachineLearningServiceFunctionBinding - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureMachineLearningServiceFunctionBinding(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionBindingPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Endpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Endpoint, global::System.Convert.ToString); - } - if (content.Contains("ApiKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).ApiKey, global::System.Convert.ToString); - } - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceInputColumnTypeConverter.ConvertFrom)); - } - if (content.Contains("Output")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn[]) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Output, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceOutputColumnTypeConverter.ConvertFrom)); - } - if (content.Contains("BatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("NumberOfParallelRequest")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).NumberOfParallelRequest = (int?) content.GetValueForProperty("NumberOfParallelRequest",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).NumberOfParallelRequest, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureMachineLearningServiceFunctionBinding(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionBindingPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Endpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Endpoint, global::System.Convert.ToString); - } - if (content.Contains("ApiKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).ApiKey, global::System.Convert.ToString); - } - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceInputColumnTypeConverter.ConvertFrom)); - } - if (content.Contains("Output")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn[]) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).Output, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceOutputColumnTypeConverter.ConvertFrom)); - } - if (content.Contains("BatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("NumberOfParallelRequest")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).NumberOfParallelRequest = (int?) content.GetValueForProperty("NumberOfParallelRequest",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal)this).NumberOfParallelRequest, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBinding DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMachineLearningServiceFunctionBinding(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBinding DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMachineLearningServiceFunctionBinding(content); - } - - /// - /// Creates a new instance of , deserializing the content from a - /// json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBinding FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The binding to an Azure Machine Learning web service. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionBindingTypeConverter))] - public partial interface IAzureMachineLearningServiceFunctionBinding - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBinding.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBinding.cs deleted file mode 100644 index 52147e988b84..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBinding.cs +++ /dev/null @@ -1,182 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The binding to an Azure Machine Learning web service. - public partial class AzureMachineLearningServiceFunctionBinding : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBinding, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionBinding(); - - /// The API key used to authenticate with Request-Response endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ApiKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).ApiKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).ApiKey = value ?? null; } - - /// - /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public int? BatchSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).BatchSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).BatchSize = value ?? default(int); } - - /// - /// The Request-Response execute endpoint of the Azure Machine Learning web service. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Endpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).Endpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).Endpoint = value ?? null; } - - /// The inputs for the Azure Machine Learning web service endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[] Input { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).Input; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).Input = value ?? null /* arrayOf */; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionBindingProperties()); set { {_property = value;} } } - - /// - /// The number of parallel requests that will be sent per partition of your job to the machine learning service. Default is - /// 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public int? NumberOfParallelRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).NumberOfParallelRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).NumberOfParallelRequest = value ?? default(int); } - - /// - /// A list of outputs from the Azure Machine Learning web service endpoint execution. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn[] Output { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).Output; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).Output = value ?? null /* arrayOf */; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingProperties _property; - - /// The binding properties associated with an Azure Machine learning web service. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionBindingProperties()); set => this._property = value; } - - /// Indicates the function binding type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)__functionBinding).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)__functionBinding).Type = value ; } - - /// - /// Creates an new instance. - /// - public AzureMachineLearningServiceFunctionBinding() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__functionBinding), __functionBinding); - await eventListener.AssertObjectIsValid(nameof(__functionBinding), __functionBinding); - } - } - /// The binding to an Azure Machine Learning web service. - public partial interface IAzureMachineLearningServiceFunctionBinding : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding - { - /// The API key used to authenticate with Request-Response endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The API key used to authenticate with Request-Response endpoint.", - SerializedName = @"apiKey", - PossibleTypes = new [] { typeof(string) })] - string ApiKey { get; set; } - /// - /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000.", - SerializedName = @"batchSize", - PossibleTypes = new [] { typeof(int) })] - int? BatchSize { get; set; } - /// - /// The Request-Response execute endpoint of the Azure Machine Learning web service. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Request-Response execute endpoint of the Azure Machine Learning web service.", - SerializedName = @"endpoint", - PossibleTypes = new [] { typeof(string) })] - string Endpoint { get; set; } - /// The inputs for the Azure Machine Learning web service endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The inputs for the Azure Machine Learning web service endpoint.", - SerializedName = @"inputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[] Input { get; set; } - /// - /// The number of parallel requests that will be sent per partition of your job to the machine learning service. Default is - /// 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The number of parallel requests that will be sent per partition of your job to the machine learning service. Default is 1.", - SerializedName = @"numberOfParallelRequests", - PossibleTypes = new [] { typeof(int) })] - int? NumberOfParallelRequest { get; set; } - /// - /// A list of outputs from the Azure Machine Learning web service endpoint execution. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of outputs from the Azure Machine Learning web service endpoint execution.", - SerializedName = @"outputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn[] Output { get; set; } - - } - /// The binding to an Azure Machine Learning web service. - internal partial interface IAzureMachineLearningServiceFunctionBindingInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal - { - /// The API key used to authenticate with Request-Response endpoint. - string ApiKey { get; set; } - /// - /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. - /// - int? BatchSize { get; set; } - /// - /// The Request-Response execute endpoint of the Azure Machine Learning web service. - /// - string Endpoint { get; set; } - /// The inputs for the Azure Machine Learning web service endpoint. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[] Input { get; set; } - /// - /// The number of parallel requests that will be sent per partition of your job to the machine learning service. Default is - /// 1. - /// - int? NumberOfParallelRequest { get; set; } - /// - /// A list of outputs from the Azure Machine Learning web service endpoint execution. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn[] Output { get; set; } - /// The binding properties associated with an Azure Machine learning web service. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingProperties Property { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingProperties.PowerShell.cs deleted file mode 100644 index 129a875605fb..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingProperties.PowerShell.cs +++ /dev/null @@ -1,189 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The binding properties associated with an Azure Machine learning web service. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionBindingPropertiesTypeConverter))] - public partial class AzureMachineLearningServiceFunctionBindingProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureMachineLearningServiceFunctionBindingProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Endpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Endpoint, global::System.Convert.ToString); - } - if (content.Contains("ApiKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).ApiKey, global::System.Convert.ToString); - } - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceInputColumnTypeConverter.ConvertFrom)); - } - if (content.Contains("Output")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn[]) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Output, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceOutputColumnTypeConverter.ConvertFrom)); - } - if (content.Contains("BatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("NumberOfParallelRequest")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).NumberOfParallelRequest = (int?) content.GetValueForProperty("NumberOfParallelRequest",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).NumberOfParallelRequest, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureMachineLearningServiceFunctionBindingProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Endpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Endpoint, global::System.Convert.ToString); - } - if (content.Contains("ApiKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).ApiKey, global::System.Convert.ToString); - } - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceInputColumnTypeConverter.ConvertFrom)); - } - if (content.Contains("Output")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn[]) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Output, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceOutputColumnTypeConverter.ConvertFrom)); - } - if (content.Contains("BatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("NumberOfParallelRequest")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).NumberOfParallelRequest = (int?) content.GetValueForProperty("NumberOfParallelRequest",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).NumberOfParallelRequest, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMachineLearningServiceFunctionBindingProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMachineLearningServiceFunctionBindingProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content - /// from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The binding properties associated with an Azure Machine learning web service. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionBindingPropertiesTypeConverter))] - public partial interface IAzureMachineLearningServiceFunctionBindingProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingRetrievalProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingRetrievalProperties.PowerShell.cs deleted file mode 100644 index 902200135e97..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingRetrievalProperties.PowerShell.cs +++ /dev/null @@ -1,159 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// The binding retrieval properties associated with an Azure Machine learning web service. - /// - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionBindingRetrievalPropertiesTypeConverter))] - public partial class AzureMachineLearningServiceFunctionBindingRetrievalProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureMachineLearningServiceFunctionBindingRetrievalProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Endpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).Endpoint, global::System.Convert.ToString); - } - if (content.Contains("UdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).UdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).UdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureMachineLearningServiceFunctionBindingRetrievalProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Endpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).Endpoint, global::System.Convert.ToString); - } - if (content.Contains("UdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).UdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).UdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMachineLearningServiceFunctionBindingRetrievalProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMachineLearningServiceFunctionBindingRetrievalProperties(content); - } - - /// - /// Creates a new instance of , deserializing - /// the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The binding retrieval properties associated with an Azure Machine learning web service. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionBindingRetrievalPropertiesTypeConverter))] - public partial interface IAzureMachineLearningServiceFunctionBindingRetrievalProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs deleted file mode 100644 index b5bb46a86411..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs +++ /dev/null @@ -1,175 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// The parameters needed to retrieve the default function definition for an Azure Machine Learning web service function. - /// - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersTypeConverter))] - public partial class AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("BindingRetrievalProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("BindingType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); - } - if (content.Contains("BindingRetrievalPropertyUdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - if (content.Contains("BindingRetrievalPropertyEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyEndpoint = (string) content.GetValueForProperty("BindingRetrievalPropertyEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyEndpoint, 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 AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("BindingRetrievalProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("BindingType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); - } - if (content.Contains("BindingRetrievalPropertyUdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - if (content.Contains("BindingRetrievalPropertyEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyEndpoint = (string) content.GetValueForProperty("BindingRetrievalPropertyEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyEndpoint, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters(content); - } - - /// - /// Creates a new instance of , deserializing - /// the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The parameters needed to retrieve the default function definition for an Azure Machine Learning web service function. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersTypeConverter))] - public partial interface IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.cs deleted file mode 100644 index 7bf8b2ab03db..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.cs +++ /dev/null @@ -1,111 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// The parameters needed to retrieve the default function definition for an Azure Machine Learning web service function. - /// - public partial class AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionRetrieveDefaultDefinitionParameters(); - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalProperties _bindingRetrievalProperty; - - /// - /// The binding retrieval properties associated with an Azure Machine learning web service. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalProperties BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionBindingRetrievalProperties()); set => this._bindingRetrievalProperty = value; } - - /// - /// The Request-Response execute endpoint of the Azure Machine Learning web service. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string BindingRetrievalPropertyEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).Endpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).Endpoint = value ?? null; } - - /// The function type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? BindingRetrievalPropertyUdfType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType)""); } - - /// Indicates the function binding type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string BindingType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)__functionRetrieveDefaultDefinitionParameters).BindingType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)__functionRetrieveDefaultDefinitionParameters).BindingType = value ; } - - /// Internal Acessors for BindingRetrievalProperty - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal.BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionBindingRetrievalProperties()); set { {_bindingRetrievalProperty = value;} } } - - /// - /// Creates an new instance. - /// - public AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); - await eventListener.AssertObjectIsValid(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); - } - } - /// The parameters needed to retrieve the default function definition for an Azure Machine Learning web service function. - public partial interface IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters - { - /// - /// The Request-Response execute endpoint of the Azure Machine Learning web service. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Request-Response execute endpoint of the Azure Machine Learning web service.", - SerializedName = @"endpoint", - PossibleTypes = new [] { typeof(string) })] - string BindingRetrievalPropertyEndpoint { get; set; } - /// The function type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The function type.", - SerializedName = @"udfType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? BindingRetrievalPropertyUdfType { get; set; } - - } - /// The parameters needed to retrieve the default function definition for an Azure Machine Learning web service function. - internal partial interface IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal - { - /// - /// The binding retrieval properties associated with an Azure Machine learning web service. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalProperties BindingRetrievalProperty { get; set; } - /// - /// The Request-Response execute endpoint of the Azure Machine Learning web service. - /// - string BindingRetrievalPropertyEndpoint { get; set; } - /// The function type. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? BindingRetrievalPropertyUdfType { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputColumn.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputColumn.PowerShell.cs deleted file mode 100644 index 3281b44b3eaa..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputColumn.PowerShell.cs +++ /dev/null @@ -1,165 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes an input column for the Azure Machine Learning web service endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceInputColumnTypeConverter))] - public partial class AzureMachineLearningServiceInputColumn - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureMachineLearningServiceInputColumn(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumnInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("DataType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumnInternal)this).DataType, global::System.Convert.ToString); - } - if (content.Contains("MapTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumnInternal)this).MapTo = (int?) content.GetValueForProperty("MapTo",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumnInternal)this).MapTo, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureMachineLearningServiceInputColumn(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumnInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("DataType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumnInternal)this).DataType, global::System.Convert.ToString); - } - if (content.Contains("MapTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumnInternal)this).MapTo = (int?) content.GetValueForProperty("MapTo",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumnInternal)this).MapTo, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMachineLearningServiceInputColumn(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMachineLearningServiceInputColumn(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json - /// string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes an input column for the Azure Machine Learning web service endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceInputColumnTypeConverter))] - public partial interface IAzureMachineLearningServiceInputColumn - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputs.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputs.PowerShell.cs deleted file mode 100644 index 9ba7c00b9d2c..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputs.PowerShell.cs +++ /dev/null @@ -1,156 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The inputs for the Azure Machine Learning web service endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceInputsTypeConverter))] - public partial class AzureMachineLearningServiceInputs - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureMachineLearningServiceInputs(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputsInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("ColumnName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputsInternal)this).ColumnName = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[]) content.GetValueForProperty("ColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputsInternal)this).ColumnName, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceInputColumnTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureMachineLearningServiceInputs(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputsInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("ColumnName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputsInternal)this).ColumnName = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[]) content.GetValueForProperty("ColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputsInternal)this).ColumnName, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceInputColumnTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputs DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMachineLearningServiceInputs(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputs DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMachineLearningServiceInputs(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputs FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The inputs for the Azure Machine Learning web service endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceInputsTypeConverter))] - public partial interface IAzureMachineLearningServiceInputs - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceOutputColumn.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceOutputColumn.PowerShell.cs deleted file mode 100644 index 6354bf5dffdf..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceOutputColumn.PowerShell.cs +++ /dev/null @@ -1,165 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes an output column for the Azure Machine Learning web service endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceOutputColumnTypeConverter))] - public partial class AzureMachineLearningServiceOutputColumn - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureMachineLearningServiceOutputColumn(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumnInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("DataType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumnInternal)this).DataType, global::System.Convert.ToString); - } - if (content.Contains("MapTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumnInternal)this).MapTo = (int?) content.GetValueForProperty("MapTo",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumnInternal)this).MapTo, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureMachineLearningServiceOutputColumn(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumnInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("DataType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumnInternal)this).DataType, global::System.Convert.ToString); - } - if (content.Contains("MapTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumnInternal)this).MapTo = (int?) content.GetValueForProperty("MapTo",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumnInternal)this).MapTo, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMachineLearningServiceOutputColumn(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMachineLearningServiceOutputColumn(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json - /// string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes an output column for the Azure Machine Learning web service endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceOutputColumnTypeConverter))] - public partial interface IAzureMachineLearningServiceOutputColumn - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBinding.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBinding.PowerShell.cs deleted file mode 100644 index 1b9727f2e476..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBinding.PowerShell.cs +++ /dev/null @@ -1,213 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The binding to an Azure Machine Learning Studio. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionBindingTypeConverter))] - public partial class AzureMachineLearningStudioFunctionBinding - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureMachineLearningStudioFunctionBinding(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionBindingPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputsTypeConverter.ConvertFrom); - } - if (content.Contains("Endpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Endpoint, global::System.Convert.ToString); - } - if (content.Contains("ApiKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).ApiKey, global::System.Convert.ToString); - } - if (content.Contains("Output")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn[]) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Output, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioOutputColumnTypeConverter.ConvertFrom)); - } - if (content.Contains("BatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("InputName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).InputName = (string) content.GetValueForProperty("InputName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).InputName, global::System.Convert.ToString); - } - if (content.Contains("InputColumnName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).InputColumnName = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[]) content.GetValueForProperty("InputColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).InputColumnName, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputColumnTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureMachineLearningStudioFunctionBinding(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionBindingPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputsTypeConverter.ConvertFrom); - } - if (content.Contains("Endpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Endpoint, global::System.Convert.ToString); - } - if (content.Contains("ApiKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).ApiKey, global::System.Convert.ToString); - } - if (content.Contains("Output")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn[]) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).Output, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioOutputColumnTypeConverter.ConvertFrom)); - } - if (content.Contains("BatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("InputName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).InputName = (string) content.GetValueForProperty("InputName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).InputName, global::System.Convert.ToString); - } - if (content.Contains("InputColumnName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).InputColumnName = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[]) content.GetValueForProperty("InputColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal)this).InputColumnName, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputColumnTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBinding DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMachineLearningStudioFunctionBinding(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBinding DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMachineLearningStudioFunctionBinding(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json - /// string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBinding FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The binding to an Azure Machine Learning Studio. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionBindingTypeConverter))] - public partial interface IAzureMachineLearningStudioFunctionBinding - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBinding.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBinding.cs deleted file mode 100644 index 63d4a1a06be4..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBinding.cs +++ /dev/null @@ -1,172 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The binding to an Azure Machine Learning Studio. - public partial class AzureMachineLearningStudioFunctionBinding : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBinding, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionBinding(); - - /// The API key used to authenticate with Request-Response endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ApiKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).ApiKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).ApiKey = value ?? null; } - - /// - /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public int? BatchSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).BatchSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).BatchSize = value ?? default(int); } - - /// - /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Endpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).Endpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).Endpoint = value ?? null; } - - /// A list of input columns for the Azure Machine Learning Studio endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[] InputColumnName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).InputColumnName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).InputColumnName = value ?? null /* arrayOf */; } - - /// The name of the input. This is the name provided while authoring the endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string InputName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).InputName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).InputName = value ?? null; } - - /// Internal Acessors for Input - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal.Input { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).Input; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).Input = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionBindingProperties()); set { {_property = value;} } } - - /// A list of outputs from the Azure Machine Learning Studio endpoint execution. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn[] Output { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).Output; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).Output = value ?? null /* arrayOf */; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingProperties _property; - - /// The binding properties associated with an Azure Machine learning Studio. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionBindingProperties()); set => this._property = value; } - - /// Indicates the function binding type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)__functionBinding).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)__functionBinding).Type = value ; } - - /// - /// Creates an new instance. - /// - public AzureMachineLearningStudioFunctionBinding() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__functionBinding), __functionBinding); - await eventListener.AssertObjectIsValid(nameof(__functionBinding), __functionBinding); - } - } - /// The binding to an Azure Machine Learning Studio. - public partial interface IAzureMachineLearningStudioFunctionBinding : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding - { - /// The API key used to authenticate with Request-Response endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The API key used to authenticate with Request-Response endpoint.", - SerializedName = @"apiKey", - PossibleTypes = new [] { typeof(string) })] - string ApiKey { get; set; } - /// - /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000.", - SerializedName = @"batchSize", - PossibleTypes = new [] { typeof(int) })] - int? BatchSize { get; set; } - /// - /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs", - SerializedName = @"endpoint", - PossibleTypes = new [] { typeof(string) })] - string Endpoint { get; set; } - /// A list of input columns for the Azure Machine Learning Studio endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of input columns for the Azure Machine Learning Studio endpoint.", - SerializedName = @"columnNames", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[] InputColumnName { get; set; } - /// The name of the input. This is the name provided while authoring the endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the input. This is the name provided while authoring the endpoint.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string InputName { get; set; } - /// A list of outputs from the Azure Machine Learning Studio endpoint execution. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of outputs from the Azure Machine Learning Studio endpoint execution.", - SerializedName = @"outputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn[] Output { get; set; } - - } - /// The binding to an Azure Machine Learning Studio. - internal partial interface IAzureMachineLearningStudioFunctionBindingInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal - { - /// The API key used to authenticate with Request-Response endpoint. - string ApiKey { get; set; } - /// - /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. - /// - int? BatchSize { get; set; } - /// - /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs - /// - string Endpoint { get; set; } - /// The inputs for the Azure Machine Learning Studio endpoint. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs Input { get; set; } - /// A list of input columns for the Azure Machine Learning Studio endpoint. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[] InputColumnName { get; set; } - /// The name of the input. This is the name provided while authoring the endpoint. - string InputName { get; set; } - /// A list of outputs from the Azure Machine Learning Studio endpoint execution. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn[] Output { get; set; } - /// The binding properties associated with an Azure Machine learning Studio. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingProperties Property { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingProperties.PowerShell.cs deleted file mode 100644 index 2e81fb65d888..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingProperties.PowerShell.cs +++ /dev/null @@ -1,197 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The binding properties associated with an Azure Machine learning Studio. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionBindingPropertiesTypeConverter))] - public partial class AzureMachineLearningStudioFunctionBindingProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureMachineLearningStudioFunctionBindingProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputsTypeConverter.ConvertFrom); - } - if (content.Contains("Endpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Endpoint, global::System.Convert.ToString); - } - if (content.Contains("ApiKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).ApiKey, global::System.Convert.ToString); - } - if (content.Contains("Output")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn[]) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Output, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioOutputColumnTypeConverter.ConvertFrom)); - } - if (content.Contains("BatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("InputName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputName = (string) content.GetValueForProperty("InputName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputName, global::System.Convert.ToString); - } - if (content.Contains("InputColumnName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputColumnName = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[]) content.GetValueForProperty("InputColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputColumnName, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputColumnTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureMachineLearningStudioFunctionBindingProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputsTypeConverter.ConvertFrom); - } - if (content.Contains("Endpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Endpoint, global::System.Convert.ToString); - } - if (content.Contains("ApiKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).ApiKey, global::System.Convert.ToString); - } - if (content.Contains("Output")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn[]) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Output, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioOutputColumnTypeConverter.ConvertFrom)); - } - if (content.Contains("BatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("InputName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputName = (string) content.GetValueForProperty("InputName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputName, global::System.Convert.ToString); - } - if (content.Contains("InputColumnName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputColumnName = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[]) content.GetValueForProperty("InputColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputColumnName, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputColumnTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMachineLearningStudioFunctionBindingProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMachineLearningStudioFunctionBindingProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content - /// from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The binding properties associated with an Azure Machine learning Studio. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionBindingPropertiesTypeConverter))] - public partial interface IAzureMachineLearningStudioFunctionBindingProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingProperties.cs deleted file mode 100644 index 302976d557d4..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingProperties.cs +++ /dev/null @@ -1,156 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The binding properties associated with an Azure Machine learning Studio. - public partial class AzureMachineLearningStudioFunctionBindingProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal - { - - /// Backing field for property. - private string _apiKey; - - /// The API key used to authenticate with Request-Response endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string ApiKey { get => this._apiKey; set => this._apiKey = value; } - - /// Backing field for property. - private int? _batchSize; - - /// - /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public int? BatchSize { get => this._batchSize; set => this._batchSize = value; } - - /// Backing field for property. - private string _endpoint; - - /// - /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Endpoint { get => this._endpoint; set => this._endpoint = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs _input; - - /// The inputs for the Azure Machine Learning Studio endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs Input { get => (this._input = this._input ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputs()); set => this._input = value; } - - /// A list of input columns for the Azure Machine Learning Studio endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[] InputColumnName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputsInternal)Input).ColumnName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputsInternal)Input).ColumnName = value ?? null /* arrayOf */; } - - /// The name of the input. This is the name provided while authoring the endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string InputName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputsInternal)Input).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputsInternal)Input).Name = value ?? null; } - - /// Internal Acessors for Input - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingPropertiesInternal.Input { get => (this._input = this._input ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputs()); set { {_input = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn[] _output; - - /// A list of outputs from the Azure Machine Learning Studio endpoint execution. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn[] Output { get => this._output; set => this._output = value; } - - /// - /// Creates an new instance. - /// - public AzureMachineLearningStudioFunctionBindingProperties() - { - - } - } - /// The binding properties associated with an Azure Machine learning Studio. - public partial interface IAzureMachineLearningStudioFunctionBindingProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// The API key used to authenticate with Request-Response endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The API key used to authenticate with Request-Response endpoint.", - SerializedName = @"apiKey", - PossibleTypes = new [] { typeof(string) })] - string ApiKey { get; set; } - /// - /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000.", - SerializedName = @"batchSize", - PossibleTypes = new [] { typeof(int) })] - int? BatchSize { get; set; } - /// - /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs", - SerializedName = @"endpoint", - PossibleTypes = new [] { typeof(string) })] - string Endpoint { get; set; } - /// A list of input columns for the Azure Machine Learning Studio endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of input columns for the Azure Machine Learning Studio endpoint.", - SerializedName = @"columnNames", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[] InputColumnName { get; set; } - /// The name of the input. This is the name provided while authoring the endpoint. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the input. This is the name provided while authoring the endpoint.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string InputName { get; set; } - /// A list of outputs from the Azure Machine Learning Studio endpoint execution. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of outputs from the Azure Machine Learning Studio endpoint execution.", - SerializedName = @"outputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn[] Output { get; set; } - - } - /// The binding properties associated with an Azure Machine learning Studio. - internal partial interface IAzureMachineLearningStudioFunctionBindingPropertiesInternal - - { - /// The API key used to authenticate with Request-Response endpoint. - string ApiKey { get; set; } - /// - /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. - /// - int? BatchSize { get; set; } - /// - /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs - /// - string Endpoint { get; set; } - /// The inputs for the Azure Machine Learning Studio endpoint. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs Input { get; set; } - /// A list of input columns for the Azure Machine Learning Studio endpoint. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[] InputColumnName { get; set; } - /// The name of the input. This is the name provided while authoring the endpoint. - string InputName { get; set; } - /// A list of outputs from the Azure Machine Learning Studio endpoint execution. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn[] Output { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingRetrievalProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingRetrievalProperties.PowerShell.cs deleted file mode 100644 index 042ec4af8ea4..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingRetrievalProperties.PowerShell.cs +++ /dev/null @@ -1,159 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// The binding retrieval properties associated with an Azure Machine learning Studio. - /// - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionBindingRetrievalPropertiesTypeConverter))] - public partial class AzureMachineLearningStudioFunctionBindingRetrievalProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureMachineLearningStudioFunctionBindingRetrievalProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ExecuteEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).ExecuteEndpoint = (string) content.GetValueForProperty("ExecuteEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).ExecuteEndpoint, global::System.Convert.ToString); - } - if (content.Contains("UdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).UdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).UdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureMachineLearningStudioFunctionBindingRetrievalProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ExecuteEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).ExecuteEndpoint = (string) content.GetValueForProperty("ExecuteEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).ExecuteEndpoint, global::System.Convert.ToString); - } - if (content.Contains("UdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).UdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).UdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMachineLearningStudioFunctionBindingRetrievalProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMachineLearningStudioFunctionBindingRetrievalProperties(content); - } - - /// - /// Creates a new instance of , deserializing the - /// content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The binding retrieval properties associated with an Azure Machine learning Studio. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionBindingRetrievalPropertiesTypeConverter))] - public partial interface IAzureMachineLearningStudioFunctionBindingRetrievalProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs deleted file mode 100644 index 150712e97e54..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs +++ /dev/null @@ -1,175 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// The parameters needed to retrieve the default function definition for an Azure Machine Learning Studio function. - /// - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersTypeConverter))] - public partial class AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("BindingRetrievalProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("BindingType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); - } - if (content.Contains("BindingRetrievalPropertyUdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - if (content.Contains("BindingRetrievalPropertyExecuteEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyExecuteEndpoint = (string) content.GetValueForProperty("BindingRetrievalPropertyExecuteEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyExecuteEndpoint, 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 AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("BindingRetrievalProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("BindingType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); - } - if (content.Contains("BindingRetrievalPropertyUdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - if (content.Contains("BindingRetrievalPropertyExecuteEndpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyExecuteEndpoint = (string) content.GetValueForProperty("BindingRetrievalPropertyExecuteEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyExecuteEndpoint, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters(content); - } - - /// - /// Creates a new instance of , deserializing - /// the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The parameters needed to retrieve the default function definition for an Azure Machine Learning Studio function. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersTypeConverter))] - public partial interface IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.cs deleted file mode 100644 index 1d65ca3d5268..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.cs +++ /dev/null @@ -1,111 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// The parameters needed to retrieve the default function definition for an Azure Machine Learning Studio function. - /// - public partial class AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionRetrieveDefaultDefinitionParameters(); - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalProperties _bindingRetrievalProperty; - - /// - /// The binding retrieval properties associated with an Azure Machine learning Studio. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalProperties BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionBindingRetrievalProperties()); set => this._bindingRetrievalProperty = value; } - - /// - /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string BindingRetrievalPropertyExecuteEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).ExecuteEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).ExecuteEndpoint = value ?? null; } - - /// The function type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? BindingRetrievalPropertyUdfType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType)""); } - - /// Indicates the function binding type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string BindingType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)__functionRetrieveDefaultDefinitionParameters).BindingType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)__functionRetrieveDefaultDefinitionParameters).BindingType = value ; } - - /// Internal Acessors for BindingRetrievalProperty - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal.BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionBindingRetrievalProperties()); set { {_bindingRetrievalProperty = value;} } } - - /// - /// Creates an new instance. - /// - public AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); - await eventListener.AssertObjectIsValid(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); - } - } - /// The parameters needed to retrieve the default function definition for an Azure Machine Learning Studio function. - public partial interface IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters - { - /// - /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs", - SerializedName = @"executeEndpoint", - PossibleTypes = new [] { typeof(string) })] - string BindingRetrievalPropertyExecuteEndpoint { get; set; } - /// The function type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The function type.", - SerializedName = @"udfType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? BindingRetrievalPropertyUdfType { get; set; } - - } - /// The parameters needed to retrieve the default function definition for an Azure Machine Learning Studio function. - internal partial interface IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal - { - /// - /// The binding retrieval properties associated with an Azure Machine learning Studio. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalProperties BindingRetrievalProperty { get; set; } - /// - /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs - /// - string BindingRetrievalPropertyExecuteEndpoint { get; set; } - /// The function type. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? BindingRetrievalPropertyUdfType { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputColumn.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputColumn.PowerShell.cs deleted file mode 100644 index 6e05d05694e3..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputColumn.PowerShell.cs +++ /dev/null @@ -1,165 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes an input column for the Azure Machine Learning Studio endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioInputColumnTypeConverter))] - public partial class AzureMachineLearningStudioInputColumn - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureMachineLearningStudioInputColumn(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumnInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("DataType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumnInternal)this).DataType, global::System.Convert.ToString); - } - if (content.Contains("MapTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumnInternal)this).MapTo = (int?) content.GetValueForProperty("MapTo",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumnInternal)this).MapTo, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureMachineLearningStudioInputColumn(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumnInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("DataType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumnInternal)this).DataType, global::System.Convert.ToString); - } - if (content.Contains("MapTo")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumnInternal)this).MapTo = (int?) content.GetValueForProperty("MapTo",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumnInternal)this).MapTo, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMachineLearningStudioInputColumn(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMachineLearningStudioInputColumn(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json - /// string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes an input column for the Azure Machine Learning Studio endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioInputColumnTypeConverter))] - public partial interface IAzureMachineLearningStudioInputColumn - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputs.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputs.PowerShell.cs deleted file mode 100644 index cca3da04898a..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputs.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The inputs for the Azure Machine Learning Studio endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioInputsTypeConverter))] - public partial class AzureMachineLearningStudioInputs - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureMachineLearningStudioInputs(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputsInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("ColumnName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputsInternal)this).ColumnName = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[]) content.GetValueForProperty("ColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputsInternal)this).ColumnName, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputColumnTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureMachineLearningStudioInputs(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputsInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("ColumnName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputsInternal)this).ColumnName = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[]) content.GetValueForProperty("ColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputsInternal)this).ColumnName, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputColumnTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMachineLearningStudioInputs(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMachineLearningStudioInputs(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The inputs for the Azure Machine Learning Studio endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioInputsTypeConverter))] - public partial interface IAzureMachineLearningStudioInputs - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioOutputColumn.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioOutputColumn.PowerShell.cs deleted file mode 100644 index 6f2471afbb8e..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioOutputColumn.PowerShell.cs +++ /dev/null @@ -1,157 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes an output column for the Azure Machine Learning Studio endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioOutputColumnTypeConverter))] - public partial class AzureMachineLearningStudioOutputColumn - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureMachineLearningStudioOutputColumn(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumnInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("DataType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumnInternal)this).DataType, 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 AzureMachineLearningStudioOutputColumn(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumnInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("DataType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumnInternal)this).DataType, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureMachineLearningStudioOutputColumn(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureMachineLearningStudioOutputColumn(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json - /// string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes an output column for the Azure Machine Learning Studio endpoint. - [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioOutputColumnTypeConverter))] - public partial interface IAzureMachineLearningStudioOutputColumn - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseDataSourceProperties.PowerShell.cs deleted file mode 100644 index fc9fd75a71a9..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,204 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with an Azure SQL database data source. - [System.ComponentModel.TypeConverter(typeof(AzureSqlDatabaseDataSourcePropertiesTypeConverter))] - public partial class AzureSqlDatabaseDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureSqlDatabaseDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("MaxBatchCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("MaxWriterCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount = (float?) content.GetValueForProperty("MaxWriterCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureSqlDatabaseDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("MaxBatchCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("MaxWriterCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount = (float?) content.GetValueForProperty("MaxWriterCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureSqlDatabaseDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureSqlDatabaseDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with an Azure SQL database data source. - [System.ComponentModel.TypeConverter(typeof(AzureSqlDatabaseDataSourcePropertiesTypeConverter))] - public partial interface IAzureSqlDatabaseDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSource.PowerShell.cs deleted file mode 100644 index bad0e4ca85cb..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSource.PowerShell.cs +++ /dev/null @@ -1,218 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes an Azure SQL database output data source. - [System.ComponentModel.TypeConverter(typeof(AzureSqlDatabaseOutputDataSourceTypeConverter))] - public partial class AzureSqlDatabaseOutputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureSqlDatabaseOutputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlDatabaseDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Password, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("MaxBatchCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("MaxWriterCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxWriterCount = (float?) content.GetValueForProperty("MaxWriterCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxWriterCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureSqlDatabaseOutputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlDatabaseDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Password, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("MaxBatchCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("MaxWriterCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxWriterCount = (float?) content.GetValueForProperty("MaxWriterCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxWriterCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureSqlDatabaseOutputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureSqlDatabaseOutputDataSource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes an Azure SQL database output data source. - [System.ComponentModel.TypeConverter(typeof(AzureSqlDatabaseOutputDataSourceTypeConverter))] - public partial interface IAzureSqlDatabaseOutputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSource.cs deleted file mode 100644 index e76ccf7e6428..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSource.cs +++ /dev/null @@ -1,223 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Describes an Azure SQL database output data source. - public partial class AzureSqlDatabaseOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(); - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Database { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Database; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Database = value ?? null; } - - /// - /// Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public float? MaxBatchCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).MaxBatchCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).MaxBatchCount = value ?? default(float); } - - /// - /// Max Write r count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public float? MaxWriterCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).MaxWriterCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).MaxWriterCount = value ?? default(float); } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlDatabaseDataSourceProperties()); set { {_property = value;} } } - - /// - /// The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Password { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Password = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties _property; - - /// - /// The properties that are associated with an Azure SQL database output. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlDatabaseDataSourceProperties()); set => this._property = value; } - - /// - /// The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Server { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Server; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Server = value ?? null; } - - /// - /// The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Table { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Table; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Table = value ?? null; } - - /// - /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type = value ; } - - /// - /// The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string User { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).User; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).User = value ?? null; } - - /// Creates an new instance. - public AzureSqlDatabaseOutputDataSource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); - await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); - } - } - /// Describes an Azure SQL database output data source. - public partial interface IAzureSqlDatabaseOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource - { - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authentication Mode.", - SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"database", - PossibleTypes = new [] { typeof(string) })] - string Database { get; set; } - /// - /// Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests.", - SerializedName = @"maxBatchCount", - PossibleTypes = new [] { typeof(float) })] - float? MaxBatchCount { get; set; } - /// - /// Max Write r count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Max Write r count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests.", - SerializedName = @"maxWriterCount", - PossibleTypes = new [] { typeof(float) })] - float? MaxWriterCount { get; set; } - /// - /// The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"password", - PossibleTypes = new [] { typeof(string) })] - string Password { get; set; } - /// - /// The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"server", - PossibleTypes = new [] { typeof(string) })] - string Server { get; set; } - /// - /// The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"table", - PossibleTypes = new [] { typeof(string) })] - string Table { get; set; } - /// - /// The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"user", - PossibleTypes = new [] { typeof(string) })] - string User { get; set; } - - } - /// Describes an Azure SQL database output data source. - internal partial interface IAzureSqlDatabaseOutputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal - { - /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. - string Database { get; set; } - /// - /// Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests. - /// - float? MaxBatchCount { get; set; } - /// - /// Max Write r count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests. - /// - float? MaxWriterCount { get; set; } - /// - /// The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - string Password { get; set; } - /// - /// The properties that are associated with an Azure SQL database output. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties Property { get; set; } - /// - /// The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - string Server { get; set; } - /// - /// The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - string Table { get; set; } - /// - /// The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - string User { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSourceProperties.PowerShell.cs deleted file mode 100644 index e303e3d22018..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,205 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with an Azure SQL database output. - [System.ComponentModel.TypeConverter(typeof(AzureSqlDatabaseOutputDataSourcePropertiesTypeConverter))] - public partial class AzureSqlDatabaseOutputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureSqlDatabaseOutputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("MaxBatchCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("MaxWriterCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount = (float?) content.GetValueForProperty("MaxWriterCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureSqlDatabaseOutputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("MaxBatchCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("MaxWriterCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount = (float?) content.GetValueForProperty("MaxWriterCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureSqlDatabaseOutputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureSqlDatabaseOutputDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a - /// json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with an Azure SQL database output. - [System.ComponentModel.TypeConverter(typeof(AzureSqlDatabaseOutputDataSourcePropertiesTypeConverter))] - public partial interface IAzureSqlDatabaseOutputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSourceProperties.cs deleted file mode 100644 index 98837d9430ab..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSourceProperties.cs +++ /dev/null @@ -1,99 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with an Azure SQL database output. - public partial class AzureSqlDatabaseOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourcePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties __azureSqlDatabaseDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlDatabaseDataSourceProperties(); - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Database { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Database; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Database = value ?? null; } - - /// - /// Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public float? MaxBatchCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).MaxBatchCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).MaxBatchCount = value ?? default(float); } - - /// - /// Max Write r count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public float? MaxWriterCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).MaxWriterCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).MaxWriterCount = value ?? default(float); } - - /// - /// The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Password { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Password = value ?? null; } - - /// - /// The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Server { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Server; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Server = value ?? null; } - - /// - /// The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Table { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Table; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Table = value ?? null; } - - /// - /// The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string User { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).User; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).User = value ?? null; } - - /// - /// Creates an new instance. - /// - public AzureSqlDatabaseOutputDataSourceProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__azureSqlDatabaseDataSourceProperties), __azureSqlDatabaseDataSourceProperties); - await eventListener.AssertObjectIsValid(nameof(__azureSqlDatabaseDataSourceProperties), __azureSqlDatabaseDataSourceProperties); - } - } - /// The properties that are associated with an Azure SQL database output. - public partial interface IAzureSqlDatabaseOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties - { - - } - /// The properties that are associated with an Azure SQL database output. - internal partial interface IAzureSqlDatabaseOutputDataSourcePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSource.PowerShell.cs deleted file mode 100644 index 1bb3cf7ba355..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSource.PowerShell.cs +++ /dev/null @@ -1,226 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes an Azure SQL database reference input data source. - [System.ComponentModel.TypeConverter(typeof(AzureSqlReferenceInputDataSourceTypeConverter))] - public partial class AzureSqlReferenceInputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureSqlReferenceInputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlReferenceInputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Password, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("RefreshType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).RefreshType = (string) content.GetValueForProperty("RefreshType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).RefreshType, global::System.Convert.ToString); - } - if (content.Contains("RefreshRate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).RefreshRate = (string) content.GetValueForProperty("RefreshRate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).RefreshRate, global::System.Convert.ToString); - } - if (content.Contains("FullSnapshotQuery")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).FullSnapshotQuery = (string) content.GetValueForProperty("FullSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).FullSnapshotQuery, global::System.Convert.ToString); - } - if (content.Contains("DeltaSnapshotQuery")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).DeltaSnapshotQuery = (string) content.GetValueForProperty("DeltaSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).DeltaSnapshotQuery, 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 AzureSqlReferenceInputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlReferenceInputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Password, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("RefreshType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).RefreshType = (string) content.GetValueForProperty("RefreshType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).RefreshType, global::System.Convert.ToString); - } - if (content.Contains("RefreshRate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).RefreshRate = (string) content.GetValueForProperty("RefreshRate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).RefreshRate, global::System.Convert.ToString); - } - if (content.Contains("FullSnapshotQuery")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).FullSnapshotQuery = (string) content.GetValueForProperty("FullSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).FullSnapshotQuery, global::System.Convert.ToString); - } - if (content.Contains("DeltaSnapshotQuery")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).DeltaSnapshotQuery = (string) content.GetValueForProperty("DeltaSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal)this).DeltaSnapshotQuery, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureSqlReferenceInputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureSqlReferenceInputDataSource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes an Azure SQL database reference input data source. - [System.ComponentModel.TypeConverter(typeof(AzureSqlReferenceInputDataSourceTypeConverter))] - public partial interface IAzureSqlReferenceInputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSourceProperties.PowerShell.cs deleted file mode 100644 index 4826e6436a7f..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,211 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - [System.ComponentModel.TypeConverter(typeof(AzureSqlReferenceInputDataSourcePropertiesTypeConverter))] - public partial class AzureSqlReferenceInputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureSqlReferenceInputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("RefreshType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshType = (string) content.GetValueForProperty("RefreshType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshType, global::System.Convert.ToString); - } - if (content.Contains("RefreshRate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshRate = (string) content.GetValueForProperty("RefreshRate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshRate, global::System.Convert.ToString); - } - if (content.Contains("FullSnapshotQuery")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).FullSnapshotQuery = (string) content.GetValueForProperty("FullSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).FullSnapshotQuery, global::System.Convert.ToString); - } - if (content.Contains("DeltaSnapshotQuery")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).DeltaSnapshotQuery = (string) content.GetValueForProperty("DeltaSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).DeltaSnapshotQuery, 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 AzureSqlReferenceInputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("RefreshType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshType = (string) content.GetValueForProperty("RefreshType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshType, global::System.Convert.ToString); - } - if (content.Contains("RefreshRate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshRate = (string) content.GetValueForProperty("RefreshRate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshRate, global::System.Convert.ToString); - } - if (content.Contains("FullSnapshotQuery")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).FullSnapshotQuery = (string) content.GetValueForProperty("FullSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).FullSnapshotQuery, global::System.Convert.ToString); - } - if (content.Contains("DeltaSnapshotQuery")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).DeltaSnapshotQuery = (string) content.GetValueForProperty("DeltaSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).DeltaSnapshotQuery, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureSqlReferenceInputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureSqlReferenceInputDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a - /// json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - [System.ComponentModel.TypeConverter(typeof(AzureSqlReferenceInputDataSourcePropertiesTypeConverter))] - public partial interface IAzureSqlReferenceInputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseDataSourceProperties.PowerShell.cs deleted file mode 100644 index 64c69562dc44..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,178 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with an Azure SQL database data source. - [System.ComponentModel.TypeConverter(typeof(AzureSynapseDataSourcePropertiesTypeConverter))] - public partial class AzureSynapseDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureSynapseDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Password, 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 AzureSynapseDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureSynapseDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureSynapseDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with an Azure SQL database data source. - [System.ComponentModel.TypeConverter(typeof(AzureSynapseDataSourcePropertiesTypeConverter))] - public partial interface IAzureSynapseDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSource.PowerShell.cs deleted file mode 100644 index 1beb56070002..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSource.PowerShell.cs +++ /dev/null @@ -1,194 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes an Azure Synapse output data source. - [System.ComponentModel.TypeConverter(typeof(AzureSynapseOutputDataSourceTypeConverter))] - public partial class AzureSynapseOutputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureSynapseOutputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSynapseDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Password, 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 AzureSynapseOutputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSynapseDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal)this).Password, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureSynapseOutputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureSynapseOutputDataSource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes an Azure Synapse output data source. - [System.ComponentModel.TypeConverter(typeof(AzureSynapseOutputDataSourceTypeConverter))] - public partial interface IAzureSynapseOutputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSourceProperties.PowerShell.cs deleted file mode 100644 index 304e0c2807e9..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,181 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with an Azure Synapse output. - [System.ComponentModel.TypeConverter(typeof(AzureSynapseOutputDataSourcePropertiesTypeConverter))] - public partial class AzureSynapseOutputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureSynapseOutputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Password, 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 AzureSynapseOutputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Server")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("User")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); - } - if (content.Contains("Password")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureSynapseOutputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureSynapseOutputDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json - /// string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with an Azure Synapse output. - [System.ComponentModel.TypeConverter(typeof(AzureSynapseOutputDataSourcePropertiesTypeConverter))] - public partial interface IAzureSynapseOutputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSourceProperties.cs deleted file mode 100644 index 2e6635454f9b..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSourceProperties.cs +++ /dev/null @@ -1,81 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with an Azure Synapse output. - public partial class AzureSynapseOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourcePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties __azureSynapseDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSynapseDataSourceProperties(); - - /// The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Database { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Database; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Database = value ?? null; } - - /// - /// The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Password { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Password = value ?? null; } - - /// - /// The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Server { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Server; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Server = value ?? null; } - - /// - /// The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Table { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Table; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Table = value ?? null; } - - /// - /// The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string User { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).User; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).User = value ?? null; } - - /// Creates an new instance. - public AzureSynapseOutputDataSourceProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__azureSynapseDataSourceProperties), __azureSynapseDataSourceProperties); - await eventListener.AssertObjectIsValid(nameof(__azureSynapseDataSourceProperties), __azureSynapseDataSourceProperties); - } - } - /// The properties that are associated with an Azure Synapse output. - public partial interface IAzureSynapseOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties - { - - } - /// The properties that are associated with an Azure Synapse output. - internal partial interface IAzureSynapseOutputDataSourcePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSource.PowerShell.cs deleted file mode 100644 index e108f90eba29..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSource.PowerShell.cs +++ /dev/null @@ -1,210 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes an Azure Table output data source. - [System.ComponentModel.TypeConverter(typeof(AzureTableOutputDataSourceTypeConverter))] - public partial class AzureTableOutputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureTableOutputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureTableOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).AccountName, global::System.Convert.ToString); - } - if (content.Contains("AccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).AccountKey, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("RowKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).RowKey = (string) content.GetValueForProperty("RowKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).RowKey, global::System.Convert.ToString); - } - if (content.Contains("ColumnsToRemove")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).ColumnsToRemove = (string[]) content.GetValueForProperty("ColumnsToRemove",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).ColumnsToRemove, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("BatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureTableOutputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureTableOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).AccountName, global::System.Convert.ToString); - } - if (content.Contains("AccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).AccountKey, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("RowKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).RowKey = (string) content.GetValueForProperty("RowKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).RowKey, global::System.Convert.ToString); - } - if (content.Contains("ColumnsToRemove")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).ColumnsToRemove = (string[]) content.GetValueForProperty("ColumnsToRemove",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).ColumnsToRemove, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("BatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureTableOutputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureTableOutputDataSource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes an Azure Table output data source. - [System.ComponentModel.TypeConverter(typeof(AzureTableOutputDataSourceTypeConverter))] - public partial interface IAzureTableOutputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSource.cs deleted file mode 100644 index 3e8e0f083b16..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSource.cs +++ /dev/null @@ -1,209 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Describes an Azure Table output data source. - public partial class AzureTableOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(); - - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string AccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)Property).AccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)Property).AccountKey = value ?? null; } - - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string AccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)Property).AccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)Property).AccountName = value ?? null; } - - /// The number of rows to write to the Azure Table at a time. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public int? BatchSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)Property).BatchSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)Property).BatchSize = value ?? default(int); } - - /// - /// If specified, each item in the array is the name of a column to remove (if present) from output event entities. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string[] ColumnsToRemove { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)Property).ColumnsToRemove; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)Property).ColumnsToRemove = value ?? null /* arrayOf */; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureTableOutputDataSourceProperties()); set { {_property = value;} } } - - /// - /// This element indicates the name of a column from the SELECT statement in the query that will be used as the partition - /// key for the Azure Table. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string PartitionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)Property).PartitionKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)Property).PartitionKey = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceProperties _property; - - /// - /// The properties that are associated with an Azure Table output. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureTableOutputDataSourceProperties()); set => this._property = value; } - - /// - /// This element indicates the name of a column from the SELECT statement in the query that will be used as the row key for - /// the Azure Table. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string RowKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)Property).RowKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)Property).RowKey = value ?? null; } - - /// The name of the Azure Table. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Table { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)Property).Table; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)Property).Table = value ?? null; } - - /// - /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type = value ; } - - /// Creates an new instance. - public AzureTableOutputDataSource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); - await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); - } - } - /// Describes an Azure Table output data source. - public partial interface IAzureTableOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource - { - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"accountKey", - PossibleTypes = new [] { typeof(string) })] - string AccountKey { get; set; } - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"accountName", - PossibleTypes = new [] { typeof(string) })] - string AccountName { get; set; } - /// The number of rows to write to the Azure Table at a time. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The number of rows to write to the Azure Table at a time.", - SerializedName = @"batchSize", - PossibleTypes = new [] { typeof(int) })] - int? BatchSize { get; set; } - /// - /// If specified, each item in the array is the name of a column to remove (if present) from output event entities. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"If specified, each item in the array is the name of a column to remove (if present) from output event entities.", - SerializedName = @"columnsToRemove", - PossibleTypes = new [] { typeof(string) })] - string[] ColumnsToRemove { get; set; } - /// - /// This element indicates the name of a column from the SELECT statement in the query that will be used as the partition - /// key for the Azure Table. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"This element indicates the name of a column from the SELECT statement in the query that will be used as the partition key for the Azure Table. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"partitionKey", - PossibleTypes = new [] { typeof(string) })] - string PartitionKey { get; set; } - /// - /// This element indicates the name of a column from the SELECT statement in the query that will be used as the row key for - /// the Azure Table. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"This element indicates the name of a column from the SELECT statement in the query that will be used as the row key for the Azure Table. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"rowKey", - PossibleTypes = new [] { typeof(string) })] - string RowKey { get; set; } - /// The name of the Azure Table. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Azure Table. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"table", - PossibleTypes = new [] { typeof(string) })] - string Table { get; set; } - - } - /// Describes an Azure Table output data source. - internal partial interface IAzureTableOutputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal - { - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - string AccountKey { get; set; } - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - string AccountName { get; set; } - /// The number of rows to write to the Azure Table at a time. - int? BatchSize { get; set; } - /// - /// If specified, each item in the array is the name of a column to remove (if present) from output event entities. - /// - string[] ColumnsToRemove { get; set; } - /// - /// This element indicates the name of a column from the SELECT statement in the query that will be used as the partition - /// key for the Azure Table. Required on PUT (CreateOrReplace) requests. - /// - string PartitionKey { get; set; } - /// - /// The properties that are associated with an Azure Table output. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceProperties Property { get; set; } - /// - /// This element indicates the name of a column from the SELECT statement in the query that will be used as the row key for - /// the Azure Table. Required on PUT (CreateOrReplace) requests. - /// - string RowKey { get; set; } - /// The name of the Azure Table. Required on PUT (CreateOrReplace) requests. - string Table { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSourceProperties.PowerShell.cs deleted file mode 100644 index 31a5c143495b..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,196 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with an Azure Table output. - [System.ComponentModel.TypeConverter(typeof(AzureTableOutputDataSourcePropertiesTypeConverter))] - public partial class AzureTableOutputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AzureTableOutputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).AccountName, global::System.Convert.ToString); - } - if (content.Contains("AccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).AccountKey, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("RowKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).RowKey = (string) content.GetValueForProperty("RowKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).RowKey, global::System.Convert.ToString); - } - if (content.Contains("ColumnsToRemove")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).ColumnsToRemove = (string[]) content.GetValueForProperty("ColumnsToRemove",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).ColumnsToRemove, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("BatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal AzureTableOutputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).AccountName, global::System.Convert.ToString); - } - if (content.Contains("AccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).AccountKey, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("RowKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).RowKey = (string) content.GetValueForProperty("RowKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).RowKey, global::System.Convert.ToString); - } - if (content.Contains("ColumnsToRemove")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).ColumnsToRemove = (string[]) content.GetValueForProperty("ColumnsToRemove",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).ColumnsToRemove, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("BatchSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AzureTableOutputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AzureTableOutputDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with an Azure Table output. - [System.ComponentModel.TypeConverter(typeof(AzureTableOutputDataSourcePropertiesTypeConverter))] - public partial interface IAzureTableOutputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobDataSourceProperties.PowerShell.cs deleted file mode 100644 index 103b8a90f5c1..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,178 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with a blob data source. - [System.ComponentModel.TypeConverter(typeof(BlobDataSourcePropertiesTypeConverter))] - public partial class BlobDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal BlobDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[]) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom)); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("PathPattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat, 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 BlobDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[]) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom)); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("PathPattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new BlobDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new BlobDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with a blob data source. - [System.ComponentModel.TypeConverter(typeof(BlobDataSourcePropertiesTypeConverter))] - public partial interface IBlobDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSource.PowerShell.cs deleted file mode 100644 index d759d4f15f50..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSource.PowerShell.cs +++ /dev/null @@ -1,202 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes a blob output data source. - [System.ComponentModel.TypeConverter(typeof(BlobOutputDataSourceTypeConverter))] - public partial class BlobOutputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal BlobOutputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[]) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom)); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("PathPattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).PathPattern, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).TimeFormat, 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 BlobOutputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[]) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom)); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("PathPattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).PathPattern, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal)this).TimeFormat, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new BlobOutputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new BlobOutputDataSource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes a blob output data source. - [System.ComponentModel.TypeConverter(typeof(BlobOutputDataSourceTypeConverter))] - public partial interface IBlobOutputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSource.cs deleted file mode 100644 index bc8cb39d580d..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSource.cs +++ /dev/null @@ -1,201 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Describes a blob output data source. - public partial class BlobOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(); - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// - /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from - /// or written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Container { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).Container; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).Container = value ?? null; } - - /// - /// The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string DateFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).DateFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).DateFormat = value ?? null; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobOutputDataSourceProperties()); set { {_property = value;} } } - - /// - /// The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine - /// whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input - /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and - /// example. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string PathPattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).PathPattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).PathPattern = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceProperties _property; - - /// - /// The properties that are associated with a blob output. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobOutputDataSourceProperties()); set => this._property = value; } - - /// - /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] StorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).StorageAccount = value ?? null /* arrayOf */; } - - /// - /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TimeFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).TimeFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).TimeFormat = value ?? null; } - - /// - /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type = value ; } - - /// Creates an new instance. - public BlobOutputDataSource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); - await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); - } - } - /// Describes a blob output data source. - public partial interface IBlobOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource - { - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authentication Mode.", - SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// - /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from - /// or written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"container", - PossibleTypes = new [] { typeof(string) })] - string Container { get; set; } - /// - /// The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.", - SerializedName = @"dateFormat", - PossibleTypes = new [] { typeof(string) })] - string DateFormat { get; set; } - /// - /// The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine - /// whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input - /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and - /// example. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.", - SerializedName = @"pathPattern", - PossibleTypes = new [] { typeof(string) })] - string PathPattern { get; set; } - /// - /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"storageAccounts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] StorageAccount { get; set; } - /// - /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.", - SerializedName = @"timeFormat", - PossibleTypes = new [] { typeof(string) })] - string TimeFormat { get; set; } - - } - /// Describes a blob output data source. - internal partial interface IBlobOutputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal - { - /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// - /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from - /// or written to. Required on PUT (CreateOrReplace) requests. - /// - string Container { get; set; } - /// - /// The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. - /// - string DateFormat { get; set; } - /// - /// The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine - /// whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input - /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and - /// example. - /// - string PathPattern { get; set; } - /// - /// The properties that are associated with a blob output. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceProperties Property { get; set; } - /// - /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] StorageAccount { get; set; } - /// - /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. - /// - string TimeFormat { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSourceProperties.PowerShell.cs deleted file mode 100644 index 9959eaa51ebb..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,186 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with a blob output. - [System.ComponentModel.TypeConverter(typeof(BlobOutputDataSourcePropertiesTypeConverter))] - public partial class BlobOutputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal BlobOutputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[]) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom)); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("PathPattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat, 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 BlobOutputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[]) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom)); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("PathPattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new BlobOutputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new BlobOutputDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with a blob output. - [System.ComponentModel.TypeConverter(typeof(BlobOutputDataSourcePropertiesTypeConverter))] - public partial interface IBlobOutputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSourceProperties.cs deleted file mode 100644 index 0ba70604cf0b..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSourceProperties.cs +++ /dev/null @@ -1,104 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with a blob output. - public partial class BlobOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourcePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties __blobDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobDataSourceProperties(); - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? _authenticationMode; - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => this._authenticationMode; set => this._authenticationMode = value; } - - /// - /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from - /// or written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Container { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).Container; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).Container = value ?? null; } - - /// - /// The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string DateFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).DateFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).DateFormat = value ?? null; } - - /// - /// The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine - /// whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input - /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and - /// example. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string PathPattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).PathPattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).PathPattern = value ?? null; } - - /// - /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] StorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).StorageAccount = value ?? null /* arrayOf */; } - - /// - /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string TimeFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).TimeFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).TimeFormat = value ?? null; } - - /// Creates an new instance. - public BlobOutputDataSourceProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__blobDataSourceProperties), __blobDataSourceProperties); - await eventListener.AssertObjectIsValid(nameof(__blobDataSourceProperties), __blobDataSourceProperties); - } - } - /// The properties that are associated with a blob output. - public partial interface IBlobOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties - { - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authentication Mode.", - SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - - } - /// The properties that are associated with a blob output. - internal partial interface IBlobOutputDataSourcePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal - { - /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSource.PowerShell.cs deleted file mode 100644 index 76fa492145c8..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSource.PowerShell.cs +++ /dev/null @@ -1,194 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes a blob input data source that contains reference data. - [System.ComponentModel.TypeConverter(typeof(BlobReferenceInputDataSourceTypeConverter))] - public partial class BlobReferenceInputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal BlobReferenceInputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[]) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom)); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("PathPattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).PathPattern, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).TimeFormat, 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 BlobReferenceInputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[]) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom)); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("PathPattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).PathPattern, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal)this).TimeFormat, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new BlobReferenceInputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new BlobReferenceInputDataSource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes a blob input data source that contains reference data. - [System.ComponentModel.TypeConverter(typeof(BlobReferenceInputDataSourceTypeConverter))] - public partial interface IBlobReferenceInputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSourceProperties.PowerShell.cs deleted file mode 100644 index 069bbee90808..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,181 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with a blob input containing reference data. - [System.ComponentModel.TypeConverter(typeof(BlobReferenceInputDataSourcePropertiesTypeConverter))] - public partial class BlobReferenceInputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal BlobReferenceInputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[]) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom)); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("PathPattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat, 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 BlobReferenceInputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[]) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom)); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("PathPattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new BlobReferenceInputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new BlobReferenceInputDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json - /// string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with a blob input containing reference data. - [System.ComponentModel.TypeConverter(typeof(BlobReferenceInputDataSourcePropertiesTypeConverter))] - public partial interface IBlobReferenceInputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSourceProperties.cs deleted file mode 100644 index 48e462758c84..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSourceProperties.cs +++ /dev/null @@ -1,87 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with a blob input containing reference data. - public partial class BlobReferenceInputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourcePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties __blobDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobDataSourceProperties(); - - /// - /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from - /// or written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Container { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).Container; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).Container = value ?? null; } - - /// - /// The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string DateFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).DateFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).DateFormat = value ?? null; } - - /// - /// The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine - /// whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input - /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and - /// example. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string PathPattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).PathPattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).PathPattern = value ?? null; } - - /// - /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] StorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).StorageAccount = value ?? null /* arrayOf */; } - - /// - /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string TimeFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).TimeFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).TimeFormat = value ?? null; } - - /// Creates an new instance. - public BlobReferenceInputDataSourceProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__blobDataSourceProperties), __blobDataSourceProperties); - await eventListener.AssertObjectIsValid(nameof(__blobDataSourceProperties), __blobDataSourceProperties); - } - } - /// The properties that are associated with a blob input containing reference data. - public partial interface IBlobReferenceInputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties - { - - } - /// The properties that are associated with a blob input containing reference data. - internal partial interface IBlobReferenceInputDataSourcePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSource.PowerShell.cs deleted file mode 100644 index 459508a45cf8..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSource.PowerShell.cs +++ /dev/null @@ -1,202 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes a blob input data source that contains stream data. - [System.ComponentModel.TypeConverter(typeof(BlobStreamInputDataSourceTypeConverter))] - public partial class BlobStreamInputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal BlobStreamInputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[]) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom)); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("PathPattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).PathPattern, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).TimeFormat, global::System.Convert.ToString); - } - if (content.Contains("SourcePartitionCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).SourcePartitionCount = (int?) content.GetValueForProperty("SourcePartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).SourcePartitionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal BlobStreamInputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[]) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom)); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("PathPattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).PathPattern, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).TimeFormat, global::System.Convert.ToString); - } - if (content.Contains("SourcePartitionCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).SourcePartitionCount = (int?) content.GetValueForProperty("SourcePartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal)this).SourcePartitionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new BlobStreamInputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new BlobStreamInputDataSource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes a blob input data source that contains stream data. - [System.ComponentModel.TypeConverter(typeof(BlobStreamInputDataSourceTypeConverter))] - public partial interface IBlobStreamInputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSourceProperties.PowerShell.cs deleted file mode 100644 index 14d1d72eceda..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,188 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with a blob input containing stream data. - [System.ComponentModel.TypeConverter(typeof(BlobStreamInputDataSourcePropertiesTypeConverter))] - public partial class BlobStreamInputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal BlobStreamInputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SourcePartitionCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourcePropertiesInternal)this).SourcePartitionCount = (int?) content.GetValueForProperty("SourcePartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourcePropertiesInternal)this).SourcePartitionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[]) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom)); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("PathPattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat, 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 BlobStreamInputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SourcePartitionCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourcePropertiesInternal)this).SourcePartitionCount = (int?) content.GetValueForProperty("SourcePartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourcePropertiesInternal)this).SourcePartitionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[]) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom)); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("PathPattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); - } - if (content.Contains("DateFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); - } - if (content.Contains("TimeFormat")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)this).TimeFormat, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new BlobStreamInputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new BlobStreamInputDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with a blob input containing stream data. - [System.ComponentModel.TypeConverter(typeof(BlobStreamInputDataSourcePropertiesTypeConverter))] - public partial interface IBlobStreamInputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSourceProperties.cs deleted file mode 100644 index bf4e5ea25641..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSourceProperties.cs +++ /dev/null @@ -1,104 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with a blob input containing stream data. - public partial class BlobStreamInputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourcePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties __blobDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobDataSourceProperties(); - - /// - /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from - /// or written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Container { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).Container; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).Container = value ?? null; } - - /// - /// The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string DateFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).DateFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).DateFormat = value ?? null; } - - /// - /// The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine - /// whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input - /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and - /// example. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string PathPattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).PathPattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).PathPattern = value ?? null; } - - /// Backing field for property. - private int? _sourcePartitionCount; - - /// The partition count of the blob input data source. Range 1 - 256. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public int? SourcePartitionCount { get => this._sourcePartitionCount; set => this._sourcePartitionCount = value; } - - /// - /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] StorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).StorageAccount = value ?? null /* arrayOf */; } - - /// - /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string TimeFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).TimeFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).TimeFormat = value ?? null; } - - /// Creates an new instance. - public BlobStreamInputDataSourceProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__blobDataSourceProperties), __blobDataSourceProperties); - await eventListener.AssertObjectIsValid(nameof(__blobDataSourceProperties), __blobDataSourceProperties); - } - } - /// The properties that are associated with a blob input containing stream data. - public partial interface IBlobStreamInputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties - { - /// The partition count of the blob input data source. Range 1 - 256. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The partition count of the blob input data source. Range 1 - 256.", - SerializedName = @"sourcePartitionCount", - PossibleTypes = new [] { typeof(int) })] - int? SourcePartitionCount { get; set; } - - } - /// The properties that are associated with a blob input containing stream data. - internal partial interface IBlobStreamInputDataSourcePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal - { - /// The partition count of the blob input data source. Range 1 - 256. - int? SourcePartitionCount { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBinding.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBinding.PowerShell.cs deleted file mode 100644 index 6904ac4b4a6e..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBinding.PowerShell.cs +++ /dev/null @@ -1,186 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The binding to a CSharp function. - [System.ComponentModel.TypeConverter(typeof(CSharpFunctionBindingTypeConverter))] - public partial class CSharpFunctionBinding - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal CSharpFunctionBinding(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionBindingPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Script")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Script, global::System.Convert.ToString); - } - if (content.Contains("DllPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).DllPath = (string) content.GetValueForProperty("DllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).DllPath, global::System.Convert.ToString); - } - if (content.Contains("Class")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Class = (string) content.GetValueForProperty("Class",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Class, global::System.Convert.ToString); - } - if (content.Contains("Method")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Method = (string) content.GetValueForProperty("Method",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Method, 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 CSharpFunctionBinding(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionBindingPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Script")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Script, global::System.Convert.ToString); - } - if (content.Contains("DllPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).DllPath = (string) content.GetValueForProperty("DllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).DllPath, global::System.Convert.ToString); - } - if (content.Contains("Class")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Class = (string) content.GetValueForProperty("Class",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Class, global::System.Convert.ToString); - } - if (content.Contains("Method")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Method = (string) content.GetValueForProperty("Method",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal)this).Method, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBinding DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CSharpFunctionBinding(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBinding DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CSharpFunctionBinding(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBinding FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The binding to a CSharp function. - [System.ComponentModel.TypeConverter(typeof(CSharpFunctionBindingTypeConverter))] - public partial interface ICSharpFunctionBinding - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBinding.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBinding.cs deleted file mode 100644 index 8592a7a1ee8f..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBinding.cs +++ /dev/null @@ -1,125 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The binding to a CSharp function. - public partial class CSharpFunctionBinding : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBinding, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionBinding(); - - /// The Csharp code containing a single function definition. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Class { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)Property).Class; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)Property).Class = value ?? null; } - - /// The Csharp code containing a single function definition. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string DllPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)Property).DllPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)Property).DllPath = value ?? null; } - - /// The Csharp code containing a single function definition. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Method { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)Property).Method; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)Property).Method = value ?? null; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionBindingProperties()); set { {_property = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingProperties _property; - - /// The binding properties associated with a CSharp function. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionBindingProperties()); set => this._property = value; } - - /// The Csharp code containing a single function definition. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Script { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)Property).Script; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)Property).Script = value ?? null; } - - /// Indicates the function binding type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)__functionBinding).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)__functionBinding).Type = value ; } - - /// Creates an new instance. - public CSharpFunctionBinding() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__functionBinding), __functionBinding); - await eventListener.AssertObjectIsValid(nameof(__functionBinding), __functionBinding); - } - } - /// The binding to a CSharp function. - public partial interface ICSharpFunctionBinding : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding - { - /// The Csharp code containing a single function definition. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Csharp code containing a single function definition.", - SerializedName = @"class", - PossibleTypes = new [] { typeof(string) })] - string Class { get; set; } - /// The Csharp code containing a single function definition. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Csharp code containing a single function definition.", - SerializedName = @"dllPath", - PossibleTypes = new [] { typeof(string) })] - string DllPath { get; set; } - /// The Csharp code containing a single function definition. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Csharp code containing a single function definition.", - SerializedName = @"method", - PossibleTypes = new [] { typeof(string) })] - string Method { get; set; } - /// The Csharp code containing a single function definition. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The Csharp code containing a single function definition.", - SerializedName = @"script", - PossibleTypes = new [] { typeof(string) })] - string Script { get; set; } - - } - /// The binding to a CSharp function. - internal partial interface ICSharpFunctionBindingInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal - { - /// The Csharp code containing a single function definition. - string Class { get; set; } - /// The Csharp code containing a single function definition. - string DllPath { get; set; } - /// The Csharp code containing a single function definition. - string Method { get; set; } - /// The binding properties associated with a CSharp function. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingProperties Property { get; set; } - /// The Csharp code containing a single function definition. - string Script { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingProperties.PowerShell.cs deleted file mode 100644 index 3b2a4e43c7d4..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingProperties.PowerShell.cs +++ /dev/null @@ -1,170 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The binding properties associated with a CSharp function. - [System.ComponentModel.TypeConverter(typeof(CSharpFunctionBindingPropertiesTypeConverter))] - public partial class CSharpFunctionBindingProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal CSharpFunctionBindingProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Script")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).Script, global::System.Convert.ToString); - } - if (content.Contains("DllPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).DllPath = (string) content.GetValueForProperty("DllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).DllPath, global::System.Convert.ToString); - } - if (content.Contains("Class")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).Class = (string) content.GetValueForProperty("Class",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).Class, global::System.Convert.ToString); - } - if (content.Contains("Method")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).Method = (string) content.GetValueForProperty("Method",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).Method, 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 CSharpFunctionBindingProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Script")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).Script, global::System.Convert.ToString); - } - if (content.Contains("DllPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).DllPath = (string) content.GetValueForProperty("DllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).DllPath, global::System.Convert.ToString); - } - if (content.Contains("Class")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).Class = (string) content.GetValueForProperty("Class",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).Class, global::System.Convert.ToString); - } - if (content.Contains("Method")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).Method = (string) content.GetValueForProperty("Method",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal)this).Method, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CSharpFunctionBindingProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CSharpFunctionBindingProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The binding properties associated with a CSharp function. - [System.ComponentModel.TypeConverter(typeof(CSharpFunctionBindingPropertiesTypeConverter))] - public partial interface ICSharpFunctionBindingProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingRetrievalProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingRetrievalProperties.PowerShell.cs deleted file mode 100644 index 63d6e5532645..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingRetrievalProperties.PowerShell.cs +++ /dev/null @@ -1,157 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The binding retrieval properties associated with a CSharp function. - [System.ComponentModel.TypeConverter(typeof(CSharpFunctionBindingRetrievalPropertiesTypeConverter))] - public partial class CSharpFunctionBindingRetrievalProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal CSharpFunctionBindingRetrievalProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Script")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalPropertiesInternal)this).Script, global::System.Convert.ToString); - } - if (content.Contains("UdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalPropertiesInternal)this).UdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalPropertiesInternal)this).UdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal CSharpFunctionBindingRetrievalProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Script")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalPropertiesInternal)this).Script, global::System.Convert.ToString); - } - if (content.Contains("UdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalPropertiesInternal)this).UdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalPropertiesInternal)this).UdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CSharpFunctionBindingRetrievalProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CSharpFunctionBindingRetrievalProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json - /// string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The binding retrieval properties associated with a CSharp function. - [System.ComponentModel.TypeConverter(typeof(CSharpFunctionBindingRetrievalPropertiesTypeConverter))] - public partial interface ICSharpFunctionBindingRetrievalProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs deleted file mode 100644 index 9fdeb2e4510c..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs +++ /dev/null @@ -1,175 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// The parameters needed to retrieve the default function definition for a CSharp function. - /// - [System.ComponentModel.TypeConverter(typeof(CSharpFunctionRetrieveDefaultDefinitionParametersTypeConverter))] - public partial class CSharpFunctionRetrieveDefaultDefinitionParameters - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal CSharpFunctionRetrieveDefaultDefinitionParameters(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("BindingRetrievalProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("BindingType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); - } - if (content.Contains("BindingRetrievalPropertyUdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - if (content.Contains("BindingRetrievalPropertyScript")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript = (string) content.GetValueForProperty("BindingRetrievalPropertyScript",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript, 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 CSharpFunctionRetrieveDefaultDefinitionParameters(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("BindingRetrievalProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("BindingType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); - } - if (content.Contains("BindingRetrievalPropertyUdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - if (content.Contains("BindingRetrievalPropertyScript")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript = (string) content.GetValueForProperty("BindingRetrievalPropertyScript",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CSharpFunctionRetrieveDefaultDefinitionParameters(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CSharpFunctionRetrieveDefaultDefinitionParameters(content); - } - - /// - /// Creates a new instance of , deserializing the content - /// from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The parameters needed to retrieve the default function definition for a CSharp function. - [System.ComponentModel.TypeConverter(typeof(CSharpFunctionRetrieveDefaultDefinitionParametersTypeConverter))] - public partial interface ICSharpFunctionRetrieveDefaultDefinitionParameters - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionRetrieveDefaultDefinitionParameters.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionRetrieveDefaultDefinitionParameters.cs deleted file mode 100644 index 08980a6cb2f2..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionRetrieveDefaultDefinitionParameters.cs +++ /dev/null @@ -1,101 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// The parameters needed to retrieve the default function definition for a CSharp function. - /// - public partial class CSharpFunctionRetrieveDefaultDefinitionParameters : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParameters, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionRetrieveDefaultDefinitionParameters(); - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalProperties _bindingRetrievalProperty; - - /// The binding retrieval properties associated with a CSharp function. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalProperties BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionBindingRetrievalProperties()); set => this._bindingRetrievalProperty = value; } - - /// The CSharp code containing a single function definition. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string BindingRetrievalPropertyScript { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).Script; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).Script = value ?? null; } - - /// The function type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? BindingRetrievalPropertyUdfType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType)""); } - - /// Indicates the function binding type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string BindingType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)__functionRetrieveDefaultDefinitionParameters).BindingType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)__functionRetrieveDefaultDefinitionParameters).BindingType = value ; } - - /// Internal Acessors for BindingRetrievalProperty - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal.BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionBindingRetrievalProperties()); set { {_bindingRetrievalProperty = value;} } } - - /// - /// Creates an new instance. - /// - public CSharpFunctionRetrieveDefaultDefinitionParameters() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); - await eventListener.AssertObjectIsValid(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); - } - } - /// The parameters needed to retrieve the default function definition for a CSharp function. - public partial interface ICSharpFunctionRetrieveDefaultDefinitionParameters : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters - { - /// The CSharp code containing a single function definition. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The CSharp code containing a single function definition.", - SerializedName = @"script", - PossibleTypes = new [] { typeof(string) })] - string BindingRetrievalPropertyScript { get; set; } - /// The function type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The function type.", - SerializedName = @"udfType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? BindingRetrievalPropertyUdfType { get; set; } - - } - /// The parameters needed to retrieve the default function definition for a CSharp function. - internal partial interface ICSharpFunctionRetrieveDefaultDefinitionParametersInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal - { - /// The binding retrieval properties associated with a CSharp function. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalProperties BindingRetrievalProperty { get; set; } - /// The CSharp code containing a single function definition. - string BindingRetrievalPropertyScript { get; set; } - /// The function type. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? BindingRetrievalPropertyUdfType { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerialization.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerialization.PowerShell.cs deleted file mode 100644 index 1c4b93817373..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerialization.PowerShell.cs +++ /dev/null @@ -1,172 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// Describes how data from an input is serialized or how data is serialized when written to an output in CSV format. - /// - [System.ComponentModel.TypeConverter(typeof(CsvSerializationTypeConverter))] - public partial class CsvSerialization - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal CsvSerialization(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CsvSerializationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); - } - if (content.Contains("Encoding")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationInternal)this).Encoding = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding?) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationInternal)this).Encoding, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding.CreateFrom); - } - if (content.Contains("FieldDelimiter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationInternal)this).FieldDelimiter = (string) content.GetValueForProperty("FieldDelimiter",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationInternal)this).FieldDelimiter, 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 CsvSerialization(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CsvSerializationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); - } - if (content.Contains("Encoding")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationInternal)this).Encoding = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding?) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationInternal)this).Encoding, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding.CreateFrom); - } - if (content.Contains("FieldDelimiter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationInternal)this).FieldDelimiter = (string) content.GetValueForProperty("FieldDelimiter",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationInternal)this).FieldDelimiter, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerialization DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CsvSerialization(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerialization DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CsvSerialization(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerialization FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes how data from an input is serialized or how data is serialized when written to an output in CSV format. - [System.ComponentModel.TypeConverter(typeof(CsvSerializationTypeConverter))] - public partial interface ICsvSerialization - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerialization.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerialization.cs deleted file mode 100644 index 93ae2a41e483..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerialization.cs +++ /dev/null @@ -1,126 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// Describes how data from an input is serialized or how data is serialized when written to an output in CSV format. - /// - public partial class CsvSerialization : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerialization, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Serialization(); - - /// - /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. - /// Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding? Encoding { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationPropertiesInternal)Property).Encoding; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationPropertiesInternal)Property).Encoding = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding)""); } - - /// - /// Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input - /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required - /// on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string FieldDelimiter { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationPropertiesInternal)Property).FieldDelimiter; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationPropertiesInternal)Property).FieldDelimiter = value ?? null; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CsvSerializationProperties()); set { {_property = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationProperties _property; - - /// - /// The properties that are associated with the CSV serialization type. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CsvSerializationProperties()); set => this._property = value; } - - /// - /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)__serialization).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)__serialization).Type = value ; } - - /// Creates an new instance. - public CsvSerialization() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__serialization), __serialization); - await eventListener.AssertObjectIsValid(nameof(__serialization), __serialization); - } - } - /// Describes how data from an input is serialized or how data is serialized when written to an output in CSV format. - public partial interface ICsvSerialization : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization - { - /// - /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. - /// Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"encoding", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding? Encoding { get; set; } - /// - /// Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input - /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required - /// on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"fieldDelimiter", - PossibleTypes = new [] { typeof(string) })] - string FieldDelimiter { get; set; } - - } - /// Describes how data from an input is serialized or how data is serialized when written to an output in CSV format. - internal partial interface ICsvSerializationInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal - { - /// - /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. - /// Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding? Encoding { get; set; } - /// - /// Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input - /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required - /// on PUT (CreateOrReplace) requests. - /// - string FieldDelimiter { get; set; } - /// - /// The properties that are associated with the CSV serialization type. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationProperties Property { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerializationProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerializationProperties.PowerShell.cs deleted file mode 100644 index f95cdcd47304..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerializationProperties.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with the CSV serialization type. - [System.ComponentModel.TypeConverter(typeof(CsvSerializationPropertiesTypeConverter))] - public partial class CsvSerializationProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal CsvSerializationProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("FieldDelimiter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationPropertiesInternal)this).FieldDelimiter = (string) content.GetValueForProperty("FieldDelimiter",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationPropertiesInternal)this).FieldDelimiter, global::System.Convert.ToString); - } - if (content.Contains("Encoding")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationPropertiesInternal)this).Encoding = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding?) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationPropertiesInternal)this).Encoding, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal CsvSerializationProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("FieldDelimiter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationPropertiesInternal)this).FieldDelimiter = (string) content.GetValueForProperty("FieldDelimiter",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationPropertiesInternal)this).FieldDelimiter, global::System.Convert.ToString); - } - if (content.Contains("Encoding")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationPropertiesInternal)this).Encoding = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding?) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationPropertiesInternal)this).Encoding, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CsvSerializationProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CsvSerializationProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with the CSV serialization type. - [System.ComponentModel.TypeConverter(typeof(CsvSerializationPropertiesTypeConverter))] - public partial interface ICsvSerializationProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerialization.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerialization.PowerShell.cs deleted file mode 100644 index 1c2c9e9b6a7f..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerialization.PowerShell.cs +++ /dev/null @@ -1,172 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// Describes how data from an input is serialized or how data is serialized when written to an output in custom format. - /// - [System.ComponentModel.TypeConverter(typeof(CustomClrSerializationTypeConverter))] - public partial class CustomClrSerialization - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal CustomClrSerialization(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CustomClrSerializationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); - } - if (content.Contains("SerializationDllPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationInternal)this).SerializationDllPath = (string) content.GetValueForProperty("SerializationDllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationInternal)this).SerializationDllPath, global::System.Convert.ToString); - } - if (content.Contains("SerializationClassName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationInternal)this).SerializationClassName = (string) content.GetValueForProperty("SerializationClassName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationInternal)this).SerializationClassName, 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 CustomClrSerialization(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CustomClrSerializationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); - } - if (content.Contains("SerializationDllPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationInternal)this).SerializationDllPath = (string) content.GetValueForProperty("SerializationDllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationInternal)this).SerializationDllPath, global::System.Convert.ToString); - } - if (content.Contains("SerializationClassName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationInternal)this).SerializationClassName = (string) content.GetValueForProperty("SerializationClassName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationInternal)this).SerializationClassName, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerialization DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CustomClrSerialization(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerialization DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CustomClrSerialization(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerialization FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes how data from an input is serialized or how data is serialized when written to an output in custom format. - [System.ComponentModel.TypeConverter(typeof(CustomClrSerializationTypeConverter))] - public partial interface ICustomClrSerialization - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerialization.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerialization.cs deleted file mode 100644 index 4416617b7c12..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerialization.cs +++ /dev/null @@ -1,105 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// Describes how data from an input is serialized or how data is serialized when written to an output in custom format. - /// - public partial class CustomClrSerialization : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerialization, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Serialization(); - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CustomClrSerializationProperties()); set { {_property = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationProperties _property; - - /// - /// The properties that are associated with the CustomClr serialization type. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CustomClrSerializationProperties()); set => this._property = value; } - - /// The serialization class name. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SerializationClassName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationPropertiesInternal)Property).SerializationClassName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationPropertiesInternal)Property).SerializationClassName = value ?? null; } - - /// The serialization library path. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SerializationDllPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationPropertiesInternal)Property).SerializationDllPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationPropertiesInternal)Property).SerializationDllPath = value ?? null; } - - /// - /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)__serialization).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)__serialization).Type = value ; } - - /// Creates an new instance. - public CustomClrSerialization() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__serialization), __serialization); - await eventListener.AssertObjectIsValid(nameof(__serialization), __serialization); - } - } - /// Describes how data from an input is serialized or how data is serialized when written to an output in custom format. - public partial interface ICustomClrSerialization : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization - { - /// The serialization class name. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The serialization class name.", - SerializedName = @"serializationClassName", - PossibleTypes = new [] { typeof(string) })] - string SerializationClassName { get; set; } - /// The serialization library path. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The serialization library path.", - SerializedName = @"serializationDllPath", - PossibleTypes = new [] { typeof(string) })] - string SerializationDllPath { get; set; } - - } - /// Describes how data from an input is serialized or how data is serialized when written to an output in custom format. - internal partial interface ICustomClrSerializationInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal - { - /// - /// The properties that are associated with the CustomClr serialization type. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationProperties Property { get; set; } - /// The serialization class name. - string SerializationClassName { get; set; } - /// The serialization library path. - string SerializationDllPath { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerializationProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerializationProperties.PowerShell.cs deleted file mode 100644 index 6f0acc7625d5..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerializationProperties.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with the CustomClr serialization type. - [System.ComponentModel.TypeConverter(typeof(CustomClrSerializationPropertiesTypeConverter))] - public partial class CustomClrSerializationProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal CustomClrSerializationProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SerializationDllPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationPropertiesInternal)this).SerializationDllPath = (string) content.GetValueForProperty("SerializationDllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationPropertiesInternal)this).SerializationDllPath, global::System.Convert.ToString); - } - if (content.Contains("SerializationClassName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationPropertiesInternal)this).SerializationClassName = (string) content.GetValueForProperty("SerializationClassName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationPropertiesInternal)this).SerializationClassName, 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 CustomClrSerializationProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("SerializationDllPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationPropertiesInternal)this).SerializationDllPath = (string) content.GetValueForProperty("SerializationDllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationPropertiesInternal)this).SerializationDllPath, global::System.Convert.ToString); - } - if (content.Contains("SerializationClassName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationPropertiesInternal)this).SerializationClassName = (string) content.GetValueForProperty("SerializationClassName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationPropertiesInternal)this).SerializationClassName, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new CustomClrSerializationProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new CustomClrSerializationProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with the CustomClr serialization type. - [System.ComponentModel.TypeConverter(typeof(CustomClrSerializationPropertiesTypeConverter))] - public partial interface ICustomClrSerializationProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DiagnosticCondition.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DiagnosticCondition.PowerShell.cs deleted file mode 100644 index 31fcb7819c0e..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DiagnosticCondition.PowerShell.cs +++ /dev/null @@ -1,164 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// Condition applicable to the resource, or to the job overall, that warrant customer attention. - /// - [System.ComponentModel.TypeConverter(typeof(DiagnosticConditionTypeConverter))] - public partial class DiagnosticCondition - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new DiagnosticCondition(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new DiagnosticCondition(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal DiagnosticCondition(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Since")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal)this).Since = (string) content.GetValueForProperty("Since",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal)this).Since, global::System.Convert.ToString); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal)this).Message, 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 DiagnosticCondition(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Since")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal)this).Since = (string) content.GetValueForProperty("Since",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal)this).Since, global::System.Convert.ToString); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal)this).Message, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Condition applicable to the resource, or to the job overall, that warrant customer attention. - [System.ComponentModel.TypeConverter(typeof(DiagnosticConditionTypeConverter))] - public partial interface IDiagnosticCondition - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Diagnostics.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Diagnostics.PowerShell.cs deleted file mode 100644 index 4c34896d608b..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Diagnostics.PowerShell.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. - /// - [System.ComponentModel.TypeConverter(typeof(DiagnosticsTypeConverter))] - public partial class Diagnostics - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Diagnostics(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Diagnostics(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Diagnostics(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Condition")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticsInternal)this).Condition = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[]) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticsInternal)this).Condition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticConditionTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Diagnostics(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Condition")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticsInternal)this).Condition = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[]) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticsInternal)this).Condition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticConditionTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. - [System.ComponentModel.TypeConverter(typeof(DiagnosticsTypeConverter))] - public partial interface IDiagnostics - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Diagnostics.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Diagnostics.cs deleted file mode 100644 index df3e1a18d493..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Diagnostics.cs +++ /dev/null @@ -1,62 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. - /// - public partial class Diagnostics : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticsInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[] _condition; - - /// - /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[] Condition { get => this._condition; } - - /// Internal Acessors for Condition - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[] Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticsInternal.Condition { get => this._condition; set { {_condition = value;} } } - - /// Creates an new instance. - public Diagnostics() - { - - } - } - /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. - public partial interface IDiagnostics : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// - /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention.", - SerializedName = @"conditions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[] Condition { get; } - - } - /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. - internal partial interface IDiagnosticsInternal - - { - /// - /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[] Condition { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSource.PowerShell.cs deleted file mode 100644 index 3a81819ca35a..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSource.PowerShell.cs +++ /dev/null @@ -1,202 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes a DocumentDB output data source. - [System.ComponentModel.TypeConverter(typeof(DocumentDbOutputDataSourceTypeConverter))] - public partial class DocumentDbOutputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new DocumentDbOutputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new DocumentDbOutputDataSource(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal DocumentDbOutputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DocumentDbOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AccountId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).AccountId, global::System.Convert.ToString); - } - if (content.Contains("AccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).AccountKey, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("CollectionNamePattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).CollectionNamePattern = (string) content.GetValueForProperty("CollectionNamePattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).CollectionNamePattern, global::System.Convert.ToString); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("DocumentId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).DocumentId = (string) content.GetValueForProperty("DocumentId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).DocumentId, 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 DocumentDbOutputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DocumentDbOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AccountId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).AccountId, global::System.Convert.ToString); - } - if (content.Contains("AccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).AccountKey, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("CollectionNamePattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).CollectionNamePattern = (string) content.GetValueForProperty("CollectionNamePattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).CollectionNamePattern, global::System.Convert.ToString); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("DocumentId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).DocumentId = (string) content.GetValueForProperty("DocumentId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal)this).DocumentId, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes a DocumentDB output data source. - [System.ComponentModel.TypeConverter(typeof(DocumentDbOutputDataSourceTypeConverter))] - public partial interface IDocumentDbOutputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSourceProperties.PowerShell.cs deleted file mode 100644 index d8740c9c03ad..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,188 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with a DocumentDB output. - [System.ComponentModel.TypeConverter(typeof(DocumentDbOutputDataSourcePropertiesTypeConverter))] - public partial class DocumentDbOutputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new DocumentDbOutputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new DocumentDbOutputDataSourceProperties(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal DocumentDbOutputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AccountId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountId, global::System.Convert.ToString); - } - if (content.Contains("AccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountKey, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("CollectionNamePattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).CollectionNamePattern = (string) content.GetValueForProperty("CollectionNamePattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).CollectionNamePattern, global::System.Convert.ToString); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("DocumentId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).DocumentId = (string) content.GetValueForProperty("DocumentId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).DocumentId, 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 DocumentDbOutputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AccountId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountId, global::System.Convert.ToString); - } - if (content.Contains("AccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountKey, global::System.Convert.ToString); - } - if (content.Contains("Database")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); - } - if (content.Contains("CollectionNamePattern")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).CollectionNamePattern = (string) content.GetValueForProperty("CollectionNamePattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).CollectionNamePattern, global::System.Convert.ToString); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("DocumentId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).DocumentId = (string) content.GetValueForProperty("DocumentId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)this).DocumentId, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with a DocumentDB output. - [System.ComponentModel.TypeConverter(typeof(DocumentDbOutputDataSourcePropertiesTypeConverter))] - public partial interface IDocumentDbOutputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ErrorResponse.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ErrorResponse.PowerShell.cs deleted file mode 100644 index f3884c4a10a7..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ErrorResponse.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes the error that occurred. - [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] - public partial class ErrorResponse - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ErrorResponse(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ErrorResponse(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ErrorResponse(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal)this).Message, 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 ErrorResponse(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal)this).Message, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes the error that occurred. - [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] - public partial interface IErrorResponse - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ErrorResponse.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ErrorResponse.TypeConverter.cs deleted file mode 100644 index e3d92b3dc748..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ErrorResponse.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ErrorResponseTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponse ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponse).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ErrorResponse.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ErrorResponse.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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ErrorResponse.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ErrorResponse.cs deleted file mode 100644 index 00302446bbe7..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ErrorResponse.cs +++ /dev/null @@ -1,74 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Describes the error that occurred. - public partial class ErrorResponse : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponse, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal - { - - /// Backing field for property. - private string _code; - - /// Error code associated with the error that occurred. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Code { get => this._code; } - - /// Backing field for property. - private string _message; - - /// Describes the error in detail. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Message { get => this._message; } - - /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal.Code { get => this._code; set { {_code = value;} } } - - /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal.Message { get => this._message; set { {_message = value;} } } - - /// Creates an new instance. - public ErrorResponse() - { - - } - } - /// Describes the error that occurred. - public partial interface IErrorResponse : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// Error code associated with the error that occurred. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Error code associated with the error that occurred.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string Code { get; } - /// Describes the error in detail. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Describes the error in detail.", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string Message { get; } - - } - /// Describes the error that occurred. - internal partial interface IErrorResponseInternal - - { - /// Error code associated with the error that occurred. - string Code { get; set; } - /// Describes the error in detail. - string Message { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ErrorResponse.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ErrorResponse.json.cs deleted file mode 100644 index 9648d0e1f932..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ErrorResponse.json.cs +++ /dev/null @@ -1,116 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Describes the error that occurred. - public partial class ErrorResponse - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. - internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponse. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponse. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubDataSourceProperties.PowerShell.cs deleted file mode 100644 index e64583e989dd..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,178 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The common properties that are associated with Event Hub data sources. - [System.ComponentModel.TypeConverter(typeof(EventHubDataSourcePropertiesTypeConverter))] - public partial class EventHubDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EventHubDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EventHubDataSourceProperties(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EventHubDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("EventHubName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)this).EventHubName, global::System.Convert.ToString); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal EventHubDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("EventHubName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)this).EventHubName, global::System.Convert.ToString); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The common properties that are associated with Event Hub data sources. - [System.ComponentModel.TypeConverter(typeof(EventHubDataSourcePropertiesTypeConverter))] - public partial interface IEventHubDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubDataSourceProperties.cs deleted file mode 100644 index a604d230c0f4..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubDataSourceProperties.cs +++ /dev/null @@ -1,94 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The common properties that are associated with Event Hub data sources. - public partial class EventHubDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourceProperties __serviceBusDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusDataSourceProperties(); - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// Backing field for property. - private string _eventHubName; - - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } - - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).ServiceBusNamespace = value ?? null; } - - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyKey = value ?? null; } - - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyName = value ?? null; } - - /// Creates an new instance. - public EventHubDataSourceProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__serviceBusDataSourceProperties), __serviceBusDataSourceProperties); - await eventListener.AssertObjectIsValid(nameof(__serviceBusDataSourceProperties), __serviceBusDataSourceProperties); - } - } - /// The common properties that are associated with Event Hub data sources. - public partial interface IEventHubDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourceProperties - { - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Event Hub. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"eventHubName", - PossibleTypes = new [] { typeof(string) })] - string EventHubName { get; set; } - - } - /// The common properties that are associated with Event Hub data sources. - internal partial interface IEventHubDataSourcePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal - { - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - string EventHubName { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSource.PowerShell.cs deleted file mode 100644 index dbefda134c25..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSource.PowerShell.cs +++ /dev/null @@ -1,210 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes an Event Hub output data source. - [System.ComponentModel.TypeConverter(typeof(EventHubOutputDataSourceTypeConverter))] - public partial class EventHubOutputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EventHubOutputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EventHubOutputDataSource(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EventHubOutputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("EventHubName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("PropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).PropertyColumn = (string[]) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToArray(__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 EventHubOutputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("EventHubName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("PropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).PropertyColumn = (string[]) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToArray(__y, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes an Event Hub output data source. - [System.ComponentModel.TypeConverter(typeof(EventHubOutputDataSourceTypeConverter))] - public partial interface IEventHubOutputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSource.cs deleted file mode 100644 index 560014cb1f9c..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSource.cs +++ /dev/null @@ -1,196 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Describes an Event Hub output data source. - public partial class EventHubOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(); - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string EventHubName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)Property).EventHubName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)Property).EventHubName = value ?? null; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubOutputDataSourceProperties()); set { {_property = value;} } } - - /// The key/column that is used to determine to which partition to send event data. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string PartitionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)Property).PartitionKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)Property).PartitionKey = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties _property; - - /// - /// The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubOutputDataSourceProperties()); set => this._property = value; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string[] PropertyColumn { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)Property).PropertyColumn; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)Property).PropertyColumn = value ?? null /* arrayOf */; } - - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace = value ?? null; } - - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey = value ?? null; } - - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName = value ?? null; } - - /// - /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type = value ; } - - /// Creates an new instance. - public EventHubOutputDataSource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); - await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); - } - } - /// Describes an Event Hub output data source. - public partial interface IEventHubOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource - { - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authentication Mode.", - SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Event Hub. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"eventHubName", - PossibleTypes = new [] { typeof(string) })] - string EventHubName { get; set; } - /// The key/column that is used to determine to which partition to send event data. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The key/column that is used to determine to which partition to send event data.", - SerializedName = @"partitionKey", - PossibleTypes = new [] { typeof(string) })] - string PartitionKey { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"propertyColumns", - PossibleTypes = new [] { typeof(string) })] - string[] PropertyColumn { get; set; } - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"serviceBusNamespace", - PossibleTypes = new [] { typeof(string) })] - string ServiceBusNamespace { get; set; } - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"sharedAccessPolicyKey", - PossibleTypes = new [] { typeof(string) })] - string SharedAccessPolicyKey { get; set; } - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"sharedAccessPolicyName", - PossibleTypes = new [] { typeof(string) })] - string SharedAccessPolicyName { get; set; } - - } - /// Describes an Event Hub output data source. - internal partial interface IEventHubOutputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal - { - /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - string EventHubName { get; set; } - /// The key/column that is used to determine to which partition to send event data. - string PartitionKey { get; set; } - /// - /// The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties Property { get; set; } - - string[] PropertyColumn { get; set; } - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - string ServiceBusNamespace { get; set; } - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - string SharedAccessPolicyKey { get; set; } - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - string SharedAccessPolicyName { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSourceProperties.PowerShell.cs deleted file mode 100644 index 23ca0be42488..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,196 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with an Event Hub output. - [System.ComponentModel.TypeConverter(typeof(EventHubOutputDataSourcePropertiesTypeConverter))] - public partial class EventHubOutputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EventHubOutputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EventHubOutputDataSourceProperties(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EventHubOutputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("PropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)this).PropertyColumn = (string[]) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("EventHubName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)this).EventHubName, 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 EventHubOutputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("PropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)this).PropertyColumn = (string[]) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("EventHubName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)this).EventHubName, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with an Event Hub output. - [System.ComponentModel.TypeConverter(typeof(EventHubOutputDataSourcePropertiesTypeConverter))] - public partial interface IEventHubOutputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSourceProperties.cs deleted file mode 100644 index f9d8aec23643..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSourceProperties.cs +++ /dev/null @@ -1,114 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with an Event Hub output. - public partial class EventHubOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourceProperties __eventHubDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubDataSourceProperties(); - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string EventHubName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)__eventHubDataSourceProperties).EventHubName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)__eventHubDataSourceProperties).EventHubName = value ?? null; } - - /// Backing field for property. - private string _partitionKey; - - /// The key/column that is used to determine to which partition to send event data. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string PartitionKey { get => this._partitionKey; set => this._partitionKey = value; } - - /// Backing field for property. - private string[] _propertyColumn; - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string[] PropertyColumn { get => this._propertyColumn; set => this._propertyColumn = value; } - - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).ServiceBusNamespace = value ?? null; } - - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyKey = value ?? null; } - - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyName = value ?? null; } - - /// Creates an new instance. - public EventHubOutputDataSourceProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__eventHubDataSourceProperties), __eventHubDataSourceProperties); - await eventListener.AssertObjectIsValid(nameof(__eventHubDataSourceProperties), __eventHubDataSourceProperties); - } - } - /// The properties that are associated with an Event Hub output. - public partial interface IEventHubOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourceProperties - { - /// The key/column that is used to determine to which partition to send event data. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The key/column that is used to determine to which partition to send event data.", - SerializedName = @"partitionKey", - PossibleTypes = new [] { typeof(string) })] - string PartitionKey { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"propertyColumns", - PossibleTypes = new [] { typeof(string) })] - string[] PropertyColumn { get; set; } - - } - /// The properties that are associated with an Event Hub output. - internal partial interface IEventHubOutputDataSourcePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal - { - /// The key/column that is used to determine to which partition to send event data. - string PartitionKey { get; set; } - - string[] PropertyColumn { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSource.PowerShell.cs deleted file mode 100644 index dfa0075b1ae9..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSource.PowerShell.cs +++ /dev/null @@ -1,202 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes an Event Hub input data source that contains stream data. - [System.ComponentModel.TypeConverter(typeof(EventHubStreamInputDataSourceTypeConverter))] - public partial class EventHubStreamInputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EventHubStreamInputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EventHubStreamInputDataSource(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EventHubStreamInputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("EventHubName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); - } - if (content.Contains("ConsumerGroupName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).ConsumerGroupName, 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 EventHubStreamInputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("EventHubName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); - } - if (content.Contains("ConsumerGroupName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal)this).ConsumerGroupName, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes an Event Hub input data source that contains stream data. - [System.ComponentModel.TypeConverter(typeof(EventHubStreamInputDataSourceTypeConverter))] - public partial interface IEventHubStreamInputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSource.cs deleted file mode 100644 index 4fdd691e2a9b..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSource.cs +++ /dev/null @@ -1,195 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Describes an Event Hub input data source that contains stream data. - public partial class EventHubStreamInputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamInputDataSource(); - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// - /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer - /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, - /// the input uses the Event Hub’s default consumer group. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ConsumerGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourcePropertiesInternal)Property).ConsumerGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourcePropertiesInternal)Property).ConsumerGroupName = value ?? null; } - - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string EventHubName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)Property).EventHubName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)Property).EventHubName = value ?? null; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubStreamInputDataSourceProperties()); set { {_property = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties _property; - - /// - /// The properties that are associated with an Event Hub input containing stream data. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubStreamInputDataSourceProperties()); set => this._property = value; } - - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace = value ?? null; } - - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey = value ?? null; } - - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName = value ?? null; } - - /// - /// Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)__streamInputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)__streamInputDataSource).Type = value ; } - - /// Creates an new instance. - public EventHubStreamInputDataSource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__streamInputDataSource), __streamInputDataSource); - await eventListener.AssertObjectIsValid(nameof(__streamInputDataSource), __streamInputDataSource); - } - } - /// Describes an Event Hub input data source that contains stream data. - public partial interface IEventHubStreamInputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource - { - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authentication Mode.", - SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// - /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer - /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, - /// the input uses the Event Hub’s default consumer group. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, the input uses the Event Hub’s default consumer group.", - SerializedName = @"consumerGroupName", - PossibleTypes = new [] { typeof(string) })] - string ConsumerGroupName { get; set; } - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Event Hub. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"eventHubName", - PossibleTypes = new [] { typeof(string) })] - string EventHubName { get; set; } - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"serviceBusNamespace", - PossibleTypes = new [] { typeof(string) })] - string ServiceBusNamespace { get; set; } - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"sharedAccessPolicyKey", - PossibleTypes = new [] { typeof(string) })] - string SharedAccessPolicyKey { get; set; } - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"sharedAccessPolicyName", - PossibleTypes = new [] { typeof(string) })] - string SharedAccessPolicyName { get; set; } - - } - /// Describes an Event Hub input data source that contains stream data. - internal partial interface IEventHubStreamInputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal - { - /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// - /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer - /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, - /// the input uses the Event Hub’s default consumer group. - /// - string ConsumerGroupName { get; set; } - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - string EventHubName { get; set; } - /// - /// The properties that are associated with an Event Hub input containing stream data. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties Property { get; set; } - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - string ServiceBusNamespace { get; set; } - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - string SharedAccessPolicyKey { get; set; } - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - string SharedAccessPolicyName { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSourceProperties.PowerShell.cs deleted file mode 100644 index 652f12e0226f..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,191 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// The properties that are associated with a Event Hub input containing stream data. - /// - [System.ComponentModel.TypeConverter(typeof(EventHubStreamInputDataSourcePropertiesTypeConverter))] - public partial class EventHubStreamInputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EventHubStreamInputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EventHubStreamInputDataSourceProperties(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EventHubStreamInputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ConsumerGroupName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName, global::System.Convert.ToString); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("EventHubName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)this).EventHubName, 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 EventHubStreamInputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ConsumerGroupName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName, global::System.Convert.ToString); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("EventHubName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)this).EventHubName, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with a Event Hub input containing stream data. - [System.ComponentModel.TypeConverter(typeof(EventHubStreamInputDataSourcePropertiesTypeConverter))] - public partial interface IEventHubStreamInputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSourceProperties.cs deleted file mode 100644 index f7b97e75c870..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSourceProperties.cs +++ /dev/null @@ -1,112 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// The properties that are associated with a Event Hub input containing stream data. - /// - public partial class EventHubStreamInputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourcePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourceProperties __eventHubDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubDataSourceProperties(); - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// Backing field for property. - private string _consumerGroupName; - - /// - /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer - /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, - /// the input uses the Event Hub’s default consumer group. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string ConsumerGroupName { get => this._consumerGroupName; set => this._consumerGroupName = value; } - - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string EventHubName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)__eventHubDataSourceProperties).EventHubName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)__eventHubDataSourceProperties).EventHubName = value ?? null; } - - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).ServiceBusNamespace = value ?? null; } - - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyKey = value ?? null; } - - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyName = value ?? null; } - - /// Creates an new instance. - public EventHubStreamInputDataSourceProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__eventHubDataSourceProperties), __eventHubDataSourceProperties); - await eventListener.AssertObjectIsValid(nameof(__eventHubDataSourceProperties), __eventHubDataSourceProperties); - } - } - /// The properties that are associated with a Event Hub input containing stream data. - public partial interface IEventHubStreamInputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourceProperties - { - /// - /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer - /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, - /// the input uses the Event Hub’s default consumer group. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, the input uses the Event Hub’s default consumer group.", - SerializedName = @"consumerGroupName", - PossibleTypes = new [] { typeof(string) })] - string ConsumerGroupName { get; set; } - - } - /// The properties that are associated with a Event Hub input containing stream data. - internal partial interface IEventHubStreamInputDataSourcePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal - { - /// - /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer - /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, - /// the input uses the Event Hub’s default consumer group. - /// - string ConsumerGroupName { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2OutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2OutputDataSource.PowerShell.cs deleted file mode 100644 index 8c2a77226431..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2OutputDataSource.PowerShell.cs +++ /dev/null @@ -1,210 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes an Event Hub output data source. - [System.ComponentModel.TypeConverter(typeof(EventHubV2OutputDataSourceTypeConverter))] - public partial class EventHubV2OutputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EventHubV2OutputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EventHubV2OutputDataSource(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EventHubV2OutputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("EventHubName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("PropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).PropertyColumn = (string[]) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToArray(__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 EventHubV2OutputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("EventHubName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("PropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).PropertyColumn = (string[]) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToArray(__y, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes an Event Hub output data source. - [System.ComponentModel.TypeConverter(typeof(EventHubV2OutputDataSourceTypeConverter))] - public partial interface IEventHubV2OutputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2OutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2OutputDataSource.cs deleted file mode 100644 index da4a59fa3dbc..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2OutputDataSource.cs +++ /dev/null @@ -1,196 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Describes an Event Hub output data source. - public partial class EventHubV2OutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(); - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string EventHubName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)Property).EventHubName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)Property).EventHubName = value ?? null; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubOutputDataSourceProperties()); set { {_property = value;} } } - - /// The key/column that is used to determine to which partition to send event data. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string PartitionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)Property).PartitionKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)Property).PartitionKey = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties _property; - - /// - /// The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubOutputDataSourceProperties()); set => this._property = value; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string[] PropertyColumn { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)Property).PropertyColumn; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourcePropertiesInternal)Property).PropertyColumn = value ?? null /* arrayOf */; } - - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace = value ?? null; } - - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey = value ?? null; } - - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName = value ?? null; } - - /// - /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type = value ; } - - /// Creates an new instance. - public EventHubV2OutputDataSource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); - await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); - } - } - /// Describes an Event Hub output data source. - public partial interface IEventHubV2OutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource - { - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authentication Mode.", - SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Event Hub. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"eventHubName", - PossibleTypes = new [] { typeof(string) })] - string EventHubName { get; set; } - /// The key/column that is used to determine to which partition to send event data. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The key/column that is used to determine to which partition to send event data.", - SerializedName = @"partitionKey", - PossibleTypes = new [] { typeof(string) })] - string PartitionKey { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"propertyColumns", - PossibleTypes = new [] { typeof(string) })] - string[] PropertyColumn { get; set; } - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"serviceBusNamespace", - PossibleTypes = new [] { typeof(string) })] - string ServiceBusNamespace { get; set; } - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"sharedAccessPolicyKey", - PossibleTypes = new [] { typeof(string) })] - string SharedAccessPolicyKey { get; set; } - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"sharedAccessPolicyName", - PossibleTypes = new [] { typeof(string) })] - string SharedAccessPolicyName { get; set; } - - } - /// Describes an Event Hub output data source. - internal partial interface IEventHubV2OutputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal - { - /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - string EventHubName { get; set; } - /// The key/column that is used to determine to which partition to send event data. - string PartitionKey { get; set; } - /// - /// The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties Property { get; set; } - - string[] PropertyColumn { get; set; } - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - string ServiceBusNamespace { get; set; } - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - string SharedAccessPolicyKey { get; set; } - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - string SharedAccessPolicyName { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2StreamInputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2StreamInputDataSource.PowerShell.cs deleted file mode 100644 index 47c53bf11c97..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2StreamInputDataSource.PowerShell.cs +++ /dev/null @@ -1,202 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes an Event Hub input data source that contains stream data. - [System.ComponentModel.TypeConverter(typeof(EventHubV2StreamInputDataSourceTypeConverter))] - public partial class EventHubV2StreamInputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new EventHubV2StreamInputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new EventHubV2StreamInputDataSource(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal EventHubV2StreamInputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("EventHubName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); - } - if (content.Contains("ConsumerGroupName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).ConsumerGroupName, 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 EventHubV2StreamInputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("EventHubName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); - } - if (content.Contains("ConsumerGroupName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal)this).ConsumerGroupName, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes an Event Hub input data source that contains stream data. - [System.ComponentModel.TypeConverter(typeof(EventHubV2StreamInputDataSourceTypeConverter))] - public partial interface IEventHubV2StreamInputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2StreamInputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2StreamInputDataSource.cs deleted file mode 100644 index 12695975180a..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2StreamInputDataSource.cs +++ /dev/null @@ -1,195 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Describes an Event Hub input data source that contains stream data. - public partial class EventHubV2StreamInputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamInputDataSource(); - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// - /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer - /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, - /// the input uses the Event Hub’s default consumer group. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ConsumerGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourcePropertiesInternal)Property).ConsumerGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourcePropertiesInternal)Property).ConsumerGroupName = value ?? null; } - - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string EventHubName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)Property).EventHubName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourcePropertiesInternal)Property).EventHubName = value ?? null; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubStreamInputDataSourceProperties()); set { {_property = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties _property; - - /// - /// The properties that are associated with an Event Hub input containing stream data. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubStreamInputDataSourceProperties()); set => this._property = value; } - - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace = value ?? null; } - - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey = value ?? null; } - - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName = value ?? null; } - - /// - /// Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)__streamInputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)__streamInputDataSource).Type = value ; } - - /// Creates an new instance. - public EventHubV2StreamInputDataSource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__streamInputDataSource), __streamInputDataSource); - await eventListener.AssertObjectIsValid(nameof(__streamInputDataSource), __streamInputDataSource); - } - } - /// Describes an Event Hub input data source that contains stream data. - public partial interface IEventHubV2StreamInputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource - { - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authentication Mode.", - SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// - /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer - /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, - /// the input uses the Event Hub’s default consumer group. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, the input uses the Event Hub’s default consumer group.", - SerializedName = @"consumerGroupName", - PossibleTypes = new [] { typeof(string) })] - string ConsumerGroupName { get; set; } - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Event Hub. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"eventHubName", - PossibleTypes = new [] { typeof(string) })] - string EventHubName { get; set; } - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"serviceBusNamespace", - PossibleTypes = new [] { typeof(string) })] - string ServiceBusNamespace { get; set; } - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"sharedAccessPolicyKey", - PossibleTypes = new [] { typeof(string) })] - string SharedAccessPolicyKey { get; set; } - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"sharedAccessPolicyName", - PossibleTypes = new [] { typeof(string) })] - string SharedAccessPolicyName { get; set; } - - } - /// Describes an Event Hub input data source that contains stream data. - internal partial interface IEventHubV2StreamInputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal - { - /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// - /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer - /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, - /// the input uses the Event Hub’s default consumer group. - /// - string ConsumerGroupName { get; set; } - /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. - string EventHubName { get; set; } - /// - /// The properties that are associated with an Event Hub input containing stream data. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties Property { get; set; } - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - string ServiceBusNamespace { get; set; } - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - string SharedAccessPolicyKey { get; set; } - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - string SharedAccessPolicyName { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/External.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/External.PowerShell.cs deleted file mode 100644 index 960c14e4f039..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/External.PowerShell.cs +++ /dev/null @@ -1,176 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The storage account where the custom code artifacts are located. - [System.ComponentModel.TypeConverter(typeof(ExternalTypeConverter))] - public partial class External - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new External(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new External(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal External(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).StorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("Path")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).Path, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).StorageAccountName = (string) content.GetValueForProperty("StorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).StorageAccountName, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).StorageAccountKey = (string) content.GetValueForProperty("StorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).StorageAccountKey, 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 External(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).StorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom); - } - if (content.Contains("Container")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).Container, global::System.Convert.ToString); - } - if (content.Contains("Path")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).Path, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).StorageAccountName = (string) content.GetValueForProperty("StorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).StorageAccountName, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).StorageAccountKey = (string) content.GetValueForProperty("StorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)this).StorageAccountKey, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The storage account where the custom code artifacts are located. - [System.ComponentModel.TypeConverter(typeof(ExternalTypeConverter))] - public partial interface IExternal - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Function.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Function.PowerShell.cs deleted file mode 100644 index 0964dcf715d1..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Function.PowerShell.cs +++ /dev/null @@ -1,196 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// A function object, containing all information associated with the named function. All functions are contained under a - /// streaming job. - /// - [System.ComponentModel.TypeConverter(typeof(FunctionTypeConverter))] - public partial class Function - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Function(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Function(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Function(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("ETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).ETag, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ConfigurationProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).ConfigurationProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) content.GetValueForProperty("ConfigurationProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).ConfigurationProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("PropertiesType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).PropertiesType = (string) content.GetValueForProperty("PropertiesType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).PropertiesType, 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 Function(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("ETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).ETag, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("ConfigurationProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).ConfigurationProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) content.GetValueForProperty("ConfigurationProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).ConfigurationProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("PropertiesType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).PropertiesType = (string) content.GetValueForProperty("PropertiesType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).PropertiesType, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// A function object, containing all information associated with the named function. All functions are contained under a - /// streaming job. - [System.ComponentModel.TypeConverter(typeof(FunctionTypeConverter))] - public partial interface IFunction - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Function.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Function.cs deleted file mode 100644 index ec91a5993438..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Function.cs +++ /dev/null @@ -1,142 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// A function object, containing all information associated with the named function. All functions are contained under a - /// streaming job. - /// - public partial class Function : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubResource(); - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration ConfigurationProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)Property).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)Property).Property = value ?? null /* model class */; } - - /// Backing field for property. - private string _eTag; - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string ETag { get => this._eTag; set => this._eTag = value; } - - /// Resource Id - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Id; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionProperties()); set { {_property = value;} } } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Type = value; } - - /// Resource name - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Name; } - - /// Indicates the type of function. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string PropertiesType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)Property).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)Property).Type = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties _property; - - /// The properties that are associated with a function. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionProperties()); set => this._property = value; } - - /// Resource type - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Type; } - - /// Creates an new instance. - public Function() - { - - } - - /// - void Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("ETag", out var __eTagHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInternal)this).ETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader0) is string __headerETagHeader0 ? __headerETagHeader0 : (string)null; - } - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__subResource), __subResource); - await eventListener.AssertObjectIsValid(nameof(__subResource), __subResource); - } - } - /// A function object, containing all information associated with the named function. All functions are contained under a - /// streaming job. - public partial interface IFunction : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource - { - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration ConfigurationProperty { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"ETag", - PossibleTypes = new [] { typeof(string) })] - string ETag { get; set; } - /// Indicates the type of function. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates the type of function.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string PropertiesType { get; set; } - - } - /// A function object, containing all information associated with the named function. All functions are contained under a - /// streaming job. - internal partial interface IFunctionInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration ConfigurationProperty { get; set; } - - string ETag { get; set; } - /// Indicates the type of function. - string PropertiesType { get; set; } - /// The properties that are associated with a function. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties Property { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionConfiguration.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionConfiguration.PowerShell.cs deleted file mode 100644 index 9e0a75b4df9f..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionConfiguration.PowerShell.cs +++ /dev/null @@ -1,160 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - [System.ComponentModel.TypeConverter(typeof(FunctionConfigurationTypeConverter))] - public partial class FunctionConfiguration - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new FunctionConfiguration(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new FunctionConfiguration(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal FunctionConfiguration(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfigurationInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfigurationInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionInputTypeConverter.ConvertFrom)); - } - if (content.Contains("Output")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfigurationInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfigurationInternal)this).Output, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionOutputTypeConverter.ConvertFrom); - } - if (content.Contains("Binding")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfigurationInternal)this).Binding = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding) content.GetValueForProperty("Binding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfigurationInternal)this).Binding, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionBindingTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal FunctionConfiguration(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfigurationInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfigurationInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionInputTypeConverter.ConvertFrom)); - } - if (content.Contains("Output")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfigurationInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfigurationInternal)this).Output, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionOutputTypeConverter.ConvertFrom); - } - if (content.Contains("Binding")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfigurationInternal)this).Binding = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding) content.GetValueForProperty("Binding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfigurationInternal)this).Binding, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionBindingTypeConverter.ConvertFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - [System.ComponentModel.TypeConverter(typeof(FunctionConfigurationTypeConverter))] - public partial interface IFunctionConfiguration - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionConfiguration.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionConfiguration.cs deleted file mode 100644 index b7d8a9557887..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionConfiguration.cs +++ /dev/null @@ -1,90 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - public partial class FunctionConfiguration : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfigurationInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding _binding; - - /// - /// The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the - /// endpoint. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding Binding { get => (this._binding = this._binding ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionBinding()); set => this._binding = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput[] _input; - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput[] Input { get => this._input; set => this._input = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput _output; - - /// Describes the output of a function. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput Output { get => (this._output = this._output ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionOutput()); set => this._output = value; } - - /// Creates an new instance. - public FunctionConfiguration() - { - - } - } - public partial interface IFunctionConfiguration : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// - /// The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the - /// endpoint. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint.", - SerializedName = @"binding", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding Binding { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"inputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput[] Input { get; set; } - /// Describes the output of a function. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Describes the output of a function.", - SerializedName = @"output", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput Output { get; set; } - - } - internal partial interface IFunctionConfigurationInternal - - { - /// - /// The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the - /// endpoint. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding Binding { get; set; } - - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput[] Input { get; set; } - /// Describes the output of a function. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput Output { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionInput.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionInput.PowerShell.cs deleted file mode 100644 index edd26820d266..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionInput.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes one input parameter of a function. - [System.ComponentModel.TypeConverter(typeof(FunctionInputTypeConverter))] - public partial class FunctionInput - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new FunctionInput(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new FunctionInput(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal FunctionInput(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("DataType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInputInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInputInternal)this).DataType, global::System.Convert.ToString); - } - if (content.Contains("IsConfigurationParameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInputInternal)this).IsConfigurationParameter = (bool?) content.GetValueForProperty("IsConfigurationParameter",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInputInternal)this).IsConfigurationParameter, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal FunctionInput(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("DataType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInputInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInputInternal)this).DataType, global::System.Convert.ToString); - } - if (content.Contains("IsConfigurationParameter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInputInternal)this).IsConfigurationParameter = (bool?) content.GetValueForProperty("IsConfigurationParameter",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInputInternal)this).IsConfigurationParameter, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes one input parameter of a function. - [System.ComponentModel.TypeConverter(typeof(FunctionInputTypeConverter))] - public partial interface IFunctionInput - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionListResult.PowerShell.cs deleted file mode 100644 index 3c607010aa56..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionListResult.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Object containing a list of functions under a streaming job. - [System.ComponentModel.TypeConverter(typeof(FunctionListResultTypeConverter))] - public partial class FunctionListResult - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new FunctionListResult(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new FunctionListResult(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal FunctionListResult(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResultInternal)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 FunctionListResult(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResultInternal)this).NextLink, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Object containing a list of functions under a streaming job. - [System.ComponentModel.TypeConverter(typeof(FunctionListResultTypeConverter))] - public partial interface IFunctionListResult - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionListResult.cs deleted file mode 100644 index 5f7a2e8eeccd..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionListResult.cs +++ /dev/null @@ -1,74 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Object containing a list of functions under a streaming job. - public partial class FunctionListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResult, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResultInternal - { - - /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResultInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// The link (url) to the next page of results. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] _value; - - /// A list of functions under a streaming job. Populated by a 'List' operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] Value { get => this._value; } - - /// Creates an new instance. - public FunctionListResult() - { - - } - } - /// Object containing a list of functions under a streaming job. - public partial interface IFunctionListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// The link (url) to the next page of results. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The link (url) to the next page of results.", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; } - /// A list of functions under a streaming job. Populated by a 'List' operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A list of functions under a streaming job. Populated by a 'List' operation.", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] Value { get; } - - } - /// Object containing a list of functions under a streaming job. - internal partial interface IFunctionListResultInternal - - { - /// The link (url) to the next page of results. - string NextLink { get; set; } - /// A list of functions under a streaming job. Populated by a 'List' operation. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionProperties.PowerShell.cs deleted file mode 100644 index f6e7378f75e8..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionProperties.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with a function. - [System.ComponentModel.TypeConverter(typeof(FunctionPropertiesTypeConverter))] - public partial class FunctionProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new FunctionProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new FunctionProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal FunctionProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionConfigurationTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal FunctionProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionConfigurationTypeConverter.ConvertFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with a function. - [System.ComponentModel.TypeConverter(typeof(FunctionPropertiesTypeConverter))] - public partial interface IFunctionProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Identity.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Identity.PowerShell.cs deleted file mode 100644 index e30e8941997a..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Identity.PowerShell.cs +++ /dev/null @@ -1,160 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes how identity is verified - [System.ComponentModel.TypeConverter(typeof(IdentityTypeConverter))] - public partial class Identity - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Identity(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Identity(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Identity(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("TenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)this).TenantId, global::System.Convert.ToString); - } - if (content.Contains("PrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)this).Type, 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 Identity(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("TenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)this).TenantId, global::System.Convert.ToString); - } - if (content.Contains("PrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)this).Type, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes how identity is verified - [System.ComponentModel.TypeConverter(typeof(IdentityTypeConverter))] - public partial interface IIdentity - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Input.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Input.PowerShell.cs deleted file mode 100644 index 565d3a8a042f..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Input.PowerShell.cs +++ /dev/null @@ -1,180 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// An input object, containing all information associated with the named input. All inputs are contained under a streaming - /// job. - /// - [System.ComponentModel.TypeConverter(typeof(InputTypeConverter))] - public partial class Input - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Input(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Input(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Input(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("ETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputInternal)this).ETag, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type, 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 Input(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("ETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputInternal)this).ETag, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// An input object, containing all information associated with the named input. All inputs are contained under a streaming - /// job. - [System.ComponentModel.TypeConverter(typeof(InputTypeConverter))] - public partial interface IInput - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Input.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Input.cs deleted file mode 100644 index dfeedfa5aa01..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Input.cs +++ /dev/null @@ -1,126 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// An input object, containing all information associated with the named input. All inputs are contained under a streaming - /// job. - /// - public partial class Input : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubResource(); - - /// Backing field for property. - private string _eTag; - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string ETag { get => this._eTag; set => this._eTag = value; } - - /// Resource Id - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Id; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Type = value; } - - /// Resource name - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties _property; - - /// - /// The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputProperties()); set => this._property = value; } - - /// Resource type - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Type; } - - /// Creates an new instance. - public Input() - { - - } - - /// - void Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("ETag", out var __eTagHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputInternal)this).ETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader0) is string __headerETagHeader0 ? __headerETagHeader0 : (string)null; - } - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__subResource), __subResource); - await eventListener.AssertObjectIsValid(nameof(__subResource), __subResource); - } - } - /// An input object, containing all information associated with the named input. All inputs are contained under a streaming - /// job. - public partial interface IInput : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource - { - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"ETag", - PossibleTypes = new [] { typeof(string) })] - string ETag { get; set; } - /// - /// The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties Property { get; set; } - - } - /// An input object, containing all information associated with the named input. All inputs are contained under a streaming - /// job. - internal partial interface IInputInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal - { - string ETag { get; set; } - /// - /// The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties Property { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputListResult.PowerShell.cs deleted file mode 100644 index 7d57d7139cb2..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputListResult.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Object containing a list of inputs under a streaming job. - [System.ComponentModel.TypeConverter(typeof(InputListResultTypeConverter))] - public partial class InputListResult - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new InputListResult(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new InputListResult(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal InputListResult(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResultInternal)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 InputListResult(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResultInternal)this).NextLink, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Object containing a list of inputs under a streaming job. - [System.ComponentModel.TypeConverter(typeof(InputListResultTypeConverter))] - public partial interface IInputListResult - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputListResult.cs deleted file mode 100644 index 904894293c63..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputListResult.cs +++ /dev/null @@ -1,74 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Object containing a list of inputs under a streaming job. - public partial class InputListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResult, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResultInternal - { - - /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResultInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// The link (url) to the next page of results. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] _value; - - /// A list of inputs under a streaming job. Populated by a 'List' operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] Value { get => this._value; } - - /// Creates an new instance. - public InputListResult() - { - - } - } - /// Object containing a list of inputs under a streaming job. - public partial interface IInputListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// The link (url) to the next page of results. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The link (url) to the next page of results.", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; } - /// A list of inputs under a streaming job. Populated by a 'List' operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A list of inputs under a streaming job. Populated by a 'List' operation.", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] Value { get; } - - } - /// Object containing a list of inputs under a streaming job. - internal partial interface IInputListResultInternal - - { - /// The link (url) to the next page of results. - string NextLink { get; set; } - /// A list of inputs under a streaming job. Populated by a 'List' operation. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputProperties.PowerShell.cs deleted file mode 100644 index 0a82ca51989e..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputProperties.PowerShell.cs +++ /dev/null @@ -1,178 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with an input. - [System.ComponentModel.TypeConverter(typeof(InputPropertiesTypeConverter))] - public partial class InputProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new InputProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new InputProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal InputProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Serialization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SerializationTypeConverter.ConvertFrom); - } - if (content.Contains("Diagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticsTypeConverter.ConvertFrom); - } - if (content.Contains("Compression")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Compression = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression) content.GetValueForProperty("Compression",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Compression, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CompressionTypeConverter.ConvertFrom); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).PartitionKey, 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 InputProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Serialization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SerializationTypeConverter.ConvertFrom); - } - if (content.Contains("Diagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticsTypeConverter.ConvertFrom); - } - if (content.Contains("Compression")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Compression = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression) content.GetValueForProperty("Compression",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Compression, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CompressionTypeConverter.ConvertFrom); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).PartitionKey, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with an input. - [System.ComponentModel.TypeConverter(typeof(InputPropertiesTypeConverter))] - public partial interface IInputProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSource.PowerShell.cs deleted file mode 100644 index 7d25fe86b7a8..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSource.PowerShell.cs +++ /dev/null @@ -1,194 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes an IoT Hub input data source that contains stream data. - [System.ComponentModel.TypeConverter(typeof(IoTHubStreamInputDataSourceTypeConverter))] - public partial class IoTHubStreamInputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new IoTHubStreamInputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new IoTHubStreamInputDataSource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal IoTHubStreamInputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IoTHubStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("IotHubNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).IotHubNamespace = (string) content.GetValueForProperty("IotHubNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).IotHubNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("ConsumerGroupName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).ConsumerGroupName, global::System.Convert.ToString); - } - if (content.Contains("Endpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).Endpoint, 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 IoTHubStreamInputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IoTHubStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("IotHubNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).IotHubNamespace = (string) content.GetValueForProperty("IotHubNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).IotHubNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("ConsumerGroupName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).ConsumerGroupName, global::System.Convert.ToString); - } - if (content.Contains("Endpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal)this).Endpoint, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes an IoT Hub input data source that contains stream data. - [System.ComponentModel.TypeConverter(typeof(IoTHubStreamInputDataSourceTypeConverter))] - public partial interface IIoTHubStreamInputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSourceProperties.PowerShell.cs deleted file mode 100644 index 3902390b1403..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,181 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with a IoT Hub input containing stream data. - [System.ComponentModel.TypeConverter(typeof(IoTHubStreamInputDataSourcePropertiesTypeConverter))] - public partial class IoTHubStreamInputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new IoTHubStreamInputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new IoTHubStreamInputDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json - /// string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal IoTHubStreamInputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("IotHubNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).IotHubNamespace = (string) content.GetValueForProperty("IotHubNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).IotHubNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("ConsumerGroupName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName, global::System.Convert.ToString); - } - if (content.Contains("Endpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).Endpoint, 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 IoTHubStreamInputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("IotHubNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).IotHubNamespace = (string) content.GetValueForProperty("IotHubNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).IotHubNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("ConsumerGroupName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName, global::System.Convert.ToString); - } - if (content.Contains("Endpoint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)this).Endpoint, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with a IoT Hub input containing stream data. - [System.ComponentModel.TypeConverter(typeof(IoTHubStreamInputDataSourcePropertiesTypeConverter))] - public partial interface IIoTHubStreamInputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBinding.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBinding.PowerShell.cs deleted file mode 100644 index 734dbd3e3681..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBinding.PowerShell.cs +++ /dev/null @@ -1,162 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The binding to a JavaScript function. - [System.ComponentModel.TypeConverter(typeof(JavaScriptFunctionBindingTypeConverter))] - public partial class JavaScriptFunctionBinding - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBinding DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new JavaScriptFunctionBinding(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBinding DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new JavaScriptFunctionBinding(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBinding FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal JavaScriptFunctionBinding(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionBindingPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Script")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingInternal)this).Script, 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 JavaScriptFunctionBinding(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionBindingPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Script")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingInternal)this).Script, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The binding to a JavaScript function. - [System.ComponentModel.TypeConverter(typeof(JavaScriptFunctionBindingTypeConverter))] - public partial interface IJavaScriptFunctionBinding - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBinding.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBinding.cs deleted file mode 100644 index ba6227f2644d..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBinding.cs +++ /dev/null @@ -1,89 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The binding to a JavaScript function. - public partial class JavaScriptFunctionBinding : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBinding, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionBinding(); - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionBindingProperties()); set { {_property = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingProperties _property; - - /// The binding properties associated with a JavaScript function. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionBindingProperties()); set => this._property = value; } - - /// - /// The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }' - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Script { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingPropertiesInternal)Property).Script; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingPropertiesInternal)Property).Script = value ?? null; } - - /// Indicates the function binding type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)__functionBinding).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)__functionBinding).Type = value ; } - - /// Creates an new instance. - public JavaScriptFunctionBinding() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__functionBinding), __functionBinding); - await eventListener.AssertObjectIsValid(nameof(__functionBinding), __functionBinding); - } - } - /// The binding to a JavaScript function. - public partial interface IJavaScriptFunctionBinding : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding - { - /// - /// The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }' - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }'", - SerializedName = @"script", - PossibleTypes = new [] { typeof(string) })] - string Script { get; set; } - - } - /// The binding to a JavaScript function. - internal partial interface IJavaScriptFunctionBindingInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal - { - /// The binding properties associated with a JavaScript function. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingProperties Property { get; set; } - /// - /// The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }' - /// - string Script { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingRetrievalProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingRetrievalProperties.PowerShell.cs deleted file mode 100644 index 7a8c61163863..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingRetrievalProperties.PowerShell.cs +++ /dev/null @@ -1,157 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The binding retrieval properties associated with a JavaScript function. - [System.ComponentModel.TypeConverter(typeof(JavaScriptFunctionBindingRetrievalPropertiesTypeConverter))] - public partial class JavaScriptFunctionBindingRetrievalProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new JavaScriptFunctionBindingRetrievalProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new JavaScriptFunctionBindingRetrievalProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from - /// a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal JavaScriptFunctionBindingRetrievalProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Script")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).Script, global::System.Convert.ToString); - } - if (content.Contains("UdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).UdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).UdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal JavaScriptFunctionBindingRetrievalProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Script")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).Script, global::System.Convert.ToString); - } - if (content.Contains("UdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).UdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).UdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The binding retrieval properties associated with a JavaScript function. - [System.ComponentModel.TypeConverter(typeof(JavaScriptFunctionBindingRetrievalPropertiesTypeConverter))] - public partial interface IJavaScriptFunctionBindingRetrievalProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs deleted file mode 100644 index 4d9378a85345..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs +++ /dev/null @@ -1,175 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// The parameters needed to retrieve the default function definition for a JavaScript function. - /// - [System.ComponentModel.TypeConverter(typeof(JavaScriptFunctionRetrieveDefaultDefinitionParametersTypeConverter))] - public partial class JavaScriptFunctionRetrieveDefaultDefinitionParameters - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new JavaScriptFunctionRetrieveDefaultDefinitionParameters(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new JavaScriptFunctionRetrieveDefaultDefinitionParameters(content); - } - - /// - /// Creates a new instance of , deserializing the content - /// from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal JavaScriptFunctionRetrieveDefaultDefinitionParameters(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("BindingRetrievalProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("BindingType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); - } - if (content.Contains("BindingRetrievalPropertyUdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - if (content.Contains("BindingRetrievalPropertyScript")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript = (string) content.GetValueForProperty("BindingRetrievalPropertyScript",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript, 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 JavaScriptFunctionRetrieveDefaultDefinitionParameters(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("BindingRetrievalProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("BindingType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); - } - if (content.Contains("BindingRetrievalPropertyUdfType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType?) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType.CreateFrom); - } - if (content.Contains("BindingRetrievalPropertyScript")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript = (string) content.GetValueForProperty("BindingRetrievalPropertyScript",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The parameters needed to retrieve the default function definition for a JavaScript function. - [System.ComponentModel.TypeConverter(typeof(JavaScriptFunctionRetrieveDefaultDefinitionParametersTypeConverter))] - public partial interface IJavaScriptFunctionRetrieveDefaultDefinitionParameters - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionRetrieveDefaultDefinitionParameters.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionRetrieveDefaultDefinitionParameters.cs deleted file mode 100644 index 2417f5570800..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionRetrieveDefaultDefinitionParameters.cs +++ /dev/null @@ -1,107 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// The parameters needed to retrieve the default function definition for a JavaScript function. - /// - public partial class JavaScriptFunctionRetrieveDefaultDefinitionParameters : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParameters, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionRetrieveDefaultDefinitionParameters(); - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalProperties _bindingRetrievalProperty; - - /// The binding retrieval properties associated with a JavaScript function. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalProperties BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionBindingRetrievalProperties()); set => this._bindingRetrievalProperty = value; } - - /// - /// The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }'. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string BindingRetrievalPropertyScript { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).Script; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).Script = value ?? null; } - - /// The function type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? BindingRetrievalPropertyUdfType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType)""); } - - /// Indicates the function binding type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string BindingType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)__functionRetrieveDefaultDefinitionParameters).BindingType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)__functionRetrieveDefaultDefinitionParameters).BindingType = value ; } - - /// Internal Acessors for BindingRetrievalProperty - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal.BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionBindingRetrievalProperties()); set { {_bindingRetrievalProperty = value;} } } - - /// - /// Creates an new instance. - /// - public JavaScriptFunctionRetrieveDefaultDefinitionParameters() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); - await eventListener.AssertObjectIsValid(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); - } - } - /// The parameters needed to retrieve the default function definition for a JavaScript function. - public partial interface IJavaScriptFunctionRetrieveDefaultDefinitionParameters : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters - { - /// - /// The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }'. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }'.", - SerializedName = @"script", - PossibleTypes = new [] { typeof(string) })] - string BindingRetrievalPropertyScript { get; set; } - /// The function type. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The function type.", - SerializedName = @"udfType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? BindingRetrievalPropertyUdfType { get; set; } - - } - /// The parameters needed to retrieve the default function definition for a JavaScript function. - internal partial interface IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal - { - /// The binding retrieval properties associated with a JavaScript function. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalProperties BindingRetrievalProperty { get; set; } - /// - /// The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }'. - /// - string BindingRetrievalPropertyScript { get; set; } - /// The function type. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? BindingRetrievalPropertyUdfType { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JobStorageAccount.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JobStorageAccount.PowerShell.cs deleted file mode 100644 index 60e421c450dc..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JobStorageAccount.PowerShell.cs +++ /dev/null @@ -1,162 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with an Azure Storage account with MSI - [System.ComponentModel.TypeConverter(typeof(JobStorageAccountTypeConverter))] - public partial class JobStorageAccount - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new JobStorageAccount(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new JobStorageAccount(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal JobStorageAccount(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccountInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccountInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("AccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountName, global::System.Convert.ToString); - } - if (content.Contains("AccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountKey, 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 JobStorageAccount(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccountInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccountInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("AccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountName, global::System.Convert.ToString); - } - if (content.Contains("AccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountKey, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with an Azure Storage account with MSI - [System.ComponentModel.TypeConverter(typeof(JobStorageAccountTypeConverter))] - public partial interface IJobStorageAccount - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JobStorageAccount.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JobStorageAccount.cs deleted file mode 100644 index 0749afe70c4a..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JobStorageAccount.cs +++ /dev/null @@ -1,82 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with an Azure Storage account with MSI - public partial class JobStorageAccount : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccountInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount __storageAccount = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccount(); - - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string AccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)__storageAccount).AccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)__storageAccount).AccountKey = value ?? null; } - - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string AccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)__storageAccount).AccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)__storageAccount).AccountName = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? _authenticationMode; - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => this._authenticationMode; set => this._authenticationMode = value; } - - /// Creates an new instance. - public JobStorageAccount() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__storageAccount), __storageAccount); - await eventListener.AssertObjectIsValid(nameof(__storageAccount), __storageAccount); - } - } - /// The properties that are associated with an Azure Storage account with MSI - public partial interface IJobStorageAccount : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount - { - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authentication Mode.", - SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - - } - /// The properties that are associated with an Azure Storage account with MSI - internal partial interface IJobStorageAccountInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal - { - /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerialization.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerialization.PowerShell.cs deleted file mode 100644 index 763719918a49..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerialization.PowerShell.cs +++ /dev/null @@ -1,172 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// Describes how data from an input is serialized or how data is serialized when written to an output in JSON format. - /// - [System.ComponentModel.TypeConverter(typeof(JsonSerializationTypeConverter))] - public partial class JsonSerialization - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerialization DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new JsonSerialization(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerialization DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new JsonSerialization(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerialization FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal JsonSerialization(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JsonSerializationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); - } - if (content.Contains("Encoding")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationInternal)this).Encoding = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding?) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationInternal)this).Encoding, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding.CreateFrom); - } - if (content.Contains("Format")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationInternal)this).Format = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat?) content.GetValueForProperty("Format",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationInternal)this).Format, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal JsonSerialization(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JsonSerializationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); - } - if (content.Contains("Encoding")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationInternal)this).Encoding = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding?) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationInternal)this).Encoding, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding.CreateFrom); - } - if (content.Contains("Format")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationInternal)this).Format = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat?) content.GetValueForProperty("Format",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationInternal)this).Format, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes how data from an input is serialized or how data is serialized when written to an output in JSON format. - [System.ComponentModel.TypeConverter(typeof(JsonSerializationTypeConverter))] - public partial interface IJsonSerialization - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerialization.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerialization.cs deleted file mode 100644 index fe60ae0eb859..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerialization.cs +++ /dev/null @@ -1,129 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// Describes how data from an input is serialized or how data is serialized when written to an output in JSON format. - /// - public partial class JsonSerialization : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerialization, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Serialization(); - - /// - /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. - /// Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding? Encoding { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationPropertiesInternal)Property).Encoding; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationPropertiesInternal)Property).Encoding = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding)""); } - - /// - /// This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies - /// the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the - /// output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be - /// formatted as an array of JSON objects. Default value is 'lineSeparated' if left null. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat? Format { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationPropertiesInternal)Property).Format; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationPropertiesInternal)Property).Format = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat)""); } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JsonSerializationProperties()); set { {_property = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationProperties _property; - - /// - /// The properties that are associated with the JSON serialization type. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JsonSerializationProperties()); set => this._property = value; } - - /// - /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)__serialization).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)__serialization).Type = value ; } - - /// Creates an new instance. - public JsonSerialization() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__serialization), __serialization); - await eventListener.AssertObjectIsValid(nameof(__serialization), __serialization); - } - } - /// Describes how data from an input is serialized or how data is serialized when written to an output in JSON format. - public partial interface IJsonSerialization : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization - { - /// - /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. - /// Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"encoding", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding? Encoding { get; set; } - /// - /// This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies - /// the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the - /// output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be - /// formatted as an array of JSON objects. Default value is 'lineSeparated' if left null. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be formatted as an array of JSON objects. Default value is 'lineSeparated' if left null.", - SerializedName = @"format", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat? Format { get; set; } - - } - /// Describes how data from an input is serialized or how data is serialized when written to an output in JSON format. - internal partial interface IJsonSerializationInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal - { - /// - /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. - /// Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding? Encoding { get; set; } - /// - /// This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies - /// the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the - /// output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be - /// formatted as an array of JSON objects. Default value is 'lineSeparated' if left null. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat? Format { get; set; } - /// - /// The properties that are associated with the JSON serialization type. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationProperties Property { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerializationProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerializationProperties.PowerShell.cs deleted file mode 100644 index 472583b99245..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerializationProperties.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with the JSON serialization type. - [System.ComponentModel.TypeConverter(typeof(JsonSerializationPropertiesTypeConverter))] - public partial class JsonSerializationProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new JsonSerializationProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new JsonSerializationProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal JsonSerializationProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Encoding")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationPropertiesInternal)this).Encoding = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding?) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationPropertiesInternal)this).Encoding, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding.CreateFrom); - } - if (content.Contains("Format")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationPropertiesInternal)this).Format = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat?) content.GetValueForProperty("Format",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationPropertiesInternal)this).Format, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal JsonSerializationProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Encoding")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationPropertiesInternal)this).Encoding = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding?) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationPropertiesInternal)this).Encoding, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding.CreateFrom); - } - if (content.Contains("Format")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationPropertiesInternal)this).Format = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat?) content.GetValueForProperty("Format",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationPropertiesInternal)this).Format, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with the JSON serialization type. - [System.ComponentModel.TypeConverter(typeof(JsonSerializationPropertiesTypeConverter))] - public partial interface IJsonSerializationProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OAuthBasedDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OAuthBasedDataSourceProperties.PowerShell.cs deleted file mode 100644 index 32f33288968b..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OAuthBasedDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,164 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// The properties that are associated with data sources that use OAuth as their authentication model. - /// - [System.ComponentModel.TypeConverter(typeof(OAuthBasedDataSourcePropertiesTypeConverter))] - public partial class OAuthBasedDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new OAuthBasedDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new OAuthBasedDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal OAuthBasedDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("RefreshToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken, global::System.Convert.ToString); - } - if (content.Contains("TokenUserPrincipalName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); - } - if (content.Contains("TokenUserDisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName, 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 OAuthBasedDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("RefreshToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken, global::System.Convert.ToString); - } - if (content.Contains("TokenUserPrincipalName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); - } - if (content.Contains("TokenUserDisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with data sources that use OAuth as their authentication model. - [System.ComponentModel.TypeConverter(typeof(OAuthBasedDataSourcePropertiesTypeConverter))] - public partial interface IOAuthBasedDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Operation.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Operation.PowerShell.cs deleted file mode 100644 index c09cdac0d0bb..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Operation.PowerShell.cs +++ /dev/null @@ -1,184 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// A Stream Analytics REST API operation - [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] - public partial class Operation - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Operation(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Operation(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Operation(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Display")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OperationDisplayTypeConverter.ConvertFrom); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("DisplayProvider")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); - } - if (content.Contains("DisplayResource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); - } - if (content.Contains("DisplayOperation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); - } - if (content.Contains("DisplayDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Operation(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Display")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OperationDisplayTypeConverter.ConvertFrom); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("DisplayProvider")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); - } - if (content.Contains("DisplayResource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); - } - if (content.Contains("DisplayOperation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); - } - if (content.Contains("DisplayDescription")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// A Stream Analytics REST API operation - [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] - public partial interface IOperation - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Operation.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Operation.TypeConverter.cs deleted file mode 100644 index d7529914030b..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Operation.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class OperationTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return Operation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return Operation.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return Operation.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Operation.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Operation.cs deleted file mode 100644 index d06a22dae392..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Operation.cs +++ /dev/null @@ -1,144 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// A Stream Analytics REST API operation - public partial class Operation : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplay _display; - - /// - /// Contains the localized display information for this particular operation / action. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OperationDisplay()); } - - /// The localized friendly description for the operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)Display).Description; } - - /// The localized friendly name for the operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)Display).Operation; } - - /// The localized friendly form of the resource provider name. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)Display).Provider; } - - /// - /// The localized friendly form of the resource type related to this action/operation. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)Display).Resource; } - - /// Internal Acessors for Display - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OperationDisplay()); set { {_display = value;} } } - - /// Internal Acessors for DisplayDescription - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)Display).Description = value; } - - /// Internal Acessors for DisplayOperation - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)Display).Operation = value; } - - /// Internal Acessors for DisplayProvider - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)Display).Provider = value; } - - /// Internal Acessors for DisplayResource - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)Display).Resource = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationInternal.Name { get => this._name; set { {_name = value;} } } - - /// Backing field for property. - private string _name; - - /// The name of the operation being performed on this particular object. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// Creates an new instance. - public Operation() - { - - } - } - /// A Stream Analytics REST API operation - public partial interface IOperation : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// The localized friendly description for the operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The localized friendly description for the operation.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string DisplayDescription { get; } - /// The localized friendly name for the operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The localized friendly name for the operation.", - SerializedName = @"operation", - PossibleTypes = new [] { typeof(string) })] - string DisplayOperation { get; } - /// The localized friendly form of the resource provider name. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The localized friendly form of the resource provider name.", - SerializedName = @"provider", - PossibleTypes = new [] { typeof(string) })] - string DisplayProvider { get; } - /// - /// The localized friendly form of the resource type related to this action/operation. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The localized friendly form of the resource type related to this action/operation.", - SerializedName = @"resource", - PossibleTypes = new [] { typeof(string) })] - string DisplayResource { get; } - /// The name of the operation being performed on this particular object. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The name of the operation being performed on this particular object.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - - } - /// A Stream Analytics REST API operation - internal partial interface IOperationInternal - - { - /// - /// Contains the localized display information for this particular operation / action. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplay Display { get; set; } - /// The localized friendly description for the operation. - string DisplayDescription { get; set; } - /// The localized friendly name for the operation. - string DisplayOperation { get; set; } - /// The localized friendly form of the resource provider name. - string DisplayProvider { get; set; } - /// - /// The localized friendly form of the resource type related to this action/operation. - /// - string DisplayResource { get; set; } - /// The name of the operation being performed on this particular object. - string Name { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Operation.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Operation.json.cs deleted file mode 100644 index 6a259a88ea0c..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Operation.json.cs +++ /dev/null @@ -1,116 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// A Stream Analytics REST API operation - public partial class Operation - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new Operation(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. - internal Operation(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OperationDisplay.FromJson(__jsonDisplay) : Display;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationDisplay.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationDisplay.PowerShell.cs deleted file mode 100644 index 6078ccb64374..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationDisplay.PowerShell.cs +++ /dev/null @@ -1,172 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// Contains the localized display information for this particular operation / action. - /// - [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] - public partial class OperationDisplay - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new OperationDisplay(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new OperationDisplay(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal OperationDisplay(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Provider")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); - } - if (content.Contains("Resource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); - } - if (content.Contains("Operation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal OperationDisplay(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Provider")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); - } - if (content.Contains("Resource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); - } - if (content.Contains("Operation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); - } - if (content.Contains("Description")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Contains the localized display information for this particular operation / action. - [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] - public partial interface IOperationDisplay - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationDisplay.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationDisplay.TypeConverter.cs deleted file mode 100644 index fc63b4836f1f..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationDisplay.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class OperationDisplayTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplay ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplay).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return OperationDisplay.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return OperationDisplay.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return OperationDisplay.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationDisplay.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationDisplay.cs deleted file mode 100644 index 74f8ae0dde5b..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationDisplay.cs +++ /dev/null @@ -1,122 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// Contains the localized display information for this particular operation / action. - /// - public partial class OperationDisplay : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplay, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal - { - - /// Backing field for property. - private string _description; - - /// The localized friendly description for the operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Description { get => this._description; } - - /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } - - /// Internal Acessors for Operation - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } - - /// Internal Acessors for Provider - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } - - /// Internal Acessors for Resource - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } - - /// Backing field for property. - private string _operation; - - /// The localized friendly name for the operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Operation { get => this._operation; } - - /// Backing field for property. - private string _provider; - - /// The localized friendly form of the resource provider name. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Provider { get => this._provider; } - - /// Backing field for property. - private string _resource; - - /// - /// The localized friendly form of the resource type related to this action/operation. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Resource { get => this._resource; } - - /// Creates an new instance. - public OperationDisplay() - { - - } - } - /// Contains the localized display information for this particular operation / action. - public partial interface IOperationDisplay : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// The localized friendly description for the operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The localized friendly description for the operation.", - SerializedName = @"description", - PossibleTypes = new [] { typeof(string) })] - string Description { get; } - /// The localized friendly name for the operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The localized friendly name for the operation.", - SerializedName = @"operation", - PossibleTypes = new [] { typeof(string) })] - string Operation { get; } - /// The localized friendly form of the resource provider name. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The localized friendly form of the resource provider name.", - SerializedName = @"provider", - PossibleTypes = new [] { typeof(string) })] - string Provider { get; } - /// - /// The localized friendly form of the resource type related to this action/operation. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The localized friendly form of the resource type related to this action/operation.", - SerializedName = @"resource", - PossibleTypes = new [] { typeof(string) })] - string Resource { get; } - - } - /// Contains the localized display information for this particular operation / action. - internal partial interface IOperationDisplayInternal - - { - /// The localized friendly description for the operation. - string Description { get; set; } - /// The localized friendly name for the operation. - string Operation { get; set; } - /// The localized friendly form of the resource provider name. - string Provider { get; set; } - /// - /// The localized friendly form of the resource type related to this action/operation. - /// - string Resource { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationDisplay.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationDisplay.json.cs deleted file mode 100644 index ab20ae70ff22..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationDisplay.json.cs +++ /dev/null @@ -1,128 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// Contains the localized display information for this particular operation / action. - /// - public partial class OperationDisplay - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplay. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplay. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. - internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider;} - {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource;} - {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} - {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationListResult.PowerShell.cs deleted file mode 100644 index 46b9de565be4..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationListResult.PowerShell.cs +++ /dev/null @@ -1,158 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// Result of the request to list Stream Analytics operations. It contains a list of operations and a URL link to get the - /// next set of results. - /// - [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] - public partial class OperationListResult - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new OperationListResult(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new OperationListResult(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal OperationListResult(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OperationTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal OperationListResult(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OperationTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Result of the request to list Stream Analytics operations. It contains a list of operations and a URL link to get the - /// next set of results. - [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] - public partial interface IOperationListResult - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationListResult.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationListResult.TypeConverter.cs deleted file mode 100644 index 6f9f331ba036..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationListResult.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class OperationListResultTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResult ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResult).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return OperationListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return OperationListResult.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return OperationListResult.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationListResult.cs deleted file mode 100644 index 1783fbf01a2d..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationListResult.cs +++ /dev/null @@ -1,85 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// Result of the request to list Stream Analytics operations. It contains a list of operations and a URL link to get the - /// next set of results. - /// - public partial class OperationListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResult, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResultInternal - { - - /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation[] Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// URL to get the next set of operation list results if there are any. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation[] _value; - - /// - /// List of Stream Analytics operations supported by the Microsoft.StreamAnalytics resource provider. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation[] Value { get => this._value; } - - /// Creates an new instance. - public OperationListResult() - { - - } - } - /// Result of the request to list Stream Analytics operations. It contains a list of operations and a URL link to get the - /// next set of results. - public partial interface IOperationListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// URL to get the next set of operation list results if there are any. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"URL to get the next set of operation list results if there are any.", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; } - /// - /// List of Stream Analytics operations supported by the Microsoft.StreamAnalytics resource provider. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"List of Stream Analytics operations supported by the Microsoft.StreamAnalytics resource provider.", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation[] Value { get; } - - } - /// Result of the request to list Stream Analytics operations. It contains a list of operations and a URL link to get the - /// next set of results. - internal partial interface IOperationListResultInternal - - { - /// URL to get the next set of operation list results if there are any. - string NextLink { get; set; } - /// - /// List of Stream Analytics operations supported by the Microsoft.StreamAnalytics resource provider. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationListResult.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationListResult.json.cs deleted file mode 100644 index ed71be60e8ee..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OperationListResult.json.cs +++ /dev/null @@ -1,127 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// Result of the request to list Stream Analytics operations. It contains a list of operations and a URL link to get the - /// next set of results. - /// - public partial class OperationListResult - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResult. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResult. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new OperationListResult(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. - internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Operation.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) - { - if (null != this._value) - { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.XNodeArray(); - foreach( var __x in this._value ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("value",__w); - } - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Output.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Output.PowerShell.cs deleted file mode 100644 index 04270903b866..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Output.PowerShell.cs +++ /dev/null @@ -1,236 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// An output object, containing all information associated with the named output. All outputs are contained under a streaming - /// job. - /// - [System.ComponentModel.TypeConverter(typeof(OutputTypeConverter))] - public partial class Output - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Output(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Output(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Output(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("ETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).ETag, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Serialization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SerializationTypeConverter.ConvertFrom); - } - if (content.Contains("Diagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticsTypeConverter.ConvertFrom); - } - if (content.Contains("Datasource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSourceTypeConverter.ConvertFrom); - } - if (content.Contains("TimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).TimeWindow = (string) content.GetValueForProperty("TimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).TimeWindow, global::System.Convert.ToString); - } - if (content.Contains("SizeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).SizeWindow = (float?) content.GetValueForProperty("SizeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).SizeWindow, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("DiagnosticCondition")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).DiagnosticCondition = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[]) content.GetValueForProperty("DiagnosticCondition",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).DiagnosticCondition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticConditionTypeConverter.ConvertFrom)); - } - if (content.Contains("SerializationType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).SerializationType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("SerializationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).SerializationType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Output(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("ETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).ETag, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Serialization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SerializationTypeConverter.ConvertFrom); - } - if (content.Contains("Diagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticsTypeConverter.ConvertFrom); - } - if (content.Contains("Datasource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSourceTypeConverter.ConvertFrom); - } - if (content.Contains("TimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).TimeWindow = (string) content.GetValueForProperty("TimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).TimeWindow, global::System.Convert.ToString); - } - if (content.Contains("SizeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).SizeWindow = (float?) content.GetValueForProperty("SizeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).SizeWindow, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("DiagnosticCondition")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).DiagnosticCondition = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[]) content.GetValueForProperty("DiagnosticCondition",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).DiagnosticCondition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticConditionTypeConverter.ConvertFrom)); - } - if (content.Contains("SerializationType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).SerializationType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("SerializationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).SerializationType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// An output object, containing all information associated with the named output. All outputs are contained under a streaming - /// job. - [System.ComponentModel.TypeConverter(typeof(OutputTypeConverter))] - public partial interface IOutput - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Output.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Output.cs deleted file mode 100644 index 65a5a4c22f2c..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Output.cs +++ /dev/null @@ -1,225 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// An output object, containing all information associated with the named output. All outputs are contained under a streaming - /// job. - /// - public partial class Output : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubResource(); - - /// - /// Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource Datasource { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)Property).Datasource; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)Property).Datasource = value ?? null /* model class */; } - - /// - /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[] DiagnosticCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)Property).DiagnosticCondition; } - - /// Backing field for property. - private string _eTag; - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string ETag { get => this._eTag; set => this._eTag = value; } - - /// Resource Id - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Id; } - - /// Internal Acessors for Diagnostic - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal.Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)Property).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)Property).Diagnostic = value; } - - /// Internal Acessors for DiagnosticCondition - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[] Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal.DiagnosticCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)Property).DiagnosticCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)Property).DiagnosticCondition = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputProperties()); set { {_property = value;} } } - - /// Internal Acessors for Serialization - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal.Serialization { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)Property).Serialization; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)Property).Serialization = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Type = value; } - - /// Resource name - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputProperties _property; - - /// - /// The properties that are associated with an output. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputProperties()); set => this._property = value; } - - /// - /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType? SerializationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)Property).SerializationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)Property).SerializationType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType)""); } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public float? SizeWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)Property).SizeWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)Property).SizeWindow = value ?? default(float); } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TimeWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)Property).TimeWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)Property).TimeWindow = value ?? null; } - - /// Resource type - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Type; } - - /// - void Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("ETag", out var __eTagHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputInternal)this).ETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader0) is string __headerETagHeader0 ? __headerETagHeader0 : (string)null; - } - } - - /// Creates an new instance. - public Output() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__subResource), __subResource); - await eventListener.AssertObjectIsValid(nameof(__subResource), __subResource); - } - } - /// An output object, containing all information associated with the named output. All outputs are contained under a streaming - /// job. - public partial interface IOutput : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource - { - /// - /// Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"datasource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource Datasource { get; set; } - /// - /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention.", - SerializedName = @"conditions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[] DiagnosticCondition { get; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"ETag", - PossibleTypes = new [] { typeof(string) })] - string ETag { get; set; } - /// - /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType? SerializationType { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"sizeWindow", - PossibleTypes = new [] { typeof(float) })] - float? SizeWindow { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"timeWindow", - PossibleTypes = new [] { typeof(string) })] - string TimeWindow { get; set; } - - } - /// An output object, containing all information associated with the named output. All outputs are contained under a streaming - /// job. - internal partial interface IOutputInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal - { - /// - /// Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource Datasource { get; set; } - /// - /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics Diagnostic { get; set; } - /// - /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[] DiagnosticCondition { get; set; } - - string ETag { get; set; } - /// - /// The properties that are associated with an output. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputProperties Property { get; set; } - /// - /// Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) - /// requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization Serialization { get; set; } - /// - /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType? SerializationType { get; set; } - - float? SizeWindow { get; set; } - - string TimeWindow { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputListResult.PowerShell.cs deleted file mode 100644 index a8374a6ef7b0..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputListResult.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Object containing a list of outputs under a streaming job. - [System.ComponentModel.TypeConverter(typeof(OutputListResultTypeConverter))] - public partial class OutputListResult - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new OutputListResult(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new OutputListResult(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal OutputListResult(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResultInternal)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 OutputListResult(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResultInternal)this).NextLink, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Object containing a list of outputs under a streaming job. - [System.ComponentModel.TypeConverter(typeof(OutputListResultTypeConverter))] - public partial interface IOutputListResult - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputListResult.cs deleted file mode 100644 index 37b0d6341a85..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputListResult.cs +++ /dev/null @@ -1,74 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Object containing a list of outputs under a streaming job. - public partial class OutputListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResult, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResultInternal - { - - /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResultInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// The link (url) to the next page of results. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] _value; - - /// A list of outputs under a streaming job. Populated by a 'List' operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] Value { get => this._value; } - - /// Creates an new instance. - public OutputListResult() - { - - } - } - /// Object containing a list of outputs under a streaming job. - public partial interface IOutputListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// The link (url) to the next page of results. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The link (url) to the next page of results.", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; } - /// A list of outputs under a streaming job. Populated by a 'List' operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A list of outputs under a streaming job. Populated by a 'List' operation.", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] Value { get; } - - } - /// Object containing a list of outputs under a streaming job. - internal partial interface IOutputListResultInternal - - { - /// The link (url) to the next page of results. - string NextLink { get; set; } - /// A list of outputs under a streaming job. Populated by a 'List' operation. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputProperties.PowerShell.cs deleted file mode 100644 index f31006d4cf56..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputProperties.PowerShell.cs +++ /dev/null @@ -1,194 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with an output. - [System.ComponentModel.TypeConverter(typeof(OutputPropertiesTypeConverter))] - public partial class OutputProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new OutputProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new OutputProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal OutputProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Serialization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SerializationTypeConverter.ConvertFrom); - } - if (content.Contains("Diagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticsTypeConverter.ConvertFrom); - } - if (content.Contains("Datasource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSourceTypeConverter.ConvertFrom); - } - if (content.Contains("TimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).TimeWindow = (string) content.GetValueForProperty("TimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).TimeWindow, global::System.Convert.ToString); - } - if (content.Contains("SizeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).SizeWindow = (float?) content.GetValueForProperty("SizeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).SizeWindow, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("DiagnosticCondition")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).DiagnosticCondition = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[]) content.GetValueForProperty("DiagnosticCondition",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).DiagnosticCondition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticConditionTypeConverter.ConvertFrom)); - } - if (content.Contains("SerializationType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).SerializationType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("SerializationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).SerializationType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal OutputProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Serialization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SerializationTypeConverter.ConvertFrom); - } - if (content.Contains("Diagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticsTypeConverter.ConvertFrom); - } - if (content.Contains("Datasource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSourceTypeConverter.ConvertFrom); - } - if (content.Contains("TimeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).TimeWindow = (string) content.GetValueForProperty("TimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).TimeWindow, global::System.Convert.ToString); - } - if (content.Contains("SizeWindow")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).SizeWindow = (float?) content.GetValueForProperty("SizeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).SizeWindow, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("DiagnosticCondition")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).DiagnosticCondition = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[]) content.GetValueForProperty("DiagnosticCondition",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).DiagnosticCondition, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticConditionTypeConverter.ConvertFrom)); - } - if (content.Contains("SerializationType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).SerializationType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("SerializationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal)this).SerializationType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with an output. - [System.ComponentModel.TypeConverter(typeof(OutputPropertiesTypeConverter))] - public partial interface IOutputProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputProperties.cs deleted file mode 100644 index 5e4c747d4422..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputProperties.cs +++ /dev/null @@ -1,166 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with an output. - public partial class OutputProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource _datasource; - - /// - /// Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource Datasource { get => (this._datasource = this._datasource ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource()); set => this._datasource = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics _diagnostic; - - /// - /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics Diagnostic { get => (this._diagnostic = this._diagnostic ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Diagnostics()); } - - /// - /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[] DiagnosticCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticsInternal)Diagnostic).Condition; } - - /// Internal Acessors for Diagnostic - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal.Diagnostic { get => (this._diagnostic = this._diagnostic ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Diagnostics()); set { {_diagnostic = value;} } } - - /// Internal Acessors for DiagnosticCondition - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[] Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal.DiagnosticCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticsInternal)Diagnostic).Condition; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticsInternal)Diagnostic).Condition = value; } - - /// Internal Acessors for Serialization - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputPropertiesInternal.Serialization { get => (this._serialization = this._serialization ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Serialization()); set { {_serialization = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization _serialization; - - /// - /// Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization Serialization { get => (this._serialization = this._serialization ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Serialization()); set => this._serialization = value; } - - /// - /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType? SerializationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)Serialization).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)Serialization).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType)""); } - - /// Backing field for property. - private float? _sizeWindow; - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public float? SizeWindow { get => this._sizeWindow; set => this._sizeWindow = value; } - - /// Backing field for property. - private string _timeWindow; - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string TimeWindow { get => this._timeWindow; set => this._timeWindow = value; } - - /// Creates an new instance. - public OutputProperties() - { - - } - } - /// The properties that are associated with an output. - public partial interface IOutputProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// - /// Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"datasource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource Datasource { get; set; } - /// - /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention.", - SerializedName = @"conditions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[] DiagnosticCondition { get; } - /// - /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType? SerializationType { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"sizeWindow", - PossibleTypes = new [] { typeof(float) })] - float? SizeWindow { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"timeWindow", - PossibleTypes = new [] { typeof(string) })] - string TimeWindow { get; set; } - - } - /// The properties that are associated with an output. - internal partial interface IOutputPropertiesInternal - - { - /// - /// Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource Datasource { get; set; } - /// - /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics Diagnostic { get; set; } - /// - /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition[] DiagnosticCondition { get; set; } - /// - /// Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) - /// requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization Serialization { get; set; } - /// - /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType? SerializationType { get; set; } - - float? SizeWindow { get; set; } - - string TimeWindow { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ParquetSerialization.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ParquetSerialization.PowerShell.cs deleted file mode 100644 index ca8858ae07a3..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ParquetSerialization.PowerShell.cs +++ /dev/null @@ -1,156 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// Describes how data from an input is serialized or how data is serialized when written to an output in Parquet format. - /// - [System.ComponentModel.TypeConverter(typeof(ParquetSerializationTypeConverter))] - public partial class ParquetSerialization - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IParquetSerialization DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ParquetSerialization(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IParquetSerialization DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ParquetSerialization(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IParquetSerialization FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ParquetSerialization(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IParquetSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IParquetSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ParquetSerialization(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IParquetSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IParquetSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AnyTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes how data from an input is serialized or how data is serialized when written to an output in Parquet format. - [System.ComponentModel.TypeConverter(typeof(ParquetSerializationTypeConverter))] - public partial interface IParquetSerialization - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSource.PowerShell.cs deleted file mode 100644 index 94d11ca2c644..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSource.PowerShell.cs +++ /dev/null @@ -1,218 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes a Power BI output data source. - [System.ComponentModel.TypeConverter(typeof(PowerBiOutputDataSourceTypeConverter))] - public partial class PowerBiOutputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new PowerBiOutputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new PowerBiOutputDataSource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal PowerBiOutputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.PowerBiOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("RefreshToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).RefreshToken, global::System.Convert.ToString); - } - if (content.Contains("TokenUserPrincipalName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); - } - if (content.Contains("TokenUserDisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).TokenUserDisplayName, global::System.Convert.ToString); - } - if (content.Contains("Dataset")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).Dataset = (string) content.GetValueForProperty("Dataset",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).Dataset, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("GroupId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).GroupId, global::System.Convert.ToString); - } - if (content.Contains("GroupName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).GroupName = (string) content.GetValueForProperty("GroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).GroupName, 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 PowerBiOutputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.PowerBiOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("RefreshToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).RefreshToken, global::System.Convert.ToString); - } - if (content.Contains("TokenUserPrincipalName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); - } - if (content.Contains("TokenUserDisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).TokenUserDisplayName, global::System.Convert.ToString); - } - if (content.Contains("Dataset")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).Dataset = (string) content.GetValueForProperty("Dataset",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).Dataset, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("GroupId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).GroupId, global::System.Convert.ToString); - } - if (content.Contains("GroupName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).GroupName = (string) content.GetValueForProperty("GroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal)this).GroupName, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes a Power BI output data source. - [System.ComponentModel.TypeConverter(typeof(PowerBiOutputDataSourceTypeConverter))] - public partial interface IPowerBiOutputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSource.cs deleted file mode 100644 index 9aafd98cb007..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSource.cs +++ /dev/null @@ -1,232 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Describes a Power BI output data source. - public partial class PowerBiOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(); - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Dataset { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)Property).Dataset; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)Property).Dataset = value ?? null; } - - /// The ID of the Power BI group. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string GroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)Property).GroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)Property).GroupId = value ?? null; } - - /// - /// The name of the Power BI group. Use this property to help remember which specific Power BI group id was used. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string GroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)Property).GroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)Property).GroupName = value ?? null; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.PowerBiOutputDataSourceProperties()); set { {_property = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceProperties _property; - - /// - /// The properties that are associated with a Power BI output. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.PowerBiOutputDataSourceProperties()); set => this._property = value; } - - /// - /// A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. - /// A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value - /// here when creating the data source and then going to the Azure Portal to authenticate the data source which will update - /// this property with a valid refresh token. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string RefreshToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)Property).RefreshToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)Property).RefreshToken = value ?? null; } - - /// - /// The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Table { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)Property).Table; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)Property).Table = value ?? null; } - - /// - /// The user display name of the user that was used to obtain the refresh token. Use this property to help remember which - /// user was used to obtain the refresh token. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TokenUserDisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserDisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserDisplayName = value ?? null; } - - /// - /// The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember - /// which user was used to obtain the refresh token. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TokenUserPrincipalName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserPrincipalName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserPrincipalName = value ?? null; } - - /// - /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type = value ; } - - /// Creates an new instance. - public PowerBiOutputDataSource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); - await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); - } - } - /// Describes a Power BI output data source. - public partial interface IPowerBiOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource - { - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authentication Mode.", - SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"dataset", - PossibleTypes = new [] { typeof(string) })] - string Dataset { get; set; } - /// The ID of the Power BI group. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The ID of the Power BI group.", - SerializedName = @"groupId", - PossibleTypes = new [] { typeof(string) })] - string GroupId { get; set; } - /// - /// The name of the Power BI group. Use this property to help remember which specific Power BI group id was used. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Power BI group. Use this property to help remember which specific Power BI group id was used.", - SerializedName = @"groupName", - PossibleTypes = new [] { typeof(string) })] - string GroupName { get; set; } - /// - /// A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. - /// A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value - /// here when creating the data source and then going to the Azure Portal to authenticate the data source which will update - /// this property with a valid refresh token. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"refreshToken", - PossibleTypes = new [] { typeof(string) })] - string RefreshToken { get; set; } - /// - /// The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"table", - PossibleTypes = new [] { typeof(string) })] - string Table { get; set; } - /// - /// The user display name of the user that was used to obtain the refresh token. Use this property to help remember which - /// user was used to obtain the refresh token. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The user display name of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", - SerializedName = @"tokenUserDisplayName", - PossibleTypes = new [] { typeof(string) })] - string TokenUserDisplayName { get; set; } - /// - /// The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember - /// which user was used to obtain the refresh token. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", - SerializedName = @"tokenUserPrincipalName", - PossibleTypes = new [] { typeof(string) })] - string TokenUserPrincipalName { get; set; } - - } - /// Describes a Power BI output data source. - internal partial interface IPowerBiOutputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal - { - /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests. - string Dataset { get; set; } - /// The ID of the Power BI group. - string GroupId { get; set; } - /// - /// The name of the Power BI group. Use this property to help remember which specific Power BI group id was used. - /// - string GroupName { get; set; } - /// - /// The properties that are associated with a Power BI output. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceProperties Property { get; set; } - /// - /// A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. - /// A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value - /// here when creating the data source and then going to the Azure Portal to authenticate the data source which will update - /// this property with a valid refresh token. Required on PUT (CreateOrReplace) requests. - /// - string RefreshToken { get; set; } - /// - /// The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests. - /// - string Table { get; set; } - /// - /// The user display name of the user that was used to obtain the refresh token. Use this property to help remember which - /// user was used to obtain the refresh token. - /// - string TokenUserDisplayName { get; set; } - /// - /// The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember - /// which user was used to obtain the refresh token. - /// - string TokenUserPrincipalName { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSourceProperties.PowerShell.cs deleted file mode 100644 index db03649be173..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,204 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with a Power BI output. - [System.ComponentModel.TypeConverter(typeof(PowerBiOutputDataSourcePropertiesTypeConverter))] - public partial class PowerBiOutputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new PowerBiOutputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new PowerBiOutputDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal PowerBiOutputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Dataset")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).Dataset = (string) content.GetValueForProperty("Dataset",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).Dataset, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("GroupId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).GroupId, global::System.Convert.ToString); - } - if (content.Contains("GroupName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).GroupName = (string) content.GetValueForProperty("GroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).GroupName, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("RefreshToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken, global::System.Convert.ToString); - } - if (content.Contains("TokenUserPrincipalName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); - } - if (content.Contains("TokenUserDisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName, 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 PowerBiOutputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Dataset")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).Dataset = (string) content.GetValueForProperty("Dataset",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).Dataset, global::System.Convert.ToString); - } - if (content.Contains("Table")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); - } - if (content.Contains("GroupId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).GroupId, global::System.Convert.ToString); - } - if (content.Contains("GroupName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).GroupName = (string) content.GetValueForProperty("GroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).GroupName, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("RefreshToken")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken, global::System.Convert.ToString); - } - if (content.Contains("TokenUserPrincipalName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); - } - if (content.Contains("TokenUserDisplayName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with a Power BI output. - [System.ComponentModel.TypeConverter(typeof(PowerBiOutputDataSourcePropertiesTypeConverter))] - public partial interface IPowerBiOutputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputProperties.PowerShell.cs deleted file mode 100644 index 48fe292ba43d..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputProperties.PowerShell.cs +++ /dev/null @@ -1,194 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with an input containing reference data. - [System.ComponentModel.TypeConverter(typeof(ReferenceInputPropertiesTypeConverter))] - public partial class ReferenceInputProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ReferenceInputProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ReferenceInputProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ReferenceInputProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Datasource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputPropertiesInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputPropertiesInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ReferenceInputDataSourceTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Serialization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SerializationTypeConverter.ConvertFrom); - } - if (content.Contains("Diagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticsTypeConverter.ConvertFrom); - } - if (content.Contains("Compression")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Compression = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression) content.GetValueForProperty("Compression",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Compression, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CompressionTypeConverter.ConvertFrom); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("DatasourceType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputPropertiesInternal)this).DatasourceType = (string) content.GetValueForProperty("DatasourceType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputPropertiesInternal)this).DatasourceType, 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 ReferenceInputProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Datasource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputPropertiesInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputPropertiesInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ReferenceInputDataSourceTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Serialization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SerializationTypeConverter.ConvertFrom); - } - if (content.Contains("Diagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticsTypeConverter.ConvertFrom); - } - if (content.Contains("Compression")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Compression = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression) content.GetValueForProperty("Compression",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Compression, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CompressionTypeConverter.ConvertFrom); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("DatasourceType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputPropertiesInternal)this).DatasourceType = (string) content.GetValueForProperty("DatasourceType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputPropertiesInternal)this).DatasourceType, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with an input containing reference data. - [System.ComponentModel.TypeConverter(typeof(ReferenceInputPropertiesTypeConverter))] - public partial interface IReferenceInputProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputProperties.cs deleted file mode 100644 index fa0ca52bed20..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputProperties.cs +++ /dev/null @@ -1,121 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with an input containing reference data. - public partial class ReferenceInputProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputPropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties __inputProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputProperties(); - - /// Describes how input data is compressed - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression Compression { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Compression; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Compression = value ?? null /* model class */; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource _datasource; - - /// - /// Describes an input data source that contains reference data. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource Datasource { get => (this._datasource = this._datasource ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ReferenceInputDataSource()); set => this._datasource = value; } - - /// - /// Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string DatasourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)Datasource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)Datasource).Type = value ?? null; } - - /// - /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Diagnostic; } - - /// Internal Acessors for Diagnostic - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal.Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Diagnostic = value; } - - /// Internal Acessors for Datasource - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputPropertiesInternal.Datasource { get => (this._datasource = this._datasource ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ReferenceInputDataSource()); set { {_datasource = value;} } } - - /// - /// partitionKey Describes a key in the input data which is used for partitioning the input data - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string PartitionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).PartitionKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).PartitionKey = value ?? null; } - - /// - /// Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization Serialization { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Serialization; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Serialization = value ?? null /* model class */; } - - /// - /// Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Type = value ; } - - /// Creates an new instance. - public ReferenceInputProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__inputProperties), __inputProperties); - await eventListener.AssertObjectIsValid(nameof(__inputProperties), __inputProperties); - } - } - /// The properties that are associated with an input containing reference data. - public partial interface IReferenceInputProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties - { - /// - /// Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string DatasourceType { get; set; } - - } - /// The properties that are associated with an input containing reference data. - internal partial interface IReferenceInputPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal - { - /// - /// Describes an input data source that contains reference data. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource Datasource { get; set; } - /// - /// Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests. - /// - string DatasourceType { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ResourceTestStatus.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ResourceTestStatus.PowerShell.cs deleted file mode 100644 index d39a73589211..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ResourceTestStatus.PowerShell.cs +++ /dev/null @@ -1,172 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// Describes the status of the test operation along with error information, if applicable. - /// - [System.ComponentModel.TypeConverter(typeof(ResourceTestStatusTypeConverter))] - public partial class ResourceTestStatus - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ResourceTestStatus(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ResourceTestStatus(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ResourceTestStatus(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponse) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ErrorResponseTypeConverter.ConvertFrom); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Message, 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 ResourceTestStatus(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponse) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ErrorResponseTypeConverter.ConvertFrom); - } - if (content.Contains("Status")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Status, global::System.Convert.ToString); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal)this).Message, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes the status of the test operation along with error information, if applicable. - [System.ComponentModel.TypeConverter(typeof(ResourceTestStatusTypeConverter))] - public partial interface IResourceTestStatus - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ResourceTestStatus.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ResourceTestStatus.cs deleted file mode 100644 index d62afeb72d40..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ResourceTestStatus.cs +++ /dev/null @@ -1,102 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// Describes the status of the test operation along with error information, if applicable. - /// - public partial class ResourceTestStatus : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal - { - - /// Error code associated with the error that occurred. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal)Error).Code; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponse _error; - - /// Describes the error that occurred. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponse Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ErrorResponse()); } - - /// Describes the error in detail. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal)Error).Message; } - - /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal)Error).Code = value; } - - /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponse Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ErrorResponse()); set { {_error = value;} } } - - /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponseInternal)Error).Message = value; } - - /// Internal Acessors for Status - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatusInternal.Status { get => this._status; set { {_status = value;} } } - - /// Backing field for property. - private string _status; - - /// The status of the test operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Status { get => this._status; } - - /// Creates an new instance. - public ResourceTestStatus() - { - - } - } - /// Describes the status of the test operation along with error information, if applicable. - public partial interface IResourceTestStatus : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// Error code associated with the error that occurred. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Error code associated with the error that occurred.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string Code { get; } - /// Describes the error in detail. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Describes the error in detail.", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string Message { get; } - /// The status of the test operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The status of the test operation.", - SerializedName = @"status", - PossibleTypes = new [] { typeof(string) })] - string Status { get; } - - } - /// Describes the status of the test operation along with error information, if applicable. - internal partial interface IResourceTestStatusInternal - - { - /// Error code associated with the error that occurred. - string Code { get; set; } - /// Describes the error that occurred. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IErrorResponse Error { get; set; } - /// Describes the error in detail. - string Message { get; set; } - /// The status of the test operation. - string Status { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ScalarFunctionProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ScalarFunctionProperties.PowerShell.cs deleted file mode 100644 index cf24812e1f7e..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ScalarFunctionProperties.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with a scalar function. - [System.ComponentModel.TypeConverter(typeof(ScalarFunctionPropertiesTypeConverter))] - public partial class ScalarFunctionProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IScalarFunctionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ScalarFunctionProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IScalarFunctionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ScalarFunctionProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IScalarFunctionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ScalarFunctionProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionConfigurationTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ScalarFunctionProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionConfigurationTypeConverter.ConvertFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with a scalar function. - [System.ComponentModel.TypeConverter(typeof(ScalarFunctionPropertiesTypeConverter))] - public partial interface IScalarFunctionProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ScalarFunctionProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ScalarFunctionProperties.cs deleted file mode 100644 index c6e995c73281..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ScalarFunctionProperties.cs +++ /dev/null @@ -1,60 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with a scalar function. - public partial class ScalarFunctionProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IScalarFunctionProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IScalarFunctionPropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties __functionProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionProperties(); - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration Property { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)__functionProperties).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)__functionProperties).Property = value ?? null /* model class */; } - - /// Indicates the type of function. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)__functionProperties).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal)__functionProperties).Type = value ; } - - /// Creates an new instance. - public ScalarFunctionProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__functionProperties), __functionProperties); - await eventListener.AssertObjectIsValid(nameof(__functionProperties), __functionProperties); - } - } - /// The properties that are associated with a scalar function. - public partial interface IScalarFunctionProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties - { - - } - /// The properties that are associated with a scalar function. - internal partial interface IScalarFunctionPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusDataSourceProperties.PowerShell.cs deleted file mode 100644 index 88801f4335ee..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,172 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// The common properties that are associated with Service Bus data sources (Queues, Topics, Event Hubs, etc.). - /// - [System.ComponentModel.TypeConverter(typeof(ServiceBusDataSourcePropertiesTypeConverter))] - public partial class ServiceBusDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ServiceBusDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ServiceBusDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ServiceBusDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ServiceBusDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The common properties that are associated with Service Bus data sources (Queues, Topics, Event Hubs, etc.). - [System.ComponentModel.TypeConverter(typeof(ServiceBusDataSourcePropertiesTypeConverter))] - public partial interface IServiceBusDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSource.PowerShell.cs deleted file mode 100644 index bd5608908d4f..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSource.PowerShell.cs +++ /dev/null @@ -1,210 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes a Service Bus Queue output data source. - [System.ComponentModel.TypeConverter(typeof(ServiceBusQueueOutputDataSourceTypeConverter))] - public partial class ServiceBusQueueOutputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ServiceBusQueueOutputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ServiceBusQueueOutputDataSource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ServiceBusQueueOutputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("QueueName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).QueueName = (string) content.GetValueForProperty("QueueName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).QueueName, global::System.Convert.ToString); - } - if (content.Contains("PropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).PropertyColumn = (string[]) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("SystemPropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ServiceBusQueueOutputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("QueueName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).QueueName = (string) content.GetValueForProperty("QueueName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).QueueName, global::System.Convert.ToString); - } - if (content.Contains("PropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).PropertyColumn = (string[]) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("SystemPropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes a Service Bus Queue output data source. - [System.ComponentModel.TypeConverter(typeof(ServiceBusQueueOutputDataSourceTypeConverter))] - public partial interface IServiceBusQueueOutputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSource.cs deleted file mode 100644 index 9b06587a0d8f..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSource.cs +++ /dev/null @@ -1,203 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Describes a Service Bus Queue output data source. - public partial class ServiceBusQueueOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(); - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourceProperties()); set { {_property = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceProperties _property; - - /// - /// The properties that are associated with a Service Bus Queue output. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourceProperties()); set => this._property = value; } - - /// - /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string[] PropertyColumn { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)Property).PropertyColumn; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)Property).PropertyColumn = value ?? null /* arrayOf */; } - - /// The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string QueueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)Property).QueueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)Property).QueueName = value ?? null; } - - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace = value ?? null; } - - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey = value ?? null; } - - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName = value ?? null; } - - /// Dictionary of - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)Property).SystemPropertyColumn; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)Property).SystemPropertyColumn = value ?? null /* model class */; } - - /// - /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type = value ; } - - /// Creates an new instance. - public ServiceBusQueueOutputDataSource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); - await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); - } - } - /// Describes a Service Bus Queue output data source. - public partial interface IServiceBusQueueOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource - { - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authentication Mode.", - SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// - /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A string array of the names of output columns to be attached to Service Bus messages as custom properties.", - SerializedName = @"propertyColumns", - PossibleTypes = new [] { typeof(string) })] - string[] PropertyColumn { get; set; } - /// The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"queueName", - PossibleTypes = new [] { typeof(string) })] - string QueueName { get; set; } - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"serviceBusNamespace", - PossibleTypes = new [] { typeof(string) })] - string ServiceBusNamespace { get; set; } - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"sharedAccessPolicyKey", - PossibleTypes = new [] { typeof(string) })] - string SharedAccessPolicyKey { get; set; } - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"sharedAccessPolicyName", - PossibleTypes = new [] { typeof(string) })] - string SharedAccessPolicyName { get; set; } - /// Dictionary of - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Dictionary of ", - SerializedName = @"systemPropertyColumns", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } - - } - /// Describes a Service Bus Queue output data source. - internal partial interface IServiceBusQueueOutputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal - { - /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// - /// The properties that are associated with a Service Bus Queue output. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceProperties Property { get; set; } - /// - /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. - /// - string[] PropertyColumn { get; set; } - /// The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests. - string QueueName { get; set; } - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - string ServiceBusNamespace { get; set; } - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - string SharedAccessPolicyKey { get; set; } - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - string SharedAccessPolicyName { get; set; } - /// Dictionary of - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourceProperties.PowerShell.cs deleted file mode 100644 index 6045df50f49b..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,197 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with a Service Bus Queue output. - [System.ComponentModel.TypeConverter(typeof(ServiceBusQueueOutputDataSourcePropertiesTypeConverter))] - public partial class ServiceBusQueueOutputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ServiceBusQueueOutputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ServiceBusQueueOutputDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json - /// string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ServiceBusQueueOutputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("QueueName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)this).QueueName = (string) content.GetValueForProperty("QueueName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)this).QueueName, global::System.Convert.ToString); - } - if (content.Contains("PropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)this).PropertyColumn = (string[]) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("SystemPropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ServiceBusQueueOutputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("QueueName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)this).QueueName = (string) content.GetValueForProperty("QueueName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)this).QueueName, global::System.Convert.ToString); - } - if (content.Contains("PropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)this).PropertyColumn = (string[]) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("SystemPropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with a Service Bus Queue output. - [System.ComponentModel.TypeConverter(typeof(ServiceBusQueueOutputDataSourcePropertiesTypeConverter))] - public partial interface IServiceBusQueueOutputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourceProperties.cs deleted file mode 100644 index 29e36644a06e..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourceProperties.cs +++ /dev/null @@ -1,136 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with a Service Bus Queue output. - public partial class ServiceBusQueueOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourceProperties __serviceBusDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusDataSourceProperties(); - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// Backing field for property. - private string[] _propertyColumn; - - /// - /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string[] PropertyColumn { get => this._propertyColumn; set => this._propertyColumn = value; } - - /// Backing field for property. - private string _queueName; - - /// The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string QueueName { get => this._queueName; set => this._queueName = value; } - - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).ServiceBusNamespace = value ?? null; } - - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyKey = value ?? null; } - - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyName = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns _systemPropertyColumn; - - /// Dictionary of - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get => (this._systemPropertyColumn = this._systemPropertyColumn ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns()); set => this._systemPropertyColumn = value; } - - /// - /// Creates an new instance. - /// - public ServiceBusQueueOutputDataSourceProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__serviceBusDataSourceProperties), __serviceBusDataSourceProperties); - await eventListener.AssertObjectIsValid(nameof(__serviceBusDataSourceProperties), __serviceBusDataSourceProperties); - } - } - /// The properties that are associated with a Service Bus Queue output. - public partial interface IServiceBusQueueOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourceProperties - { - /// - /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A string array of the names of output columns to be attached to Service Bus messages as custom properties.", - SerializedName = @"propertyColumns", - PossibleTypes = new [] { typeof(string) })] - string[] PropertyColumn { get; set; } - /// The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"queueName", - PossibleTypes = new [] { typeof(string) })] - string QueueName { get; set; } - /// Dictionary of - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Dictionary of ", - SerializedName = @"systemPropertyColumns", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } - - } - /// The properties that are associated with a Service Bus Queue output. - internal partial interface IServiceBusQueueOutputDataSourcePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal - { - /// - /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. - /// - string[] PropertyColumn { get; set; } - /// The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests. - string QueueName { get; set; } - /// Dictionary of - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSource.PowerShell.cs deleted file mode 100644 index 1f45ed7e9c32..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSource.PowerShell.cs +++ /dev/null @@ -1,210 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes a Service Bus Topic output data source. - [System.ComponentModel.TypeConverter(typeof(ServiceBusTopicOutputDataSourceTypeConverter))] - public partial class ServiceBusTopicOutputDataSource - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ServiceBusTopicOutputDataSource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ServiceBusTopicOutputDataSource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ServiceBusTopicOutputDataSource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("TopicName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).TopicName = (string) content.GetValueForProperty("TopicName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).TopicName, global::System.Convert.ToString); - } - if (content.Contains("PropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).PropertyColumn = (string[]) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("SystemPropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ServiceBusTopicOutputDataSource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourcePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("TopicName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).TopicName = (string) content.GetValueForProperty("TopicName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).TopicName, global::System.Convert.ToString); - } - if (content.Contains("PropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).PropertyColumn = (string[]) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("SystemPropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes a Service Bus Topic output data source. - [System.ComponentModel.TypeConverter(typeof(ServiceBusTopicOutputDataSourceTypeConverter))] - public partial interface IServiceBusTopicOutputDataSource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSource.cs deleted file mode 100644 index 6221ca538ebc..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSource.cs +++ /dev/null @@ -1,203 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Describes a Service Bus Topic output data source. - public partial class ServiceBusTopicOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(); - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourceProperties()); set { {_property = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceProperties _property; - - /// - /// The properties that are associated with a Service Bus Topic output. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourceProperties()); set => this._property = value; } - - /// - /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string[] PropertyColumn { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)Property).PropertyColumn; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)Property).PropertyColumn = value ?? null /* arrayOf */; } - - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace = value ?? null; } - - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey = value ?? null; } - - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName = value ?? null; } - - /// Dictionary of - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)Property).SystemPropertyColumn; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)Property).SystemPropertyColumn = value ?? null /* model class */; } - - /// The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TopicName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)Property).TopicName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)Property).TopicName = value ?? null; } - - /// - /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type = value ; } - - /// Creates an new instance. - public ServiceBusTopicOutputDataSource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); - await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); - } - } - /// Describes a Service Bus Topic output data source. - public partial interface IServiceBusTopicOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource - { - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authentication Mode.", - SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// - /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A string array of the names of output columns to be attached to Service Bus messages as custom properties.", - SerializedName = @"propertyColumns", - PossibleTypes = new [] { typeof(string) })] - string[] PropertyColumn { get; set; } - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"serviceBusNamespace", - PossibleTypes = new [] { typeof(string) })] - string ServiceBusNamespace { get; set; } - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"sharedAccessPolicyKey", - PossibleTypes = new [] { typeof(string) })] - string SharedAccessPolicyKey { get; set; } - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"sharedAccessPolicyName", - PossibleTypes = new [] { typeof(string) })] - string SharedAccessPolicyName { get; set; } - /// Dictionary of - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Dictionary of ", - SerializedName = @"systemPropertyColumns", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } - /// The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"topicName", - PossibleTypes = new [] { typeof(string) })] - string TopicName { get; set; } - - } - /// Describes a Service Bus Topic output data source. - internal partial interface IServiceBusTopicOutputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal - { - /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } - /// - /// The properties that are associated with a Service Bus Topic output. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceProperties Property { get; set; } - /// - /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. - /// - string[] PropertyColumn { get; set; } - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - string ServiceBusNamespace { get; set; } - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - string SharedAccessPolicyKey { get; set; } - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - string SharedAccessPolicyName { get; set; } - /// Dictionary of - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } - /// The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests. - string TopicName { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourceProperties.PowerShell.cs deleted file mode 100644 index afa370123998..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourceProperties.PowerShell.cs +++ /dev/null @@ -1,197 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with a Service Bus Topic output. - [System.ComponentModel.TypeConverter(typeof(ServiceBusTopicOutputDataSourcePropertiesTypeConverter))] - public partial class ServiceBusTopicOutputDataSourceProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ServiceBusTopicOutputDataSourceProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ServiceBusTopicOutputDataSourceProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json - /// string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ServiceBusTopicOutputDataSourceProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("TopicName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)this).TopicName = (string) content.GetValueForProperty("TopicName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)this).TopicName, global::System.Convert.ToString); - } - if (content.Contains("PropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)this).PropertyColumn = (string[]) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("SystemPropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ServiceBusTopicOutputDataSourceProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("TopicName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)this).TopicName = (string) content.GetValueForProperty("TopicName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)this).TopicName, global::System.Convert.ToString); - } - if (content.Contains("PropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)this).PropertyColumn = (string[]) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("SystemPropertyColumn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); - } - if (content.Contains("ServiceBusNamespace")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); - } - if (content.Contains("SharedAccessPolicyKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); - } - if (content.Contains("AuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with a Service Bus Topic output. - [System.ComponentModel.TypeConverter(typeof(ServiceBusTopicOutputDataSourcePropertiesTypeConverter))] - public partial interface IServiceBusTopicOutputDataSourceProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourceProperties.cs deleted file mode 100644 index 6f28f60b8556..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourceProperties.cs +++ /dev/null @@ -1,136 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with a Service Bus Topic output. - public partial class ServiceBusTopicOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourceProperties __serviceBusDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusDataSourceProperties(); - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// Backing field for property. - private string[] _propertyColumn; - - /// - /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string[] PropertyColumn { get => this._propertyColumn; set => this._propertyColumn = value; } - - /// - /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT - /// (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).ServiceBusNamespace = value ?? null; } - - /// - /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyKey = value ?? null; } - - /// - /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyName = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns _systemPropertyColumn; - - /// Dictionary of - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get => (this._systemPropertyColumn = this._systemPropertyColumn ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns()); set => this._systemPropertyColumn = value; } - - /// Backing field for property. - private string _topicName; - - /// The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string TopicName { get => this._topicName; set => this._topicName = value; } - - /// - /// Creates an new instance. - /// - public ServiceBusTopicOutputDataSourceProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__serviceBusDataSourceProperties), __serviceBusDataSourceProperties); - await eventListener.AssertObjectIsValid(nameof(__serviceBusDataSourceProperties), __serviceBusDataSourceProperties); - } - } - /// The properties that are associated with a Service Bus Topic output. - public partial interface IServiceBusTopicOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourceProperties - { - /// - /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A string array of the names of output columns to be attached to Service Bus messages as custom properties.", - SerializedName = @"propertyColumns", - PossibleTypes = new [] { typeof(string) })] - string[] PropertyColumn { get; set; } - /// Dictionary of - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Dictionary of ", - SerializedName = @"systemPropertyColumns", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } - /// The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"topicName", - PossibleTypes = new [] { typeof(string) })] - string TopicName { get; set; } - - } - /// The properties that are associated with a Service Bus Topic output. - internal partial interface IServiceBusTopicOutputDataSourcePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal - { - /// - /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. - /// - string[] PropertyColumn { get; set; } - /// Dictionary of - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } - /// The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests. - string TopicName { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StartStreamingJobParameters.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StartStreamingJobParameters.PowerShell.cs deleted file mode 100644 index 4a743352ad8c..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StartStreamingJobParameters.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Parameters supplied to the Start Streaming Job operation. - [System.ComponentModel.TypeConverter(typeof(StartStreamingJobParametersTypeConverter))] - public partial class StartStreamingJobParameters - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new StartStreamingJobParameters(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new StartStreamingJobParameters(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal StartStreamingJobParameters(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("OutputStartMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParametersInternal)this).OutputStartMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode?) content.GetValueForProperty("OutputStartMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParametersInternal)this).OutputStartMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode.CreateFrom); - } - if (content.Contains("OutputStartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParametersInternal)this).OutputStartTime = (global::System.DateTime?) content.GetValueForProperty("OutputStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParametersInternal)this).OutputStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal StartStreamingJobParameters(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("OutputStartMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParametersInternal)this).OutputStartMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode?) content.GetValueForProperty("OutputStartMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParametersInternal)this).OutputStartMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode.CreateFrom); - } - if (content.Contains("OutputStartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParametersInternal)this).OutputStartTime = (global::System.DateTime?) content.GetValueForProperty("OutputStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParametersInternal)this).OutputStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Parameters supplied to the Start Streaming Job operation. - [System.ComponentModel.TypeConverter(typeof(StartStreamingJobParametersTypeConverter))] - public partial interface IStartStreamingJobParameters - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StorageAccount.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StorageAccount.PowerShell.cs deleted file mode 100644 index 3a78cbf9e78a..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StorageAccount.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with an Azure Storage account - [System.ComponentModel.TypeConverter(typeof(StorageAccountTypeConverter))] - public partial class StorageAccount - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new StorageAccount(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new StorageAccount(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal StorageAccount(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountName, global::System.Convert.ToString); - } - if (content.Contains("AccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountKey, 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 StorageAccount(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("AccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountName, global::System.Convert.ToString); - } - if (content.Contains("AccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)this).AccountKey, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with an Azure Storage account - [System.ComponentModel.TypeConverter(typeof(StorageAccountTypeConverter))] - public partial interface IStorageAccount - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputProperties.PowerShell.cs deleted file mode 100644 index 1c908ad7a52d..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputProperties.PowerShell.cs +++ /dev/null @@ -1,194 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with an input containing stream data. - [System.ComponentModel.TypeConverter(typeof(StreamInputPropertiesTypeConverter))] - public partial class StreamInputProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new StreamInputProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new StreamInputProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal StreamInputProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Datasource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputPropertiesInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputPropertiesInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamInputDataSourceTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Serialization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SerializationTypeConverter.ConvertFrom); - } - if (content.Contains("Diagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticsTypeConverter.ConvertFrom); - } - if (content.Contains("Compression")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Compression = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression) content.GetValueForProperty("Compression",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Compression, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CompressionTypeConverter.ConvertFrom); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("DatasourceType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputPropertiesInternal)this).DatasourceType = (string) content.GetValueForProperty("DatasourceType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputPropertiesInternal)this).DatasourceType, 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 StreamInputProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Datasource")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputPropertiesInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputPropertiesInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamInputDataSourceTypeConverter.ConvertFrom); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Serialization")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SerializationTypeConverter.ConvertFrom); - } - if (content.Contains("Diagnostic")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticsTypeConverter.ConvertFrom); - } - if (content.Contains("Compression")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Compression = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression) content.GetValueForProperty("Compression",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).Compression, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CompressionTypeConverter.ConvertFrom); - } - if (content.Contains("PartitionKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)this).PartitionKey, global::System.Convert.ToString); - } - if (content.Contains("DatasourceType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputPropertiesInternal)this).DatasourceType = (string) content.GetValueForProperty("DatasourceType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputPropertiesInternal)this).DatasourceType, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with an input containing stream data. - [System.ComponentModel.TypeConverter(typeof(StreamInputPropertiesTypeConverter))] - public partial interface IStreamInputProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputProperties.cs deleted file mode 100644 index aad0d67538c0..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputProperties.cs +++ /dev/null @@ -1,121 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with an input containing stream data. - public partial class StreamInputProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputPropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties __inputProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputProperties(); - - /// Describes how input data is compressed - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression Compression { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Compression; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Compression = value ?? null /* model class */; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource _datasource; - - /// - /// Describes an input data source that contains stream data. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource Datasource { get => (this._datasource = this._datasource ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamInputDataSource()); set => this._datasource = value; } - - /// - /// Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string DatasourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)Datasource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)Datasource).Type = value ?? null; } - - /// - /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Diagnostic; } - - /// Internal Acessors for Diagnostic - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal.Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Diagnostic = value; } - - /// Internal Acessors for Datasource - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputPropertiesInternal.Datasource { get => (this._datasource = this._datasource ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamInputDataSource()); set { {_datasource = value;} } } - - /// - /// partitionKey Describes a key in the input data which is used for partitioning the input data - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string PartitionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).PartitionKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).PartitionKey = value ?? null; } - - /// - /// Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) - /// requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization Serialization { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Serialization; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Serialization = value ?? null /* model class */; } - - /// - /// Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal)__inputProperties).Type = value ; } - - /// Creates an new instance. - public StreamInputProperties() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__inputProperties), __inputProperties); - await eventListener.AssertObjectIsValid(nameof(__inputProperties), __inputProperties); - } - } - /// The properties that are associated with an input containing stream data. - public partial interface IStreamInputProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties - { - /// - /// Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string DatasourceType { get; set; } - - } - /// The properties that are associated with an input containing stream data. - internal partial interface IStreamInputPropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal - { - /// - /// Describes an input data source that contains stream data. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource Datasource { get; set; } - /// - /// Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. - /// - string DatasourceType { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJob.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJob.PowerShell.cs deleted file mode 100644 index b19aaa98d2a5..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJob.PowerShell.cs +++ /dev/null @@ -1,548 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// A streaming job object, containing all information associated with the named streaming job. - /// - [System.ComponentModel.TypeConverter(typeof(StreamingJobTypeConverter))] - public partial class StreamingJob - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new StreamingJob(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new StreamingJob(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal StreamingJob(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IdentityTypeConverter.ConvertFrom); - } - if (content.Contains("ETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ETag, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Transformation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Transformation = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation) content.GetValueForProperty("Transformation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Transformation, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.TransformationTypeConverter.ConvertFrom); - } - if (content.Contains("JobType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType?) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType.CreateFrom); - } - if (content.Contains("CompatibilityLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).CompatibilityLevel = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).CompatibilityLevel, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel.CreateFrom); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).IdentityType, global::System.Convert.ToString); - } - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobSkuTypeConverter.ConvertFrom); - } - if (content.Contains("JobStorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount) content.GetValueForProperty("JobStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JobStorageAccountTypeConverter.ConvertFrom); - } - if (content.Contains("External")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).External = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal) content.GetValueForProperty("External",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).External, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ExternalTypeConverter.ConvertFrom); - } - if (content.Contains("Cluster")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ClusterInfoTypeConverter.ConvertFrom); - } - if (content.Contains("JobId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobId = (string) content.GetValueForProperty("JobId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("JobState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobState = (string) content.GetValueForProperty("JobState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobState, global::System.Convert.ToString); - } - if (content.Contains("OutputStartMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).OutputStartMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode?) content.GetValueForProperty("OutputStartMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).OutputStartMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode.CreateFrom); - } - if (content.Contains("OutputStartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).OutputStartTime = (global::System.DateTime?) content.GetValueForProperty("OutputStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).OutputStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastOutputEventTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).LastOutputEventTime = (global::System.DateTime?) content.GetValueForProperty("LastOutputEventTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).LastOutputEventTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("EventsOutOfOrderPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).EventsOutOfOrderPolicy = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy?) content.GetValueForProperty("EventsOutOfOrderPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).EventsOutOfOrderPolicy, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy.CreateFrom); - } - if (content.Contains("OutputErrorPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).OutputErrorPolicy = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy?) content.GetValueForProperty("OutputErrorPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).OutputErrorPolicy, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy.CreateFrom); - } - if (content.Contains("EventsOutOfOrderMaxDelayInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).EventsOutOfOrderMaxDelayInSecond = (int?) content.GetValueForProperty("EventsOutOfOrderMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).EventsOutOfOrderMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EventsLateArrivalMaxDelayInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).EventsLateArrivalMaxDelayInSecond = (int?) content.GetValueForProperty("EventsLateArrivalMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).EventsLateArrivalMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DataLocale")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).DataLocale = (string) content.GetValueForProperty("DataLocale",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).DataLocale, global::System.Convert.ToString); - } - if (content.Contains("CreatedDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputTypeConverter.ConvertFrom)); - } - if (content.Contains("Output")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[]) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Output, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputTypeConverter.ConvertFrom)); - } - if (content.Contains("Function")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Function = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[]) content.GetValueForProperty("Function",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Function, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionTypeConverter.ConvertFrom)); - } - if (content.Contains("ContentStoragePolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ContentStoragePolicy = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy?) content.GetValueForProperty("ContentStoragePolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ContentStoragePolicy, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy.CreateFrom); - } - if (content.Contains("TransformationProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties) content.GetValueForProperty("TransformationProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.TransformationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("JobStorageAccountAuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccountAuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("JobStorageAccountAuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccountAuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ExternalStorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ExternalStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount) content.GetValueForProperty("ExternalStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ExternalStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName.CreateFrom); - } - if (content.Contains("TransformationId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationId = (string) content.GetValueForProperty("TransformationId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationId, global::System.Convert.ToString); - } - if (content.Contains("TransformationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationName = (string) content.GetValueForProperty("TransformationName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationName, global::System.Convert.ToString); - } - if (content.Contains("TransformationType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationType = (string) content.GetValueForProperty("TransformationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationType, global::System.Convert.ToString); - } - if (content.Contains("TransformationETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationETag = (string) content.GetValueForProperty("TransformationETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationETag, global::System.Convert.ToString); - } - if (content.Contains("StreamingUnit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Query")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Query, global::System.Convert.ToString); - } - if (content.Contains("JobStorageAccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccountName = (string) content.GetValueForProperty("JobStorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccountName, global::System.Convert.ToString); - } - if (content.Contains("JobStorageAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccountKey = (string) content.GetValueForProperty("JobStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccountKey, global::System.Convert.ToString); - } - if (content.Contains("ExternalContainer")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ExternalContainer = (string) content.GetValueForProperty("ExternalContainer",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ExternalContainer, global::System.Convert.ToString); - } - if (content.Contains("ExternalPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ExternalPath = (string) content.GetValueForProperty("ExternalPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ExternalPath, global::System.Convert.ToString); - } - if (content.Contains("ClusterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ClusterId, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).StorageAccountName = (string) content.GetValueForProperty("StorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).StorageAccountName, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).StorageAccountKey = (string) content.GetValueForProperty("StorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).StorageAccountKey, 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 StreamingJob(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IdentityTypeConverter.ConvertFrom); - } - if (content.Contains("ETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ETag, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Transformation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Transformation = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation) content.GetValueForProperty("Transformation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Transformation, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.TransformationTypeConverter.ConvertFrom); - } - if (content.Contains("JobType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType?) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType.CreateFrom); - } - if (content.Contains("CompatibilityLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).CompatibilityLevel = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).CompatibilityLevel, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel.CreateFrom); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).IdentityType, global::System.Convert.ToString); - } - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobSkuTypeConverter.ConvertFrom); - } - if (content.Contains("JobStorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount) content.GetValueForProperty("JobStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JobStorageAccountTypeConverter.ConvertFrom); - } - if (content.Contains("External")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).External = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal) content.GetValueForProperty("External",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).External, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ExternalTypeConverter.ConvertFrom); - } - if (content.Contains("Cluster")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ClusterInfoTypeConverter.ConvertFrom); - } - if (content.Contains("JobId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobId = (string) content.GetValueForProperty("JobId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("JobState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobState = (string) content.GetValueForProperty("JobState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobState, global::System.Convert.ToString); - } - if (content.Contains("OutputStartMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).OutputStartMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode?) content.GetValueForProperty("OutputStartMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).OutputStartMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode.CreateFrom); - } - if (content.Contains("OutputStartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).OutputStartTime = (global::System.DateTime?) content.GetValueForProperty("OutputStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).OutputStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastOutputEventTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).LastOutputEventTime = (global::System.DateTime?) content.GetValueForProperty("LastOutputEventTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).LastOutputEventTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("EventsOutOfOrderPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).EventsOutOfOrderPolicy = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy?) content.GetValueForProperty("EventsOutOfOrderPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).EventsOutOfOrderPolicy, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy.CreateFrom); - } - if (content.Contains("OutputErrorPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).OutputErrorPolicy = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy?) content.GetValueForProperty("OutputErrorPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).OutputErrorPolicy, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy.CreateFrom); - } - if (content.Contains("EventsOutOfOrderMaxDelayInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).EventsOutOfOrderMaxDelayInSecond = (int?) content.GetValueForProperty("EventsOutOfOrderMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).EventsOutOfOrderMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EventsLateArrivalMaxDelayInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).EventsLateArrivalMaxDelayInSecond = (int?) content.GetValueForProperty("EventsLateArrivalMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).EventsLateArrivalMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DataLocale")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).DataLocale = (string) content.GetValueForProperty("DataLocale",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).DataLocale, global::System.Convert.ToString); - } - if (content.Contains("CreatedDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputTypeConverter.ConvertFrom)); - } - if (content.Contains("Output")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[]) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Output, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputTypeConverter.ConvertFrom)); - } - if (content.Contains("Function")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Function = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[]) content.GetValueForProperty("Function",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Function, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionTypeConverter.ConvertFrom)); - } - if (content.Contains("ContentStoragePolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ContentStoragePolicy = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy?) content.GetValueForProperty("ContentStoragePolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ContentStoragePolicy, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy.CreateFrom); - } - if (content.Contains("TransformationProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties) content.GetValueForProperty("TransformationProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.TransformationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("JobStorageAccountAuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccountAuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("JobStorageAccountAuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccountAuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ExternalStorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ExternalStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount) content.GetValueForProperty("ExternalStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ExternalStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName.CreateFrom); - } - if (content.Contains("TransformationId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationId = (string) content.GetValueForProperty("TransformationId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationId, global::System.Convert.ToString); - } - if (content.Contains("TransformationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationName = (string) content.GetValueForProperty("TransformationName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationName, global::System.Convert.ToString); - } - if (content.Contains("TransformationType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationType = (string) content.GetValueForProperty("TransformationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationType, global::System.Convert.ToString); - } - if (content.Contains("TransformationETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationETag = (string) content.GetValueForProperty("TransformationETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationETag, global::System.Convert.ToString); - } - if (content.Contains("StreamingUnit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Query")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).Query, global::System.Convert.ToString); - } - if (content.Contains("JobStorageAccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccountName = (string) content.GetValueForProperty("JobStorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccountName, global::System.Convert.ToString); - } - if (content.Contains("JobStorageAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccountKey = (string) content.GetValueForProperty("JobStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).JobStorageAccountKey, global::System.Convert.ToString); - } - if (content.Contains("ExternalContainer")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ExternalContainer = (string) content.GetValueForProperty("ExternalContainer",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ExternalContainer, global::System.Convert.ToString); - } - if (content.Contains("ExternalPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ExternalPath = (string) content.GetValueForProperty("ExternalPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ExternalPath, global::System.Convert.ToString); - } - if (content.Contains("ClusterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ClusterId, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).StorageAccountName = (string) content.GetValueForProperty("StorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).StorageAccountName, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).StorageAccountKey = (string) content.GetValueForProperty("StorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).StorageAccountKey, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// A streaming job object, containing all information associated with the named streaming job. - [System.ComponentModel.TypeConverter(typeof(StreamingJobTypeConverter))] - public partial interface IStreamingJob - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJob.cs deleted file mode 100644 index 3c2e72a26f5e..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJob.cs +++ /dev/null @@ -1,886 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// A streaming job object, containing all information associated with the named streaming job. - /// - public partial class StreamingJob : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResource(); - - /// The resource id of cluster. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).ClusterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).ClusterId = value ?? null; } - - /// Controls certain runtime behaviors of the streaming job. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel? CompatibilityLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).CompatibilityLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).CompatibilityLevel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel)""); } - - /// - /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify - /// jobStorageAccount property. . - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy? ContentStoragePolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).ContentStoragePolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).ContentStoragePolicy = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy)""); } - - /// - /// Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public global::System.DateTime? CreatedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).CreatedDate; } - - /// - /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. - /// Defaults to 'en-US' if none specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string DataLocale { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).DataLocale; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).DataLocale = value ?? null; } - - /// Backing field for property. - private string _eTag; - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string ETag { get => this._eTag; set => this._eTag = value; } - - /// - /// The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 - /// (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a - /// value of -1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public int? EventsLateArrivalMaxDelayInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).EventsLateArrivalMaxDelayInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).EventsLateArrivalMaxDelayInSecond = value ?? default(int); } - - /// - /// The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public int? EventsOutOfOrderMaxDelayInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).EventsOutOfOrderMaxDelayInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).EventsOutOfOrderMaxDelayInSecond = value ?? default(int); } - - /// - /// Indicates the policy to apply to events that arrive out of order in the input event stream. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy? EventsOutOfOrderPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).EventsOutOfOrderPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).EventsOutOfOrderPolicy = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy)""); } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ExternalContainer { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).ExternalContainer; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).ExternalContainer = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ExternalPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).ExternalPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).ExternalPath = value ?? null; } - - /// - /// A list of one or more functions for the streaming job. The name property for each function is required when specifying - /// this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available - /// for the individual transformation. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] Function { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).Function; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).Function = value ?? null /* arrayOf */; } - - /// - /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Id; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentity _identity; - - /// - /// Describes the system-assigned managed identity assigned to this job that can be used to authenticate with inputs and outputs. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Identity()); set => this._identity = value; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)Identity).PrincipalId = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)Identity).TenantId = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal)Identity).Type = value ?? null; } - - /// - /// A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property - /// in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual - /// input. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] Input { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).Input; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).Input = value ?? null /* arrayOf */; } - - /// - /// A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string JobId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobId; } - - /// Describes the state of the streaming job. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string JobState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobState; } - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? JobStorageAccountAuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobStorageAccountAuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobStorageAccountAuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string JobStorageAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobStorageAccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobStorageAccountKey = value ?? null; } - - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string JobStorageAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobStorageAccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobStorageAccountName = value ?? null; } - - /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType? JobType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType)""); } - - /// - /// Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating - /// that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in - /// that set. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public global::System.DateTime? LastOutputEventTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).LastOutputEventTime; } - - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)__trackedResource).Location = value ?? null; } - - /// Internal Acessors for Cluster - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.Cluster { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).Cluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).Cluster = value; } - - /// Internal Acessors for CreatedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.CreatedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).CreatedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).CreatedDate = value; } - - /// Internal Acessors for External - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.External { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).External; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).External = value; } - - /// Internal Acessors for ExternalStorageAccount - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.ExternalStorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).ExternalStorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).ExternalStorageAccount = value; } - - /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentity Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Identity()); set { {_identity = value;} } } - - /// Internal Acessors for JobId - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.JobId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobId = value; } - - /// Internal Acessors for JobState - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.JobState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobState = value; } - - /// Internal Acessors for JobStorageAccount - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.JobStorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobStorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).JobStorageAccount = value; } - - /// Internal Acessors for LastOutputEventTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.LastOutputEventTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).LastOutputEventTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).LastOutputEventTime = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for Sku - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).Sku = value; } - - /// Internal Acessors for Transformation - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.Transformation { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).Transformation; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).Transformation = value; } - - /// Internal Acessors for TransformationId - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.TransformationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).TransformationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).TransformationId = value; } - - /// Internal Acessors for TransformationName - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.TransformationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).TransformationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).TransformationName = value; } - - /// Internal Acessors for TransformationProperty - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.TransformationProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).TransformationProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).TransformationProperty = value; } - - /// Internal Acessors for TransformationType - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal.TransformationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).TransformationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).TransformationType = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Name; } - - /// - /// A list of one or more outputs for the streaming job. The name property for each output is required when specifying this - /// property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available - /// for the individual output. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] Output { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).Output; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).Output = value ?? null /* arrayOf */; } - - /// - /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to - /// being malformed (missing column values, column values of wrong type or size). - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy? OutputErrorPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).OutputErrorPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).OutputErrorPolicy = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy)""); } - - /// - /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may - /// be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream - /// should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, - /// or start from the last event output time. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode? OutputStartMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).OutputStartMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).OutputStartMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode)""); } - - /// - /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null - /// to indicate that the output event stream will start whenever the streaming job is started. This property must have a value - /// if outputStartMode is set to CustomTime. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public global::System.DateTime? OutputStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).OutputStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).OutputStartTime = value ?? default(global::System.DateTime); } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobProperties _property; - - /// - /// The properties that are associated with a streaming job. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobProperties()); set => this._property = value; } - - /// Describes the provisioning status of the streaming job. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).ProvisioningState; } - - /// - /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language - /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Query { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).Query; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).Query = value ?? null; } - - /// The name of the SKU. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName? SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).SkuName = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName)""); } - - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string StorageAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).StorageAccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).StorageAccountKey = value ?? null; } - - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string StorageAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).StorageAccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).StorageAccountName = value ?? null; } - - /// Specifies the number of streaming units that the streaming job uses. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public int? StreamingUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).StreamingUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).StreamingUnit = value ?? default(int); } - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TransformationETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).TransformationETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).TransformationETag = value ?? null; } - - /// Resource Id - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TransformationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).TransformationId; } - - /// Resource name - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TransformationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).TransformationName; } - - /// Resource type - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TransformationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)Property).TransformationType; } - - /// - /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Type; } - - /// - void Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("ETag", out var __eTagHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).ETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader0) is string __headerETagHeader0 ? __headerETagHeader0 : (string)null; - } - if (headers.TryGetValues("ETag", out var __eTagHeader1)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobInternal)this).TransformationETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader1) is string __headerETagHeader1 ? __headerETagHeader1 : (string)null; - } - } - - /// Creates an new instance. - public StreamingJob() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); - await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); - } - } - /// A streaming job object, containing all information associated with the named streaming job. - public partial interface IStreamingJob : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResource - { - /// The resource id of cluster. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The resource id of cluster.", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string ClusterId { get; set; } - /// Controls certain runtime behaviors of the streaming job. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Controls certain runtime behaviors of the streaming job.", - SerializedName = @"compatibilityLevel", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel? CompatibilityLevel { get; set; } - /// - /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify - /// jobStorageAccount property. . - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. .", - SerializedName = @"contentStoragePolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy? ContentStoragePolicy { get; set; } - /// - /// Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created.", - SerializedName = @"createdDate", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? CreatedDate { get; } - /// - /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. - /// Defaults to 'en-US' if none specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to 'en-US' if none specified.", - SerializedName = @"dataLocale", - PossibleTypes = new [] { typeof(string) })] - string DataLocale { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"ETag", - PossibleTypes = new [] { typeof(string) })] - string ETag { get; set; } - /// - /// The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 - /// (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a - /// value of -1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a value of -1.", - SerializedName = @"eventsLateArrivalMaxDelayInSeconds", - PossibleTypes = new [] { typeof(int) })] - int? EventsLateArrivalMaxDelayInSecond { get; set; } - /// - /// The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order.", - SerializedName = @"eventsOutOfOrderMaxDelayInSeconds", - PossibleTypes = new [] { typeof(int) })] - int? EventsOutOfOrderMaxDelayInSecond { get; set; } - /// - /// Indicates the policy to apply to events that arrive out of order in the input event stream. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates the policy to apply to events that arrive out of order in the input event stream.", - SerializedName = @"eventsOutOfOrderPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy? EventsOutOfOrderPolicy { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"container", - PossibleTypes = new [] { typeof(string) })] - string ExternalContainer { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"path", - PossibleTypes = new [] { typeof(string) })] - string ExternalPath { get; set; } - /// - /// A list of one or more functions for the streaming job. The name property for each function is required when specifying - /// this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available - /// for the individual transformation. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of one or more functions for the streaming job. The name property for each function is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual transformation.", - SerializedName = @"functions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] Function { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"principalId", - PossibleTypes = new [] { typeof(string) })] - string IdentityPrincipalId { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"tenantId", - PossibleTypes = new [] { typeof(string) })] - string IdentityTenantId { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string IdentityType { get; set; } - /// - /// A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property - /// in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual - /// input. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual input.", - SerializedName = @"inputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] Input { get; set; } - /// - /// A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job.", - SerializedName = @"jobId", - PossibleTypes = new [] { typeof(string) })] - string JobId { get; } - /// Describes the state of the streaming job. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Describes the state of the streaming job.", - SerializedName = @"jobState", - PossibleTypes = new [] { typeof(string) })] - string JobState { get; } - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authentication Mode.", - SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? JobStorageAccountAuthenticationMode { get; set; } - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"accountKey", - PossibleTypes = new [] { typeof(string) })] - string JobStorageAccountKey { get; set; } - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"accountName", - PossibleTypes = new [] { typeof(string) })] - string JobStorageAccountName { get; set; } - /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Describes the type of the job. Valid modes are `Cloud` and 'Edge'.", - SerializedName = @"jobType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType? JobType { get; set; } - /// - /// Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating - /// that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in - /// that set. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in that set.", - SerializedName = @"lastOutputEventTime", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? LastOutputEventTime { get; } - /// - /// A list of one or more outputs for the streaming job. The name property for each output is required when specifying this - /// property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available - /// for the individual output. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output.", - SerializedName = @"outputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] Output { get; set; } - /// - /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to - /// being malformed (missing column values, column values of wrong type or size). - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size).", - SerializedName = @"outputErrorPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy? OutputErrorPolicy { get; set; } - /// - /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may - /// be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream - /// should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, - /// or start from the last event output time. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"This property should only be utilized when it is desired that the job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time.", - SerializedName = @"outputStartMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode? OutputStartMode { get; set; } - /// - /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null - /// to indicate that the output event stream will start whenever the streaming job is started. This property must have a value - /// if outputStartMode is set to CustomTime. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. This property must have a value if outputStartMode is set to CustomTime.", - SerializedName = @"outputStartTime", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? OutputStartTime { get; set; } - /// Describes the provisioning status of the streaming job. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Describes the provisioning status of the streaming job.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } - /// - /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language - /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests.", - SerializedName = @"query", - PossibleTypes = new [] { typeof(string) })] - string Query { get; set; } - /// The name of the SKU. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the SKU. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName? SkuName { get; set; } - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"accountKey", - PossibleTypes = new [] { typeof(string) })] - string StorageAccountKey { get; set; } - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"accountName", - PossibleTypes = new [] { typeof(string) })] - string StorageAccountName { get; set; } - /// Specifies the number of streaming units that the streaming job uses. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the number of streaming units that the streaming job uses.", - SerializedName = @"streamingUnits", - PossibleTypes = new [] { typeof(int) })] - int? StreamingUnit { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"ETag", - PossibleTypes = new [] { typeof(string) })] - string TransformationETag { get; set; } - /// Resource Id - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Resource Id", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string TransformationId { get; } - /// Resource name - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Resource name", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string TransformationName { get; } - /// Resource type - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Resource type", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string TransformationType { get; } - - } - /// A streaming job object, containing all information associated with the named streaming job. - internal partial interface IStreamingJobInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal - { - /// The cluster which streaming jobs will run on. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo Cluster { get; set; } - /// The resource id of cluster. - string ClusterId { get; set; } - /// Controls certain runtime behaviors of the streaming job. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel? CompatibilityLevel { get; set; } - /// - /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify - /// jobStorageAccount property. . - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy? ContentStoragePolicy { get; set; } - /// - /// Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created. - /// - global::System.DateTime? CreatedDate { get; set; } - /// - /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. - /// Defaults to 'en-US' if none specified. - /// - string DataLocale { get; set; } - - string ETag { get; set; } - /// - /// The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 - /// (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a - /// value of -1. - /// - int? EventsLateArrivalMaxDelayInSecond { get; set; } - /// - /// The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. - /// - int? EventsOutOfOrderMaxDelayInSecond { get; set; } - /// - /// Indicates the policy to apply to events that arrive out of order in the input event stream. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy? EventsOutOfOrderPolicy { get; set; } - /// The storage account where the custom code artifacts are located. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal External { get; set; } - - string ExternalContainer { get; set; } - - string ExternalPath { get; set; } - /// The properties that are associated with an Azure Storage account - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount ExternalStorageAccount { get; set; } - /// - /// A list of one or more functions for the streaming job. The name property for each function is required when specifying - /// this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available - /// for the individual transformation. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] Function { get; set; } - /// - /// Describes the system-assigned managed identity assigned to this job that can be used to authenticate with inputs and outputs. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentity Identity { get; set; } - - string IdentityPrincipalId { get; set; } - - string IdentityTenantId { get; set; } - - string IdentityType { get; set; } - /// - /// A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property - /// in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual - /// input. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] Input { get; set; } - /// - /// A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job. - /// - string JobId { get; set; } - /// Describes the state of the streaming job. - string JobState { get; set; } - /// The properties that are associated with an Azure Storage account with MSI - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount JobStorageAccount { get; set; } - /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? JobStorageAccountAuthenticationMode { get; set; } - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - string JobStorageAccountKey { get; set; } - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - string JobStorageAccountName { get; set; } - /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType? JobType { get; set; } - /// - /// Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating - /// that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in - /// that set. - /// - global::System.DateTime? LastOutputEventTime { get; set; } - /// - /// A list of one or more outputs for the streaming job. The name property for each output is required when specifying this - /// property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available - /// for the individual output. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] Output { get; set; } - /// - /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to - /// being malformed (missing column values, column values of wrong type or size). - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy? OutputErrorPolicy { get; set; } - /// - /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may - /// be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream - /// should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, - /// or start from the last event output time. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode? OutputStartMode { get; set; } - /// - /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null - /// to indicate that the output event stream will start whenever the streaming job is started. This property must have a value - /// if outputStartMode is set to CustomTime. - /// - global::System.DateTime? OutputStartTime { get; set; } - /// - /// The properties that are associated with a streaming job. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobProperties Property { get; set; } - /// Describes the provisioning status of the streaming job. - string ProvisioningState { get; set; } - /// - /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language - /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. - /// - string Query { get; set; } - /// - /// Describes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku Sku { get; set; } - /// The name of the SKU. Required on PUT (CreateOrReplace) requests. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName? SkuName { get; set; } - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - string StorageAccountKey { get; set; } - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - string StorageAccountName { get; set; } - /// Specifies the number of streaming units that the streaming job uses. - int? StreamingUnit { get; set; } - /// - /// Indicates the query and the number of streaming units to use for the streaming job. The name property of the transformation - /// is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You - /// must use the PATCH API available for the individual transformation. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation Transformation { get; set; } - - string TransformationETag { get; set; } - /// Resource Id - string TransformationId { get; set; } - /// Resource name - string TransformationName { get; set; } - /// - /// The properties that are associated with a transformation. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties TransformationProperty { get; set; } - /// Resource type - string TransformationType { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobListResult.PowerShell.cs deleted file mode 100644 index a12d0423f275..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobListResult.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Object containing a list of streaming jobs. - [System.ComponentModel.TypeConverter(typeof(StreamingJobListResultTypeConverter))] - public partial class StreamingJobListResult - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new StreamingJobListResult(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new StreamingJobListResult(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal StreamingJobListResult(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResultInternal)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 StreamingJobListResult(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResultInternal)this).NextLink, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Object containing a list of streaming jobs. - [System.ComponentModel.TypeConverter(typeof(StreamingJobListResultTypeConverter))] - public partial interface IStreamingJobListResult - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobListResult.cs deleted file mode 100644 index 8b94083c8680..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobListResult.cs +++ /dev/null @@ -1,74 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Object containing a list of streaming jobs. - public partial class StreamingJobListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResult, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResultInternal - { - - /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob[] Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResultInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// The link (url) to the next page of results. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob[] _value; - - /// A list of streaming jobs. Populated by a 'List' operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob[] Value { get => this._value; } - - /// Creates an new instance. - public StreamingJobListResult() - { - - } - } - /// Object containing a list of streaming jobs. - public partial interface IStreamingJobListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// The link (url) to the next page of results. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The link (url) to the next page of results.", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; } - /// A list of streaming jobs. Populated by a 'List' operation. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A list of streaming jobs. Populated by a 'List' operation.", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob[] Value { get; } - - } - /// Object containing a list of streaming jobs. - internal partial interface IStreamingJobListResultInternal - - { - /// The link (url) to the next page of results. - string NextLink { get; set; } - /// A list of streaming jobs. Populated by a 'List' operation. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobProperties.PowerShell.cs deleted file mode 100644 index 4f7ac5e8f73f..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobProperties.PowerShell.cs +++ /dev/null @@ -1,458 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with a streaming job. - [System.ComponentModel.TypeConverter(typeof(StreamingJobPropertiesTypeConverter))] - public partial class StreamingJobProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new StreamingJobProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new StreamingJobProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal StreamingJobProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobSkuTypeConverter.ConvertFrom); - } - if (content.Contains("Transformation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Transformation = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation) content.GetValueForProperty("Transformation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Transformation, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.TransformationTypeConverter.ConvertFrom); - } - if (content.Contains("JobStorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount) content.GetValueForProperty("JobStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JobStorageAccountTypeConverter.ConvertFrom); - } - if (content.Contains("External")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).External = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal) content.GetValueForProperty("External",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).External, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ExternalTypeConverter.ConvertFrom); - } - if (content.Contains("Cluster")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ClusterInfoTypeConverter.ConvertFrom); - } - if (content.Contains("JobId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobId = (string) content.GetValueForProperty("JobId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("JobState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobState = (string) content.GetValueForProperty("JobState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobState, global::System.Convert.ToString); - } - if (content.Contains("JobType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType?) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType.CreateFrom); - } - if (content.Contains("OutputStartMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).OutputStartMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode?) content.GetValueForProperty("OutputStartMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).OutputStartMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode.CreateFrom); - } - if (content.Contains("OutputStartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).OutputStartTime = (global::System.DateTime?) content.GetValueForProperty("OutputStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).OutputStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastOutputEventTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).LastOutputEventTime = (global::System.DateTime?) content.GetValueForProperty("LastOutputEventTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).LastOutputEventTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("EventsOutOfOrderPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).EventsOutOfOrderPolicy = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy?) content.GetValueForProperty("EventsOutOfOrderPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).EventsOutOfOrderPolicy, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy.CreateFrom); - } - if (content.Contains("OutputErrorPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).OutputErrorPolicy = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy?) content.GetValueForProperty("OutputErrorPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).OutputErrorPolicy, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy.CreateFrom); - } - if (content.Contains("EventsOutOfOrderMaxDelayInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).EventsOutOfOrderMaxDelayInSecond = (int?) content.GetValueForProperty("EventsOutOfOrderMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).EventsOutOfOrderMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EventsLateArrivalMaxDelayInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).EventsLateArrivalMaxDelayInSecond = (int?) content.GetValueForProperty("EventsLateArrivalMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).EventsLateArrivalMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DataLocale")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).DataLocale = (string) content.GetValueForProperty("DataLocale",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).DataLocale, global::System.Convert.ToString); - } - if (content.Contains("CompatibilityLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).CompatibilityLevel = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).CompatibilityLevel, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel.CreateFrom); - } - if (content.Contains("CreatedDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputTypeConverter.ConvertFrom)); - } - if (content.Contains("Output")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[]) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Output, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputTypeConverter.ConvertFrom)); - } - if (content.Contains("Function")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Function = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[]) content.GetValueForProperty("Function",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Function, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionTypeConverter.ConvertFrom)); - } - if (content.Contains("ContentStoragePolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ContentStoragePolicy = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy?) content.GetValueForProperty("ContentStoragePolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ContentStoragePolicy, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy.CreateFrom); - } - if (content.Contains("TransformationProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties) content.GetValueForProperty("TransformationProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.TransformationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("JobStorageAccountAuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccountAuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("JobStorageAccountAuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccountAuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ExternalStorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ExternalStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount) content.GetValueForProperty("ExternalStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ExternalStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName.CreateFrom); - } - if (content.Contains("TransformationId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationId = (string) content.GetValueForProperty("TransformationId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationId, global::System.Convert.ToString); - } - if (content.Contains("TransformationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationName = (string) content.GetValueForProperty("TransformationName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationName, global::System.Convert.ToString); - } - if (content.Contains("TransformationType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationType = (string) content.GetValueForProperty("TransformationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationType, global::System.Convert.ToString); - } - if (content.Contains("TransformationETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationETag = (string) content.GetValueForProperty("TransformationETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationETag, global::System.Convert.ToString); - } - if (content.Contains("StreamingUnit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Query")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Query, global::System.Convert.ToString); - } - if (content.Contains("JobStorageAccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccountName = (string) content.GetValueForProperty("JobStorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccountName, global::System.Convert.ToString); - } - if (content.Contains("JobStorageAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccountKey = (string) content.GetValueForProperty("JobStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccountKey, global::System.Convert.ToString); - } - if (content.Contains("ExternalContainer")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ExternalContainer = (string) content.GetValueForProperty("ExternalContainer",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ExternalContainer, global::System.Convert.ToString); - } - if (content.Contains("ExternalPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ExternalPath = (string) content.GetValueForProperty("ExternalPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ExternalPath, global::System.Convert.ToString); - } - if (content.Contains("ClusterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ClusterId, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).StorageAccountName = (string) content.GetValueForProperty("StorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).StorageAccountName, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).StorageAccountKey = (string) content.GetValueForProperty("StorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).StorageAccountKey, 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 StreamingJobProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobSkuTypeConverter.ConvertFrom); - } - if (content.Contains("Transformation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Transformation = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation) content.GetValueForProperty("Transformation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Transformation, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.TransformationTypeConverter.ConvertFrom); - } - if (content.Contains("JobStorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount) content.GetValueForProperty("JobStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JobStorageAccountTypeConverter.ConvertFrom); - } - if (content.Contains("External")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).External = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal) content.GetValueForProperty("External",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).External, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ExternalTypeConverter.ConvertFrom); - } - if (content.Contains("Cluster")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ClusterInfoTypeConverter.ConvertFrom); - } - if (content.Contains("JobId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobId = (string) content.GetValueForProperty("JobId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("JobState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobState = (string) content.GetValueForProperty("JobState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobState, global::System.Convert.ToString); - } - if (content.Contains("JobType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobType = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType?) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobType, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType.CreateFrom); - } - if (content.Contains("OutputStartMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).OutputStartMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode?) content.GetValueForProperty("OutputStartMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).OutputStartMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode.CreateFrom); - } - if (content.Contains("OutputStartTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).OutputStartTime = (global::System.DateTime?) content.GetValueForProperty("OutputStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).OutputStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("LastOutputEventTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).LastOutputEventTime = (global::System.DateTime?) content.GetValueForProperty("LastOutputEventTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).LastOutputEventTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("EventsOutOfOrderPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).EventsOutOfOrderPolicy = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy?) content.GetValueForProperty("EventsOutOfOrderPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).EventsOutOfOrderPolicy, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy.CreateFrom); - } - if (content.Contains("OutputErrorPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).OutputErrorPolicy = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy?) content.GetValueForProperty("OutputErrorPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).OutputErrorPolicy, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy.CreateFrom); - } - if (content.Contains("EventsOutOfOrderMaxDelayInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).EventsOutOfOrderMaxDelayInSecond = (int?) content.GetValueForProperty("EventsOutOfOrderMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).EventsOutOfOrderMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EventsLateArrivalMaxDelayInSecond")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).EventsLateArrivalMaxDelayInSecond = (int?) content.GetValueForProperty("EventsLateArrivalMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).EventsLateArrivalMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DataLocale")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).DataLocale = (string) content.GetValueForProperty("DataLocale",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).DataLocale, global::System.Convert.ToString); - } - if (content.Contains("CompatibilityLevel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).CompatibilityLevel = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel?) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).CompatibilityLevel, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel.CreateFrom); - } - if (content.Contains("CreatedDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("Input")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[]) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Input, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputTypeConverter.ConvertFrom)); - } - if (content.Contains("Output")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[]) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Output, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputTypeConverter.ConvertFrom)); - } - if (content.Contains("Function")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Function = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[]) content.GetValueForProperty("Function",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Function, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionTypeConverter.ConvertFrom)); - } - if (content.Contains("ContentStoragePolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ContentStoragePolicy = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy?) content.GetValueForProperty("ContentStoragePolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ContentStoragePolicy, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy.CreateFrom); - } - if (content.Contains("TransformationProperty")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties) content.GetValueForProperty("TransformationProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.TransformationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("JobStorageAccountAuthenticationMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccountAuthenticationMode = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode?) content.GetValueForProperty("JobStorageAccountAuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccountAuthenticationMode, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode.CreateFrom); - } - if (content.Contains("ExternalStorageAccount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ExternalStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount) content.GetValueForProperty("ExternalStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ExternalStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccountTypeConverter.ConvertFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName.CreateFrom); - } - if (content.Contains("TransformationId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationId = (string) content.GetValueForProperty("TransformationId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationId, global::System.Convert.ToString); - } - if (content.Contains("TransformationName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationName = (string) content.GetValueForProperty("TransformationName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationName, global::System.Convert.ToString); - } - if (content.Contains("TransformationType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationType = (string) content.GetValueForProperty("TransformationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationType, global::System.Convert.ToString); - } - if (content.Contains("TransformationETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationETag = (string) content.GetValueForProperty("TransformationETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationETag, global::System.Convert.ToString); - } - if (content.Contains("StreamingUnit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Query")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).Query, global::System.Convert.ToString); - } - if (content.Contains("JobStorageAccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccountName = (string) content.GetValueForProperty("JobStorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccountName, global::System.Convert.ToString); - } - if (content.Contains("JobStorageAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccountKey = (string) content.GetValueForProperty("JobStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).JobStorageAccountKey, global::System.Convert.ToString); - } - if (content.Contains("ExternalContainer")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ExternalContainer = (string) content.GetValueForProperty("ExternalContainer",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ExternalContainer, global::System.Convert.ToString); - } - if (content.Contains("ExternalPath")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ExternalPath = (string) content.GetValueForProperty("ExternalPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ExternalPath, global::System.Convert.ToString); - } - if (content.Contains("ClusterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).ClusterId, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).StorageAccountName = (string) content.GetValueForProperty("StorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).StorageAccountName, global::System.Convert.ToString); - } - if (content.Contains("StorageAccountKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).StorageAccountKey = (string) content.GetValueForProperty("StorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).StorageAccountKey, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties that are associated with a streaming job. - [System.ComponentModel.TypeConverter(typeof(StreamingJobPropertiesTypeConverter))] - public partial interface IStreamingJobProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobProperties.cs deleted file mode 100644 index 8b60babcd011..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobProperties.cs +++ /dev/null @@ -1,836 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with a streaming job. - public partial class StreamingJobProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo _cluster; - - /// The cluster which streaming jobs will run on. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo Cluster { get => (this._cluster = this._cluster ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ClusterInfo()); set => this._cluster = value; } - - /// The resource id of cluster. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfoInternal)Cluster).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfoInternal)Cluster).Id = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel? _compatibilityLevel; - - /// Controls certain runtime behaviors of the streaming job. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel? CompatibilityLevel { get => this._compatibilityLevel; set => this._compatibilityLevel = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy? _contentStoragePolicy; - - /// - /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify - /// jobStorageAccount property. . - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy? ContentStoragePolicy { get => this._contentStoragePolicy; set => this._contentStoragePolicy = value; } - - /// Backing field for property. - private global::System.DateTime? _createdDate; - - /// - /// Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public global::System.DateTime? CreatedDate { get => this._createdDate; } - - /// Backing field for property. - private string _dataLocale; - - /// - /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. - /// Defaults to 'en-US' if none specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string DataLocale { get => this._dataLocale; set => this._dataLocale = value; } - - /// Backing field for property. - private int? _eventsLateArrivalMaxDelayInSecond; - - /// - /// The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 - /// (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a - /// value of -1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public int? EventsLateArrivalMaxDelayInSecond { get => this._eventsLateArrivalMaxDelayInSecond; set => this._eventsLateArrivalMaxDelayInSecond = value; } - - /// Backing field for property. - private int? _eventsOutOfOrderMaxDelayInSecond; - - /// - /// The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public int? EventsOutOfOrderMaxDelayInSecond { get => this._eventsOutOfOrderMaxDelayInSecond; set => this._eventsOutOfOrderMaxDelayInSecond = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy? _eventsOutOfOrderPolicy; - - /// - /// Indicates the policy to apply to events that arrive out of order in the input event stream. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy? EventsOutOfOrderPolicy { get => this._eventsOutOfOrderPolicy; set => this._eventsOutOfOrderPolicy = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal _external; - - /// The storage account where the custom code artifacts are located. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal External { get => (this._external = this._external ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.External()); set => this._external = value; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ExternalContainer { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)External).Container; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)External).Container = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ExternalPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)External).Path; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)External).Path = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] _function; - - /// - /// A list of one or more functions for the streaming job. The name property for each function is required when specifying - /// this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available - /// for the individual transformation. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] Function { get => this._function; set => this._function = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] _input; - - /// - /// A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property - /// in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual - /// input. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] Input { get => this._input; set => this._input = value; } - - /// Backing field for property. - private string _jobId; - - /// - /// A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string JobId { get => this._jobId; } - - /// Backing field for property. - private string _jobState; - - /// Describes the state of the streaming job. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string JobState { get => this._jobState; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount _jobStorageAccount; - - /// The properties that are associated with an Azure Storage account with MSI - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount JobStorageAccount { get => (this._jobStorageAccount = this._jobStorageAccount ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JobStorageAccount()); set => this._jobStorageAccount = value; } - - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? JobStorageAccountAuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccountInternal)JobStorageAccount).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccountInternal)JobStorageAccount).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } - - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string JobStorageAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)JobStorageAccount).AccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)JobStorageAccount).AccountKey = value ?? null; } - - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string JobStorageAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)JobStorageAccount).AccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)JobStorageAccount).AccountName = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType? _jobType; - - /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType? JobType { get => this._jobType; set => this._jobType = value; } - - /// Backing field for property. - private global::System.DateTime? _lastOutputEventTime; - - /// - /// Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating - /// that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in - /// that set. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public global::System.DateTime? LastOutputEventTime { get => this._lastOutputEventTime; } - - /// Internal Acessors for Cluster - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal.Cluster { get => (this._cluster = this._cluster ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ClusterInfo()); set { {_cluster = value;} } } - - /// Internal Acessors for CreatedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal.CreatedDate { get => this._createdDate; set { {_createdDate = value;} } } - - /// Internal Acessors for External - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal.External { get => (this._external = this._external ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.External()); set { {_external = value;} } } - - /// Internal Acessors for ExternalStorageAccount - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal.ExternalStorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)External).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)External).StorageAccount = value; } - - /// Internal Acessors for JobId - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal.JobId { get => this._jobId; set { {_jobId = value;} } } - - /// Internal Acessors for JobState - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal.JobState { get => this._jobState; set { {_jobState = value;} } } - - /// Internal Acessors for JobStorageAccount - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal.JobStorageAccount { get => (this._jobStorageAccount = this._jobStorageAccount ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JobStorageAccount()); set { {_jobStorageAccount = value;} } } - - /// Internal Acessors for LastOutputEventTime - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal.LastOutputEventTime { get => this._lastOutputEventTime; set { {_lastOutputEventTime = value;} } } - - /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Internal Acessors for Sku - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobSku()); set { {_sku = value;} } } - - /// Internal Acessors for Transformation - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal.Transformation { get => (this._transformation = this._transformation ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Transformation()); set { {_transformation = value;} } } - - /// Internal Acessors for TransformationId - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal.TransformationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)Transformation).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)Transformation).Id = value; } - - /// Internal Acessors for TransformationName - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal.TransformationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)Transformation).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)Transformation).Name = value; } - - /// Internal Acessors for TransformationProperty - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal.TransformationProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)Transformation).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)Transformation).Property = value; } - - /// Internal Acessors for TransformationType - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal.TransformationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)Transformation).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)Transformation).Type = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] _output; - - /// - /// A list of one or more outputs for the streaming job. The name property for each output is required when specifying this - /// property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available - /// for the individual output. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] Output { get => this._output; set => this._output = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy? _outputErrorPolicy; - - /// - /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to - /// being malformed (missing column values, column values of wrong type or size). - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy? OutputErrorPolicy { get => this._outputErrorPolicy; set => this._outputErrorPolicy = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode? _outputStartMode; - - /// - /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may - /// be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream - /// should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, - /// or start from the last event output time. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode? OutputStartMode { get => this._outputStartMode; set => this._outputStartMode = value; } - - /// Backing field for property. - private global::System.DateTime? _outputStartTime; - - /// - /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null - /// to indicate that the output event stream will start whenever the streaming job is started. This property must have a value - /// if outputStartMode is set to CustomTime. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public global::System.DateTime? OutputStartTime { get => this._outputStartTime; set => this._outputStartTime = value; } - - /// Backing field for property. - private string _provisioningState; - - /// Describes the provisioning status of the streaming job. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string ProvisioningState { get => this._provisioningState; } - - /// - /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language - /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Query { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)Transformation).Query; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)Transformation).Query = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku _sku; - - /// - /// Describes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobSku()); set => this._sku = value; } - - /// The name of the SKU. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName? SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSkuInternal)Sku).Name = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName)""); } - - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string StorageAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)External).StorageAccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)External).StorageAccountKey = value ?? null; } - - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string StorageAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)External).StorageAccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal)External).StorageAccountName = value ?? null; } - - /// Specifies the number of streaming units that the streaming job uses. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public int? StreamingUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)Transformation).StreamingUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)Transformation).StreamingUnit = value ?? default(int); } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation _transformation; - - /// - /// Indicates the query and the number of streaming units to use for the streaming job. The name property of the transformation - /// is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You - /// must use the PATCH API available for the individual transformation. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation Transformation { get => (this._transformation = this._transformation ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Transformation()); set => this._transformation = value; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TransformationETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)Transformation).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)Transformation).ETag = value ?? null; } - - /// Resource Id - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TransformationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)Transformation).Id; } - - /// Resource name - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TransformationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)Transformation).Name; } - - /// Resource type - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TransformationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)Transformation).Type; } - - /// - void Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("ETag", out var __eTagHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobPropertiesInternal)this).TransformationETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader0) is string __headerETagHeader0 ? __headerETagHeader0 : (string)null; - } - } - - /// Creates an new instance. - public StreamingJobProperties() - { - - } - } - /// The properties that are associated with a streaming job. - public partial interface IStreamingJobProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// The resource id of cluster. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The resource id of cluster.", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string ClusterId { get; set; } - /// Controls certain runtime behaviors of the streaming job. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Controls certain runtime behaviors of the streaming job.", - SerializedName = @"compatibilityLevel", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel? CompatibilityLevel { get; set; } - /// - /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify - /// jobStorageAccount property. . - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. .", - SerializedName = @"contentStoragePolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy? ContentStoragePolicy { get; set; } - /// - /// Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created.", - SerializedName = @"createdDate", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? CreatedDate { get; } - /// - /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. - /// Defaults to 'en-US' if none specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to 'en-US' if none specified.", - SerializedName = @"dataLocale", - PossibleTypes = new [] { typeof(string) })] - string DataLocale { get; set; } - /// - /// The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 - /// (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a - /// value of -1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a value of -1.", - SerializedName = @"eventsLateArrivalMaxDelayInSeconds", - PossibleTypes = new [] { typeof(int) })] - int? EventsLateArrivalMaxDelayInSecond { get; set; } - /// - /// The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order.", - SerializedName = @"eventsOutOfOrderMaxDelayInSeconds", - PossibleTypes = new [] { typeof(int) })] - int? EventsOutOfOrderMaxDelayInSecond { get; set; } - /// - /// Indicates the policy to apply to events that arrive out of order in the input event stream. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates the policy to apply to events that arrive out of order in the input event stream.", - SerializedName = @"eventsOutOfOrderPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy? EventsOutOfOrderPolicy { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"container", - PossibleTypes = new [] { typeof(string) })] - string ExternalContainer { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"path", - PossibleTypes = new [] { typeof(string) })] - string ExternalPath { get; set; } - /// - /// A list of one or more functions for the streaming job. The name property for each function is required when specifying - /// this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available - /// for the individual transformation. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of one or more functions for the streaming job. The name property for each function is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual transformation.", - SerializedName = @"functions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] Function { get; set; } - /// - /// A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property - /// in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual - /// input. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual input.", - SerializedName = @"inputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] Input { get; set; } - /// - /// A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job.", - SerializedName = @"jobId", - PossibleTypes = new [] { typeof(string) })] - string JobId { get; } - /// Describes the state of the streaming job. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Describes the state of the streaming job.", - SerializedName = @"jobState", - PossibleTypes = new [] { typeof(string) })] - string JobState { get; } - /// Authentication Mode. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authentication Mode.", - SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? JobStorageAccountAuthenticationMode { get; set; } - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"accountKey", - PossibleTypes = new [] { typeof(string) })] - string JobStorageAccountKey { get; set; } - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"accountName", - PossibleTypes = new [] { typeof(string) })] - string JobStorageAccountName { get; set; } - /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Describes the type of the job. Valid modes are `Cloud` and 'Edge'.", - SerializedName = @"jobType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType? JobType { get; set; } - /// - /// Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating - /// that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in - /// that set. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in that set.", - SerializedName = @"lastOutputEventTime", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? LastOutputEventTime { get; } - /// - /// A list of one or more outputs for the streaming job. The name property for each output is required when specifying this - /// property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available - /// for the individual output. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output.", - SerializedName = @"outputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] Output { get; set; } - /// - /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to - /// being malformed (missing column values, column values of wrong type or size). - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size).", - SerializedName = @"outputErrorPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy? OutputErrorPolicy { get; set; } - /// - /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may - /// be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream - /// should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, - /// or start from the last event output time. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"This property should only be utilized when it is desired that the job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time.", - SerializedName = @"outputStartMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode? OutputStartMode { get; set; } - /// - /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null - /// to indicate that the output event stream will start whenever the streaming job is started. This property must have a value - /// if outputStartMode is set to CustomTime. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. This property must have a value if outputStartMode is set to CustomTime.", - SerializedName = @"outputStartTime", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? OutputStartTime { get; set; } - /// Describes the provisioning status of the streaming job. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Describes the provisioning status of the streaming job.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } - /// - /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language - /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests.", - SerializedName = @"query", - PossibleTypes = new [] { typeof(string) })] - string Query { get; set; } - /// The name of the SKU. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the SKU. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName? SkuName { get; set; } - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"accountKey", - PossibleTypes = new [] { typeof(string) })] - string StorageAccountKey { get; set; } - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"accountName", - PossibleTypes = new [] { typeof(string) })] - string StorageAccountName { get; set; } - /// Specifies the number of streaming units that the streaming job uses. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the number of streaming units that the streaming job uses.", - SerializedName = @"streamingUnits", - PossibleTypes = new [] { typeof(int) })] - int? StreamingUnit { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"ETag", - PossibleTypes = new [] { typeof(string) })] - string TransformationETag { get; set; } - /// Resource Id - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Resource Id", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string TransformationId { get; } - /// Resource name - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Resource name", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string TransformationName { get; } - /// Resource type - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Resource type", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string TransformationType { get; } - - } - /// The properties that are associated with a streaming job. - internal partial interface IStreamingJobPropertiesInternal - - { - /// The cluster which streaming jobs will run on. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo Cluster { get; set; } - /// The resource id of cluster. - string ClusterId { get; set; } - /// Controls certain runtime behaviors of the streaming job. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel? CompatibilityLevel { get; set; } - /// - /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify - /// jobStorageAccount property. . - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy? ContentStoragePolicy { get; set; } - /// - /// Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created. - /// - global::System.DateTime? CreatedDate { get; set; } - /// - /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. - /// Defaults to 'en-US' if none specified. - /// - string DataLocale { get; set; } - /// - /// The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 - /// (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a - /// value of -1. - /// - int? EventsLateArrivalMaxDelayInSecond { get; set; } - /// - /// The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. - /// - int? EventsOutOfOrderMaxDelayInSecond { get; set; } - /// - /// Indicates the policy to apply to events that arrive out of order in the input event stream. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy? EventsOutOfOrderPolicy { get; set; } - /// The storage account where the custom code artifacts are located. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal External { get; set; } - - string ExternalContainer { get; set; } - - string ExternalPath { get; set; } - /// The properties that are associated with an Azure Storage account - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount ExternalStorageAccount { get; set; } - /// - /// A list of one or more functions for the streaming job. The name property for each function is required when specifying - /// this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available - /// for the individual transformation. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] Function { get; set; } - /// - /// A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property - /// in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual - /// input. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] Input { get; set; } - /// - /// A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job. - /// - string JobId { get; set; } - /// Describes the state of the streaming job. - string JobState { get; set; } - /// The properties that are associated with an Azure Storage account with MSI - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount JobStorageAccount { get; set; } - /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? JobStorageAccountAuthenticationMode { get; set; } - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - string JobStorageAccountKey { get; set; } - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - string JobStorageAccountName { get; set; } - /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType? JobType { get; set; } - /// - /// Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating - /// that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in - /// that set. - /// - global::System.DateTime? LastOutputEventTime { get; set; } - /// - /// A list of one or more outputs for the streaming job. The name property for each output is required when specifying this - /// property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available - /// for the individual output. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] Output { get; set; } - /// - /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to - /// being malformed (missing column values, column values of wrong type or size). - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy? OutputErrorPolicy { get; set; } - /// - /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may - /// be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream - /// should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, - /// or start from the last event output time. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode? OutputStartMode { get; set; } - /// - /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null - /// to indicate that the output event stream will start whenever the streaming job is started. This property must have a value - /// if outputStartMode is set to CustomTime. - /// - global::System.DateTime? OutputStartTime { get; set; } - /// Describes the provisioning status of the streaming job. - string ProvisioningState { get; set; } - /// - /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language - /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. - /// - string Query { get; set; } - /// - /// Describes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku Sku { get; set; } - /// The name of the SKU. Required on PUT (CreateOrReplace) requests. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName? SkuName { get; set; } - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - string StorageAccountKey { get; set; } - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - string StorageAccountName { get; set; } - /// Specifies the number of streaming units that the streaming job uses. - int? StreamingUnit { get; set; } - /// - /// Indicates the query and the number of streaming units to use for the streaming job. The name property of the transformation - /// is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You - /// must use the PATCH API available for the individual transformation. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation Transformation { get; set; } - - string TransformationETag { get; set; } - /// Resource Id - string TransformationId { get; set; } - /// Resource name - string TransformationName { get; set; } - /// - /// The properties that are associated with a transformation. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties TransformationProperty { get; set; } - /// Resource type - string TransformationType { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobSku.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobSku.cs deleted file mode 100644 index 5602f27a0c95..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobSku.cs +++ /dev/null @@ -1,51 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The properties that are associated with a SKU. - public partial class StreamingJobSku : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSkuInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName? _name; - - /// The name of the SKU. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName? Name { get => this._name; set => this._name = value; } - - /// Creates an new instance. - public StreamingJobSku() - { - - } - } - /// The properties that are associated with a SKU. - public partial interface IStreamingJobSku : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// The name of the SKU. Required on PUT (CreateOrReplace) requests. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the SKU. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName? Name { get; set; } - - } - /// The properties that are associated with a SKU. - internal partial interface IStreamingJobSkuInternal - - { - /// The name of the SKU. Required on PUT (CreateOrReplace) requests. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName? Name { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubResource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubResource.PowerShell.cs deleted file mode 100644 index f0a50ee68547..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubResource.PowerShell.cs +++ /dev/null @@ -1,160 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The base sub-resource model definition. - [System.ComponentModel.TypeConverter(typeof(SubResourceTypeConverter))] - public partial class SubResource - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SubResource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SubResource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SubResource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type, 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 SubResource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The base sub-resource model definition. - [System.ComponentModel.TypeConverter(typeof(SubResourceTypeConverter))] - public partial interface ISubResource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuota.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuota.PowerShell.cs deleted file mode 100644 index 208708f7e22c..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuota.PowerShell.cs +++ /dev/null @@ -1,186 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes the current quota for the subscription. - [System.ComponentModel.TypeConverter(typeof(SubscriptionQuotaTypeConverter))] - public partial class SubscriptionQuota - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SubscriptionQuota(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SubscriptionQuota(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SubscriptionQuota(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubscriptionQuotaPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("MaxCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CurrentCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal)this).CurrentCount = (int?) content.GetValueForProperty("CurrentCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal)this).CurrentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SubscriptionQuota(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubscriptionQuotaPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("MaxCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CurrentCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal)this).CurrentCount = (int?) content.GetValueForProperty("CurrentCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal)this).CurrentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes the current quota for the subscription. - [System.ComponentModel.TypeConverter(typeof(SubscriptionQuotaTypeConverter))] - public partial interface ISubscriptionQuota - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuota.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuota.cs deleted file mode 100644 index 7a5a36e97ddd..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuota.cs +++ /dev/null @@ -1,120 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Describes the current quota for the subscription. - public partial class SubscriptionQuota : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubResource(); - - /// The current usage of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public int? CurrentCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal)Property).CurrentCount; } - - /// Resource Id - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Id; } - - /// The max permitted usage of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public int? MaxCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal)Property).MaxCount; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Type = value; } - - /// Internal Acessors for CurrentCount - int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal.CurrentCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal)Property).CurrentCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal)Property).CurrentCount = value; } - - /// Internal Acessors for MaxCount - int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal.MaxCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal)Property).MaxCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal)Property).MaxCount = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubscriptionQuotaProperties()); set { {_property = value;} } } - - /// Resource name - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaProperties _property; - - /// Describes the properties of the quota. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubscriptionQuotaProperties()); } - - /// Resource type - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Type; } - - /// Creates an new instance. - public SubscriptionQuota() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__subResource), __subResource); - await eventListener.AssertObjectIsValid(nameof(__subResource), __subResource); - } - } - /// Describes the current quota for the subscription. - public partial interface ISubscriptionQuota : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource - { - /// The current usage of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The current usage of this resource.", - SerializedName = @"currentCount", - PossibleTypes = new [] { typeof(int) })] - int? CurrentCount { get; } - /// The max permitted usage of this resource. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The max permitted usage of this resource.", - SerializedName = @"maxCount", - PossibleTypes = new [] { typeof(int) })] - int? MaxCount { get; } - - } - /// Describes the current quota for the subscription. - internal partial interface ISubscriptionQuotaInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal - { - /// The current usage of this resource. - int? CurrentCount { get; set; } - /// The max permitted usage of this resource. - int? MaxCount { get; set; } - /// Describes the properties of the quota. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaProperties Property { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotaProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotaProperties.PowerShell.cs deleted file mode 100644 index 8e9861183247..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotaProperties.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Describes the properties of the quota. - [System.ComponentModel.TypeConverter(typeof(SubscriptionQuotaPropertiesTypeConverter))] - public partial class SubscriptionQuotaProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SubscriptionQuotaProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SubscriptionQuotaProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SubscriptionQuotaProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("MaxCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CurrentCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal)this).CurrentCount = (int?) content.GetValueForProperty("CurrentCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal)this).CurrentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SubscriptionQuotaProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("MaxCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CurrentCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal)this).CurrentCount = (int?) content.GetValueForProperty("CurrentCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal)this).CurrentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Describes the properties of the quota. - [System.ComponentModel.TypeConverter(typeof(SubscriptionQuotaPropertiesTypeConverter))] - public partial interface ISubscriptionQuotaProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotasListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotasListResult.PowerShell.cs deleted file mode 100644 index 08b680276255..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotasListResult.PowerShell.cs +++ /dev/null @@ -1,148 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// Result of the GetQuotas operation. It contains a list of quotas for the subscription in a particular region. - /// - [System.ComponentModel.TypeConverter(typeof(SubscriptionQuotasListResultTypeConverter))] - public partial class SubscriptionQuotasListResult - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SubscriptionQuotasListResult(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SubscriptionQuotasListResult(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SubscriptionQuotasListResult(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubscriptionQuotaTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SubscriptionQuotasListResult(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubscriptionQuotaTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Result of the GetQuotas operation. It contains a list of quotas for the subscription in a particular region. - [System.ComponentModel.TypeConverter(typeof(SubscriptionQuotasListResultTypeConverter))] - public partial interface ISubscriptionQuotasListResult - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotasListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotasListResult.cs deleted file mode 100644 index 9532b2cb83cd..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotasListResult.cs +++ /dev/null @@ -1,56 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// Result of the GetQuotas operation. It contains a list of quotas for the subscription in a particular region. - /// - public partial class SubscriptionQuotasListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResult, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResultInternal - { - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota[] Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResultInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota[] _value; - - /// List of quotas for the subscription in a particular region. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota[] Value { get => this._value; } - - /// Creates an new instance. - public SubscriptionQuotasListResult() - { - - } - } - /// Result of the GetQuotas operation. It contains a list of quotas for the subscription in a particular region. - public partial interface ISubscriptionQuotasListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// List of quotas for the subscription in a particular region. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"List of quotas for the subscription in a particular region.", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota[] Value { get; } - - } - /// Result of the GetQuotas operation. It contains a list of quotas for the subscription in a particular region. - internal partial interface ISubscriptionQuotasListResultInternal - - { - /// List of quotas for the subscription in a particular region. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Transformation.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Transformation.PowerShell.cs deleted file mode 100644 index 1126aecc2f9d..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Transformation.PowerShell.cs +++ /dev/null @@ -1,198 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// A transformation object, containing all information associated with the named transformation. All transformations are - /// contained under a streaming job. - /// - [System.ComponentModel.TypeConverter(typeof(TransformationTypeConverter))] - public partial class Transformation - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Transformation(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Transformation(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Transformation(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.TransformationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("ETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).ETag, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("StreamingUnit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Query")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).Query, 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 Transformation(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.TransformationPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("ETag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).ETag, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("StreamingUnit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Query")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).Query, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - } - /// A transformation object, containing all information associated with the named transformation. All transformations are - /// contained under a streaming job. - [System.ComponentModel.TypeConverter(typeof(TransformationTypeConverter))] - public partial interface ITransformation - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Transformation.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Transformation.cs deleted file mode 100644 index c1f9859050cb..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Transformation.cs +++ /dev/null @@ -1,156 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// - /// A transformation object, containing all information associated with the named transformation. All transformations are - /// contained under a streaming job. - /// - public partial class Transformation : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubResource(); - - /// Backing field for property. - private string _eTag; - - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string ETag { get => this._eTag; set => this._eTag = value; } - - /// Resource Id - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Id; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Type = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.TransformationProperties()); set { {_property = value;} } } - - /// Resource name - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties _property; - - /// - /// The properties that are associated with a transformation. Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.TransformationProperties()); set => this._property = value; } - - /// - /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language - /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Query { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationPropertiesInternal)Property).Query; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationPropertiesInternal)Property).Query = value ?? null; } - - /// Specifies the number of streaming units that the streaming job uses. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public int? StreamingUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationPropertiesInternal)Property).StreamingUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationPropertiesInternal)Property).StreamingUnit = value ?? default(int); } - - /// Resource type - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal)__subResource).Type; } - - /// - void Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("ETag", out var __eTagHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationInternal)this).ETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader0) is string __headerETagHeader0 ? __headerETagHeader0 : (string)null; - } - } - - /// Creates an new instance. - public Transformation() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__subResource), __subResource); - await eventListener.AssertObjectIsValid(nameof(__subResource), __subResource); - } - } - /// A transformation object, containing all information associated with the named transformation. All transformations are - /// contained under a streaming job. - public partial interface ITransformation : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource - { - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"ETag", - PossibleTypes = new [] { typeof(string) })] - string ETag { get; set; } - /// - /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language - /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests.", - SerializedName = @"query", - PossibleTypes = new [] { typeof(string) })] - string Query { get; set; } - /// Specifies the number of streaming units that the streaming job uses. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the number of streaming units that the streaming job uses.", - SerializedName = @"streamingUnits", - PossibleTypes = new [] { typeof(int) })] - int? StreamingUnit { get; set; } - - } - /// A transformation object, containing all information associated with the named transformation. All transformations are - /// contained under a streaming job. - internal partial interface ITransformationInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal - { - string ETag { get; set; } - /// - /// The properties that are associated with a transformation. Required on PUT (CreateOrReplace) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties Property { get; set; } - /// - /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language - /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. - /// - string Query { get; set; } - /// Specifies the number of streaming units that the streaming job uses. - int? StreamingUnit { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/TransformationProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/TransformationProperties.PowerShell.cs deleted file mode 100644 index 1ea093be703a..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/TransformationProperties.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties that are associated with a transformation. - [System.ComponentModel.TypeConverter(typeof(TransformationPropertiesTypeConverter))] - public partial class TransformationProperties - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new TransformationProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new TransformationProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal TransformationProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StreamingUnit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationPropertiesInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationPropertiesInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Query")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationPropertiesInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationPropertiesInternal)this).Query, 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 TransformationProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("StreamingUnit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationPropertiesInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationPropertiesInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("Query")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationPropertiesInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationPropertiesInternal)this).Query, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - } - /// The properties that are associated with a transformation. - [System.ComponentModel.TypeConverter(typeof(TransformationPropertiesTypeConverter))] - public partial interface ITransformationProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/Cluster.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/Cluster.PowerShell.cs deleted file mode 100644 index 6e942794f876..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/Cluster.PowerShell.cs +++ /dev/null @@ -1,256 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// A Stream Analytics Cluster object - [System.ComponentModel.TypeConverter(typeof(ClusterTypeConverter))] - public partial class Cluster - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Cluster(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterSkuTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Etag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).Etag = (string) content.GetValueForProperty("Etag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).Etag, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName.CreateFrom); - } - if (content.Contains("SkuCapacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CreatedDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ClusterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).ClusterId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState.CreateFrom); - } - if (content.Contains("CapacityAllocated")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).CapacityAllocated = (int?) content.GetValueForProperty("CapacityAllocated",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).CapacityAllocated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CapacityAssigned")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).CapacityAssigned = (int?) content.GetValueForProperty("CapacityAssigned",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).CapacityAssigned, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Cluster(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterSkuTypeConverter.ConvertFrom); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Etag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).Etag = (string) content.GetValueForProperty("Etag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).Etag, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName.CreateFrom); - } - if (content.Contains("SkuCapacity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CreatedDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ClusterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).ClusterId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState.CreateFrom); - } - if (content.Contains("CapacityAllocated")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).CapacityAllocated = (int?) content.GetValueForProperty("CapacityAllocated",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).CapacityAllocated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CapacityAssigned")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).CapacityAssigned = (int?) content.GetValueForProperty("CapacityAssigned",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal)this).CapacityAssigned, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Cluster(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Cluster(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// A Stream Analytics Cluster object - [System.ComponentModel.TypeConverter(typeof(ClusterTypeConverter))] - public partial interface ICluster - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/Cluster.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/Cluster.cs deleted file mode 100644 index 0d12893ead34..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/Cluster.cs +++ /dev/null @@ -1,286 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// A Stream Analytics Cluster object - public partial class Cluster : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResource(); - - /// Represents the number of streaming units currently being used on the cluster. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public int? CapacityAllocated { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)Property).CapacityAllocated; } - - /// - /// Represents the sum of the SUs of all streaming jobs associated with the cluster. If all of the jobs were running, this - /// would be the capacity allocated. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public int? CapacityAssigned { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)Property).CapacityAssigned; } - - /// Unique identifier for the cluster. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)Property).ClusterId; } - - /// The date this cluster was created. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public global::System.DateTime? CreatedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)Property).CreatedDate; } - - /// Backing field for property. - private string _etag; - - /// - /// The current entity tag for the cluster. This is an opaque string. You can use it to detect whether the resource has changed - /// between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Etag { get => this._etag; } - - /// - /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Id; } - - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)__trackedResource).Location = value ?? null; } - - /// Internal Acessors for CapacityAllocated - int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal.CapacityAllocated { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)Property).CapacityAllocated; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)Property).CapacityAllocated = value; } - - /// Internal Acessors for CapacityAssigned - int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal.CapacityAssigned { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)Property).CapacityAssigned; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)Property).CapacityAssigned = value; } - - /// Internal Acessors for ClusterId - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal.ClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)Property).ClusterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)Property).ClusterId = value; } - - /// Internal Acessors for CreatedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal.CreatedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)Property).CreatedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)Property).CreatedDate = value; } - - /// Internal Acessors for Etag - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal.Etag { get => this._etag; set { {_etag = value;} } } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for Sku - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSku Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterSku()); set { {_sku = value;} } } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterProperties _property; - - /// The properties associated with a Stream Analytics cluster. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterProperties()); set => this._property = value; } - - /// - /// The status of the cluster provisioning. The three terminal states are: Succeeded, Failed and Canceled - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)Property).ProvisioningState; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSku _sku; - - /// - /// The SKU of the cluster. This determines the size/capacity of the cluster. Required on PUT (CreateOrUpdate) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterSku()); set => this._sku = value; } - - /// - /// Denotes the number of streaming units the cluster can support. Valid values for this property are multiples of 36 with - /// a minimum value of 36 and maximum value of 216. Required on PUT (CreateOrUpdate) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSkuInternal)Sku).Capacity = value ?? default(int); } - - /// - /// Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName? SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSkuInternal)Sku).Name = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName)""); } - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } - - /// - /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__trackedResource).Type; } - - /// Creates an new instance. - public Cluster() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); - await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); - } - } - /// A Stream Analytics Cluster object - public partial interface ICluster : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResource - { - /// Represents the number of streaming units currently being used on the cluster. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Represents the number of streaming units currently being used on the cluster.", - SerializedName = @"capacityAllocated", - PossibleTypes = new [] { typeof(int) })] - int? CapacityAllocated { get; } - /// - /// Represents the sum of the SUs of all streaming jobs associated with the cluster. If all of the jobs were running, this - /// would be the capacity allocated. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Represents the sum of the SUs of all streaming jobs associated with the cluster. If all of the jobs were running, this would be the capacity allocated.", - SerializedName = @"capacityAssigned", - PossibleTypes = new [] { typeof(int) })] - int? CapacityAssigned { get; } - /// Unique identifier for the cluster. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Unique identifier for the cluster.", - SerializedName = @"clusterId", - PossibleTypes = new [] { typeof(string) })] - string ClusterId { get; } - /// The date this cluster was created. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The date this cluster was created.", - SerializedName = @"createdDate", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - global::System.DateTime? CreatedDate { get; } - /// - /// The current entity tag for the cluster. This is an opaque string. You can use it to detect whether the resource has changed - /// between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The current entity tag for the cluster. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency.", - SerializedName = @"etag", - PossibleTypes = new [] { typeof(string) })] - string Etag { get; } - /// - /// The status of the cluster provisioning. The three terminal states are: Succeeded, Failed and Canceled - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The status of the cluster provisioning. The three terminal states are: Succeeded, Failed and Canceled", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState? ProvisioningState { get; } - /// - /// Denotes the number of streaming units the cluster can support. Valid values for this property are multiples of 36 with - /// a minimum value of 36 and maximum value of 216. Required on PUT (CreateOrUpdate) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Denotes the number of streaming units the cluster can support. Valid values for this property are multiples of 36 with a minimum value of 36 and maximum value of 216. Required on PUT (CreateOrUpdate) requests.", - SerializedName = @"capacity", - PossibleTypes = new [] { typeof(int) })] - int? SkuCapacity { get; set; } - /// - /// Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName? SkuName { get; set; } - - } - /// A Stream Analytics Cluster object - internal partial interface IClusterInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal - { - /// Represents the number of streaming units currently being used on the cluster. - int? CapacityAllocated { get; set; } - /// - /// Represents the sum of the SUs of all streaming jobs associated with the cluster. If all of the jobs were running, this - /// would be the capacity allocated. - /// - int? CapacityAssigned { get; set; } - /// Unique identifier for the cluster. - string ClusterId { get; set; } - /// The date this cluster was created. - global::System.DateTime? CreatedDate { get; set; } - /// - /// The current entity tag for the cluster. This is an opaque string. You can use it to detect whether the resource has changed - /// between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency. - /// - string Etag { get; set; } - /// The properties associated with a Stream Analytics cluster. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterProperties Property { get; set; } - /// - /// The status of the cluster provisioning. The three terminal states are: Succeeded, Failed and Canceled - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState? ProvisioningState { get; set; } - /// - /// The SKU of the cluster. This determines the size/capacity of the cluster. Required on PUT (CreateOrUpdate) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSku Sku { get; set; } - /// - /// Denotes the number of streaming units the cluster can support. Valid values for this property are multiples of 36 with - /// a minimum value of 36 and maximum value of 216. Required on PUT (CreateOrUpdate) requests. - /// - int? SkuCapacity { get; set; } - /// - /// Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests. - /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName? SkuName { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJob.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJob.PowerShell.cs deleted file mode 100644 index e33572d5f147..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJob.PowerShell.cs +++ /dev/null @@ -1,160 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// A streaming job. - [System.ComponentModel.TypeConverter(typeof(ClusterJobTypeConverter))] - public partial class ClusterJob - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ClusterJob(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("StreamingUnit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("JobState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal)this).JobState = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState?) content.GetValueForProperty("JobState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal)this).JobState, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ClusterJob(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("StreamingUnit")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("JobState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal)this).JobState = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState?) content.GetValueForProperty("JobState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal)this).JobState, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState.CreateFrom); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ClusterJob(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ClusterJob(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// A streaming job. - [System.ComponentModel.TypeConverter(typeof(ClusterJobTypeConverter))] - public partial interface IClusterJob - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJobListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJobListResult.PowerShell.cs deleted file mode 100644 index 387995ccde06..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJobListResult.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// A list of streaming jobs. Populated by a List operation. - [System.ComponentModel.TypeConverter(typeof(ClusterJobListResultTypeConverter))] - public partial class ClusterJobListResult - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ClusterJobListResult(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterJobTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResultInternal)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 ClusterJobListResult(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterJobTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResultInternal)this).NextLink, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ClusterJobListResult(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ClusterJobListResult(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// A list of streaming jobs. Populated by a List operation. - [System.ComponentModel.TypeConverter(typeof(ClusterJobListResultTypeConverter))] - public partial interface IClusterJobListResult - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJobListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJobListResult.cs deleted file mode 100644 index 73b42c12c8b8..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJobListResult.cs +++ /dev/null @@ -1,74 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// A list of streaming jobs. Populated by a List operation. - public partial class ClusterJobListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResult, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResultInternal - { - - /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob[] Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResultInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// The URL to fetch the next set of streaming jobs. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob[] _value; - - /// A list of streaming jobs. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob[] Value { get => this._value; } - - /// Creates an new instance. - public ClusterJobListResult() - { - - } - } - /// A list of streaming jobs. Populated by a List operation. - public partial interface IClusterJobListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// The URL to fetch the next set of streaming jobs. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The URL to fetch the next set of streaming jobs.", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; } - /// A list of streaming jobs. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A list of streaming jobs.", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob[] Value { get; } - - } - /// A list of streaming jobs. Populated by a List operation. - internal partial interface IClusterJobListResultInternal - - { - /// The URL to fetch the next set of streaming jobs. - string NextLink { get; set; } - /// A list of streaming jobs. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterListResult.PowerShell.cs deleted file mode 100644 index 30a914b414ef..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterListResult.PowerShell.cs +++ /dev/null @@ -1,154 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// A list of clusters populated by a 'list' operation. - [System.ComponentModel.TypeConverter(typeof(ClusterListResultTypeConverter))] - public partial class ClusterListResult - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ClusterListResult(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResultInternal)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 ClusterListResult(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Value")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterTypeConverter.ConvertFrom)); - } - if (content.Contains("NextLink")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResultInternal)this).NextLink, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ClusterListResult(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ClusterListResult(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// A list of clusters populated by a 'list' operation. - [System.ComponentModel.TypeConverter(typeof(ClusterListResultTypeConverter))] - public partial interface IClusterListResult - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterListResult.cs deleted file mode 100644 index f127402d716a..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterListResult.cs +++ /dev/null @@ -1,74 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// A list of clusters populated by a 'list' operation. - public partial class ClusterListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResult, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResultInternal - { - - /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } - - /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster[] Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResultInternal.Value { get => this._value; set { {_value = value;} } } - - /// Backing field for property. - private string _nextLink; - - /// The URL to fetch the next set of clusters. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string NextLink { get => this._nextLink; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster[] _value; - - /// A list of clusters. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster[] Value { get => this._value; } - - /// Creates an new instance. - public ClusterListResult() - { - - } - } - /// A list of clusters populated by a 'list' operation. - public partial interface IClusterListResult : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// The URL to fetch the next set of clusters. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The URL to fetch the next set of clusters.", - SerializedName = @"nextLink", - PossibleTypes = new [] { typeof(string) })] - string NextLink { get; } - /// A list of clusters. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"A list of clusters.", - SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster[] Value { get; } - - } - /// A list of clusters populated by a 'list' operation. - internal partial interface IClusterListResultInternal - - { - /// The URL to fetch the next set of clusters. - string NextLink { get; set; } - /// A list of clusters. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster[] Value { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterProperties.PowerShell.cs deleted file mode 100644 index 37ca1bfbd238..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterProperties.PowerShell.cs +++ /dev/null @@ -1,178 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The properties associated with a Stream Analytics cluster. - [System.ComponentModel.TypeConverter(typeof(ClusterPropertiesTypeConverter))] - public partial class ClusterProperties - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ClusterProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CreatedDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ClusterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).ClusterId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState.CreateFrom); - } - if (content.Contains("CapacityAllocated")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).CapacityAllocated = (int?) content.GetValueForProperty("CapacityAllocated",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).CapacityAllocated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CapacityAssigned")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).CapacityAssigned = (int?) content.GetValueForProperty("CapacityAssigned",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).CapacityAssigned, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ClusterProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("CreatedDate")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); - } - if (content.Contains("ClusterId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).ClusterId, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState.CreateFrom); - } - if (content.Contains("CapacityAllocated")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).CapacityAllocated = (int?) content.GetValueForProperty("CapacityAllocated",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).CapacityAllocated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("CapacityAssigned")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).CapacityAssigned = (int?) content.GetValueForProperty("CapacityAssigned",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal)this).CapacityAssigned, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ClusterProperties(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ClusterProperties(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// The properties associated with a Stream Analytics cluster. - [System.ComponentModel.TypeConverter(typeof(ClusterPropertiesTypeConverter))] - public partial interface IClusterProperties - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Error.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Error.PowerShell.cs deleted file mode 100644 index b4fa017b5eb3..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Error.PowerShell.cs +++ /dev/null @@ -1,176 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Common error representation. - [System.ComponentModel.TypeConverter(typeof(ErrorTypeConverter))] - public partial class Error - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Error(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Error(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Error(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error1")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Error1 = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGenerated) content.GetValueForProperty("Error1",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Error1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ErrorAutoGeneratedTypeConverter.ConvertFrom); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ErrorDetailsTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal Error(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Error1")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Error1 = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGenerated) content.GetValueForProperty("Error1",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Error1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ErrorAutoGeneratedTypeConverter.ConvertFrom); - } - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ErrorDetailsTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Common error representation. - [System.ComponentModel.TypeConverter(typeof(ErrorTypeConverter))] - public partial interface IError - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Error.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Error.cs deleted file mode 100644 index 9308745d8f62..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Error.cs +++ /dev/null @@ -1,102 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Common error representation. - public partial class Error : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal - { - - /// Error code. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)Error1).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)Error1).Code = value ?? null; } - - /// Error details. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)Error1).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)Error1).Detail = value ?? null /* arrayOf */; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGenerated _error1; - - /// Error definition properties. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGenerated Error1 { get => (this._error1 = this._error1 ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ErrorAutoGenerated()); set => this._error1 = value; } - - /// Error message. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)Error1).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)Error1).Message = value ?? null; } - - /// Internal Acessors for Error1 - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGenerated Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorInternal.Error1 { get => (this._error1 = this._error1 ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ErrorAutoGenerated()); set { {_error1 = value;} } } - - /// Error target. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)Error1).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)Error1).Target = value ?? null; } - - /// Creates an new instance. - public Error() - { - - } - } - /// Common error representation. - public partial interface IError : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// Error code. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Error code.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string Code { get; set; } - /// Error details. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Error details.", - SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails[] Detail { get; set; } - /// Error message. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Error message.", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string Message { get; set; } - /// Error target. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Error target.", - SerializedName = @"target", - PossibleTypes = new [] { typeof(string) })] - string Target { get; set; } - - } - /// Common error representation. - internal partial interface IErrorInternal - - { - /// Error code. - string Code { get; set; } - /// Error details. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails[] Detail { get; set; } - /// Error definition properties. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGenerated Error1 { get; set; } - /// Error message. - string Message { get; set; } - /// Error target. - string Target { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorAutoGenerated.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorAutoGenerated.PowerShell.cs deleted file mode 100644 index d9d9bf83c37a..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorAutoGenerated.PowerShell.cs +++ /dev/null @@ -1,168 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Error definition properties. - [System.ComponentModel.TypeConverter(typeof(ErrorAutoGeneratedTypeConverter))] - public partial class ErrorAutoGenerated - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGenerated DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ErrorAutoGenerated(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGenerated DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ErrorAutoGenerated(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ErrorAutoGenerated(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ErrorDetailsTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ErrorAutoGenerated(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Message, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Detail")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ErrorDetailsTypeConverter.ConvertFrom)); - } - AfterDeserializePSObject(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGenerated FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Error definition properties. - [System.ComponentModel.TypeConverter(typeof(ErrorAutoGeneratedTypeConverter))] - public partial interface IErrorAutoGenerated - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorAutoGenerated.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorAutoGenerated.TypeConverter.cs deleted file mode 100644 index e48f14a834a7..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorAutoGenerated.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ErrorAutoGeneratedTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGenerated ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGenerated).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return ErrorAutoGenerated.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return ErrorAutoGenerated.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return ErrorAutoGenerated.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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorAutoGenerated.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorAutoGenerated.cs deleted file mode 100644 index 3a68359ad855..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorAutoGenerated.cs +++ /dev/null @@ -1,102 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Error definition properties. - public partial class ErrorAutoGenerated : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGenerated, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGeneratedInternal - { - - /// Backing field for property. - private string _code; - - /// Error code. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Code { get => this._code; set => this._code = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails[] _detail; - - /// Error details. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails[] Detail { get => this._detail; set => this._detail = value; } - - /// Backing field for property. - private string _message; - - /// Error message. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Message { get => this._message; set => this._message = value; } - - /// Backing field for property. - private string _target; - - /// Error target. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Target { get => this._target; set => this._target = value; } - - /// Creates an new instance. - public ErrorAutoGenerated() - { - - } - } - /// Error definition properties. - public partial interface IErrorAutoGenerated : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// Error code. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Error code.", - SerializedName = @"code", - PossibleTypes = new [] { typeof(string) })] - string Code { get; set; } - /// Error details. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Error details.", - SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails[] Detail { get; set; } - /// Error message. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Error message.", - SerializedName = @"message", - PossibleTypes = new [] { typeof(string) })] - string Message { get; set; } - /// Error target. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Error target.", - SerializedName = @"target", - PossibleTypes = new [] { typeof(string) })] - string Target { get; set; } - - } - /// Error definition properties. - internal partial interface IErrorAutoGeneratedInternal - - { - /// Error code. - string Code { get; set; } - /// Error details. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails[] Detail { get; set; } - /// Error message. - string Message { get; set; } - /// Error target. - string Target { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorAutoGenerated.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorAutoGenerated.json.cs deleted file mode 100644 index 4b8a30fcfcb7..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorAutoGenerated.json.cs +++ /dev/null @@ -1,122 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Error definition properties. - public partial class ErrorAutoGenerated - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. - internal ErrorAutoGenerated(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} - {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} - {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ErrorDetails.FromJson(__u) )) ))() : null : Detail;} - AfterFromJson(json); - } - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGenerated. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGenerated. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorAutoGenerated FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ErrorAutoGenerated(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); - AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); - AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); - if (null != this._detail) - { - var __w = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.XNodeArray(); - foreach( var __x in this._detail ) - { - AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); - } - container.Add("details",__w); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorDetails.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorDetails.PowerShell.cs deleted file mode 100644 index 0e3530a61506..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorDetails.PowerShell.cs +++ /dev/null @@ -1,160 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Common error details representation. - [System.ComponentModel.TypeConverter(typeof(ErrorDetailsTypeConverter))] - public partial class ErrorDetails - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ErrorDetails(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ErrorDetails(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ErrorDetails(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetailsInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetailsInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetailsInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetailsInternal)this).Message, 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 ErrorDetails(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Code")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetailsInternal)this).Code, global::System.Convert.ToString); - } - if (content.Contains("Target")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetailsInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetailsInternal)this).Target, global::System.Convert.ToString); - } - if (content.Contains("Message")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetailsInternal)this).Message, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - /// Common error details representation. - [System.ComponentModel.TypeConverter(typeof(ErrorDetailsTypeConverter))] - public partial interface IErrorDetails - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Resource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Resource.PowerShell.cs deleted file mode 100644 index c828ca11d396..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Resource.PowerShell.cs +++ /dev/null @@ -1,158 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] - public partial class Resource - { - - /// - /// 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); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Resource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Resource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal Resource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type, 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 Resource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] - public partial interface IResource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Resource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Resource.TypeConverter.cs deleted file mode 100644 index 326a8a8e7a97..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Resource.TypeConverter.cs +++ /dev/null @@ -1,146 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class ResourceTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResource ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResource).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return Resource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return Resource.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return Resource.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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Resource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Resource.cs deleted file mode 100644 index 9ba7893fcae3..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Resource.cs +++ /dev/null @@ -1,103 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - public partial class Resource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal - { - - /// Backing field for property. - private string _id; - - /// - /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Id { get => this._id; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal.Id { get => this._id; set { {_id = value;} } } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal.Name { get => this._name; set { {_name = value;} } } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal.Type { get => this._type; set { {_type = value;} } } - - /// Backing field for property. - private string _name; - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// Backing field for property. - private string _type; - - /// - /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Type { get => this._type; } - - /// Creates an new instance. - public Resource() - { - - } - } - public partial interface IResource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable - { - /// - /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string Id { get; } - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The name of the resource", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// - /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string Type { get; } - - } - internal partial interface IResourceInternal - - { - /// - /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - string Id { get; set; } - /// The name of the resource - string Name { get; set; } - /// - /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - /// - string Type { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Resource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Resource.json.cs deleted file mode 100644 index 55dbe8822c6f..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Resource.json.cs +++ /dev/null @@ -1,120 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - public partial class Resource - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResource. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResource. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new Resource(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. - internal Resource(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); - } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResource.PowerShell.cs deleted file mode 100644 index daaa37fa78da..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResource.PowerShell.cs +++ /dev/null @@ -1,176 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// The resource model definition for a ARM tracked top level resource - [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] - public partial class TrackedResource - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new TrackedResource(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new TrackedResource(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal TrackedResource(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type, 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 TrackedResource(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)this).Type, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - } - /// The resource model definition for a ARM tracked top level resource - [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] - public partial interface ITrackedResource - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResource.TypeConverter.cs deleted file mode 100644 index 6077cade253b..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResource.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class TrackedResourceTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResource ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResource).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return TrackedResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return TrackedResource.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return TrackedResource.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResource.cs deleted file mode 100644 index 65e7bde9a910..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResource.cs +++ /dev/null @@ -1,112 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The resource model definition for a ARM tracked top level resource - public partial class TrackedResource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.Resource(); - - /// - /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__resource).Id; } - - /// Backing field for property. - private string _location; - - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string Location { get => this._location; set => this._location = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__resource).Type = value; } - - /// The name of the resource - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__resource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags _tag; - - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResourceTags()); set => this._tag = value; } - - /// - /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. - /// - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public TrackedResource() - { - - } - - /// Validates that this object meets the validation criteria. - /// an instance that will receive validation - /// events. - /// - /// A that will be complete when validation is completed. - /// - public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - await eventListener.AssertNotNull(nameof(__resource), __resource); - await eventListener.AssertObjectIsValid(nameof(__resource), __resource); - } - } - /// The resource model definition for a ARM tracked top level resource - public partial interface ITrackedResource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResource - { - /// The geo-location where the resource lives - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - string Location { get; set; } - /// Resource tags. - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags Tag { get; set; } - - } - /// The resource model definition for a ARM tracked top level resource - internal partial interface ITrackedResourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IResourceInternal - { - /// The geo-location where the resource lives - string Location { get; set; } - /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags Tag { get; set; } - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResource.json.cs deleted file mode 100644 index d775530a0044..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResource.json.cs +++ /dev/null @@ -1,112 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// The resource model definition for a ARM tracked top level resource - public partial class TrackedResource - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResource. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResource. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - __resource?.ToJson(container, serializationMode); - AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); - AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); - AfterToJson(ref container); - return container; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. - internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.Resource(json); - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResourceTags.FromJson(__jsonTags) : Tag;} - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} - AfterFromJson(json); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResourceTags.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResourceTags.PowerShell.cs deleted file mode 100644 index 09e3ba1e2e7e..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResourceTags.PowerShell.cs +++ /dev/null @@ -1,140 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// Resource tags. - [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] - public partial class TrackedResourceTags - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new TrackedResourceTags(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new TrackedResourceTags(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal TrackedResourceTags(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - // this type is a dictionary; copy elements from source to here. - CopyFrom(content); - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal TrackedResourceTags(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - // this type is a dictionary; copy elements from source to here. - CopyFrom(content); - AfterDeserializePSObject(content); - } - } - /// Resource tags. - [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] - public partial interface ITrackedResourceTags - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResourceTags.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResourceTags.TypeConverter.cs deleted file mode 100644 index 257b36cc5448..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResourceTags.TypeConverter.cs +++ /dev/null @@ -1,147 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class TrackedResourceTagsTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return TrackedResourceTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return TrackedResourceTags.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return TrackedResourceTags.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResourceTags.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResourceTags.cs deleted file mode 100644 index 2cd92fa2ca45..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResourceTags.cs +++ /dev/null @@ -1,35 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Resource tags. - public partial class TrackedResourceTags : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTagsInternal - { - - /// Creates an new instance. - public TrackedResourceTags() - { - - } - } - /// Resource tags. - public partial interface ITrackedResourceTags : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray - { - - } - /// Resource tags. - internal partial interface ITrackedResourceTagsInternal - - { - - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResourceTags.dictionary.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResourceTags.dictionary.cs deleted file mode 100644 index 99834dc93275..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResourceTags.dictionary.cs +++ /dev/null @@ -1,75 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - public partial class TrackedResourceTags : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray - { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); - - global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } - - int Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } - - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } - - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - - public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } - - /// - /// - public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); - - public void Clear() => __additionalProperties.Clear(); - - /// - public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); - - /// - public void CopyFrom(global::System.Collections.IDictionary source) - { - if (null != source) - { - foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) - { - if ((null != property.Key && null != property.Value)) - { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); - } - } - } - } - - /// - public void CopyFrom(global::System.Management.Automation.PSObject source) - { - if (null != source) - { - foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) - { - if ((null != property.Key && null != property.Value)) - { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); - } - } - } - } - - /// - public bool Remove(global::System.String key) => __additionalProperties.Remove( key); - - /// - /// - public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); - - /// - - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResourceTags source) => source.__additionalProperties; - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResourceTags.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResourceTags.json.cs deleted file mode 100644 index eda0e887151f..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/TrackedResourceTags.json.cs +++ /dev/null @@ -1,109 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - - /// Resource tags. - public partial class TrackedResourceTags - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null; - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray)this).AdditionalProperties, container); - AfterToJson(ref container); - return container; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. - /// - internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); - AfterFromJson(json); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AvroSerialization.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AvroSerialization.PowerShell.cs new file mode 100644 index 000000000000..0af14ed486ce --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AvroSerialization.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// Describes how data from an input is serialized or how data is serialized when written to an output in Avro format. + /// + [System.ComponentModel.TypeConverter(typeof(AvroSerializationTypeConverter))] + public partial class AvroSerialization + { + + /// + /// 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 AvroSerialization(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAvroSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAvroSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type, 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 AvroSerialization(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAvroSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAvroSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAvroSerialization DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AvroSerialization(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAvroSerialization DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AvroSerialization(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAvroSerialization FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes how data from an input is serialized or how data is serialized when written to an output in Avro format. + [System.ComponentModel.TypeConverter(typeof(AvroSerializationTypeConverter))] + public partial interface IAvroSerialization + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AvroSerialization.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AvroSerialization.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AvroSerialization.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AvroSerialization.TypeConverter.cs index e2acda0929c9..bc8d9202692f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AvroSerialization.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AvroSerialization.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAvroSerialization ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAvroSerialization ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAvroSerialization).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAvroSerialization).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AvroSerialization.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AvroSerialization.cs similarity index 84% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AvroSerialization.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AvroSerialization.cs index 68e344d05200..b654a1de13e6 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AvroSerialization.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AvroSerialization.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -11,15 +11,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401P /// Describes how data from an input is serialized or how data is serialized when written to an output in Avro format. /// public partial class AvroSerialization : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAvroSerialization, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAvroSerializationInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAvroSerialization, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAvroSerializationInternal, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Serialization(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Serialization(); /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAny _property; @@ -33,13 +33,14 @@ public partial class AvroSerialization : /// /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)__serialization).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)__serialization).Type = value ; } + public string Type { get => "Avro"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)__serialization).Type = "Avro"; } /// Creates an new instance. public AvroSerialization() { - + this.__serialization.Type = "Avro"; } /// Validates that this object meets the validation criteria. @@ -57,7 +58,7 @@ public AvroSerialization() /// Describes how data from an input is serialized or how data is serialized when written to an output in Avro format. public partial interface IAvroSerialization : Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization { /// /// The properties that are associated with the Avro serialization type. Required on PUT (CreateOrReplace) requests. @@ -65,6 +66,9 @@ public partial interface IAvroSerialization : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The properties that are associated with the Avro serialization type. Required on PUT (CreateOrReplace) requests.", SerializedName = @"properties", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAny) })] @@ -73,7 +77,7 @@ public partial interface IAvroSerialization : } /// Describes how data from an input is serialized or how data is serialized when written to an output in Avro format. internal partial interface IAvroSerializationInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal { /// /// The properties that are associated with the Avro serialization type. Required on PUT (CreateOrReplace) requests. diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AvroSerialization.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AvroSerialization.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AvroSerialization.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AvroSerialization.json.cs index 074c3a7b66f4..fe2580a90f15 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AvroSerialization.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AvroSerialization.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -67,19 +67,19 @@ internal AvroSerialization(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Ru { return; } - __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Serialization(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Any.FromJson(__jsonProperties) : Property;} + __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Serialization(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Any.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAvroSerialization. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAvroSerialization. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAvroSerialization. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAvroSerialization. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAvroSerialization FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAvroSerialization FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AvroSerialization(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSource.PowerShell.cs new file mode 100644 index 000000000000..705325b2d835 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSource.PowerShell.cs @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes an Azure Data Lake Store output data source. + [System.ComponentModel.TypeConverter(typeof(AzureDataLakeStoreOutputDataSourceTypeConverter))] + public partial class AzureDataLakeStoreOutputDataSource + { + + /// + /// 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 AzureDataLakeStoreOutputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureDataLakeStoreOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("RefreshToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).RefreshToken, global::System.Convert.ToString); + } + if (content.Contains("TokenUserPrincipalName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); + } + if (content.Contains("TokenUserDisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserDisplayName, global::System.Convert.ToString); + } + if (content.Contains("AccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).AccountName, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("FilePathPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).FilePathPrefix = (string) content.GetValueForProperty("FilePathPrefix",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).FilePathPrefix, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TimeFormat, 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 AzureDataLakeStoreOutputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureDataLakeStoreOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("RefreshToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).RefreshToken, global::System.Convert.ToString); + } + if (content.Contains("TokenUserPrincipalName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); + } + if (content.Contains("TokenUserDisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TokenUserDisplayName, global::System.Convert.ToString); + } + if (content.Contains("AccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).AccountName, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("FilePathPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).FilePathPrefix = (string) content.GetValueForProperty("FilePathPrefix",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).FilePathPrefix, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal)this).TimeFormat, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureDataLakeStoreOutputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureDataLakeStoreOutputDataSource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes an Azure Data Lake Store output data source. + [System.ComponentModel.TypeConverter(typeof(AzureDataLakeStoreOutputDataSourceTypeConverter))] + public partial interface IAzureDataLakeStoreOutputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSource.TypeConverter.cs index fe728dba0a85..10f99d9150e5 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSource.cs similarity index 75% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSource.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSource.cs index abd73ace37d0..5b47e34cb79d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSource.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSource.cs @@ -3,55 +3,55 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes an Azure Data Lake Store output data source. public partial class AzureDataLakeStoreOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(); /// /// The name of the Azure Data Lake Store account. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string AccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).AccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).AccountName = value ?? null; } + public string AccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).AccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).AccountName = value ?? null; } /// Authentication Mode. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); } + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? null; } /// /// The date format. Wherever {date} appears in filePathPrefix, the value of this property is used as the date format instead. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string DateFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).DateFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).DateFormat = value ?? null; } + public string DateFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).DateFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).DateFormat = value ?? null; } /// /// The location of the file to which the output should be written to. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string FilePathPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).FilePathPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).FilePathPrefix = value ?? null; } + public string FilePathPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).FilePathPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).FilePathPrefix = value ?? null; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureDataLakeStoreOutputDataSourceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureDataLakeStoreOutputDataSourceProperties()); set { {_property = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceProperties _property; /// /// The properties that are associated with an Azure Data Lake Store output. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureDataLakeStoreOutputDataSourceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureDataLakeStoreOutputDataSourceProperties()); set => this._property = value; } /// /// A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. @@ -60,44 +60,45 @@ public partial class AzureDataLakeStoreOutputDataSource : /// this property with a valid refresh token. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string RefreshToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)Property).RefreshToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)Property).RefreshToken = value ?? null; } + public string RefreshToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)Property).RefreshToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)Property).RefreshToken = value ?? null; } /// /// The tenant id of the user used to obtain the refresh token. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).TenantId = value ?? null; } + public string TenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).TenantId = value ?? null; } /// /// The time format. Wherever {time} appears in filePathPrefix, the value of this property is used as the time format instead. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TimeFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).TimeFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).TimeFormat = value ?? null; } + public string TimeFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).TimeFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)Property).TimeFormat = value ?? null; } /// /// The user display name of the user that was used to obtain the refresh token. Use this property to help remember which /// user was used to obtain the refresh token. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TokenUserDisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserDisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserDisplayName = value ?? null; } + public string TokenUserDisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserDisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserDisplayName = value ?? null; } /// /// The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember /// which user was used to obtain the refresh token. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TokenUserPrincipalName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserPrincipalName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserPrincipalName = value ?? null; } + public string TokenUserPrincipalName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserPrincipalName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserPrincipalName = value ?? null; } /// /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type = value ; } + public string Type { get => "Microsoft.DataLake/Accounts"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)__outputDataSource).Type = "Microsoft.DataLake/Accounts"; } /// Creates an new instance. public AzureDataLakeStoreOutputDataSource() { - + this.__outputDataSource.Type = "Microsoft.DataLake/Accounts"; } /// Validates that this object meets the validation criteria. @@ -115,7 +116,7 @@ public AzureDataLakeStoreOutputDataSource() /// Describes an Azure Data Lake Store output data source. public partial interface IAzureDataLakeStoreOutputDataSource : Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource { /// /// The name of the Azure Data Lake Store account. Required on PUT (CreateOrReplace) requests. @@ -123,6 +124,9 @@ public partial interface IAzureDataLakeStoreOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Azure Data Lake Store account. Required on PUT (CreateOrReplace) requests.", SerializedName = @"accountName", PossibleTypes = new [] { typeof(string) })] @@ -131,16 +135,23 @@ public partial interface IAzureDataLakeStoreOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Authentication Mode.", SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } /// /// The date format. Wherever {date} appears in filePathPrefix, the value of this property is used as the date format instead. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The date format. Wherever {date} appears in filePathPrefix, the value of this property is used as the date format instead.", SerializedName = @"dateFormat", PossibleTypes = new [] { typeof(string) })] @@ -151,6 +162,9 @@ public partial interface IAzureDataLakeStoreOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The location of the file to which the output should be written to. Required on PUT (CreateOrReplace) requests.", SerializedName = @"filePathPrefix", PossibleTypes = new [] { typeof(string) })] @@ -164,6 +178,9 @@ public partial interface IAzureDataLakeStoreOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests.", SerializedName = @"refreshToken", PossibleTypes = new [] { typeof(string) })] @@ -174,6 +191,9 @@ public partial interface IAzureDataLakeStoreOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The tenant id of the user used to obtain the refresh token. Required on PUT (CreateOrReplace) requests.", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -184,6 +204,9 @@ public partial interface IAzureDataLakeStoreOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The time format. Wherever {time} appears in filePathPrefix, the value of this property is used as the time format instead.", SerializedName = @"timeFormat", PossibleTypes = new [] { typeof(string) })] @@ -195,6 +218,9 @@ public partial interface IAzureDataLakeStoreOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The user display name of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", SerializedName = @"tokenUserDisplayName", PossibleTypes = new [] { typeof(string) })] @@ -206,6 +232,9 @@ public partial interface IAzureDataLakeStoreOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", SerializedName = @"tokenUserPrincipalName", PossibleTypes = new [] { typeof(string) })] @@ -214,14 +243,15 @@ public partial interface IAzureDataLakeStoreOutputDataSource : } /// Describes an Azure Data Lake Store output data source. internal partial interface IAzureDataLakeStoreOutputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal { /// /// The name of the Azure Data Lake Store account. Required on PUT (CreateOrReplace) requests. /// string AccountName { get; set; } /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } /// /// The date format. Wherever {date} appears in filePathPrefix, the value of this property is used as the date format instead. /// @@ -233,7 +263,7 @@ internal partial interface IAzureDataLakeStoreOutputDataSourceInternal : /// /// The properties that are associated with an Azure Data Lake Store output. Required on PUT (CreateOrReplace) requests. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceProperties Property { get; set; } /// /// A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. /// A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSource.json.cs index 974ddef9162a..6e73395552d8 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AzureDataLakeStoreOutputDataSource(Microsoft.Azure.PowerShell.Cmdlets.S { return; } - __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureDataLakeStoreOutputDataSourceProperties.FromJson(__jsonProperties) : Property;} + __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureDataLakeStoreOutputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureDataLakeStoreOutputDataSource(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..54c41680e397 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSourceProperties.PowerShell.cs @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with an Azure Data Lake Store. + [System.ComponentModel.TypeConverter(typeof(AzureDataLakeStoreOutputDataSourcePropertiesTypeConverter))] + public partial class AzureDataLakeStoreOutputDataSourceProperties + { + + /// + /// 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 AzureDataLakeStoreOutputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AccountName, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("FilePathPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).FilePathPrefix = (string) content.GetValueForProperty("FilePathPrefix",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).FilePathPrefix, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TimeFormat, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("RefreshToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken, global::System.Convert.ToString); + } + if (content.Contains("TokenUserPrincipalName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); + } + if (content.Contains("TokenUserDisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName, 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 AzureDataLakeStoreOutputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AccountName, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("FilePathPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).FilePathPrefix = (string) content.GetValueForProperty("FilePathPrefix",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).FilePathPrefix, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).TimeFormat, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("RefreshToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken, global::System.Convert.ToString); + } + if (content.Contains("TokenUserPrincipalName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); + } + if (content.Contains("TokenUserDisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureDataLakeStoreOutputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureDataLakeStoreOutputDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with an Azure Data Lake Store. + [System.ComponentModel.TypeConverter(typeof(AzureDataLakeStoreOutputDataSourcePropertiesTypeConverter))] + public partial interface IAzureDataLakeStoreOutputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSourceProperties.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSourceProperties.TypeConverter.cs index ecb73bd27cb5..6ecbec5090ed 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSourceProperties.cs similarity index 82% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSourceProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSourceProperties.cs index 59987f4f152e..d5cb40632530 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSourceProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSourceProperties.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with an Azure Data Lake Store. public partial class AzureDataLakeStoreOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourcePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourcePropertiesInternal, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourceProperties __oAuthBasedDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OAuthBasedDataSourceProperties(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourceProperties __oAuthBasedDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OAuthBasedDataSourceProperties(); /// Backing field for property. private string _accountName; @@ -29,11 +29,11 @@ public partial class AzureDataLakeStoreOutputDataSourceProperties : public string AccountName { get => this._accountName; set => this._accountName = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? _authenticationMode; + private string _authenticationMode; /// Authentication Mode. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => this._authenticationMode; set => this._authenticationMode = value; } + public string AuthenticationMode { get => this._authenticationMode; set => this._authenticationMode = value; } /// Backing field for property. private string _dateFormat; @@ -60,7 +60,7 @@ public partial class AzureDataLakeStoreOutputDataSourceProperties : /// this property with a valid refresh token. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string RefreshToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).RefreshToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).RefreshToken = value ?? null; } + public string RefreshToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).RefreshToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).RefreshToken = value ?? null; } /// Backing field for property. private string _tenantId; @@ -85,14 +85,14 @@ public partial class AzureDataLakeStoreOutputDataSourceProperties : /// user was used to obtain the refresh token. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string TokenUserDisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserDisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserDisplayName = value ?? null; } + public string TokenUserDisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserDisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserDisplayName = value ?? null; } /// /// The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember /// which user was used to obtain the refresh token. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string TokenUserPrincipalName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserPrincipalName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserPrincipalName = value ?? null; } + public string TokenUserPrincipalName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserPrincipalName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserPrincipalName = value ?? null; } /// /// Creates an new instance. @@ -117,7 +117,7 @@ public AzureDataLakeStoreOutputDataSourceProperties() /// The properties that are associated with an Azure Data Lake Store. public partial interface IAzureDataLakeStoreOutputDataSourceProperties : Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourceProperties { /// /// The name of the Azure Data Lake Store account. Required on PUT (CreateOrReplace) requests. @@ -125,6 +125,9 @@ public partial interface IAzureDataLakeStoreOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Azure Data Lake Store account. Required on PUT (CreateOrReplace) requests.", SerializedName = @"accountName", PossibleTypes = new [] { typeof(string) })] @@ -133,16 +136,23 @@ public partial interface IAzureDataLakeStoreOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Authentication Mode.", SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } /// /// The date format. Wherever {date} appears in filePathPrefix, the value of this property is used as the date format instead. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The date format. Wherever {date} appears in filePathPrefix, the value of this property is used as the date format instead.", SerializedName = @"dateFormat", PossibleTypes = new [] { typeof(string) })] @@ -153,6 +163,9 @@ public partial interface IAzureDataLakeStoreOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The location of the file to which the output should be written to. Required on PUT (CreateOrReplace) requests.", SerializedName = @"filePathPrefix", PossibleTypes = new [] { typeof(string) })] @@ -163,6 +176,9 @@ public partial interface IAzureDataLakeStoreOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The tenant id of the user used to obtain the refresh token. Required on PUT (CreateOrReplace) requests.", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -173,6 +189,9 @@ public partial interface IAzureDataLakeStoreOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The time format. Wherever {time} appears in filePathPrefix, the value of this property is used as the time format instead.", SerializedName = @"timeFormat", PossibleTypes = new [] { typeof(string) })] @@ -181,14 +200,15 @@ public partial interface IAzureDataLakeStoreOutputDataSourceProperties : } /// The properties that are associated with an Azure Data Lake Store. internal partial interface IAzureDataLakeStoreOutputDataSourcePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal { /// /// The name of the Azure Data Lake Store account. Required on PUT (CreateOrReplace) requests. /// string AccountName { get; set; } /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } /// /// The date format. Wherever {date} appears in filePathPrefix, the value of this property is used as the date format instead. /// diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSourceProperties.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSourceProperties.json.cs index 067b220e5a1c..6257e31bb604 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureDataLakeStoreOutputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureDataLakeStoreOutputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -66,24 +66,24 @@ internal AzureDataLakeStoreOutputDataSourceProperties(Microsoft.Azure.PowerShell { return; } - __oAuthBasedDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OAuthBasedDataSourceProperties(json); - {_accountName = If( json?.PropertyT("accountName"), out var __jsonAccountName) ? (string)__jsonAccountName : (string)AccountName;} - {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)TenantId;} - {_filePathPrefix = If( json?.PropertyT("filePathPrefix"), out var __jsonFilePathPrefix) ? (string)__jsonFilePathPrefix : (string)FilePathPrefix;} - {_dateFormat = If( json?.PropertyT("dateFormat"), out var __jsonDateFormat) ? (string)__jsonDateFormat : (string)DateFormat;} - {_timeFormat = If( json?.PropertyT("timeFormat"), out var __jsonTimeFormat) ? (string)__jsonTimeFormat : (string)TimeFormat;} - {_authenticationMode = If( json?.PropertyT("authenticationMode"), out var __jsonAuthenticationMode) ? (string)__jsonAuthenticationMode : (string)AuthenticationMode;} + __oAuthBasedDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OAuthBasedDataSourceProperties(json); + {_accountName = If( json?.PropertyT("accountName"), out var __jsonAccountName) ? (string)__jsonAccountName : (string)_accountName;} + {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)_tenantId;} + {_filePathPrefix = If( json?.PropertyT("filePathPrefix"), out var __jsonFilePathPrefix) ? (string)__jsonFilePathPrefix : (string)_filePathPrefix;} + {_dateFormat = If( json?.PropertyT("dateFormat"), out var __jsonDateFormat) ? (string)__jsonDateFormat : (string)_dateFormat;} + {_timeFormat = If( json?.PropertyT("timeFormat"), out var __jsonTimeFormat) ? (string)__jsonTimeFormat : (string)_timeFormat;} + {_authenticationMode = If( json?.PropertyT("authenticationMode"), out var __jsonAuthenticationMode) ? (string)__jsonAuthenticationMode : (string)_authenticationMode;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureDataLakeStoreOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureDataLakeStoreOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureDataLakeStoreOutputDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSource.PowerShell.cs new file mode 100644 index 000000000000..c1b823dc2a9d --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSource.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Defines the metadata of AzureFunctionOutputDataSource + [System.ComponentModel.TypeConverter(typeof(AzureFunctionOutputDataSourceTypeConverter))] + public partial class AzureFunctionOutputDataSource + { + + /// + /// 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 AzureFunctionOutputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureFunctionOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("FunctionAppName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).FunctionAppName = (string) content.GetValueForProperty("FunctionAppName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).FunctionAppName, global::System.Convert.ToString); + } + if (content.Contains("FunctionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).FunctionName = (string) content.GetValueForProperty("FunctionName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).FunctionName, global::System.Convert.ToString); + } + if (content.Contains("ApiKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).ApiKey, global::System.Convert.ToString); + } + if (content.Contains("MaxBatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).MaxBatchSize = (float?) content.GetValueForProperty("MaxBatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).MaxBatchSize, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("MaxBatchCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureFunctionOutputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureFunctionOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("FunctionAppName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).FunctionAppName = (string) content.GetValueForProperty("FunctionAppName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).FunctionAppName, global::System.Convert.ToString); + } + if (content.Contains("FunctionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).FunctionName = (string) content.GetValueForProperty("FunctionName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).FunctionName, global::System.Convert.ToString); + } + if (content.Contains("ApiKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).ApiKey, global::System.Convert.ToString); + } + if (content.Contains("MaxBatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).MaxBatchSize = (float?) content.GetValueForProperty("MaxBatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).MaxBatchSize, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("MaxBatchCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureFunctionOutputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureFunctionOutputDataSource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 metadata of AzureFunctionOutputDataSource + [System.ComponentModel.TypeConverter(typeof(AzureFunctionOutputDataSourceTypeConverter))] + public partial interface IAzureFunctionOutputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSource.TypeConverter.cs index dae1ee8bb4c9..978f3f6d6ef5 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSource.cs new file mode 100644 index 000000000000..79a5222c4a86 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSource.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Defines the metadata of AzureFunctionOutputDataSource + public partial class AzureFunctionOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(); + + /// + /// If you want to use an Azure Function from another subscription, you can do so by providing the key to access your function. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ApiKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)Property).ApiKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)Property).ApiKey = value ?? null; } + + /// The name of your Azure Functions app. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string FunctionAppName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)Property).FunctionAppName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)Property).FunctionAppName = value ?? null; } + + /// The name of the function in your Azure Functions app. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string FunctionName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)Property).FunctionName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)Property).FunctionName = value ?? null; } + + /// + /// A property that lets you specify the maximum number of events in each batch that's sent to Azure Functions. The default + /// value is 100. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public float? MaxBatchCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)Property).MaxBatchCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)Property).MaxBatchCount = value ?? default(float); } + + /// + /// A property that lets you set the maximum size for each output batch that's sent to your Azure function. The input unit + /// is in bytes. By default, this value is 262,144 bytes (256 KB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public float? MaxBatchSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)Property).MaxBatchSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)Property).MaxBatchSize = value ?? default(float); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureFunctionOutputDataSourceProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceProperties _property; + + /// + /// The properties that are associated with a Azure Function output. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureFunctionOutputDataSourceProperties()); set => this._property = value; } + + /// + /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Microsoft.AzureFunction"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)__outputDataSource).Type = "Microsoft.AzureFunction"; } + + /// Creates an new instance. + public AzureFunctionOutputDataSource() + { + this.__outputDataSource.Type = "Microsoft.AzureFunction"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); + await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); + } + } + /// Defines the metadata of AzureFunctionOutputDataSource + public partial interface IAzureFunctionOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource + { + /// + /// If you want to use an Azure Function from another subscription, you can do so by providing the key to access your function. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"If you want to use an Azure Function from another subscription, you can do so by providing the key to access your function.", + SerializedName = @"apiKey", + PossibleTypes = new [] { typeof(string) })] + string ApiKey { get; set; } + /// The name of your Azure Functions app. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of your Azure Functions app.", + SerializedName = @"functionAppName", + PossibleTypes = new [] { typeof(string) })] + string FunctionAppName { get; set; } + /// The name of the function in your Azure Functions app. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the function in your Azure Functions app.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + string FunctionName { get; set; } + /// + /// A property that lets you specify the maximum number of events in each batch that's sent to Azure Functions. The default + /// value is 100. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A property that lets you specify the maximum number of events in each batch that's sent to Azure Functions. The default value is 100.", + SerializedName = @"maxBatchCount", + PossibleTypes = new [] { typeof(float) })] + float? MaxBatchCount { get; set; } + /// + /// A property that lets you set the maximum size for each output batch that's sent to your Azure function. The input unit + /// is in bytes. By default, this value is 262,144 bytes (256 KB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A property that lets you set the maximum size for each output batch that's sent to your Azure function. The input unit is in bytes. By default, this value is 262,144 bytes (256 KB).", + SerializedName = @"maxBatchSize", + PossibleTypes = new [] { typeof(float) })] + float? MaxBatchSize { get; set; } + + } + /// Defines the metadata of AzureFunctionOutputDataSource + internal partial interface IAzureFunctionOutputDataSourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal + { + /// + /// If you want to use an Azure Function from another subscription, you can do so by providing the key to access your function. + /// + string ApiKey { get; set; } + /// The name of your Azure Functions app. + string FunctionAppName { get; set; } + /// The name of the function in your Azure Functions app. + string FunctionName { get; set; } + /// + /// A property that lets you specify the maximum number of events in each batch that's sent to Azure Functions. The default + /// value is 100. + /// + float? MaxBatchCount { get; set; } + /// + /// A property that lets you set the maximum size for each output batch that's sent to your Azure function. The input unit + /// is in bytes. By default, this value is 262,144 bytes (256 KB). + /// + float? MaxBatchSize { get; set; } + /// + /// The properties that are associated with a Azure Function output. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSource.json.cs index bac84284643a..9b32af7001a5 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AzureFunctionOutputDataSource(Microsoft.Azure.PowerShell.Cmdlets.Stream { return; } - __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureFunctionOutputDataSourceProperties.FromJson(__jsonProperties) : Property;} + __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureFunctionOutputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureFunctionOutputDataSource(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..e2e158458e27 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSourceProperties.PowerShell.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with a DocumentDB output. + [System.ComponentModel.TypeConverter(typeof(AzureFunctionOutputDataSourcePropertiesTypeConverter))] + public partial class AzureFunctionOutputDataSourceProperties + { + + /// + /// 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 AzureFunctionOutputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("FunctionAppName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionAppName = (string) content.GetValueForProperty("FunctionAppName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionAppName, global::System.Convert.ToString); + } + if (content.Contains("FunctionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionName = (string) content.GetValueForProperty("FunctionName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionName, global::System.Convert.ToString); + } + if (content.Contains("ApiKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).ApiKey, global::System.Convert.ToString); + } + if (content.Contains("MaxBatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchSize = (float?) content.GetValueForProperty("MaxBatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchSize, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("MaxBatchCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureFunctionOutputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("FunctionAppName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionAppName = (string) content.GetValueForProperty("FunctionAppName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionAppName, global::System.Convert.ToString); + } + if (content.Contains("FunctionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionName = (string) content.GetValueForProperty("FunctionName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).FunctionName, global::System.Convert.ToString); + } + if (content.Contains("ApiKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).ApiKey, global::System.Convert.ToString); + } + if (content.Contains("MaxBatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchSize = (float?) content.GetValueForProperty("MaxBatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchSize, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("MaxBatchCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureFunctionOutputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureFunctionOutputDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with a DocumentDB output. + [System.ComponentModel.TypeConverter(typeof(AzureFunctionOutputDataSourcePropertiesTypeConverter))] + public partial interface IAzureFunctionOutputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSourceProperties.TypeConverter.cs index 56f1e262b611..282d802337c4 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSourceProperties.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSourceProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSourceProperties.cs index 6990831c8bf2..2af6fd501d86 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSourceProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSourceProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with a DocumentDB output. public partial class AzureFunctionOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourcePropertiesInternal { /// Backing field for property. @@ -72,6 +72,9 @@ public partial interface IAzureFunctionOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"If you want to use an Azure Function from another subscription, you can do so by providing the key to access your function.", SerializedName = @"apiKey", PossibleTypes = new [] { typeof(string) })] @@ -80,6 +83,9 @@ public partial interface IAzureFunctionOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of your Azure Functions app.", SerializedName = @"functionAppName", PossibleTypes = new [] { typeof(string) })] @@ -88,6 +94,9 @@ public partial interface IAzureFunctionOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the function in your Azure Functions app.", SerializedName = @"functionName", PossibleTypes = new [] { typeof(string) })] @@ -99,6 +108,9 @@ public partial interface IAzureFunctionOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A property that lets you specify the maximum number of events in each batch that's sent to Azure Functions. The default value is 100.", SerializedName = @"maxBatchCount", PossibleTypes = new [] { typeof(float) })] @@ -110,6 +122,9 @@ public partial interface IAzureFunctionOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A property that lets you set the maximum size for each output batch that's sent to your Azure function. The input unit is in bytes. By default, this value is 262,144 bytes (256 KB).", SerializedName = @"maxBatchSize", PossibleTypes = new [] { typeof(float) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSourceProperties.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSourceProperties.json.cs index e61c2cf4aa19..ee4ec4713670 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureFunctionOutputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureFunctionOutputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,22 +65,22 @@ internal AzureFunctionOutputDataSourceProperties(Microsoft.Azure.PowerShell.Cmdl { return; } - {_functionAppName = If( json?.PropertyT("functionAppName"), out var __jsonFunctionAppName) ? (string)__jsonFunctionAppName : (string)FunctionAppName;} - {_functionName = If( json?.PropertyT("functionName"), out var __jsonFunctionName) ? (string)__jsonFunctionName : (string)FunctionName;} - {_apiKey = If( json?.PropertyT("apiKey"), out var __jsonApiKey) ? (string)__jsonApiKey : (string)ApiKey;} - {_maxBatchSize = If( json?.PropertyT("maxBatchSize"), out var __jsonMaxBatchSize) ? (float?)__jsonMaxBatchSize : MaxBatchSize;} - {_maxBatchCount = If( json?.PropertyT("maxBatchCount"), out var __jsonMaxBatchCount) ? (float?)__jsonMaxBatchCount : MaxBatchCount;} + {_functionAppName = If( json?.PropertyT("functionAppName"), out var __jsonFunctionAppName) ? (string)__jsonFunctionAppName : (string)_functionAppName;} + {_functionName = If( json?.PropertyT("functionName"), out var __jsonFunctionName) ? (string)__jsonFunctionName : (string)_functionName;} + {_apiKey = If( json?.PropertyT("apiKey"), out var __jsonApiKey) ? (string)__jsonApiKey : (string)_apiKey;} + {_maxBatchSize = If( json?.PropertyT("maxBatchSize"), out var __jsonMaxBatchSize) ? (float?)__jsonMaxBatchSize : _maxBatchSize;} + {_maxBatchCount = If( json?.PropertyT("maxBatchCount"), out var __jsonMaxBatchCount) ? (float?)__jsonMaxBatchCount : _maxBatchCount;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureFunctionOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureFunctionOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureFunctionOutputDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBinding.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBinding.PowerShell.cs new file mode 100644 index 000000000000..eb5db1e4720c --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBinding.PowerShell.cs @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The binding to an Azure Machine Learning web service. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionBindingTypeConverter))] + public partial class AzureMachineLearningServiceFunctionBinding + { + + /// + /// 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 AzureMachineLearningServiceFunctionBinding(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionBindingPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Endpoint, global::System.Convert.ToString); + } + if (content.Contains("ApiKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).ApiKey, global::System.Convert.ToString); + } + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Input = (System.Collections.Generic.List) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Input, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceInputColumnTypeConverter.ConvertFrom)); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Output = (System.Collections.Generic.List) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Output, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceOutputColumnTypeConverter.ConvertFrom)); + } + if (content.Contains("BatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NumberOfParallelRequest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).NumberOfParallelRequest = (int?) content.GetValueForProperty("NumberOfParallelRequest",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).NumberOfParallelRequest, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureMachineLearningServiceFunctionBinding(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionBindingPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Endpoint, global::System.Convert.ToString); + } + if (content.Contains("ApiKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).ApiKey, global::System.Convert.ToString); + } + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Input = (System.Collections.Generic.List) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Input, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceInputColumnTypeConverter.ConvertFrom)); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Output = (System.Collections.Generic.List) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).Output, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceOutputColumnTypeConverter.ConvertFrom)); + } + if (content.Contains("BatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NumberOfParallelRequest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).NumberOfParallelRequest = (int?) content.GetValueForProperty("NumberOfParallelRequest",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal)this).NumberOfParallelRequest, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBinding DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMachineLearningServiceFunctionBinding(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBinding DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMachineLearningServiceFunctionBinding(content); + } + + /// + /// Creates a new instance of , deserializing the content from a + /// json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBinding FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 binding to an Azure Machine Learning web service. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionBindingTypeConverter))] + public partial interface IAzureMachineLearningServiceFunctionBinding + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBinding.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBinding.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBinding.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBinding.TypeConverter.cs index ff7681f279f1..c0fe384db164 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBinding.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBinding.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBinding ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBinding ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBinding).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBinding).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBinding.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBinding.cs new file mode 100644 index 000000000000..9bb6ef8cbbd4 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBinding.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The binding to an Azure Machine Learning web service. + public partial class AzureMachineLearningServiceFunctionBinding : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBinding, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionBinding(); + + /// The API key used to authenticate with Request-Response endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ApiKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).ApiKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).ApiKey = value ?? null; } + + /// + /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public int? BatchSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).BatchSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).BatchSize = value ?? default(int); } + + /// + /// The Request-Response execute endpoint of the Azure Machine Learning web service. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Endpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).Endpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).Endpoint = value ?? null; } + + /// The inputs for the Azure Machine Learning web service endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Input { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).Input; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).Input = value ?? null /* arrayOf */; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionBindingProperties()); set { {_property = value;} } } + + /// + /// The number of parallel requests that will be sent per partition of your job to the machine learning service. Default is + /// 1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public int? NumberOfParallelRequest { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).NumberOfParallelRequest; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).NumberOfParallelRequest = value ?? default(int); } + + /// + /// A list of outputs from the Azure Machine Learning web service endpoint execution. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Output { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).Output; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)Property).Output = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingProperties _property; + + /// The binding properties associated with an Azure Machine learning web service. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionBindingProperties()); set => this._property = value; } + + /// Indicates the function binding type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Microsoft.MachineLearningServices"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)__functionBinding).Type = "Microsoft.MachineLearningServices"; } + + /// + /// Creates an new instance. + /// + public AzureMachineLearningServiceFunctionBinding() + { + this.__functionBinding.Type = "Microsoft.MachineLearningServices"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__functionBinding), __functionBinding); + await eventListener.AssertObjectIsValid(nameof(__functionBinding), __functionBinding); + } + } + /// The binding to an Azure Machine Learning web service. + public partial interface IAzureMachineLearningServiceFunctionBinding : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding + { + /// The API key used to authenticate with Request-Response endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The API key used to authenticate with Request-Response endpoint.", + SerializedName = @"apiKey", + PossibleTypes = new [] { typeof(string) })] + string ApiKey { get; set; } + /// + /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000.", + SerializedName = @"batchSize", + PossibleTypes = new [] { typeof(int) })] + int? BatchSize { get; set; } + /// + /// The Request-Response execute endpoint of the Azure Machine Learning web service. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Request-Response execute endpoint of the Azure Machine Learning web service.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + string Endpoint { get; set; } + /// The inputs for the Azure Machine Learning web service endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The inputs for the Azure Machine Learning web service endpoint.", + SerializedName = @"inputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumn) })] + System.Collections.Generic.List Input { get; set; } + /// + /// The number of parallel requests that will be sent per partition of your job to the machine learning service. Default is + /// 1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of parallel requests that will be sent per partition of your job to the machine learning service. Default is 1.", + SerializedName = @"numberOfParallelRequests", + PossibleTypes = new [] { typeof(int) })] + int? NumberOfParallelRequest { get; set; } + /// + /// A list of outputs from the Azure Machine Learning web service endpoint execution. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of outputs from the Azure Machine Learning web service endpoint execution.", + SerializedName = @"outputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumn) })] + System.Collections.Generic.List Output { get; set; } + + } + /// The binding to an Azure Machine Learning web service. + internal partial interface IAzureMachineLearningServiceFunctionBindingInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal + { + /// The API key used to authenticate with Request-Response endpoint. + string ApiKey { get; set; } + /// + /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. + /// + int? BatchSize { get; set; } + /// + /// The Request-Response execute endpoint of the Azure Machine Learning web service. + /// + string Endpoint { get; set; } + /// The inputs for the Azure Machine Learning web service endpoint. + System.Collections.Generic.List Input { get; set; } + /// + /// The number of parallel requests that will be sent per partition of your job to the machine learning service. Default is + /// 1. + /// + int? NumberOfParallelRequest { get; set; } + /// + /// A list of outputs from the Azure Machine Learning web service endpoint execution. + /// + System.Collections.Generic.List Output { get; set; } + /// The binding properties associated with an Azure Machine learning web service. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBinding.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBinding.json.cs similarity index 92% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBinding.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBinding.json.cs index 415a446a87ae..875c5cc07a2c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBinding.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBinding.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AzureMachineLearningServiceFunctionBinding(Microsoft.Azure.PowerShell.C { return; } - __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionBinding(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionBindingProperties.FromJson(__jsonProperties) : Property;} + __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionBinding(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionBindingProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBinding. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBinding. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBinding. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBinding. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBinding FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBinding FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureMachineLearningServiceFunctionBinding(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingProperties.PowerShell.cs new file mode 100644 index 000000000000..a681398f8c1b --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingProperties.PowerShell.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The binding properties associated with an Azure Machine learning web service. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionBindingPropertiesTypeConverter))] + public partial class AzureMachineLearningServiceFunctionBindingProperties + { + + /// + /// 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 AzureMachineLearningServiceFunctionBindingProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Endpoint, global::System.Convert.ToString); + } + if (content.Contains("ApiKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).ApiKey, global::System.Convert.ToString); + } + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Input = (System.Collections.Generic.List) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Input, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceInputColumnTypeConverter.ConvertFrom)); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Output = (System.Collections.Generic.List) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Output, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceOutputColumnTypeConverter.ConvertFrom)); + } + if (content.Contains("BatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NumberOfParallelRequest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).NumberOfParallelRequest = (int?) content.GetValueForProperty("NumberOfParallelRequest",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).NumberOfParallelRequest, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureMachineLearningServiceFunctionBindingProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Endpoint, global::System.Convert.ToString); + } + if (content.Contains("ApiKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).ApiKey, global::System.Convert.ToString); + } + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Input = (System.Collections.Generic.List) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Input, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceInputColumnTypeConverter.ConvertFrom)); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Output = (System.Collections.Generic.List) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).Output, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceOutputColumnTypeConverter.ConvertFrom)); + } + if (content.Contains("BatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NumberOfParallelRequest")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).NumberOfParallelRequest = (int?) content.GetValueForProperty("NumberOfParallelRequest",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal)this).NumberOfParallelRequest, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMachineLearningServiceFunctionBindingProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMachineLearningServiceFunctionBindingProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 binding properties associated with an Azure Machine learning web service. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionBindingPropertiesTypeConverter))] + public partial interface IAzureMachineLearningServiceFunctionBindingProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingProperties.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingProperties.TypeConverter.cs index 9f465842e531..b51f2154a642 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingProperties.cs similarity index 80% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingProperties.cs index 09ac603995de..4a554b62de4f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The binding properties associated with an Azure Machine learning web service. public partial class AzureMachineLearningServiceFunctionBindingProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingPropertiesInternal { /// Backing field for property. @@ -39,11 +39,11 @@ public partial class AzureMachineLearningServiceFunctionBindingProperties : public string Endpoint { get => this._endpoint; set => this._endpoint = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[] _input; + private System.Collections.Generic.List _input; /// The inputs for the Azure Machine Learning web service endpoint. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[] Input { get => this._input; set => this._input = value; } + public System.Collections.Generic.List Input { get => this._input; set => this._input = value; } /// Backing field for property. private int? _numberOfParallelRequest; @@ -56,13 +56,13 @@ public partial class AzureMachineLearningServiceFunctionBindingProperties : public int? NumberOfParallelRequest { get => this._numberOfParallelRequest; set => this._numberOfParallelRequest = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn[] _output; + private System.Collections.Generic.List _output; /// /// A list of outputs from the Azure Machine Learning web service endpoint execution. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn[] Output { get => this._output; set => this._output = value; } + public System.Collections.Generic.List Output { get => this._output; set => this._output = value; } /// /// Creates an new instance. @@ -80,6 +80,9 @@ public partial interface IAzureMachineLearningServiceFunctionBindingProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The API key used to authenticate with Request-Response endpoint.", SerializedName = @"apiKey", PossibleTypes = new [] { typeof(string) })] @@ -90,6 +93,9 @@ public partial interface IAzureMachineLearningServiceFunctionBindingProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000.", SerializedName = @"batchSize", PossibleTypes = new [] { typeof(int) })] @@ -100,6 +106,9 @@ public partial interface IAzureMachineLearningServiceFunctionBindingProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Request-Response execute endpoint of the Azure Machine Learning web service.", SerializedName = @"endpoint", PossibleTypes = new [] { typeof(string) })] @@ -108,10 +117,13 @@ public partial interface IAzureMachineLearningServiceFunctionBindingProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The inputs for the Azure Machine Learning web service endpoint.", SerializedName = @"inputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[] Input { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumn) })] + System.Collections.Generic.List Input { get; set; } /// /// The number of parallel requests that will be sent per partition of your job to the machine learning service. Default is /// 1. @@ -119,6 +131,9 @@ public partial interface IAzureMachineLearningServiceFunctionBindingProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The number of parallel requests that will be sent per partition of your job to the machine learning service. Default is 1.", SerializedName = @"numberOfParallelRequests", PossibleTypes = new [] { typeof(int) })] @@ -129,10 +144,13 @@ public partial interface IAzureMachineLearningServiceFunctionBindingProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A list of outputs from the Azure Machine Learning web service endpoint execution.", SerializedName = @"outputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn[] Output { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumn) })] + System.Collections.Generic.List Output { get; set; } } /// The binding properties associated with an Azure Machine learning web service. @@ -150,7 +168,7 @@ internal partial interface IAzureMachineLearningServiceFunctionBindingProperties /// string Endpoint { get; set; } /// The inputs for the Azure Machine Learning web service endpoint. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[] Input { get; set; } + System.Collections.Generic.List Input { get; set; } /// /// The number of parallel requests that will be sent per partition of your job to the machine learning service. Default is /// 1. @@ -159,7 +177,7 @@ internal partial interface IAzureMachineLearningServiceFunctionBindingProperties /// /// A list of outputs from the Azure Machine Learning web service endpoint execution. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn[] Output { get; set; } + System.Collections.Generic.List Output { get; set; } } } \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingProperties.json.cs similarity index 85% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingProperties.json.cs index b3956e84ea5f..921164f0a5fd 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -66,23 +66,23 @@ internal AzureMachineLearningServiceFunctionBindingProperties(Microsoft.Azure.Po { return; } - {_endpoint = If( json?.PropertyT("endpoint"), out var __jsonEndpoint) ? (string)__jsonEndpoint : (string)Endpoint;} - {_apiKey = If( json?.PropertyT("apiKey"), out var __jsonApiKey) ? (string)__jsonApiKey : (string)ApiKey;} - {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? If( __jsonInputs as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceInputColumn.FromJson(__u) )) ))() : null : Input;} - {_output = If( json?.PropertyT("outputs"), out var __jsonOutputs) ? If( __jsonOutputs as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceOutputColumn.FromJson(__p) )) ))() : null : Output;} - {_batchSize = If( json?.PropertyT("batchSize"), out var __jsonBatchSize) ? (int?)__jsonBatchSize : BatchSize;} - {_numberOfParallelRequest = If( json?.PropertyT("numberOfParallelRequests"), out var __jsonNumberOfParallelRequests) ? (int?)__jsonNumberOfParallelRequests : NumberOfParallelRequest;} + {_endpoint = If( json?.PropertyT("endpoint"), out var __jsonEndpoint) ? (string)__jsonEndpoint : (string)_endpoint;} + {_apiKey = If( json?.PropertyT("apiKey"), out var __jsonApiKey) ? (string)__jsonApiKey : (string)_apiKey;} + {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? If( __jsonInputs as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumn) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceInputColumn.FromJson(__u) )) ))() : null : _input;} + {_output = If( json?.PropertyT("outputs"), out var __jsonOutputs) ? If( __jsonOutputs as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumn) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceOutputColumn.FromJson(__p) )) ))() : null : _output;} + {_batchSize = If( json?.PropertyT("batchSize"), out var __jsonBatchSize) ? (int?)__jsonBatchSize : _batchSize;} + {_numberOfParallelRequest = If( json?.PropertyT("numberOfParallelRequests"), out var __jsonNumberOfParallelRequests) ? (int?)__jsonNumberOfParallelRequests : _numberOfParallelRequest;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureMachineLearningServiceFunctionBindingProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingRetrievalProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingRetrievalProperties.PowerShell.cs new file mode 100644 index 000000000000..f1eb103b5b9d --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingRetrievalProperties.PowerShell.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// The binding retrieval properties associated with an Azure Machine learning web service. + /// + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionBindingRetrievalPropertiesTypeConverter))] + public partial class AzureMachineLearningServiceFunctionBindingRetrievalProperties + { + + /// + /// 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 AzureMachineLearningServiceFunctionBindingRetrievalProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).Endpoint, global::System.Convert.ToString); + } + if (content.Contains("UdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).UdfType = (string) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).UdfType, 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 AzureMachineLearningServiceFunctionBindingRetrievalProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).Endpoint, global::System.Convert.ToString); + } + if (content.Contains("UdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).UdfType = (string) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)this).UdfType, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMachineLearningServiceFunctionBindingRetrievalProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMachineLearningServiceFunctionBindingRetrievalProperties(content); + } + + /// + /// Creates a new instance of , deserializing + /// the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 binding retrieval properties associated with an Azure Machine learning web service. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionBindingRetrievalPropertiesTypeConverter))] + public partial interface IAzureMachineLearningServiceFunctionBindingRetrievalProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingRetrievalProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingRetrievalProperties.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingRetrievalProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingRetrievalProperties.TypeConverter.cs index d42ccffdbe43..ba6b0efebccb 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingRetrievalProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingRetrievalProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is /// no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingRetrievalProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingRetrievalProperties.cs similarity index 81% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingRetrievalProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingRetrievalProperties.cs index 96ad6f1887fe..8259c5cb6e04 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingRetrievalProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingRetrievalProperties.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401P /// The binding retrieval properties associated with an Azure Machine learning web service. /// public partial class AzureMachineLearningServiceFunctionBindingRetrievalProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal { /// Backing field for property. @@ -25,11 +25,11 @@ public partial class AzureMachineLearningServiceFunctionBindingRetrievalProperti public string Endpoint { get => this._endpoint; set => this._endpoint = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? _udfType; + private string _udfType; /// The function type. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? UdfType { get => this._udfType; set => this._udfType = value; } + public string UdfType { get => this._udfType; set => this._udfType = value; } /// /// Creates an new instance. @@ -49,6 +49,9 @@ public partial interface IAzureMachineLearningServiceFunctionBindingRetrievalPro [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Request-Response execute endpoint of the Azure Machine Learning web service.", SerializedName = @"endpoint", PossibleTypes = new [] { typeof(string) })] @@ -57,10 +60,14 @@ public partial interface IAzureMachineLearningServiceFunctionBindingRetrievalPro [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The function type.", SerializedName = @"udfType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? UdfType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string UdfType { get; set; } } /// The binding retrieval properties associated with an Azure Machine learning web service. @@ -72,7 +79,8 @@ internal partial interface IAzureMachineLearningServiceFunctionBindingRetrievalP /// string Endpoint { get; set; } /// The function type. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? UdfType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string UdfType { get; set; } } } \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingRetrievalProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingRetrievalProperties.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingRetrievalProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingRetrievalProperties.json.cs index a1907eababf8..c5ce61bd7bd5 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionBindingRetrievalProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionBindingRetrievalProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -68,19 +68,19 @@ internal AzureMachineLearningServiceFunctionBindingRetrievalProperties(Microsoft { return; } - {_endpoint = If( json?.PropertyT("endpoint"), out var __jsonEndpoint) ? (string)__jsonEndpoint : (string)Endpoint;} - {_udfType = If( json?.PropertyT("udfType"), out var __jsonUdfType) ? (string)__jsonUdfType : (string)UdfType;} + {_endpoint = If( json?.PropertyT("endpoint"), out var __jsonEndpoint) ? (string)__jsonEndpoint : (string)_endpoint;} + {_udfType = If( json?.PropertyT("udfType"), out var __jsonUdfType) ? (string)__jsonUdfType : (string)_udfType;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionBindingRetrievalProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureMachineLearningServiceFunctionBindingRetrievalProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs new file mode 100644 index 000000000000..9c62e29d1143 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// The parameters needed to retrieve the default function definition for an Azure Machine Learning web service function. + /// + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersTypeConverter))] + public partial class AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters + { + + /// + /// 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 AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("BindingRetrievalProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("BindingType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyUdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (string) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyEndpoint = (string) content.GetValueForProperty("BindingRetrievalPropertyEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyEndpoint, 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 AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("BindingRetrievalProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("BindingType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyUdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (string) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyEndpoint = (string) content.GetValueForProperty("BindingRetrievalPropertyEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyEndpoint, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters(content); + } + + /// + /// Creates a new instance of , deserializing + /// the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 parameters needed to retrieve the default function definition for an Azure Machine Learning web service function. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersTypeConverter))] + public partial interface IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs index 512951f20e24..eb972a4ec865 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if /// there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.cs new file mode 100644 index 000000000000..6def2cb0d74f --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// The parameters needed to retrieve the default function definition for an Azure Machine Learning web service function. + /// + public partial class AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionRetrieveDefaultDefinitionParameters(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalProperties _bindingRetrievalProperty; + + /// + /// The binding retrieval properties associated with an Azure Machine learning web service. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalProperties BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionBindingRetrievalProperties()); set => this._bindingRetrievalProperty = value; } + + /// + /// The Request-Response execute endpoint of the Azure Machine Learning web service. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string BindingRetrievalPropertyEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).Endpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).Endpoint = value ?? null; } + + /// The function type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string BindingRetrievalPropertyUdfType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType = value ?? null; } + + /// Indicates the function binding type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string BindingType { get => "Microsoft.MachineLearningServices"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)__functionRetrieveDefaultDefinitionParameters).BindingType = "Microsoft.MachineLearningServices"; } + + /// Internal Acessors for BindingRetrievalProperty + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal.BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionBindingRetrievalProperties()); set { {_bindingRetrievalProperty = value;} } } + + /// + /// Creates an new instance. + /// + public AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters() + { + this.__functionRetrieveDefaultDefinitionParameters.BindingType = "Microsoft.MachineLearningServices"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); + await eventListener.AssertObjectIsValid(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); + } + } + /// The parameters needed to retrieve the default function definition for an Azure Machine Learning web service function. + public partial interface IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters + { + /// + /// The Request-Response execute endpoint of the Azure Machine Learning web service. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Request-Response execute endpoint of the Azure Machine Learning web service.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + string BindingRetrievalPropertyEndpoint { get; set; } + /// The function type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The function type.", + SerializedName = @"udfType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string BindingRetrievalPropertyUdfType { get; set; } + + } + /// The parameters needed to retrieve the default function definition for an Azure Machine Learning web service function. + internal partial interface IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParametersInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal + { + /// + /// The binding retrieval properties associated with an Azure Machine learning web service. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionBindingRetrievalProperties BindingRetrievalProperty { get; set; } + /// + /// The Request-Response execute endpoint of the Azure Machine Learning web service. + /// + string BindingRetrievalPropertyEndpoint { get; set; } + /// The function type. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string BindingRetrievalPropertyUdfType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.json.cs similarity index 91% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.json.cs index 27931b0c9b4d..d5c02fd8cc79 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -68,19 +68,19 @@ internal AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters( { return; } - __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionRetrieveDefaultDefinitionParameters(json); - {_bindingRetrievalProperty = If( json?.PropertyT("bindingRetrievalProperties"), out var __jsonBindingRetrievalProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceFunctionBindingRetrievalProperties.FromJson(__jsonBindingRetrievalProperties) : BindingRetrievalProperty;} + __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionRetrieveDefaultDefinitionParameters(json); + {_bindingRetrievalProperty = If( json?.PropertyT("bindingRetrievalProperties"), out var __jsonBindingRetrievalProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceFunctionBindingRetrievalProperties.FromJson(__jsonBindingRetrievalProperties) : _bindingRetrievalProperty;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureMachineLearningServiceFunctionRetrieveDefaultDefinitionParameters(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputColumn.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputColumn.PowerShell.cs new file mode 100644 index 000000000000..b467019d5252 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputColumn.PowerShell.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes an input column for the Azure Machine Learning web service endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceInputColumnTypeConverter))] + public partial class AzureMachineLearningServiceInputColumn + { + + /// + /// 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 AzureMachineLearningServiceInputColumn(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumnInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DataType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumnInternal)this).DataType, global::System.Convert.ToString); + } + if (content.Contains("MapTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumnInternal)this).MapTo = (int?) content.GetValueForProperty("MapTo",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumnInternal)this).MapTo, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureMachineLearningServiceInputColumn(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumnInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DataType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumnInternal)this).DataType, global::System.Convert.ToString); + } + if (content.Contains("MapTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumnInternal)this).MapTo = (int?) content.GetValueForProperty("MapTo",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumnInternal)this).MapTo, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumn DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMachineLearningServiceInputColumn(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumn DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMachineLearningServiceInputColumn(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumn FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes an input column for the Azure Machine Learning web service endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceInputColumnTypeConverter))] + public partial interface IAzureMachineLearningServiceInputColumn + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputColumn.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputColumn.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputColumn.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputColumn.TypeConverter.cs index 7ce126a275f8..8481c241596f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputColumn.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputColumn.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumn ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumn).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputColumn.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputColumn.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputColumn.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputColumn.cs index fc3888217794..457712bb5c56 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputColumn.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputColumn.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes an input column for the Azure Machine Learning web service endpoint. public partial class AzureMachineLearningServiceInputColumn : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumnInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumn, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumnInternal { /// Backing field for property. @@ -48,6 +48,9 @@ public partial interface IAzureMachineLearningServiceInputColumn : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The (Azure Machine Learning supported) data type of the input column.", SerializedName = @"dataType", PossibleTypes = new [] { typeof(string) })] @@ -56,6 +59,9 @@ public partial interface IAzureMachineLearningServiceInputColumn : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The zero based index of the function parameter this input maps to.", SerializedName = @"mapTo", PossibleTypes = new [] { typeof(int) })] @@ -64,6 +70,9 @@ public partial interface IAzureMachineLearningServiceInputColumn : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the input column.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputColumn.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputColumn.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputColumn.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputColumn.json.cs index 98425b2d8389..5aea3804b8ac 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputColumn.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputColumn.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,20 +65,20 @@ internal AzureMachineLearningServiceInputColumn(Microsoft.Azure.PowerShell.Cmdle { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_dataType = If( json?.PropertyT("dataType"), out var __jsonDataType) ? (string)__jsonDataType : (string)DataType;} - {_mapTo = If( json?.PropertyT("mapTo"), out var __jsonMapTo) ? (int?)__jsonMapTo : MapTo;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_dataType = If( json?.PropertyT("dataType"), out var __jsonDataType) ? (string)__jsonDataType : (string)_dataType;} + {_mapTo = If( json?.PropertyT("mapTo"), out var __jsonMapTo) ? (int?)__jsonMapTo : _mapTo;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumn. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumn. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumn FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureMachineLearningServiceInputColumn(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputs.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputs.PowerShell.cs new file mode 100644 index 000000000000..55d161733e95 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputs.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The inputs for the Azure Machine Learning web service endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceInputsTypeConverter))] + public partial class AzureMachineLearningServiceInputs + { + + /// + /// 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 AzureMachineLearningServiceInputs(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputsInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ColumnName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputsInternal)this).ColumnName = (System.Collections.Generic.List) content.GetValueForProperty("ColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputsInternal)this).ColumnName, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceInputColumnTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureMachineLearningServiceInputs(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputsInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ColumnName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputsInternal)this).ColumnName = (System.Collections.Generic.List) content.GetValueForProperty("ColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputsInternal)this).ColumnName, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceInputColumnTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputs DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMachineLearningServiceInputs(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputs DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMachineLearningServiceInputs(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputs FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 inputs for the Azure Machine Learning web service endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceInputsTypeConverter))] + public partial interface IAzureMachineLearningServiceInputs + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputs.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputs.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputs.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputs.TypeConverter.cs index 523723e7e6de..1d1515c32574 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputs.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputs.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputs ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputs ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputs).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputs).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputs.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputs.cs similarity index 76% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputs.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputs.cs index 17b207c75486..0b736e7f04e1 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputs.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputs.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The inputs for the Azure Machine Learning web service endpoint. public partial class AzureMachineLearningServiceInputs : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputs, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputsInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputs, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputsInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[] _columnName; + private System.Collections.Generic.List _columnName; /// A list of input columns for the Azure Machine Learning web service endpoint. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[] ColumnName { get => this._columnName; set => this._columnName = value; } + public System.Collections.Generic.List ColumnName { get => this._columnName; set => this._columnName = value; } /// Backing field for property. private string _name; @@ -41,14 +41,20 @@ public partial interface IAzureMachineLearningServiceInputs : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A list of input columns for the Azure Machine Learning web service endpoint.", SerializedName = @"columnNames", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[] ColumnName { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumn) })] + System.Collections.Generic.List ColumnName { get; set; } /// The name of the input. This is the name provided while authoring the endpoint. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the input. This is the name provided while authoring the endpoint.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -60,7 +66,7 @@ internal partial interface IAzureMachineLearningServiceInputsInternal { /// A list of input columns for the Azure Machine Learning web service endpoint. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn[] ColumnName { get; set; } + System.Collections.Generic.List ColumnName { get; set; } /// The name of the input. This is the name provided while authoring the endpoint. string Name { get; set; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputs.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputs.json.cs similarity index 89% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputs.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputs.json.cs index 79e4945e8161..22ec0c3c318f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceInputs.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceInputs.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AzureMachineLearningServiceInputs(Microsoft.Azure.PowerShell.Cmdlets.St { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_columnName = If( json?.PropertyT("columnNames"), out var __jsonColumnNames) ? If( __jsonColumnNames as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputColumn) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningServiceInputColumn.FromJson(__u) )) ))() : null : ColumnName;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_columnName = If( json?.PropertyT("columnNames"), out var __jsonColumnNames) ? If( __jsonColumnNames as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputColumn) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningServiceInputColumn.FromJson(__u) )) ))() : null : _columnName;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputs. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputs. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputs. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputs. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceInputs FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceInputs FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureMachineLearningServiceInputs(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceOutputColumn.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceOutputColumn.PowerShell.cs new file mode 100644 index 000000000000..2d20aa4488d0 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceOutputColumn.PowerShell.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes an output column for the Azure Machine Learning web service endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceOutputColumnTypeConverter))] + public partial class AzureMachineLearningServiceOutputColumn + { + + /// + /// 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 AzureMachineLearningServiceOutputColumn(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumnInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DataType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumnInternal)this).DataType, global::System.Convert.ToString); + } + if (content.Contains("MapTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumnInternal)this).MapTo = (int?) content.GetValueForProperty("MapTo",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumnInternal)this).MapTo, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureMachineLearningServiceOutputColumn(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumnInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DataType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumnInternal)this).DataType, global::System.Convert.ToString); + } + if (content.Contains("MapTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumnInternal)this).MapTo = (int?) content.GetValueForProperty("MapTo",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumnInternal)this).MapTo, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumn DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMachineLearningServiceOutputColumn(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumn DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMachineLearningServiceOutputColumn(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumn FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes an output column for the Azure Machine Learning web service endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningServiceOutputColumnTypeConverter))] + public partial interface IAzureMachineLearningServiceOutputColumn + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceOutputColumn.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceOutputColumn.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceOutputColumn.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceOutputColumn.TypeConverter.cs index dc2cfa48330e..8a332bff0876 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceOutputColumn.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceOutputColumn.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumn ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumn).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceOutputColumn.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceOutputColumn.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceOutputColumn.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceOutputColumn.cs index d07f038dbc09..31623fbb7aa7 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceOutputColumn.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceOutputColumn.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes an output column for the Azure Machine Learning web service endpoint. public partial class AzureMachineLearningServiceOutputColumn : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumnInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumn, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumnInternal { /// Backing field for property. @@ -48,6 +48,9 @@ public partial interface IAzureMachineLearningServiceOutputColumn : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The (Azure Machine Learning supported) data type of the output column.", SerializedName = @"dataType", PossibleTypes = new [] { typeof(string) })] @@ -56,6 +59,9 @@ public partial interface IAzureMachineLearningServiceOutputColumn : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The zero based index of the function parameter this input maps to.", SerializedName = @"mapTo", PossibleTypes = new [] { typeof(int) })] @@ -64,6 +70,9 @@ public partial interface IAzureMachineLearningServiceOutputColumn : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the output column.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceOutputColumn.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceOutputColumn.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceOutputColumn.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceOutputColumn.json.cs index ef71a197c544..670cb465f3fa 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningServiceOutputColumn.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningServiceOutputColumn.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,20 +65,20 @@ internal AzureMachineLearningServiceOutputColumn(Microsoft.Azure.PowerShell.Cmdl { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_dataType = If( json?.PropertyT("dataType"), out var __jsonDataType) ? (string)__jsonDataType : (string)DataType;} - {_mapTo = If( json?.PropertyT("mapTo"), out var __jsonMapTo) ? (int?)__jsonMapTo : MapTo;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_dataType = If( json?.PropertyT("dataType"), out var __jsonDataType) ? (string)__jsonDataType : (string)_dataType;} + {_mapTo = If( json?.PropertyT("mapTo"), out var __jsonMapTo) ? (int?)__jsonMapTo : _mapTo;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumn. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumn. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningServiceOutputColumn FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningServiceOutputColumn FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureMachineLearningServiceOutputColumn(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBinding.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBinding.PowerShell.cs new file mode 100644 index 000000000000..52bc4c582df3 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBinding.PowerShell.cs @@ -0,0 +1,233 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The binding to an Azure Machine Learning Studio. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionBindingTypeConverter))] + public partial class AzureMachineLearningStudioFunctionBinding + { + + /// + /// 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 AzureMachineLearningStudioFunctionBinding(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionBindingPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputsTypeConverter.ConvertFrom); + } + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Endpoint, global::System.Convert.ToString); + } + if (content.Contains("ApiKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).ApiKey, global::System.Convert.ToString); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Output = (System.Collections.Generic.List) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Output, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioOutputColumnTypeConverter.ConvertFrom)); + } + if (content.Contains("BatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("InputName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).InputName = (string) content.GetValueForProperty("InputName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).InputName, global::System.Convert.ToString); + } + if (content.Contains("InputColumnName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).InputColumnName = (System.Collections.Generic.List) content.GetValueForProperty("InputColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).InputColumnName, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputColumnTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureMachineLearningStudioFunctionBinding(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionBindingPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputsTypeConverter.ConvertFrom); + } + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Endpoint, global::System.Convert.ToString); + } + if (content.Contains("ApiKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).ApiKey, global::System.Convert.ToString); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Output = (System.Collections.Generic.List) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).Output, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioOutputColumnTypeConverter.ConvertFrom)); + } + if (content.Contains("BatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("InputName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).InputName = (string) content.GetValueForProperty("InputName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).InputName, global::System.Convert.ToString); + } + if (content.Contains("InputColumnName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).InputColumnName = (System.Collections.Generic.List) content.GetValueForProperty("InputColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal)this).InputColumnName, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputColumnTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBinding DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMachineLearningStudioFunctionBinding(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBinding DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMachineLearningStudioFunctionBinding(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBinding FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 binding to an Azure Machine Learning Studio. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionBindingTypeConverter))] + public partial interface IAzureMachineLearningStudioFunctionBinding + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBinding.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBinding.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBinding.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBinding.TypeConverter.cs index baaf1298a3be..c34e4387f004 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBinding.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBinding.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBinding ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBinding ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBinding).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBinding).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBinding.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBinding.cs new file mode 100644 index 000000000000..2f28ca729f06 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBinding.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The binding to an Azure Machine Learning Studio. + public partial class AzureMachineLearningStudioFunctionBinding : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBinding, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionBinding(); + + /// The API key used to authenticate with Request-Response endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ApiKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).ApiKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).ApiKey = value ?? null; } + + /// + /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public int? BatchSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).BatchSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).BatchSize = value ?? default(int); } + + /// + /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Endpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).Endpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).Endpoint = value ?? null; } + + /// A list of input columns for the Azure Machine Learning Studio endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List InputColumnName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).InputColumnName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).InputColumnName = value ?? null /* arrayOf */; } + + /// The name of the input. This is the name provided while authoring the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string InputName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).InputName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).InputName = value ?? null; } + + /// Internal Acessors for Input + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal.Input { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).Input; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).Input = value ?? null /* model class */; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionBindingProperties()); set { {_property = value;} } } + + /// A list of outputs from the Azure Machine Learning Studio endpoint execution. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Output { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).Output; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)Property).Output = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingProperties _property; + + /// The binding properties associated with an Azure Machine learning Studio. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionBindingProperties()); set => this._property = value; } + + /// Indicates the function binding type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Microsoft.MachineLearning/WebService"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)__functionBinding).Type = "Microsoft.MachineLearning/WebService"; } + + /// + /// Creates an new instance. + /// + public AzureMachineLearningStudioFunctionBinding() + { + this.__functionBinding.Type = "Microsoft.MachineLearning/WebService"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__functionBinding), __functionBinding); + await eventListener.AssertObjectIsValid(nameof(__functionBinding), __functionBinding); + } + } + /// The binding to an Azure Machine Learning Studio. + public partial interface IAzureMachineLearningStudioFunctionBinding : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding + { + /// The API key used to authenticate with Request-Response endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The API key used to authenticate with Request-Response endpoint.", + SerializedName = @"apiKey", + PossibleTypes = new [] { typeof(string) })] + string ApiKey { get; set; } + /// + /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000.", + SerializedName = @"batchSize", + PossibleTypes = new [] { typeof(int) })] + int? BatchSize { get; set; } + /// + /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + string Endpoint { get; set; } + /// A list of input columns for the Azure Machine Learning Studio endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of input columns for the Azure Machine Learning Studio endpoint.", + SerializedName = @"columnNames", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumn) })] + System.Collections.Generic.List InputColumnName { get; set; } + /// The name of the input. This is the name provided while authoring the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the input. This is the name provided while authoring the endpoint.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string InputName { get; set; } + /// A list of outputs from the Azure Machine Learning Studio endpoint execution. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of outputs from the Azure Machine Learning Studio endpoint execution.", + SerializedName = @"outputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumn) })] + System.Collections.Generic.List Output { get; set; } + + } + /// The binding to an Azure Machine Learning Studio. + internal partial interface IAzureMachineLearningStudioFunctionBindingInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal + { + /// The API key used to authenticate with Request-Response endpoint. + string ApiKey { get; set; } + /// + /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. + /// + int? BatchSize { get; set; } + /// + /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs + /// + string Endpoint { get; set; } + /// The inputs for the Azure Machine Learning Studio endpoint. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs Input { get; set; } + /// A list of input columns for the Azure Machine Learning Studio endpoint. + System.Collections.Generic.List InputColumnName { get; set; } + /// The name of the input. This is the name provided while authoring the endpoint. + string InputName { get; set; } + /// A list of outputs from the Azure Machine Learning Studio endpoint execution. + System.Collections.Generic.List Output { get; set; } + /// The binding properties associated with an Azure Machine learning Studio. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBinding.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBinding.json.cs similarity index 92% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBinding.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBinding.json.cs index 3a59bb9245a2..ce50a9e95aa2 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBinding.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBinding.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AzureMachineLearningStudioFunctionBinding(Microsoft.Azure.PowerShell.Cm { return; } - __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionBinding(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionBindingProperties.FromJson(__jsonProperties) : Property;} + __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionBinding(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionBindingProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBinding. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBinding. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBinding. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBinding. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBinding FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBinding FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureMachineLearningStudioFunctionBinding(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingProperties.PowerShell.cs new file mode 100644 index 000000000000..7118ad6fba81 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingProperties.PowerShell.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The binding properties associated with an Azure Machine learning Studio. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionBindingPropertiesTypeConverter))] + public partial class AzureMachineLearningStudioFunctionBindingProperties + { + + /// + /// 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 AzureMachineLearningStudioFunctionBindingProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputsTypeConverter.ConvertFrom); + } + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Endpoint, global::System.Convert.ToString); + } + if (content.Contains("ApiKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).ApiKey, global::System.Convert.ToString); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Output = (System.Collections.Generic.List) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Output, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioOutputColumnTypeConverter.ConvertFrom)); + } + if (content.Contains("BatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("InputName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputName = (string) content.GetValueForProperty("InputName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputName, global::System.Convert.ToString); + } + if (content.Contains("InputColumnName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputColumnName = (System.Collections.Generic.List) content.GetValueForProperty("InputColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputColumnName, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputColumnTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureMachineLearningStudioFunctionBindingProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Input = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Input, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputsTypeConverter.ConvertFrom); + } + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Endpoint, global::System.Convert.ToString); + } + if (content.Contains("ApiKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).ApiKey = (string) content.GetValueForProperty("ApiKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).ApiKey, global::System.Convert.ToString); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Output = (System.Collections.Generic.List) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).Output, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioOutputColumnTypeConverter.ConvertFrom)); + } + if (content.Contains("BatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("InputName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputName = (string) content.GetValueForProperty("InputName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputName, global::System.Convert.ToString); + } + if (content.Contains("InputColumnName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputColumnName = (System.Collections.Generic.List) content.GetValueForProperty("InputColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal)this).InputColumnName, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputColumnTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMachineLearningStudioFunctionBindingProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMachineLearningStudioFunctionBindingProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 binding properties associated with an Azure Machine learning Studio. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionBindingPropertiesTypeConverter))] + public partial interface IAzureMachineLearningStudioFunctionBindingProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingProperties.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingProperties.TypeConverter.cs index 472a098d6f63..2e5273051197 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingProperties.cs new file mode 100644 index 000000000000..be640b48e8fe --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingProperties.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The binding properties associated with an Azure Machine learning Studio. + public partial class AzureMachineLearningStudioFunctionBindingProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal + { + + /// Backing field for property. + private string _apiKey; + + /// The API key used to authenticate with Request-Response endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string ApiKey { get => this._apiKey; set => this._apiKey = value; } + + /// Backing field for property. + private int? _batchSize; + + /// + /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public int? BatchSize { get => this._batchSize; set => this._batchSize = value; } + + /// Backing field for property. + private string _endpoint; + + /// + /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs _input; + + /// The inputs for the Azure Machine Learning Studio endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs Input { get => (this._input = this._input ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputs()); set => this._input = value; } + + /// A list of input columns for the Azure Machine Learning Studio endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List InputColumnName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputsInternal)Input).ColumnName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputsInternal)Input).ColumnName = value ?? null /* arrayOf */; } + + /// The name of the input. This is the name provided while authoring the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string InputName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputsInternal)Input).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputsInternal)Input).Name = value ?? null; } + + /// Internal Acessors for Input + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingPropertiesInternal.Input { get => (this._input = this._input ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputs()); set { {_input = value;} } } + + /// Backing field for property. + private System.Collections.Generic.List _output; + + /// A list of outputs from the Azure Machine Learning Studio endpoint execution. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List Output { get => this._output; set => this._output = value; } + + /// + /// Creates an new instance. + /// + public AzureMachineLearningStudioFunctionBindingProperties() + { + + } + } + /// The binding properties associated with an Azure Machine learning Studio. + public partial interface IAzureMachineLearningStudioFunctionBindingProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// The API key used to authenticate with Request-Response endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The API key used to authenticate with Request-Response endpoint.", + SerializedName = @"apiKey", + PossibleTypes = new [] { typeof(string) })] + string ApiKey { get; set; } + /// + /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000.", + SerializedName = @"batchSize", + PossibleTypes = new [] { typeof(int) })] + int? BatchSize { get; set; } + /// + /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + string Endpoint { get; set; } + /// A list of input columns for the Azure Machine Learning Studio endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of input columns for the Azure Machine Learning Studio endpoint.", + SerializedName = @"columnNames", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumn) })] + System.Collections.Generic.List InputColumnName { get; set; } + /// The name of the input. This is the name provided while authoring the endpoint. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the input. This is the name provided while authoring the endpoint.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string InputName { get; set; } + /// A list of outputs from the Azure Machine Learning Studio endpoint execution. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of outputs from the Azure Machine Learning Studio endpoint execution.", + SerializedName = @"outputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumn) })] + System.Collections.Generic.List Output { get; set; } + + } + /// The binding properties associated with an Azure Machine learning Studio. + internal partial interface IAzureMachineLearningStudioFunctionBindingPropertiesInternal + + { + /// The API key used to authenticate with Request-Response endpoint. + string ApiKey { get; set; } + /// + /// Number between 1 and 10000 describing maximum number of rows for every Azure ML RRS execute request. Default is 1000. + /// + int? BatchSize { get; set; } + /// + /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs + /// + string Endpoint { get; set; } + /// The inputs for the Azure Machine Learning Studio endpoint. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs Input { get; set; } + /// A list of input columns for the Azure Machine Learning Studio endpoint. + System.Collections.Generic.List InputColumnName { get; set; } + /// The name of the input. This is the name provided while authoring the endpoint. + string InputName { get; set; } + /// A list of outputs from the Azure Machine Learning Studio endpoint execution. + System.Collections.Generic.List Output { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingProperties.json.cs similarity index 88% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingProperties.json.cs index 27a94f7f23bf..c0a5e4712bf7 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -66,22 +66,22 @@ internal AzureMachineLearningStudioFunctionBindingProperties(Microsoft.Azure.Pow { return; } - {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputs.FromJson(__jsonInputs) : Input;} - {_endpoint = If( json?.PropertyT("endpoint"), out var __jsonEndpoint) ? (string)__jsonEndpoint : (string)Endpoint;} - {_apiKey = If( json?.PropertyT("apiKey"), out var __jsonApiKey) ? (string)__jsonApiKey : (string)ApiKey;} - {_output = If( json?.PropertyT("outputs"), out var __jsonOutputs) ? If( __jsonOutputs as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioOutputColumn.FromJson(__u) )) ))() : null : Output;} - {_batchSize = If( json?.PropertyT("batchSize"), out var __jsonBatchSize) ? (int?)__jsonBatchSize : BatchSize;} + {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputs.FromJson(__jsonInputs) : _input;} + {_endpoint = If( json?.PropertyT("endpoint"), out var __jsonEndpoint) ? (string)__jsonEndpoint : (string)_endpoint;} + {_apiKey = If( json?.PropertyT("apiKey"), out var __jsonApiKey) ? (string)__jsonApiKey : (string)_apiKey;} + {_output = If( json?.PropertyT("outputs"), out var __jsonOutputs) ? If( __jsonOutputs as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumn) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioOutputColumn.FromJson(__u) )) ))() : null : _output;} + {_batchSize = If( json?.PropertyT("batchSize"), out var __jsonBatchSize) ? (int?)__jsonBatchSize : _batchSize;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureMachineLearningStudioFunctionBindingProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingRetrievalProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingRetrievalProperties.PowerShell.cs new file mode 100644 index 000000000000..401f3e180ae2 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingRetrievalProperties.PowerShell.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// The binding retrieval properties associated with an Azure Machine learning Studio. + /// + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionBindingRetrievalPropertiesTypeConverter))] + public partial class AzureMachineLearningStudioFunctionBindingRetrievalProperties + { + + /// + /// 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 AzureMachineLearningStudioFunctionBindingRetrievalProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ExecuteEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).ExecuteEndpoint = (string) content.GetValueForProperty("ExecuteEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).ExecuteEndpoint, global::System.Convert.ToString); + } + if (content.Contains("UdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).UdfType = (string) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).UdfType, 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 AzureMachineLearningStudioFunctionBindingRetrievalProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ExecuteEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).ExecuteEndpoint = (string) content.GetValueForProperty("ExecuteEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).ExecuteEndpoint, global::System.Convert.ToString); + } + if (content.Contains("UdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).UdfType = (string) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)this).UdfType, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMachineLearningStudioFunctionBindingRetrievalProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMachineLearningStudioFunctionBindingRetrievalProperties(content); + } + + /// + /// Creates a new instance of , deserializing the + /// content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 binding retrieval properties associated with an Azure Machine learning Studio. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionBindingRetrievalPropertiesTypeConverter))] + public partial interface IAzureMachineLearningStudioFunctionBindingRetrievalProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingRetrievalProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingRetrievalProperties.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingRetrievalProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingRetrievalProperties.TypeConverter.cs index 8f1bc68f4d88..01f213d7f41b 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingRetrievalProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingRetrievalProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is /// no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingRetrievalProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingRetrievalProperties.cs similarity index 83% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingRetrievalProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingRetrievalProperties.cs index 6573c51b7a4d..6ef7de2e3917 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingRetrievalProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingRetrievalProperties.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401P /// The binding retrieval properties associated with an Azure Machine learning Studio. /// public partial class AzureMachineLearningStudioFunctionBindingRetrievalProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal { /// Backing field for property. @@ -25,11 +25,11 @@ public partial class AzureMachineLearningStudioFunctionBindingRetrievalPropertie public string ExecuteEndpoint { get => this._executeEndpoint; set => this._executeEndpoint = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? _udfType; + private string _udfType; /// The function type. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? UdfType { get => this._udfType; set => this._udfType = value; } + public string UdfType { get => this._udfType; set => this._udfType = value; } /// /// Creates an new instance. @@ -49,6 +49,9 @@ public partial interface IAzureMachineLearningStudioFunctionBindingRetrievalProp [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs", SerializedName = @"executeEndpoint", PossibleTypes = new [] { typeof(string) })] @@ -57,10 +60,14 @@ public partial interface IAzureMachineLearningStudioFunctionBindingRetrievalProp [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The function type.", SerializedName = @"udfType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? UdfType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string UdfType { get; set; } } /// The binding retrieval properties associated with an Azure Machine learning Studio. @@ -72,7 +79,8 @@ internal partial interface IAzureMachineLearningStudioFunctionBindingRetrievalPr /// string ExecuteEndpoint { get; set; } /// The function type. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? UdfType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string UdfType { get; set; } } } \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingRetrievalProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingRetrievalProperties.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingRetrievalProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingRetrievalProperties.json.cs index dba42fe0c5a7..5ab046e432a5 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionBindingRetrievalProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionBindingRetrievalProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -68,19 +68,19 @@ internal AzureMachineLearningStudioFunctionBindingRetrievalProperties(Microsoft. { return; } - {_executeEndpoint = If( json?.PropertyT("executeEndpoint"), out var __jsonExecuteEndpoint) ? (string)__jsonExecuteEndpoint : (string)ExecuteEndpoint;} - {_udfType = If( json?.PropertyT("udfType"), out var __jsonUdfType) ? (string)__jsonUdfType : (string)UdfType;} + {_executeEndpoint = If( json?.PropertyT("executeEndpoint"), out var __jsonExecuteEndpoint) ? (string)__jsonExecuteEndpoint : (string)_executeEndpoint;} + {_udfType = If( json?.PropertyT("udfType"), out var __jsonUdfType) ? (string)__jsonUdfType : (string)_udfType;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionBindingRetrievalProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureMachineLearningStudioFunctionBindingRetrievalProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs new file mode 100644 index 000000000000..5ed7b5ae1890 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// The parameters needed to retrieve the default function definition for an Azure Machine Learning Studio function. + /// + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersTypeConverter))] + public partial class AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters + { + + /// + /// 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 AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("BindingRetrievalProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("BindingType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyUdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (string) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyExecuteEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyExecuteEndpoint = (string) content.GetValueForProperty("BindingRetrievalPropertyExecuteEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyExecuteEndpoint, 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 AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("BindingRetrievalProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("BindingType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyUdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (string) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyExecuteEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyExecuteEndpoint = (string) content.GetValueForProperty("BindingRetrievalPropertyExecuteEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyExecuteEndpoint, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters(content); + } + + /// + /// Creates a new instance of , deserializing + /// the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 parameters needed to retrieve the default function definition for an Azure Machine Learning Studio function. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersTypeConverter))] + public partial interface IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs index d42dada72793..c8e8ee251187 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if /// there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.cs new file mode 100644 index 000000000000..091c1c0e5395 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// The parameters needed to retrieve the default function definition for an Azure Machine Learning Studio function. + /// + public partial class AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionRetrieveDefaultDefinitionParameters(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalProperties _bindingRetrievalProperty; + + /// + /// The binding retrieval properties associated with an Azure Machine learning Studio. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalProperties BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionBindingRetrievalProperties()); set => this._bindingRetrievalProperty = value; } + + /// + /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string BindingRetrievalPropertyExecuteEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).ExecuteEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).ExecuteEndpoint = value ?? null; } + + /// The function type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string BindingRetrievalPropertyUdfType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType = value ?? null; } + + /// Indicates the function binding type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string BindingType { get => "Microsoft.MachineLearning/WebService"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)__functionRetrieveDefaultDefinitionParameters).BindingType = "Microsoft.MachineLearning/WebService"; } + + /// Internal Acessors for BindingRetrievalProperty + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal.BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionBindingRetrievalProperties()); set { {_bindingRetrievalProperty = value;} } } + + /// + /// Creates an new instance. + /// + public AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters() + { + this.__functionRetrieveDefaultDefinitionParameters.BindingType = "Microsoft.MachineLearning/WebService"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); + await eventListener.AssertObjectIsValid(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); + } + } + /// The parameters needed to retrieve the default function definition for an Azure Machine Learning Studio function. + public partial interface IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters + { + /// + /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs", + SerializedName = @"executeEndpoint", + PossibleTypes = new [] { typeof(string) })] + string BindingRetrievalPropertyExecuteEndpoint { get; set; } + /// The function type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The function type.", + SerializedName = @"udfType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string BindingRetrievalPropertyUdfType { get; set; } + + } + /// The parameters needed to retrieve the default function definition for an Azure Machine Learning Studio function. + internal partial interface IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParametersInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal + { + /// + /// The binding retrieval properties associated with an Azure Machine learning Studio. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionBindingRetrievalProperties BindingRetrievalProperty { get; set; } + /// + /// The Request-Response execute endpoint of the Azure Machine Learning Studio. Find out more here: https://docs.microsoft.com/en-us/azure/machine-learning/machine-learning-consume-web-services#request-response-service-rrs + /// + string BindingRetrievalPropertyExecuteEndpoint { get; set; } + /// The function type. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string BindingRetrievalPropertyUdfType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.json.cs similarity index 91% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.json.cs index 3f0dd9ed0a5c..4605809822c9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -68,19 +68,19 @@ internal AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters(M { return; } - __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionRetrieveDefaultDefinitionParameters(json); - {_bindingRetrievalProperty = If( json?.PropertyT("bindingRetrievalProperties"), out var __jsonBindingRetrievalProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioFunctionBindingRetrievalProperties.FromJson(__jsonBindingRetrievalProperties) : BindingRetrievalProperty;} + __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionRetrieveDefaultDefinitionParameters(json); + {_bindingRetrievalProperty = If( json?.PropertyT("bindingRetrievalProperties"), out var __jsonBindingRetrievalProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioFunctionBindingRetrievalProperties.FromJson(__jsonBindingRetrievalProperties) : _bindingRetrievalProperty;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureMachineLearningStudioFunctionRetrieveDefaultDefinitionParameters(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputColumn.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputColumn.PowerShell.cs new file mode 100644 index 000000000000..0564abb2a92b --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputColumn.PowerShell.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes an input column for the Azure Machine Learning Studio endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioInputColumnTypeConverter))] + public partial class AzureMachineLearningStudioInputColumn + { + + /// + /// 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 AzureMachineLearningStudioInputColumn(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumnInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DataType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumnInternal)this).DataType, global::System.Convert.ToString); + } + if (content.Contains("MapTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumnInternal)this).MapTo = (int?) content.GetValueForProperty("MapTo",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumnInternal)this).MapTo, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureMachineLearningStudioInputColumn(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumnInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DataType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumnInternal)this).DataType, global::System.Convert.ToString); + } + if (content.Contains("MapTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumnInternal)this).MapTo = (int?) content.GetValueForProperty("MapTo",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumnInternal)this).MapTo, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumn DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMachineLearningStudioInputColumn(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumn DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMachineLearningStudioInputColumn(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumn FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes an input column for the Azure Machine Learning Studio endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioInputColumnTypeConverter))] + public partial interface IAzureMachineLearningStudioInputColumn + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputColumn.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputColumn.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputColumn.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputColumn.TypeConverter.cs index 720387c8252a..f7fad8b14c9a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputColumn.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputColumn.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumn ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumn).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputColumn.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputColumn.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputColumn.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputColumn.cs index 2cffec449e27..aed72876d1a2 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputColumn.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputColumn.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes an input column for the Azure Machine Learning Studio endpoint. public partial class AzureMachineLearningStudioInputColumn : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumnInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumn, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumnInternal { /// Backing field for property. @@ -54,6 +54,9 @@ public partial interface IAzureMachineLearningStudioInputColumn : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The (Azure Machine Learning supported) data type of the input column. A list of valid Azure Machine Learning data types are described at https://msdn.microsoft.com/en-us/library/azure/dn905923.aspx .", SerializedName = @"dataType", PossibleTypes = new [] { typeof(string) })] @@ -62,6 +65,9 @@ public partial interface IAzureMachineLearningStudioInputColumn : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The zero based index of the function parameter this input maps to.", SerializedName = @"mapTo", PossibleTypes = new [] { typeof(int) })] @@ -70,6 +76,9 @@ public partial interface IAzureMachineLearningStudioInputColumn : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the input column.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputColumn.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputColumn.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputColumn.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputColumn.json.cs index f44aa6f6fc54..f49d9d9a7a8e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputColumn.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputColumn.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,20 +65,20 @@ internal AzureMachineLearningStudioInputColumn(Microsoft.Azure.PowerShell.Cmdlet { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_dataType = If( json?.PropertyT("dataType"), out var __jsonDataType) ? (string)__jsonDataType : (string)DataType;} - {_mapTo = If( json?.PropertyT("mapTo"), out var __jsonMapTo) ? (int?)__jsonMapTo : MapTo;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_dataType = If( json?.PropertyT("dataType"), out var __jsonDataType) ? (string)__jsonDataType : (string)_dataType;} + {_mapTo = If( json?.PropertyT("mapTo"), out var __jsonMapTo) ? (int?)__jsonMapTo : _mapTo;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumn. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumn. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumn FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureMachineLearningStudioInputColumn(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputs.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputs.PowerShell.cs new file mode 100644 index 000000000000..e183fd3dd282 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputs.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The inputs for the Azure Machine Learning Studio endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioInputsTypeConverter))] + public partial class AzureMachineLearningStudioInputs + { + + /// + /// 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 AzureMachineLearningStudioInputs(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputsInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ColumnName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputsInternal)this).ColumnName = (System.Collections.Generic.List) content.GetValueForProperty("ColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputsInternal)this).ColumnName, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputColumnTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureMachineLearningStudioInputs(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputsInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ColumnName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputsInternal)this).ColumnName = (System.Collections.Generic.List) content.GetValueForProperty("ColumnName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputsInternal)this).ColumnName, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputColumnTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMachineLearningStudioInputs(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMachineLearningStudioInputs(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 inputs for the Azure Machine Learning Studio endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioInputsTypeConverter))] + public partial interface IAzureMachineLearningStudioInputs + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputs.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputs.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputs.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputs.TypeConverter.cs index 74f4bfff27d9..1c973651c5dc 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputs.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputs.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputs.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputs.cs similarity index 76% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputs.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputs.cs index b2a6f1a1685d..27b43c342186 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputs.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputs.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The inputs for the Azure Machine Learning Studio endpoint. public partial class AzureMachineLearningStudioInputs : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputsInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputsInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[] _columnName; + private System.Collections.Generic.List _columnName; /// A list of input columns for the Azure Machine Learning Studio endpoint. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[] ColumnName { get => this._columnName; set => this._columnName = value; } + public System.Collections.Generic.List ColumnName { get => this._columnName; set => this._columnName = value; } /// Backing field for property. private string _name; @@ -41,14 +41,20 @@ public partial interface IAzureMachineLearningStudioInputs : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A list of input columns for the Azure Machine Learning Studio endpoint.", SerializedName = @"columnNames", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[] ColumnName { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumn) })] + System.Collections.Generic.List ColumnName { get; set; } /// The name of the input. This is the name provided while authoring the endpoint. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the input. This is the name provided while authoring the endpoint.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -60,7 +66,7 @@ internal partial interface IAzureMachineLearningStudioInputsInternal { /// A list of input columns for the Azure Machine Learning Studio endpoint. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn[] ColumnName { get; set; } + System.Collections.Generic.List ColumnName { get; set; } /// The name of the input. This is the name provided while authoring the endpoint. string Name { get; set; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputs.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputs.json.cs similarity index 89% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputs.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputs.json.cs index 421172a0d38f..4f50602fde65 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioInputs.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioInputs.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AzureMachineLearningStudioInputs(Microsoft.Azure.PowerShell.Cmdlets.Str { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_columnName = If( json?.PropertyT("columnNames"), out var __jsonColumnNames) ? If( __jsonColumnNames as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputColumn) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureMachineLearningStudioInputColumn.FromJson(__u) )) ))() : null : ColumnName;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_columnName = If( json?.PropertyT("columnNames"), out var __jsonColumnNames) ? If( __jsonColumnNames as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputColumn) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureMachineLearningStudioInputColumn.FromJson(__u) )) ))() : null : _columnName;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioInputs FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioInputs FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureMachineLearningStudioInputs(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioOutputColumn.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioOutputColumn.PowerShell.cs new file mode 100644 index 000000000000..80631b73c9bc --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioOutputColumn.PowerShell.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes an output column for the Azure Machine Learning Studio endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioOutputColumnTypeConverter))] + public partial class AzureMachineLearningStudioOutputColumn + { + + /// + /// 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 AzureMachineLearningStudioOutputColumn(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumnInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DataType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumnInternal)this).DataType, 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 AzureMachineLearningStudioOutputColumn(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumnInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumnInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DataType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumnInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumnInternal)this).DataType, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumn DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureMachineLearningStudioOutputColumn(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumn DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureMachineLearningStudioOutputColumn(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumn FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes an output column for the Azure Machine Learning Studio endpoint. + [System.ComponentModel.TypeConverter(typeof(AzureMachineLearningStudioOutputColumnTypeConverter))] + public partial interface IAzureMachineLearningStudioOutputColumn + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioOutputColumn.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioOutputColumn.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioOutputColumn.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioOutputColumn.TypeConverter.cs index d6554199117e..92fff00f567c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioOutputColumn.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioOutputColumn.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumn ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumn).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioOutputColumn.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioOutputColumn.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioOutputColumn.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioOutputColumn.cs index 841c309395a4..b3abeb14a82a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioOutputColumn.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioOutputColumn.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes an output column for the Azure Machine Learning Studio endpoint. public partial class AzureMachineLearningStudioOutputColumn : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumnInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumn, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumnInternal { /// Backing field for property. @@ -47,6 +47,9 @@ public partial interface IAzureMachineLearningStudioOutputColumn : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The (Azure Machine Learning supported) data type of the output column. A list of valid Azure Machine Learning data types are described at https://msdn.microsoft.com/en-us/library/azure/dn905923.aspx .", SerializedName = @"dataType", PossibleTypes = new [] { typeof(string) })] @@ -55,6 +58,9 @@ public partial interface IAzureMachineLearningStudioOutputColumn : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the output column.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioOutputColumn.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioOutputColumn.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioOutputColumn.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioOutputColumn.json.cs index ad1ff18f9cec..775031a1c189 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureMachineLearningStudioOutputColumn.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureMachineLearningStudioOutputColumn.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AzureMachineLearningStudioOutputColumn(Microsoft.Azure.PowerShell.Cmdle { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_dataType = If( json?.PropertyT("dataType"), out var __jsonDataType) ? (string)__jsonDataType : (string)DataType;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_dataType = If( json?.PropertyT("dataType"), out var __jsonDataType) ? (string)__jsonDataType : (string)_dataType;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumn. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumn. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureMachineLearningStudioOutputColumn FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureMachineLearningStudioOutputColumn FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureMachineLearningStudioOutputColumn(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..81168eb9f63c --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseDataSourceProperties.PowerShell.cs @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with an Azure SQL database data source. + [System.ComponentModel.TypeConverter(typeof(AzureSqlDatabaseDataSourcePropertiesTypeConverter))] + public partial class AzureSqlDatabaseDataSourceProperties + { + + /// + /// 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 AzureSqlDatabaseDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("MaxBatchCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("MaxWriterCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount = (float?) content.GetValueForProperty("MaxWriterCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode, 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 AzureSqlDatabaseDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("MaxBatchCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("MaxWriterCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount = (float?) content.GetValueForProperty("MaxWriterCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureSqlDatabaseDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureSqlDatabaseDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with an Azure SQL database data source. + [System.ComponentModel.TypeConverter(typeof(AzureSqlDatabaseDataSourcePropertiesTypeConverter))] + public partial interface IAzureSqlDatabaseDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseDataSourceProperties.TypeConverter.cs index 98ed5de30590..37c48c0e9392 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseDataSourceProperties.cs similarity index 89% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseDataSourceProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseDataSourceProperties.cs index a124abe418d8..8d2d94d426ca 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseDataSourceProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseDataSourceProperties.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with an Azure SQL database data source. public partial class AzureSqlDatabaseDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? _authenticationMode; + private string _authenticationMode; /// Authentication Mode. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => this._authenticationMode; set => this._authenticationMode = value; } + public string AuthenticationMode { get => this._authenticationMode; set => this._authenticationMode = value; } /// Backing field for property. private string _database; @@ -95,14 +95,21 @@ public partial interface IAzureSqlDatabaseDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Authentication Mode.", SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } /// The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"database", PossibleTypes = new [] { typeof(string) })] @@ -113,6 +120,9 @@ public partial interface IAzureSqlDatabaseDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests.", SerializedName = @"maxBatchCount", PossibleTypes = new [] { typeof(float) })] @@ -123,6 +133,9 @@ public partial interface IAzureSqlDatabaseDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Max Write r count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests.", SerializedName = @"maxWriterCount", PossibleTypes = new [] { typeof(float) })] @@ -133,6 +146,9 @@ public partial interface IAzureSqlDatabaseDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"password", PossibleTypes = new [] { typeof(string) })] @@ -143,6 +159,9 @@ public partial interface IAzureSqlDatabaseDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"server", PossibleTypes = new [] { typeof(string) })] @@ -153,6 +172,9 @@ public partial interface IAzureSqlDatabaseDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"table", PossibleTypes = new [] { typeof(string) })] @@ -163,6 +185,9 @@ public partial interface IAzureSqlDatabaseDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"user", PossibleTypes = new [] { typeof(string) })] @@ -174,7 +199,8 @@ internal partial interface IAzureSqlDatabaseDataSourcePropertiesInternal { /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } /// The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. string Database { get; set; } /// diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseDataSourceProperties.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseDataSourceProperties.json.cs index 42a1efa438ca..5ef9b2ef78f6 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,25 +65,25 @@ internal AzureSqlDatabaseDataSourceProperties(Microsoft.Azure.PowerShell.Cmdlets { return; } - {_server = If( json?.PropertyT("server"), out var __jsonServer) ? (string)__jsonServer : (string)Server;} - {_database = If( json?.PropertyT("database"), out var __jsonDatabase) ? (string)__jsonDatabase : (string)Database;} - {_user = If( json?.PropertyT("user"), out var __jsonUser) ? (string)__jsonUser : (string)User;} - {_password = If( json?.PropertyT("password"), out var __jsonPassword) ? (string)__jsonPassword : (string)Password;} - {_table = If( json?.PropertyT("table"), out var __jsonTable) ? (string)__jsonTable : (string)Table;} - {_maxBatchCount = If( json?.PropertyT("maxBatchCount"), out var __jsonMaxBatchCount) ? (float?)__jsonMaxBatchCount : MaxBatchCount;} - {_maxWriterCount = If( json?.PropertyT("maxWriterCount"), out var __jsonMaxWriterCount) ? (float?)__jsonMaxWriterCount : MaxWriterCount;} - {_authenticationMode = If( json?.PropertyT("authenticationMode"), out var __jsonAuthenticationMode) ? (string)__jsonAuthenticationMode : (string)AuthenticationMode;} + {_server = If( json?.PropertyT("server"), out var __jsonServer) ? (string)__jsonServer : (string)_server;} + {_database = If( json?.PropertyT("database"), out var __jsonDatabase) ? (string)__jsonDatabase : (string)_database;} + {_user = If( json?.PropertyT("user"), out var __jsonUser) ? (string)__jsonUser : (string)_user;} + {_password = If( json?.PropertyT("password"), out var __jsonPassword) ? (string)__jsonPassword : (string)_password;} + {_table = If( json?.PropertyT("table"), out var __jsonTable) ? (string)__jsonTable : (string)_table;} + {_maxBatchCount = If( json?.PropertyT("maxBatchCount"), out var __jsonMaxBatchCount) ? (float?)__jsonMaxBatchCount : _maxBatchCount;} + {_maxWriterCount = If( json?.PropertyT("maxWriterCount"), out var __jsonMaxWriterCount) ? (float?)__jsonMaxWriterCount : _maxWriterCount;} + {_authenticationMode = If( json?.PropertyT("authenticationMode"), out var __jsonAuthenticationMode) ? (string)__jsonAuthenticationMode : (string)_authenticationMode;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureSqlDatabaseDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSource.PowerShell.cs new file mode 100644 index 000000000000..f27453030875 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSource.PowerShell.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes an Azure SQL database output data source. + [System.ComponentModel.TypeConverter(typeof(AzureSqlDatabaseOutputDataSourceTypeConverter))] + public partial class AzureSqlDatabaseOutputDataSource + { + + /// + /// 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 AzureSqlDatabaseOutputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlDatabaseOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Password, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("MaxBatchCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("MaxWriterCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxWriterCount = (float?) content.GetValueForProperty("MaxWriterCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxWriterCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureSqlDatabaseOutputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlDatabaseOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Password, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("MaxBatchCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("MaxWriterCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxWriterCount = (float?) content.GetValueForProperty("MaxWriterCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal)this).MaxWriterCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureSqlDatabaseOutputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureSqlDatabaseOutputDataSource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes an Azure SQL database output data source. + [System.ComponentModel.TypeConverter(typeof(AzureSqlDatabaseOutputDataSourceTypeConverter))] + public partial interface IAzureSqlDatabaseOutputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSource.TypeConverter.cs index fb008c5a71e4..fc7d3504826d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSource.cs new file mode 100644 index 000000000000..895498ff335d --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSource.cs @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Describes an Azure SQL database output data source. + public partial class AzureSqlDatabaseOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(); + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? null; } + + /// The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Database { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Database; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Database = value ?? null; } + + /// + /// Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public float? MaxBatchCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).MaxBatchCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).MaxBatchCount = value ?? default(float); } + + /// + /// Max Write r count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public float? MaxWriterCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).MaxWriterCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).MaxWriterCount = value ?? default(float); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlDatabaseOutputDataSourceProperties()); set { {_property = value;} } } + + /// + /// The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Password { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Password = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceProperties _property; + + /// + /// The properties that are associated with an Azure SQL database output. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlDatabaseOutputDataSourceProperties()); set => this._property = value; } + + /// + /// The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Server { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Server; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Server = value ?? null; } + + /// + /// The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Table { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Table; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).Table = value ?? null; } + + /// + /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Microsoft.Sql/Server/Database"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)__outputDataSource).Type = "Microsoft.Sql/Server/Database"; } + + /// + /// The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string User { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).User; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)Property).User = value ?? null; } + + /// Creates an new instance. + public AzureSqlDatabaseOutputDataSource() + { + this.__outputDataSource.Type = "Microsoft.Sql/Server/Database"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); + await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); + } + } + /// Describes an Azure SQL database output data source. + public partial interface IAzureSqlDatabaseOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource + { + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Authentication Mode.", + SerializedName = @"authenticationMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"database", + PossibleTypes = new [] { typeof(string) })] + string Database { get; set; } + /// + /// Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests.", + SerializedName = @"maxBatchCount", + PossibleTypes = new [] { typeof(float) })] + float? MaxBatchCount { get; set; } + /// + /// Max Write r count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Max Write r count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests.", + SerializedName = @"maxWriterCount", + PossibleTypes = new [] { typeof(float) })] + float? MaxWriterCount { get; set; } + /// + /// The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"password", + PossibleTypes = new [] { typeof(string) })] + string Password { get; set; } + /// + /// The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"server", + PossibleTypes = new [] { typeof(string) })] + string Server { get; set; } + /// + /// The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"table", + PossibleTypes = new [] { typeof(string) })] + string Table { get; set; } + /// + /// The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"user", + PossibleTypes = new [] { typeof(string) })] + string User { get; set; } + + } + /// Describes an Azure SQL database output data source. + internal partial interface IAzureSqlDatabaseOutputDataSourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal + { + /// Authentication Mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. + string Database { get; set; } + /// + /// Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests. + /// + float? MaxBatchCount { get; set; } + /// + /// Max Write r count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests. + /// + float? MaxWriterCount { get; set; } + /// + /// The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + string Password { get; set; } + /// + /// The properties that are associated with an Azure SQL database output. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceProperties Property { get; set; } + /// + /// The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + string Server { get; set; } + /// + /// The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + string Table { get; set; } + /// + /// The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + string User { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSource.json.cs index 166e12161852..f27c945a9983 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AzureSqlDatabaseOutputDataSource(Microsoft.Azure.PowerShell.Cmdlets.Str { return; } - __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlDatabaseDataSourceProperties.FromJson(__jsonProperties) : Property;} + __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlDatabaseOutputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureSqlDatabaseOutputDataSource(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..e4a6d89ae8f8 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSourceProperties.PowerShell.cs @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with an Azure SQL database output. + [System.ComponentModel.TypeConverter(typeof(AzureSqlDatabaseOutputDataSourcePropertiesTypeConverter))] + public partial class AzureSqlDatabaseOutputDataSourceProperties + { + + /// + /// 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 AzureSqlDatabaseOutputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("MaxBatchCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("MaxWriterCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount = (float?) content.GetValueForProperty("MaxWriterCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode, 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 AzureSqlDatabaseOutputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("MaxBatchCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount = (float?) content.GetValueForProperty("MaxBatchCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxBatchCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("MaxWriterCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount = (float?) content.GetValueForProperty("MaxWriterCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).MaxWriterCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureSqlDatabaseOutputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureSqlDatabaseOutputDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a + /// json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with an Azure SQL database output. + [System.ComponentModel.TypeConverter(typeof(AzureSqlDatabaseOutputDataSourcePropertiesTypeConverter))] + public partial interface IAzureSqlDatabaseOutputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSourceProperties.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSourceProperties.TypeConverter.cs index eba6b9977d4f..0a92a2cc8d6e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSourceProperties.cs new file mode 100644 index 000000000000..6acaffe82a1e --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSourceProperties.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with an Azure SQL database output. + public partial class AzureSqlDatabaseOutputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourcePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourceProperties __azureSqlDatabaseDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlDatabaseDataSourceProperties(); + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).AuthenticationMode = value ?? null; } + + /// The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Database { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Database; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Database = value ?? null; } + + /// + /// Max Batch count for write to Sql database, the default value is 10,000. Optional on PUT requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public float? MaxBatchCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).MaxBatchCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).MaxBatchCount = value ?? default(float); } + + /// + /// Max Write r count, currently only 1(single writer) and 0(based on query partition) are available. Optional on PUT requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public float? MaxWriterCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).MaxWriterCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).MaxWriterCount = value ?? default(float); } + + /// + /// The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Password { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Password = value ?? null; } + + /// + /// The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Server { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Server; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Server = value ?? null; } + + /// + /// The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Table { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Table; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).Table = value ?? null; } + + /// + /// The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string User { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).User; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal)__azureSqlDatabaseDataSourceProperties).User = value ?? null; } + + /// + /// Creates an new instance. + /// + public AzureSqlDatabaseOutputDataSourceProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureSqlDatabaseDataSourceProperties), __azureSqlDatabaseDataSourceProperties); + await eventListener.AssertObjectIsValid(nameof(__azureSqlDatabaseDataSourceProperties), __azureSqlDatabaseDataSourceProperties); + } + } + /// The properties that are associated with an Azure SQL database output. + public partial interface IAzureSqlDatabaseOutputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourceProperties + { + + } + /// The properties that are associated with an Azure SQL database output. + internal partial interface IAzureSqlDatabaseOutputDataSourcePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseDataSourcePropertiesInternal + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSourceProperties.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSourceProperties.json.cs index d37e439fcf3d..ffc3f98c68df 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlDatabaseOutputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlDatabaseOutputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,18 +65,18 @@ internal AzureSqlDatabaseOutputDataSourceProperties(Microsoft.Azure.PowerShell.C { return; } - __azureSqlDatabaseDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlDatabaseDataSourceProperties(json); + __azureSqlDatabaseDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlDatabaseDataSourceProperties(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlDatabaseOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlDatabaseOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureSqlDatabaseOutputDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSource.PowerShell.cs new file mode 100644 index 000000000000..ca1c23e6c7c4 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSource.PowerShell.cs @@ -0,0 +1,246 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes an Azure SQL database reference input data source. + [System.ComponentModel.TypeConverter(typeof(AzureSqlReferenceInputDataSourceTypeConverter))] + public partial class AzureSqlReferenceInputDataSource + { + + /// + /// 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 AzureSqlReferenceInputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlReferenceInputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Password, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("RefreshType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).RefreshType = (string) content.GetValueForProperty("RefreshType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).RefreshType, global::System.Convert.ToString); + } + if (content.Contains("RefreshRate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).RefreshRate = (string) content.GetValueForProperty("RefreshRate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).RefreshRate, global::System.Convert.ToString); + } + if (content.Contains("FullSnapshotQuery")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).FullSnapshotQuery = (string) content.GetValueForProperty("FullSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).FullSnapshotQuery, global::System.Convert.ToString); + } + if (content.Contains("DeltaSnapshotQuery")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).DeltaSnapshotQuery = (string) content.GetValueForProperty("DeltaSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).DeltaSnapshotQuery, 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 AzureSqlReferenceInputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlReferenceInputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Password, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("RefreshType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).RefreshType = (string) content.GetValueForProperty("RefreshType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).RefreshType, global::System.Convert.ToString); + } + if (content.Contains("RefreshRate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).RefreshRate = (string) content.GetValueForProperty("RefreshRate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).RefreshRate, global::System.Convert.ToString); + } + if (content.Contains("FullSnapshotQuery")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).FullSnapshotQuery = (string) content.GetValueForProperty("FullSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).FullSnapshotQuery, global::System.Convert.ToString); + } + if (content.Contains("DeltaSnapshotQuery")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).DeltaSnapshotQuery = (string) content.GetValueForProperty("DeltaSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal)this).DeltaSnapshotQuery, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureSqlReferenceInputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureSqlReferenceInputDataSource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes an Azure SQL database reference input data source. + [System.ComponentModel.TypeConverter(typeof(AzureSqlReferenceInputDataSourceTypeConverter))] + public partial interface IAzureSqlReferenceInputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSource.TypeConverter.cs index 797b15a7d961..c6232b8be80f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSource.cs similarity index 77% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSource.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSource.cs index b93c0faae8ab..083d904cb3d9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSource.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSource.cs @@ -3,101 +3,102 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes an Azure SQL database reference input data source. public partial class AzureSqlReferenceInputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource __referenceInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ReferenceInputDataSource(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource __referenceInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ReferenceInputDataSource(); /// /// This element is associated with the datasource element. This is the name of the database that output will be written to. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Database { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Database; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Database = value ?? null; } + public string Database { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Database; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Database = value ?? null; } /// /// This element is associated with the datasource element. This query is used to fetch incremental changes from the SQL database. /// To use this option, we recommend using temporal tables in Azure SQL Database. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string DeltaSnapshotQuery { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).DeltaSnapshotQuery; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).DeltaSnapshotQuery = value ?? null; } + public string DeltaSnapshotQuery { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).DeltaSnapshotQuery; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).DeltaSnapshotQuery = value ?? null; } /// /// This element is associated with the datasource element. This query is used to fetch data from the sql database. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string FullSnapshotQuery { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).FullSnapshotQuery; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).FullSnapshotQuery = value ?? null; } + public string FullSnapshotQuery { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).FullSnapshotQuery; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).FullSnapshotQuery = value ?? null; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlReferenceInputDataSourceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlReferenceInputDataSourceProperties()); set { {_property = value;} } } /// /// This element is associated with the datasource element. This is the password that will be used to connect to the SQL Database /// instance. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Password { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Password = value ?? null; } + public string Password { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Password = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceProperties _property; [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlReferenceInputDataSourceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlReferenceInputDataSourceProperties()); set => this._property = value; } /// /// This element is associated with the datasource element. This indicates how frequently the data will be fetched from the /// database. It is of DateTime format. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string RefreshRate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).RefreshRate; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).RefreshRate = value ?? null; } + public string RefreshRate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).RefreshRate; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).RefreshRate = value ?? null; } /// /// This element is associated with the datasource element. This element is of enum type. It indicates what kind of data refresh /// option do we want to use:Static/RefreshPeriodicallyWithFull/RefreshPeriodicallyWithDelta /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string RefreshType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).RefreshType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).RefreshType = value ?? null; } + public string RefreshType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).RefreshType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).RefreshType = value ?? null; } /// /// This element is associated with the datasource element. This is the name of the server that contains the database that /// will be written to. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Server { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Server; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Server = value ?? null; } + public string Server { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Server; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Server = value ?? null; } /// /// This element is associated with the datasource element. The name of the table in the Azure SQL database.. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Table { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Table; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Table = value ?? null; } + public string Table { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Table; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).Table = value ?? null; } /// /// Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests. /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)__referenceInputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)__referenceInputDataSource).Type = value ; } + public string Type { get => "Microsoft.Sql/Server/Database"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)__referenceInputDataSource).Type = "Microsoft.Sql/Server/Database"; } /// /// This element is associated with the datasource element. This is the user name that will be used to connect to the SQL /// Database instance. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string User { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).User; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).User = value ?? null; } + public string User { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).User; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)Property).User = value ?? null; } /// Creates an new instance. public AzureSqlReferenceInputDataSource() { - + this.__referenceInputDataSource.Type = "Microsoft.Sql/Server/Database"; } /// Validates that this object meets the validation criteria. @@ -115,7 +116,7 @@ public AzureSqlReferenceInputDataSource() /// Describes an Azure SQL database reference input data source. public partial interface IAzureSqlReferenceInputDataSource : Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource { /// /// This element is associated with the datasource element. This is the name of the database that output will be written to. @@ -123,6 +124,9 @@ public partial interface IAzureSqlReferenceInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This is the name of the database that output will be written to.", SerializedName = @"database", PossibleTypes = new [] { typeof(string) })] @@ -134,6 +138,9 @@ public partial interface IAzureSqlReferenceInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This query is used to fetch incremental changes from the SQL database. To use this option, we recommend using temporal tables in Azure SQL Database.", SerializedName = @"deltaSnapshotQuery", PossibleTypes = new [] { typeof(string) })] @@ -144,6 +151,9 @@ public partial interface IAzureSqlReferenceInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This query is used to fetch data from the sql database.", SerializedName = @"fullSnapshotQuery", PossibleTypes = new [] { typeof(string) })] @@ -155,6 +165,9 @@ public partial interface IAzureSqlReferenceInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This is the password that will be used to connect to the SQL Database instance.", SerializedName = @"password", PossibleTypes = new [] { typeof(string) })] @@ -166,6 +179,9 @@ public partial interface IAzureSqlReferenceInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This indicates how frequently the data will be fetched from the database. It is of DateTime format.", SerializedName = @"refreshRate", PossibleTypes = new [] { typeof(string) })] @@ -177,6 +193,9 @@ public partial interface IAzureSqlReferenceInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This element is of enum type. It indicates what kind of data refresh option do we want to use:Static/RefreshPeriodicallyWithFull/RefreshPeriodicallyWithDelta", SerializedName = @"refreshType", PossibleTypes = new [] { typeof(string) })] @@ -188,6 +207,9 @@ public partial interface IAzureSqlReferenceInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This is the name of the server that contains the database that will be written to.", SerializedName = @"server", PossibleTypes = new [] { typeof(string) })] @@ -198,6 +220,9 @@ public partial interface IAzureSqlReferenceInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. The name of the table in the Azure SQL database..", SerializedName = @"table", PossibleTypes = new [] { typeof(string) })] @@ -209,6 +234,9 @@ public partial interface IAzureSqlReferenceInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This is the user name that will be used to connect to the SQL Database instance.", SerializedName = @"user", PossibleTypes = new [] { typeof(string) })] @@ -217,7 +245,7 @@ public partial interface IAzureSqlReferenceInputDataSource : } /// Describes an Azure SQL database reference input data source. internal partial interface IAzureSqlReferenceInputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal { /// /// This element is associated with the datasource element. This is the name of the database that output will be written to. @@ -238,7 +266,7 @@ internal partial interface IAzureSqlReferenceInputDataSourceInternal : /// string Password { get; set; } - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceProperties Property { get; set; } /// /// This element is associated with the datasource element. This indicates how frequently the data will be fetched from the /// database. It is of DateTime format. diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSource.json.cs similarity index 92% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSource.json.cs index c17e82266b07..c64b8b3912b7 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AzureSqlReferenceInputDataSource(Microsoft.Azure.PowerShell.Cmdlets.Str { return; } - __referenceInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ReferenceInputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSqlReferenceInputDataSourceProperties.FromJson(__jsonProperties) : Property;} + __referenceInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ReferenceInputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSqlReferenceInputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureSqlReferenceInputDataSource(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..915274beedeb --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSourceProperties.PowerShell.cs @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(AzureSqlReferenceInputDataSourcePropertiesTypeConverter))] + public partial class AzureSqlReferenceInputDataSourceProperties + { + + /// + /// 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 AzureSqlReferenceInputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("RefreshType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshType = (string) content.GetValueForProperty("RefreshType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshType, global::System.Convert.ToString); + } + if (content.Contains("RefreshRate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshRate = (string) content.GetValueForProperty("RefreshRate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshRate, global::System.Convert.ToString); + } + if (content.Contains("FullSnapshotQuery")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).FullSnapshotQuery = (string) content.GetValueForProperty("FullSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).FullSnapshotQuery, global::System.Convert.ToString); + } + if (content.Contains("DeltaSnapshotQuery")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).DeltaSnapshotQuery = (string) content.GetValueForProperty("DeltaSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).DeltaSnapshotQuery, 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 AzureSqlReferenceInputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("RefreshType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshType = (string) content.GetValueForProperty("RefreshType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshType, global::System.Convert.ToString); + } + if (content.Contains("RefreshRate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshRate = (string) content.GetValueForProperty("RefreshRate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).RefreshRate, global::System.Convert.ToString); + } + if (content.Contains("FullSnapshotQuery")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).FullSnapshotQuery = (string) content.GetValueForProperty("FullSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).FullSnapshotQuery, global::System.Convert.ToString); + } + if (content.Contains("DeltaSnapshotQuery")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).DeltaSnapshotQuery = (string) content.GetValueForProperty("DeltaSnapshotQuery",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal)this).DeltaSnapshotQuery, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureSqlReferenceInputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureSqlReferenceInputDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a + /// json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + [System.ComponentModel.TypeConverter(typeof(AzureSqlReferenceInputDataSourcePropertiesTypeConverter))] + public partial interface IAzureSqlReferenceInputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSourceProperties.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSourceProperties.TypeConverter.cs index b71276abc547..fe647eab7a58 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSourceProperties.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSourceProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSourceProperties.cs index 0f3bc181ed93..82570f1fdffe 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSourceProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSourceProperties.cs @@ -3,13 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; public partial class AzureSqlReferenceInputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourcePropertiesInternal { /// Backing field for property. @@ -116,6 +116,9 @@ public partial interface IAzureSqlReferenceInputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This is the name of the database that output will be written to.", SerializedName = @"database", PossibleTypes = new [] { typeof(string) })] @@ -127,6 +130,9 @@ public partial interface IAzureSqlReferenceInputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This query is used to fetch incremental changes from the SQL database. To use this option, we recommend using temporal tables in Azure SQL Database.", SerializedName = @"deltaSnapshotQuery", PossibleTypes = new [] { typeof(string) })] @@ -137,6 +143,9 @@ public partial interface IAzureSqlReferenceInputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This query is used to fetch data from the sql database.", SerializedName = @"fullSnapshotQuery", PossibleTypes = new [] { typeof(string) })] @@ -148,6 +157,9 @@ public partial interface IAzureSqlReferenceInputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This is the password that will be used to connect to the SQL Database instance.", SerializedName = @"password", PossibleTypes = new [] { typeof(string) })] @@ -159,6 +171,9 @@ public partial interface IAzureSqlReferenceInputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This indicates how frequently the data will be fetched from the database. It is of DateTime format.", SerializedName = @"refreshRate", PossibleTypes = new [] { typeof(string) })] @@ -170,6 +185,9 @@ public partial interface IAzureSqlReferenceInputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This element is of enum type. It indicates what kind of data refresh option do we want to use:Static/RefreshPeriodicallyWithFull/RefreshPeriodicallyWithDelta", SerializedName = @"refreshType", PossibleTypes = new [] { typeof(string) })] @@ -181,6 +199,9 @@ public partial interface IAzureSqlReferenceInputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This is the name of the server that contains the database that will be written to.", SerializedName = @"server", PossibleTypes = new [] { typeof(string) })] @@ -191,6 +212,9 @@ public partial interface IAzureSqlReferenceInputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. The name of the table in the Azure SQL database..", SerializedName = @"table", PossibleTypes = new [] { typeof(string) })] @@ -202,6 +226,9 @@ public partial interface IAzureSqlReferenceInputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element is associated with the datasource element. This is the user name that will be used to connect to the SQL Database instance.", SerializedName = @"user", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSourceProperties.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSourceProperties.json.cs index c9fa0655e70f..0bfde0c5aa42 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSqlReferenceInputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSqlReferenceInputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -64,26 +64,26 @@ internal AzureSqlReferenceInputDataSourceProperties(Microsoft.Azure.PowerShell.C { return; } - {_server = If( json?.PropertyT("server"), out var __jsonServer) ? (string)__jsonServer : (string)Server;} - {_database = If( json?.PropertyT("database"), out var __jsonDatabase) ? (string)__jsonDatabase : (string)Database;} - {_user = If( json?.PropertyT("user"), out var __jsonUser) ? (string)__jsonUser : (string)User;} - {_password = If( json?.PropertyT("password"), out var __jsonPassword) ? (string)__jsonPassword : (string)Password;} - {_table = If( json?.PropertyT("table"), out var __jsonTable) ? (string)__jsonTable : (string)Table;} - {_refreshType = If( json?.PropertyT("refreshType"), out var __jsonRefreshType) ? (string)__jsonRefreshType : (string)RefreshType;} - {_refreshRate = If( json?.PropertyT("refreshRate"), out var __jsonRefreshRate) ? (string)__jsonRefreshRate : (string)RefreshRate;} - {_fullSnapshotQuery = If( json?.PropertyT("fullSnapshotQuery"), out var __jsonFullSnapshotQuery) ? (string)__jsonFullSnapshotQuery : (string)FullSnapshotQuery;} - {_deltaSnapshotQuery = If( json?.PropertyT("deltaSnapshotQuery"), out var __jsonDeltaSnapshotQuery) ? (string)__jsonDeltaSnapshotQuery : (string)DeltaSnapshotQuery;} + {_server = If( json?.PropertyT("server"), out var __jsonServer) ? (string)__jsonServer : (string)_server;} + {_database = If( json?.PropertyT("database"), out var __jsonDatabase) ? (string)__jsonDatabase : (string)_database;} + {_user = If( json?.PropertyT("user"), out var __jsonUser) ? (string)__jsonUser : (string)_user;} + {_password = If( json?.PropertyT("password"), out var __jsonPassword) ? (string)__jsonPassword : (string)_password;} + {_table = If( json?.PropertyT("table"), out var __jsonTable) ? (string)__jsonTable : (string)_table;} + {_refreshType = If( json?.PropertyT("refreshType"), out var __jsonRefreshType) ? (string)__jsonRefreshType : (string)_refreshType;} + {_refreshRate = If( json?.PropertyT("refreshRate"), out var __jsonRefreshRate) ? (string)__jsonRefreshRate : (string)_refreshRate;} + {_fullSnapshotQuery = If( json?.PropertyT("fullSnapshotQuery"), out var __jsonFullSnapshotQuery) ? (string)__jsonFullSnapshotQuery : (string)_fullSnapshotQuery;} + {_deltaSnapshotQuery = If( json?.PropertyT("deltaSnapshotQuery"), out var __jsonDeltaSnapshotQuery) ? (string)__jsonDeltaSnapshotQuery : (string)_deltaSnapshotQuery;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSqlReferenceInputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSqlReferenceInputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureSqlReferenceInputDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..4e262e9cc99e --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseDataSourceProperties.PowerShell.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with an Azure SQL database data source. + [System.ComponentModel.TypeConverter(typeof(AzureSynapseDataSourcePropertiesTypeConverter))] + public partial class AzureSynapseDataSourceProperties + { + + /// + /// 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 AzureSynapseDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Password, 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 AzureSynapseDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureSynapseDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureSynapseDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with an Azure SQL database data source. + [System.ComponentModel.TypeConverter(typeof(AzureSynapseDataSourcePropertiesTypeConverter))] + public partial interface IAzureSynapseDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseDataSourceProperties.TypeConverter.cs index e0d184b46e0b..5bfc9b6fc9d5 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseDataSourceProperties.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseDataSourceProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseDataSourceProperties.cs index a0dacad791be..e48d919f7a1e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseDataSourceProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseDataSourceProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with an Azure SQL database data source. public partial class AzureSynapseDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal { /// Backing field for property. @@ -70,6 +70,9 @@ public partial interface IAzureSynapseDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"database", PossibleTypes = new [] { typeof(string) })] @@ -80,6 +83,9 @@ public partial interface IAzureSynapseDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"password", PossibleTypes = new [] { typeof(string) })] @@ -90,6 +96,9 @@ public partial interface IAzureSynapseDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"server", PossibleTypes = new [] { typeof(string) })] @@ -100,6 +109,9 @@ public partial interface IAzureSynapseDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"table", PossibleTypes = new [] { typeof(string) })] @@ -110,6 +122,9 @@ public partial interface IAzureSynapseDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"user", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseDataSourceProperties.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseDataSourceProperties.json.cs index 9da993942de3..8e16d5cc3823 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,22 +65,22 @@ internal AzureSynapseDataSourceProperties(Microsoft.Azure.PowerShell.Cmdlets.Str { return; } - {_server = If( json?.PropertyT("server"), out var __jsonServer) ? (string)__jsonServer : (string)Server;} - {_database = If( json?.PropertyT("database"), out var __jsonDatabase) ? (string)__jsonDatabase : (string)Database;} - {_table = If( json?.PropertyT("table"), out var __jsonTable) ? (string)__jsonTable : (string)Table;} - {_user = If( json?.PropertyT("user"), out var __jsonUser) ? (string)__jsonUser : (string)User;} - {_password = If( json?.PropertyT("password"), out var __jsonPassword) ? (string)__jsonPassword : (string)Password;} + {_server = If( json?.PropertyT("server"), out var __jsonServer) ? (string)__jsonServer : (string)_server;} + {_database = If( json?.PropertyT("database"), out var __jsonDatabase) ? (string)__jsonDatabase : (string)_database;} + {_table = If( json?.PropertyT("table"), out var __jsonTable) ? (string)__jsonTable : (string)_table;} + {_user = If( json?.PropertyT("user"), out var __jsonUser) ? (string)__jsonUser : (string)_user;} + {_password = If( json?.PropertyT("password"), out var __jsonPassword) ? (string)__jsonPassword : (string)_password;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureSynapseDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSource.PowerShell.cs new file mode 100644 index 000000000000..ca7e043eb475 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSource.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes an Azure Synapse output data source. + [System.ComponentModel.TypeConverter(typeof(AzureSynapseOutputDataSourceTypeConverter))] + public partial class AzureSynapseOutputDataSource + { + + /// + /// 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 AzureSynapseOutputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSynapseOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Password, 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 AzureSynapseOutputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSynapseOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal)this).Password, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureSynapseOutputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureSynapseOutputDataSource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes an Azure Synapse output data source. + [System.ComponentModel.TypeConverter(typeof(AzureSynapseOutputDataSourceTypeConverter))] + public partial interface IAzureSynapseOutputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSource.TypeConverter.cs index fccb19596548..97060b2cf62e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSource.cs similarity index 75% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSource.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSource.cs index d1d2ffe22d5f..191a8049f224 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSource.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSource.cs @@ -3,72 +3,73 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes an Azure Synapse output data source. public partial class AzureSynapseOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(); /// The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Database { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)Property).Database; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)Property).Database = value ?? null; } + public string Database { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)Property).Database; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)Property).Database = value ?? null; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSynapseDataSourceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSynapseOutputDataSourceProperties()); set { {_property = value;} } } /// /// The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Password { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)Property).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)Property).Password = value ?? null; } + public string Password { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)Property).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)Property).Password = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceProperties _property; /// /// The properties that are associated with an Azure Synapse output. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSynapseDataSourceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSynapseOutputDataSourceProperties()); set => this._property = value; } /// /// The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Server { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)Property).Server; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)Property).Server = value ?? null; } + public string Server { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)Property).Server; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)Property).Server = value ?? null; } /// /// The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Table { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)Property).Table; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)Property).Table = value ?? null; } + public string Table { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)Property).Table; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)Property).Table = value ?? null; } /// /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type = value ; } + public string Type { get => "Microsoft.Sql/Server/DataWarehouse"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)__outputDataSource).Type = "Microsoft.Sql/Server/DataWarehouse"; } /// /// The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string User { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)Property).User; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourcePropertiesInternal)Property).User = value ?? null; } + public string User { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)Property).User; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)Property).User = value ?? null; } /// Creates an new instance. public AzureSynapseOutputDataSource() { - + this.__outputDataSource.Type = "Microsoft.Sql/Server/DataWarehouse"; } /// Validates that this object meets the validation criteria. @@ -86,12 +87,15 @@ public AzureSynapseOutputDataSource() /// Describes an Azure Synapse output data source. public partial interface IAzureSynapseOutputDataSource : Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource { /// The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"database", PossibleTypes = new [] { typeof(string) })] @@ -102,6 +106,9 @@ public partial interface IAzureSynapseOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"password", PossibleTypes = new [] { typeof(string) })] @@ -112,6 +119,9 @@ public partial interface IAzureSynapseOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"server", PossibleTypes = new [] { typeof(string) })] @@ -122,6 +132,9 @@ public partial interface IAzureSynapseOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"table", PossibleTypes = new [] { typeof(string) })] @@ -132,6 +145,9 @@ public partial interface IAzureSynapseOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"user", PossibleTypes = new [] { typeof(string) })] @@ -140,7 +156,7 @@ public partial interface IAzureSynapseOutputDataSource : } /// Describes an Azure Synapse output data source. internal partial interface IAzureSynapseOutputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal { /// The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. string Database { get; set; } @@ -151,7 +167,7 @@ internal partial interface IAzureSynapseOutputDataSourceInternal : /// /// The properties that are associated with an Azure Synapse output. Required on PUT (CreateOrReplace) requests. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseDataSourceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceProperties Property { get; set; } /// /// The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. /// diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSource.json.cs index c2edc88a73fe..36a135486dac 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AzureSynapseOutputDataSource(Microsoft.Azure.PowerShell.Cmdlets.StreamA { return; } - __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSynapseDataSourceProperties.FromJson(__jsonProperties) : Property;} + __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSynapseOutputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureSynapseOutputDataSource(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..2037bc0095ac --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSourceProperties.PowerShell.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with an Azure Synapse output. + [System.ComponentModel.TypeConverter(typeof(AzureSynapseOutputDataSourcePropertiesTypeConverter))] + public partial class AzureSynapseOutputDataSourceProperties + { + + /// + /// 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 AzureSynapseOutputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Password, 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 AzureSynapseOutputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Server")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Server = (string) content.GetValueForProperty("Server",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Server, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("User")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).User = (string) content.GetValueForProperty("User",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).User, global::System.Convert.ToString); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Password = (string) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)this).Password, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureSynapseOutputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureSynapseOutputDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with an Azure Synapse output. + [System.ComponentModel.TypeConverter(typeof(AzureSynapseOutputDataSourcePropertiesTypeConverter))] + public partial interface IAzureSynapseOutputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSourceProperties.TypeConverter.cs index 3a5e508f24c0..3439d52db77e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSourceProperties.cs new file mode 100644 index 000000000000..6d775131b30f --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSourceProperties.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with an Azure Synapse output. + public partial class AzureSynapseOutputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourcePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourceProperties __azureSynapseDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSynapseDataSourceProperties(); + + /// The name of the Azure SQL database. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Database { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Database; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Database = value ?? null; } + + /// + /// The password that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Password { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Password; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Password = value ?? null; } + + /// + /// The name of the SQL server containing the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Server { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Server; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Server = value ?? null; } + + /// + /// The name of the table in the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Table { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Table; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).Table = value ?? null; } + + /// + /// The user name that will be used to connect to the Azure SQL database. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string User { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).User; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal)__azureSynapseDataSourceProperties).User = value ?? null; } + + /// Creates an new instance. + public AzureSynapseOutputDataSourceProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__azureSynapseDataSourceProperties), __azureSynapseDataSourceProperties); + await eventListener.AssertObjectIsValid(nameof(__azureSynapseDataSourceProperties), __azureSynapseDataSourceProperties); + } + } + /// The properties that are associated with an Azure Synapse output. + public partial interface IAzureSynapseOutputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourceProperties + { + + } + /// The properties that are associated with an Azure Synapse output. + internal partial interface IAzureSynapseOutputDataSourcePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseDataSourcePropertiesInternal + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSourceProperties.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSourceProperties.json.cs index c188bf1b0ba0..58bc5332a74e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureSynapseOutputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureSynapseOutputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,18 +65,18 @@ internal AzureSynapseOutputDataSourceProperties(Microsoft.Azure.PowerShell.Cmdle { return; } - __azureSynapseDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureSynapseDataSourceProperties(json); + __azureSynapseDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureSynapseDataSourceProperties(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureSynapseOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureSynapseOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureSynapseOutputDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSource.PowerShell.cs new file mode 100644 index 000000000000..f1f4a4558b4a --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSource.PowerShell.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes an Azure Table output data source. + [System.ComponentModel.TypeConverter(typeof(AzureTableOutputDataSourceTypeConverter))] + public partial class AzureTableOutputDataSource + { + + /// + /// 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 AzureTableOutputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureTableOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).AccountName, global::System.Convert.ToString); + } + if (content.Contains("AccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).AccountKey, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("RowKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).RowKey = (string) content.GetValueForProperty("RowKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).RowKey, global::System.Convert.ToString); + } + if (content.Contains("ColumnsToRemove")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).ColumnsToRemove = (System.Collections.Generic.List) content.GetValueForProperty("ColumnsToRemove",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).ColumnsToRemove, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("BatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureTableOutputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureTableOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).AccountName, global::System.Convert.ToString); + } + if (content.Contains("AccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).AccountKey, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("RowKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).RowKey = (string) content.GetValueForProperty("RowKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).RowKey, global::System.Convert.ToString); + } + if (content.Contains("ColumnsToRemove")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).ColumnsToRemove = (System.Collections.Generic.List) content.GetValueForProperty("ColumnsToRemove",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).ColumnsToRemove, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("BatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureTableOutputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureTableOutputDataSource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes an Azure Table output data source. + [System.ComponentModel.TypeConverter(typeof(AzureTableOutputDataSourceTypeConverter))] + public partial interface IAzureTableOutputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSource.TypeConverter.cs index 1c373f16c3cd..af09bde6e13f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSource.cs new file mode 100644 index 000000000000..3d84bfd9a37f --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSource.cs @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Describes an Azure Table output data source. + public partial class AzureTableOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(); + + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string AccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)Property).AccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)Property).AccountKey = value ?? null; } + + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string AccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)Property).AccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)Property).AccountName = value ?? null; } + + /// The number of rows to write to the Azure Table at a time. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public int? BatchSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)Property).BatchSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)Property).BatchSize = value ?? default(int); } + + /// + /// If specified, each item in the array is the name of a column to remove (if present) from output event entities. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ColumnsToRemove { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)Property).ColumnsToRemove; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)Property).ColumnsToRemove = value ?? null /* arrayOf */; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureTableOutputDataSourceProperties()); set { {_property = value;} } } + + /// + /// This element indicates the name of a column from the SELECT statement in the query that will be used as the partition + /// key for the Azure Table. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string PartitionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)Property).PartitionKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)Property).PartitionKey = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceProperties _property; + + /// + /// The properties that are associated with an Azure Table output. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureTableOutputDataSourceProperties()); set => this._property = value; } + + /// + /// This element indicates the name of a column from the SELECT statement in the query that will be used as the row key for + /// the Azure Table. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string RowKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)Property).RowKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)Property).RowKey = value ?? null; } + + /// The name of the Azure Table. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Table { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)Property).Table; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)Property).Table = value ?? null; } + + /// + /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Microsoft.Storage/Table"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)__outputDataSource).Type = "Microsoft.Storage/Table"; } + + /// Creates an new instance. + public AzureTableOutputDataSource() + { + this.__outputDataSource.Type = "Microsoft.Storage/Table"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); + await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); + } + } + /// Describes an Azure Table output data source. + public partial interface IAzureTableOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource + { + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"accountKey", + PossibleTypes = new [] { typeof(string) })] + string AccountKey { get; set; } + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"accountName", + PossibleTypes = new [] { typeof(string) })] + string AccountName { get; set; } + /// The number of rows to write to the Azure Table at a time. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of rows to write to the Azure Table at a time.", + SerializedName = @"batchSize", + PossibleTypes = new [] { typeof(int) })] + int? BatchSize { get; set; } + /// + /// If specified, each item in the array is the name of a column to remove (if present) from output event entities. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"If specified, each item in the array is the name of a column to remove (if present) from output event entities.", + SerializedName = @"columnsToRemove", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List ColumnsToRemove { get; set; } + /// + /// This element indicates the name of a column from the SELECT statement in the query that will be used as the partition + /// key for the Azure Table. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"This element indicates the name of a column from the SELECT statement in the query that will be used as the partition key for the Azure Table. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"partitionKey", + PossibleTypes = new [] { typeof(string) })] + string PartitionKey { get; set; } + /// + /// This element indicates the name of a column from the SELECT statement in the query that will be used as the row key for + /// the Azure Table. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"This element indicates the name of a column from the SELECT statement in the query that will be used as the row key for the Azure Table. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"rowKey", + PossibleTypes = new [] { typeof(string) })] + string RowKey { get; set; } + /// The name of the Azure Table. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Azure Table. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"table", + PossibleTypes = new [] { typeof(string) })] + string Table { get; set; } + + } + /// Describes an Azure Table output data source. + internal partial interface IAzureTableOutputDataSourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal + { + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + string AccountKey { get; set; } + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + string AccountName { get; set; } + /// The number of rows to write to the Azure Table at a time. + int? BatchSize { get; set; } + /// + /// If specified, each item in the array is the name of a column to remove (if present) from output event entities. + /// + System.Collections.Generic.List ColumnsToRemove { get; set; } + /// + /// This element indicates the name of a column from the SELECT statement in the query that will be used as the partition + /// key for the Azure Table. Required on PUT (CreateOrReplace) requests. + /// + string PartitionKey { get; set; } + /// + /// The properties that are associated with an Azure Table output. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceProperties Property { get; set; } + /// + /// This element indicates the name of a column from the SELECT statement in the query that will be used as the row key for + /// the Azure Table. Required on PUT (CreateOrReplace) requests. + /// + string RowKey { get; set; } + /// The name of the Azure Table. Required on PUT (CreateOrReplace) requests. + string Table { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSource.json.cs index 62244a4be633..e0db77c78810 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AzureTableOutputDataSource(Microsoft.Azure.PowerShell.Cmdlets.StreamAna { return; } - __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.AzureTableOutputDataSourceProperties.FromJson(__jsonProperties) : Property;} + __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AzureTableOutputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureTableOutputDataSource(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..bd38d3c101d5 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSourceProperties.PowerShell.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with an Azure Table output. + [System.ComponentModel.TypeConverter(typeof(AzureTableOutputDataSourcePropertiesTypeConverter))] + public partial class AzureTableOutputDataSourceProperties + { + + /// + /// 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 AzureTableOutputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).AccountName, global::System.Convert.ToString); + } + if (content.Contains("AccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).AccountKey, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("RowKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).RowKey = (string) content.GetValueForProperty("RowKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).RowKey, global::System.Convert.ToString); + } + if (content.Contains("ColumnsToRemove")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).ColumnsToRemove = (System.Collections.Generic.List) content.GetValueForProperty("ColumnsToRemove",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).ColumnsToRemove, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("BatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureTableOutputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).AccountName, global::System.Convert.ToString); + } + if (content.Contains("AccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).AccountKey, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("RowKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).RowKey = (string) content.GetValueForProperty("RowKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).RowKey, global::System.Convert.ToString); + } + if (content.Contains("ColumnsToRemove")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).ColumnsToRemove = (System.Collections.Generic.List) content.GetValueForProperty("ColumnsToRemove",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).ColumnsToRemove, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("BatchSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).BatchSize = (int?) content.GetValueForProperty("BatchSize",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal)this).BatchSize, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureTableOutputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureTableOutputDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with an Azure Table output. + [System.ComponentModel.TypeConverter(typeof(AzureTableOutputDataSourcePropertiesTypeConverter))] + public partial interface IAzureTableOutputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSourceProperties.TypeConverter.cs index 118a1a4867e0..05ea3a797976 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSourceProperties.cs similarity index 91% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSourceProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSourceProperties.cs index f2bd35f959f7..74d7653fcf20 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSourceProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSourceProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with an Azure Table output. public partial class AzureTableOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourcePropertiesInternal { /// Backing field for property. @@ -39,13 +39,13 @@ public partial class AzureTableOutputDataSourceProperties : public int? BatchSize { get => this._batchSize; set => this._batchSize = value; } /// Backing field for property. - private string[] _columnsToRemove; + private System.Collections.Generic.List _columnsToRemove; /// /// If specified, each item in the array is the name of a column to remove (if present) from output event entities. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public string[] ColumnsToRemove { get => this._columnsToRemove; set => this._columnsToRemove = value; } + public System.Collections.Generic.List ColumnsToRemove { get => this._columnsToRemove; set => this._columnsToRemove = value; } /// Backing field for property. private string _partitionKey; @@ -90,6 +90,9 @@ public partial interface IAzureTableOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", SerializedName = @"accountKey", PossibleTypes = new [] { typeof(string) })] @@ -100,6 +103,9 @@ public partial interface IAzureTableOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", SerializedName = @"accountName", PossibleTypes = new [] { typeof(string) })] @@ -108,6 +114,9 @@ public partial interface IAzureTableOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The number of rows to write to the Azure Table at a time.", SerializedName = @"batchSize", PossibleTypes = new [] { typeof(int) })] @@ -118,10 +127,13 @@ public partial interface IAzureTableOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"If specified, each item in the array is the name of a column to remove (if present) from output event entities.", SerializedName = @"columnsToRemove", PossibleTypes = new [] { typeof(string) })] - string[] ColumnsToRemove { get; set; } + System.Collections.Generic.List ColumnsToRemove { get; set; } /// /// This element indicates the name of a column from the SELECT statement in the query that will be used as the partition /// key for the Azure Table. Required on PUT (CreateOrReplace) requests. @@ -129,6 +141,9 @@ public partial interface IAzureTableOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element indicates the name of a column from the SELECT statement in the query that will be used as the partition key for the Azure Table. Required on PUT (CreateOrReplace) requests.", SerializedName = @"partitionKey", PossibleTypes = new [] { typeof(string) })] @@ -140,6 +155,9 @@ public partial interface IAzureTableOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This element indicates the name of a column from the SELECT statement in the query that will be used as the row key for the Azure Table. Required on PUT (CreateOrReplace) requests.", SerializedName = @"rowKey", PossibleTypes = new [] { typeof(string) })] @@ -148,6 +166,9 @@ public partial interface IAzureTableOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Azure Table. Required on PUT (CreateOrReplace) requests.", SerializedName = @"table", PossibleTypes = new [] { typeof(string) })] @@ -171,7 +192,7 @@ internal partial interface IAzureTableOutputDataSourcePropertiesInternal /// /// If specified, each item in the array is the name of a column to remove (if present) from output event entities. /// - string[] ColumnsToRemove { get; set; } + System.Collections.Generic.List ColumnsToRemove { get; set; } /// /// This element indicates the name of a column from the SELECT statement in the query that will be used as the partition /// key for the Azure Table. Required on PUT (CreateOrReplace) requests. diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSourceProperties.json.cs similarity index 92% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSourceProperties.json.cs index 9c20a4e121c6..7eb47d585e87 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/AzureTableOutputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/AzureTableOutputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,24 +65,24 @@ internal AzureTableOutputDataSourceProperties(Microsoft.Azure.PowerShell.Cmdlets { return; } - {_accountName = If( json?.PropertyT("accountName"), out var __jsonAccountName) ? (string)__jsonAccountName : (string)AccountName;} - {_accountKey = If( json?.PropertyT("accountKey"), out var __jsonAccountKey) ? (string)__jsonAccountKey : (string)AccountKey;} - {_table = If( json?.PropertyT("table"), out var __jsonTable) ? (string)__jsonTable : (string)Table;} - {_partitionKey = If( json?.PropertyT("partitionKey"), out var __jsonPartitionKey) ? (string)__jsonPartitionKey : (string)PartitionKey;} - {_rowKey = If( json?.PropertyT("rowKey"), out var __jsonRowKey) ? (string)__jsonRowKey : (string)RowKey;} - {_columnsToRemove = If( json?.PropertyT("columnsToRemove"), out var __jsonColumnsToRemove) ? If( __jsonColumnsToRemove as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : ColumnsToRemove;} - {_batchSize = If( json?.PropertyT("batchSize"), out var __jsonBatchSize) ? (int?)__jsonBatchSize : BatchSize;} + {_accountName = If( json?.PropertyT("accountName"), out var __jsonAccountName) ? (string)__jsonAccountName : (string)_accountName;} + {_accountKey = If( json?.PropertyT("accountKey"), out var __jsonAccountKey) ? (string)__jsonAccountKey : (string)_accountKey;} + {_table = If( json?.PropertyT("table"), out var __jsonTable) ? (string)__jsonTable : (string)_table;} + {_partitionKey = If( json?.PropertyT("partitionKey"), out var __jsonPartitionKey) ? (string)__jsonPartitionKey : (string)_partitionKey;} + {_rowKey = If( json?.PropertyT("rowKey"), out var __jsonRowKey) ? (string)__jsonRowKey : (string)_rowKey;} + {_columnsToRemove = If( json?.PropertyT("columnsToRemove"), out var __jsonColumnsToRemove) ? If( __jsonColumnsToRemove as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _columnsToRemove;} + {_batchSize = If( json?.PropertyT("batchSize"), out var __jsonBatchSize) ? (int?)__jsonBatchSize : _batchSize;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IAzureTableOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAzureTableOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new AzureTableOutputDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..ac905e3b95f6 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobDataSourceProperties.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with a blob data source. + [System.ComponentModel.TypeConverter(typeof(BlobDataSourcePropertiesTypeConverter))] + public partial class BlobDataSourceProperties + { + + /// + /// 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 BlobDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount = (System.Collections.Generic.List) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom)); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("PathPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat, 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 BlobDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount = (System.Collections.Generic.List) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom)); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("PathPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new BlobDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new BlobDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with a blob data source. + [System.ComponentModel.TypeConverter(typeof(BlobDataSourcePropertiesTypeConverter))] + public partial interface IBlobDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobDataSourceProperties.TypeConverter.cs index b68552bb183c..ced7cd3bfa4c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobDataSourceProperties.cs similarity index 89% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobDataSourceProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobDataSourceProperties.cs index 36ee8e48e693..1d34eddee531 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobDataSourceProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobDataSourceProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with a blob data source. public partial class BlobDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal { /// Backing field for property. @@ -45,13 +45,13 @@ public partial class BlobDataSourceProperties : public string PathPattern { get => this._pathPattern; set => this._pathPattern = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] _storageAccount; + private System.Collections.Generic.List _storageAccount; /// /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] StorageAccount { get => this._storageAccount; set => this._storageAccount = value; } + public System.Collections.Generic.List StorageAccount { get => this._storageAccount; set => this._storageAccount = value; } /// Backing field for property. private string _timeFormat; @@ -79,6 +79,9 @@ public partial interface IBlobDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.", SerializedName = @"container", PossibleTypes = new [] { typeof(string) })] @@ -89,6 +92,9 @@ public partial interface IBlobDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.", SerializedName = @"dateFormat", PossibleTypes = new [] { typeof(string) })] @@ -102,6 +108,9 @@ public partial interface IBlobDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.", SerializedName = @"pathPattern", PossibleTypes = new [] { typeof(string) })] @@ -112,16 +121,22 @@ public partial interface IBlobDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests.", SerializedName = @"storageAccounts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] StorageAccount { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount) })] + System.Collections.Generic.List StorageAccount { get; set; } /// /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.", SerializedName = @"timeFormat", PossibleTypes = new [] { typeof(string) })] @@ -151,7 +166,7 @@ internal partial interface IBlobDataSourcePropertiesInternal /// /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] StorageAccount { get; set; } + System.Collections.Generic.List StorageAccount { get; set; } /// /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. /// diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobDataSourceProperties.json.cs similarity index 91% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobDataSourceProperties.json.cs index b32fb3123fb7..20d2b1e23467 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,22 +65,22 @@ internal BlobDataSourceProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamAnaly { return; } - {_storageAccount = If( json?.PropertyT("storageAccounts"), out var __jsonStorageAccounts) ? If( __jsonStorageAccounts as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccount.FromJson(__u) )) ))() : null : StorageAccount;} - {_container = If( json?.PropertyT("container"), out var __jsonContainer) ? (string)__jsonContainer : (string)Container;} - {_pathPattern = If( json?.PropertyT("pathPattern"), out var __jsonPathPattern) ? (string)__jsonPathPattern : (string)PathPattern;} - {_dateFormat = If( json?.PropertyT("dateFormat"), out var __jsonDateFormat) ? (string)__jsonDateFormat : (string)DateFormat;} - {_timeFormat = If( json?.PropertyT("timeFormat"), out var __jsonTimeFormat) ? (string)__jsonTimeFormat : (string)TimeFormat;} + {_storageAccount = If( json?.PropertyT("storageAccounts"), out var __jsonStorageAccounts) ? If( __jsonStorageAccounts as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccount.FromJson(__u) )) ))() : null : _storageAccount;} + {_container = If( json?.PropertyT("container"), out var __jsonContainer) ? (string)__jsonContainer : (string)_container;} + {_pathPattern = If( json?.PropertyT("pathPattern"), out var __jsonPathPattern) ? (string)__jsonPathPattern : (string)_pathPattern;} + {_dateFormat = If( json?.PropertyT("dateFormat"), out var __jsonDateFormat) ? (string)__jsonDateFormat : (string)_dateFormat;} + {_timeFormat = If( json?.PropertyT("timeFormat"), out var __jsonTimeFormat) ? (string)__jsonTimeFormat : (string)_timeFormat;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new BlobDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSource.PowerShell.cs new file mode 100644 index 000000000000..391ee92455c4 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSource.PowerShell.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes a blob output data source. + [System.ComponentModel.TypeConverter(typeof(BlobOutputDataSourceTypeConverter))] + public partial class BlobOutputDataSource + { + + /// + /// 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 BlobOutputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).StorageAccount = (System.Collections.Generic.List) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom)); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("PathPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).PathPattern, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).TimeFormat, 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 BlobOutputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).StorageAccount = (System.Collections.Generic.List) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom)); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("PathPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).PathPattern, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal)this).TimeFormat, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new BlobOutputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new BlobOutputDataSource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes a blob output data source. + [System.ComponentModel.TypeConverter(typeof(BlobOutputDataSourceTypeConverter))] + public partial interface IBlobOutputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSource.TypeConverter.cs index 4d6fc1296643..efb79a5ac415 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSource.cs new file mode 100644 index 000000000000..5370d373c2ee --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSource.cs @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Describes a blob output data source. + public partial class BlobOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(); + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? null; } + + /// + /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from + /// or written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Container { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).Container; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).Container = value ?? null; } + + /// + /// The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string DateFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).DateFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).DateFormat = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobOutputDataSourceProperties()); set { {_property = value;} } } + + /// + /// The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine + /// whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input + /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and + /// example. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string PathPattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).PathPattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).PathPattern = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceProperties _property; + + /// + /// The properties that are associated with a blob output. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobOutputDataSourceProperties()); set => this._property = value; } + + /// + /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List StorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).StorageAccount = value ?? null /* arrayOf */; } + + /// + /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string TimeFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).TimeFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).TimeFormat = value ?? null; } + + /// + /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Microsoft.Storage/Blob"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)__outputDataSource).Type = "Microsoft.Storage/Blob"; } + + /// Creates an new instance. + public BlobOutputDataSource() + { + this.__outputDataSource.Type = "Microsoft.Storage/Blob"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); + await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); + } + } + /// Describes a blob output data source. + public partial interface IBlobOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource + { + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Authentication Mode.", + SerializedName = @"authenticationMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// + /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from + /// or written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"container", + PossibleTypes = new [] { typeof(string) })] + string Container { get; set; } + /// + /// The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.", + SerializedName = @"dateFormat", + PossibleTypes = new [] { typeof(string) })] + string DateFormat { get; set; } + /// + /// The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine + /// whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input + /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and + /// example. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.", + SerializedName = @"pathPattern", + PossibleTypes = new [] { typeof(string) })] + string PathPattern { get; set; } + /// + /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"storageAccounts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount) })] + System.Collections.Generic.List StorageAccount { get; set; } + /// + /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.", + SerializedName = @"timeFormat", + PossibleTypes = new [] { typeof(string) })] + string TimeFormat { get; set; } + + } + /// Describes a blob output data source. + internal partial interface IBlobOutputDataSourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal + { + /// Authentication Mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// + /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from + /// or written to. Required on PUT (CreateOrReplace) requests. + /// + string Container { get; set; } + /// + /// The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. + /// + string DateFormat { get; set; } + /// + /// The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine + /// whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input + /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and + /// example. + /// + string PathPattern { get; set; } + /// + /// The properties that are associated with a blob output. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceProperties Property { get; set; } + /// + /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. + /// + System.Collections.Generic.List StorageAccount { get; set; } + /// + /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. + /// + string TimeFormat { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSource.json.cs index 1faa655c0244..bd82bbf3b407 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal BlobOutputDataSource(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics { return; } - __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobOutputDataSourceProperties.FromJson(__jsonProperties) : Property;} + __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobOutputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new BlobOutputDataSource(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..5c3e7af2b762 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSourceProperties.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with a blob output. + [System.ComponentModel.TypeConverter(typeof(BlobOutputDataSourcePropertiesTypeConverter))] + public partial class BlobOutputDataSourceProperties + { + + /// + /// 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 BlobOutputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourcePropertiesInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount = (System.Collections.Generic.List) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom)); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("PathPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat, 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 BlobOutputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourcePropertiesInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount = (System.Collections.Generic.List) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom)); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("PathPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new BlobOutputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new BlobOutputDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with a blob output. + [System.ComponentModel.TypeConverter(typeof(BlobOutputDataSourcePropertiesTypeConverter))] + public partial interface IBlobOutputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSourceProperties.TypeConverter.cs index 87d5b460d48f..38d81d324ae3 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSourceProperties.cs new file mode 100644 index 000000000000..983dc4e0b06e --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSourceProperties.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with a blob output. + public partial class BlobOutputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourcePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourceProperties __blobDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobDataSourceProperties(); + + /// Backing field for property. + private string _authenticationMode; + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string AuthenticationMode { get => this._authenticationMode; set => this._authenticationMode = value; } + + /// + /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from + /// or written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Container { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).Container; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).Container = value ?? null; } + + /// + /// The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string DateFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).DateFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).DateFormat = value ?? null; } + + /// + /// The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine + /// whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input + /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and + /// example. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string PathPattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).PathPattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).PathPattern = value ?? null; } + + /// + /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public System.Collections.Generic.List StorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).StorageAccount = value ?? null /* arrayOf */; } + + /// + /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string TimeFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).TimeFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).TimeFormat = value ?? null; } + + /// Creates an new instance. + public BlobOutputDataSourceProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__blobDataSourceProperties), __blobDataSourceProperties); + await eventListener.AssertObjectIsValid(nameof(__blobDataSourceProperties), __blobDataSourceProperties); + } + } + /// The properties that are associated with a blob output. + public partial interface IBlobOutputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourceProperties + { + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Authentication Mode.", + SerializedName = @"authenticationMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + + } + /// The properties that are associated with a blob output. + internal partial interface IBlobOutputDataSourcePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal + { + /// Authentication Mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSourceProperties.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSourceProperties.json.cs index f2c92e341968..6824481aa463 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobOutputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobOutputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal BlobOutputDataSourceProperties(Microsoft.Azure.PowerShell.Cmdlets.Strea { return; } - __blobDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobDataSourceProperties(json); - {_authenticationMode = If( json?.PropertyT("authenticationMode"), out var __jsonAuthenticationMode) ? (string)__jsonAuthenticationMode : (string)AuthenticationMode;} + __blobDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobDataSourceProperties(json); + {_authenticationMode = If( json?.PropertyT("authenticationMode"), out var __jsonAuthenticationMode) ? (string)__jsonAuthenticationMode : (string)_authenticationMode;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new BlobOutputDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSource.PowerShell.cs new file mode 100644 index 000000000000..955cafee2d79 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSource.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes a blob input data source that contains reference data. + [System.ComponentModel.TypeConverter(typeof(BlobReferenceInputDataSourceTypeConverter))] + public partial class BlobReferenceInputDataSource + { + + /// + /// 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 BlobReferenceInputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobReferenceInputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).StorageAccount = (System.Collections.Generic.List) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom)); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("PathPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).PathPattern, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).TimeFormat, 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 BlobReferenceInputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobReferenceInputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).StorageAccount = (System.Collections.Generic.List) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom)); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("PathPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).PathPattern, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal)this).TimeFormat, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new BlobReferenceInputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new BlobReferenceInputDataSource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes a blob input data source that contains reference data. + [System.ComponentModel.TypeConverter(typeof(BlobReferenceInputDataSourceTypeConverter))] + public partial interface IBlobReferenceInputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSource.TypeConverter.cs index 0e3954540e8a..f48891f25ef7 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSource.cs similarity index 75% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSource.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSource.cs index cd15a36aed92..67bcbd9b04fc 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSource.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSource.cs @@ -3,37 +3,37 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes a blob input data source that contains reference data. public partial class BlobReferenceInputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource __referenceInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ReferenceInputDataSource(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource __referenceInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ReferenceInputDataSource(); /// /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from /// or written to. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Container { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).Container; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).Container = value ?? null; } + public string Container { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).Container; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).Container = value ?? null; } /// /// The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string DateFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).DateFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).DateFormat = value ?? null; } + public string DateFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).DateFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).DateFormat = value ?? null; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobDataSourceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobReferenceInputDataSourceProperties()); set { {_property = value;} } } /// /// The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine @@ -42,39 +42,40 @@ public partial class BlobReferenceInputDataSource : /// example. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string PathPattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).PathPattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).PathPattern = value ?? null; } + public string PathPattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).PathPattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).PathPattern = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceProperties _property; /// /// The properties that are associated with a blob input containing reference data. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobDataSourceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobReferenceInputDataSourceProperties()); set => this._property = value; } /// /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] StorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).StorageAccount = value ?? null /* arrayOf */; } + public System.Collections.Generic.List StorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).StorageAccount = value ?? null /* arrayOf */; } /// /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TimeFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).TimeFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).TimeFormat = value ?? null; } + public string TimeFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).TimeFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).TimeFormat = value ?? null; } /// /// Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests. /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)__referenceInputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)__referenceInputDataSource).Type = value ; } + public string Type { get => "Microsoft.Storage/Blob"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)__referenceInputDataSource).Type = "Microsoft.Storage/Blob"; } /// Creates an new instance. public BlobReferenceInputDataSource() { - + this.__referenceInputDataSource.Type = "Microsoft.Storage/Blob"; } /// Validates that this object meets the validation criteria. @@ -92,7 +93,7 @@ public BlobReferenceInputDataSource() /// Describes a blob input data source that contains reference data. public partial interface IBlobReferenceInputDataSource : Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource { /// /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from @@ -101,6 +102,9 @@ public partial interface IBlobReferenceInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.", SerializedName = @"container", PossibleTypes = new [] { typeof(string) })] @@ -111,6 +115,9 @@ public partial interface IBlobReferenceInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.", SerializedName = @"dateFormat", PossibleTypes = new [] { typeof(string) })] @@ -124,6 +131,9 @@ public partial interface IBlobReferenceInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.", SerializedName = @"pathPattern", PossibleTypes = new [] { typeof(string) })] @@ -134,16 +144,22 @@ public partial interface IBlobReferenceInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests.", SerializedName = @"storageAccounts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] StorageAccount { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount) })] + System.Collections.Generic.List StorageAccount { get; set; } /// /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.", SerializedName = @"timeFormat", PossibleTypes = new [] { typeof(string) })] @@ -152,7 +168,7 @@ public partial interface IBlobReferenceInputDataSource : } /// Describes a blob input data source that contains reference data. internal partial interface IBlobReferenceInputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal { /// /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from @@ -173,11 +189,11 @@ internal partial interface IBlobReferenceInputDataSourceInternal : /// /// The properties that are associated with a blob input containing reference data. Required on PUT (CreateOrReplace) requests. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceProperties Property { get; set; } /// /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] StorageAccount { get; set; } + System.Collections.Generic.List StorageAccount { get; set; } /// /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. /// diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSource.json.cs index 3146923a0835..d901013f7c80 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal BlobReferenceInputDataSource(Microsoft.Azure.PowerShell.Cmdlets.StreamA { return; } - __referenceInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ReferenceInputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobDataSourceProperties.FromJson(__jsonProperties) : Property;} + __referenceInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ReferenceInputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobReferenceInputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new BlobReferenceInputDataSource(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..5175a7a3064f --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSourceProperties.PowerShell.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with a blob input containing reference data. + [System.ComponentModel.TypeConverter(typeof(BlobReferenceInputDataSourcePropertiesTypeConverter))] + public partial class BlobReferenceInputDataSourceProperties + { + + /// + /// 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 BlobReferenceInputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount = (System.Collections.Generic.List) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom)); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("PathPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat, 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 BlobReferenceInputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount = (System.Collections.Generic.List) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom)); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("PathPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new BlobReferenceInputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new BlobReferenceInputDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with a blob input containing reference data. + [System.ComponentModel.TypeConverter(typeof(BlobReferenceInputDataSourcePropertiesTypeConverter))] + public partial interface IBlobReferenceInputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSourceProperties.TypeConverter.cs index db2d1eb41edb..e052272a88d9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSourceProperties.cs new file mode 100644 index 000000000000..accae3de93e5 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSourceProperties.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with a blob input containing reference data. + public partial class BlobReferenceInputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourcePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourceProperties __blobDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobDataSourceProperties(); + + /// + /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from + /// or written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Container { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).Container; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).Container = value ?? null; } + + /// + /// The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string DateFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).DateFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).DateFormat = value ?? null; } + + /// + /// The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine + /// whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input + /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and + /// example. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string PathPattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).PathPattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).PathPattern = value ?? null; } + + /// + /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public System.Collections.Generic.List StorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).StorageAccount = value ?? null /* arrayOf */; } + + /// + /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string TimeFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).TimeFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).TimeFormat = value ?? null; } + + /// Creates an new instance. + public BlobReferenceInputDataSourceProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__blobDataSourceProperties), __blobDataSourceProperties); + await eventListener.AssertObjectIsValid(nameof(__blobDataSourceProperties), __blobDataSourceProperties); + } + } + /// The properties that are associated with a blob input containing reference data. + public partial interface IBlobReferenceInputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourceProperties + { + + } + /// The properties that are associated with a blob input containing reference data. + internal partial interface IBlobReferenceInputDataSourcePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSourceProperties.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSourceProperties.json.cs index 9deb944f9161..1316f30ee8fe 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobReferenceInputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobReferenceInputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,18 +65,18 @@ internal BlobReferenceInputDataSourceProperties(Microsoft.Azure.PowerShell.Cmdle { return; } - __blobDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobDataSourceProperties(json); + __blobDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobDataSourceProperties(json); AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobReferenceInputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobReferenceInputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new BlobReferenceInputDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSource.PowerShell.cs new file mode 100644 index 000000000000..d56a4879bdae --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSource.PowerShell.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes a blob input data source that contains stream data. + [System.ComponentModel.TypeConverter(typeof(BlobStreamInputDataSourceTypeConverter))] + public partial class BlobStreamInputDataSource + { + + /// + /// 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 BlobStreamInputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).StorageAccount = (System.Collections.Generic.List) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom)); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("PathPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).PathPattern, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).TimeFormat, global::System.Convert.ToString); + } + if (content.Contains("SourcePartitionCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).SourcePartitionCount = (int?) content.GetValueForProperty("SourcePartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).SourcePartitionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal BlobStreamInputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).StorageAccount = (System.Collections.Generic.List) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom)); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("PathPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).PathPattern, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).TimeFormat, global::System.Convert.ToString); + } + if (content.Contains("SourcePartitionCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).SourcePartitionCount = (int?) content.GetValueForProperty("SourcePartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal)this).SourcePartitionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new BlobStreamInputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new BlobStreamInputDataSource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes a blob input data source that contains stream data. + [System.ComponentModel.TypeConverter(typeof(BlobStreamInputDataSourceTypeConverter))] + public partial interface IBlobStreamInputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSource.TypeConverter.cs index 0533fbc038e4..5b8afc453a06 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSource.cs similarity index 75% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSource.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSource.cs index 84b07e2f8fda..9d45532c6d87 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSource.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSource.cs @@ -3,37 +3,37 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes a blob input data source that contains stream data. public partial class BlobStreamInputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamInputDataSource(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamInputDataSource(); /// /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from /// or written to. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Container { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).Container; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).Container = value ?? null; } + public string Container { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).Container; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).Container = value ?? null; } /// /// The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string DateFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).DateFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).DateFormat = value ?? null; } + public string DateFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).DateFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).DateFormat = value ?? null; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobStreamInputDataSourceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobStreamInputDataSourceProperties()); set { {_property = value;} } } /// /// The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine @@ -42,43 +42,44 @@ public partial class BlobStreamInputDataSource : /// example. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string PathPattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).PathPattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).PathPattern = value ?? null; } + public string PathPattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).PathPattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).PathPattern = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceProperties _property; /// /// The properties that are associated with a blob input containing stream data. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobStreamInputDataSourceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobStreamInputDataSourceProperties()); set => this._property = value; } /// The partition count of the blob input data source. Range 1 - 256. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public int? SourcePartitionCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourcePropertiesInternal)Property).SourcePartitionCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourcePropertiesInternal)Property).SourcePartitionCount = value ?? default(int); } + public int? SourcePartitionCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourcePropertiesInternal)Property).SourcePartitionCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourcePropertiesInternal)Property).SourcePartitionCount = value ?? default(int); } /// /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] StorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).StorageAccount = value ?? null /* arrayOf */; } + public System.Collections.Generic.List StorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).StorageAccount = value ?? null /* arrayOf */; } /// /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string TimeFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).TimeFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobDataSourcePropertiesInternal)Property).TimeFormat = value ?? null; } + public string TimeFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).TimeFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)Property).TimeFormat = value ?? null; } /// /// Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)__streamInputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)__streamInputDataSource).Type = value ; } + public string Type { get => "Microsoft.Storage/Blob"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)__streamInputDataSource).Type = "Microsoft.Storage/Blob"; } /// Creates an new instance. public BlobStreamInputDataSource() { - + this.__streamInputDataSource.Type = "Microsoft.Storage/Blob"; } /// Validates that this object meets the validation criteria. @@ -96,7 +97,7 @@ public BlobStreamInputDataSource() /// Describes a blob input data source that contains stream data. public partial interface IBlobStreamInputDataSource : Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource { /// /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from @@ -105,6 +106,9 @@ public partial interface IBlobStreamInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of a container within the associated Storage account. This container contains either the blob(s) to be read from or written to. Required on PUT (CreateOrReplace) requests.", SerializedName = @"container", PossibleTypes = new [] { typeof(string) })] @@ -115,6 +119,9 @@ public partial interface IBlobStreamInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead.", SerializedName = @"dateFormat", PossibleTypes = new [] { typeof(string) })] @@ -128,6 +135,9 @@ public partial interface IBlobStreamInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and example.", SerializedName = @"pathPattern", PossibleTypes = new [] { typeof(string) })] @@ -136,6 +146,9 @@ public partial interface IBlobStreamInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The partition count of the blob input data source. Range 1 - 256.", SerializedName = @"sourcePartitionCount", PossibleTypes = new [] { typeof(int) })] @@ -146,16 +159,22 @@ public partial interface IBlobStreamInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests.", SerializedName = @"storageAccounts", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] StorageAccount { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount) })] + System.Collections.Generic.List StorageAccount { get; set; } /// /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead.", SerializedName = @"timeFormat", PossibleTypes = new [] { typeof(string) })] @@ -164,7 +183,7 @@ public partial interface IBlobStreamInputDataSource : } /// Describes a blob input data source that contains stream data. internal partial interface IBlobStreamInputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal { /// /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from @@ -185,13 +204,13 @@ internal partial interface IBlobStreamInputDataSourceInternal : /// /// The properties that are associated with a blob input containing stream data. Required on PUT (CreateOrReplace) requests. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceProperties Property { get; set; } /// The partition count of the blob input data source. Range 1 - 256. int? SourcePartitionCount { get; set; } /// /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount[] StorageAccount { get; set; } + System.Collections.Generic.List StorageAccount { get; set; } /// /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. /// diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSource.json.cs index 3bc6fbe9d626..3d73835785f9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal BlobStreamInputDataSource(Microsoft.Azure.PowerShell.Cmdlets.StreamAnal { return; } - __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamInputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobStreamInputDataSourceProperties.FromJson(__jsonProperties) : Property;} + __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamInputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobStreamInputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new BlobStreamInputDataSource(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..23a75a5d73c8 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSourceProperties.PowerShell.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with a blob input containing stream data. + [System.ComponentModel.TypeConverter(typeof(BlobStreamInputDataSourcePropertiesTypeConverter))] + public partial class BlobStreamInputDataSourceProperties + { + + /// + /// 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 BlobStreamInputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SourcePartitionCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourcePropertiesInternal)this).SourcePartitionCount = (int?) content.GetValueForProperty("SourcePartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourcePropertiesInternal)this).SourcePartitionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount = (System.Collections.Generic.List) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom)); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("PathPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat, 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 BlobStreamInputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SourcePartitionCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourcePropertiesInternal)this).SourcePartitionCount = (int?) content.GetValueForProperty("SourcePartitionCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourcePropertiesInternal)this).SourcePartitionCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount = (System.Collections.Generic.List) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).StorageAccount, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom)); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("PathPattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern = (string) content.GetValueForProperty("PathPattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).PathPattern, global::System.Convert.ToString); + } + if (content.Contains("DateFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat = (string) content.GetValueForProperty("DateFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).DateFormat, global::System.Convert.ToString); + } + if (content.Contains("TimeFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat = (string) content.GetValueForProperty("TimeFormat",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)this).TimeFormat, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new BlobStreamInputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new BlobStreamInputDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with a blob input containing stream data. + [System.ComponentModel.TypeConverter(typeof(BlobStreamInputDataSourcePropertiesTypeConverter))] + public partial interface IBlobStreamInputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSourceProperties.TypeConverter.cs index 2fb9469795aa..345fbe33519d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSourceProperties.cs new file mode 100644 index 000000000000..0e471a44e5e2 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSourceProperties.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with a blob input containing stream data. + public partial class BlobStreamInputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourcePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourceProperties __blobDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobDataSourceProperties(); + + /// + /// The name of a container within the associated Storage account. This container contains either the blob(s) to be read from + /// or written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Container { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).Container; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).Container = value ?? null; } + + /// + /// The date format. Wherever {date} appears in pathPattern, the value of this property is used as the date format instead. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string DateFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).DateFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).DateFormat = value ?? null; } + + /// + /// The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine + /// whether or not they should be included as input or output to the job. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input + /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a more detailed explanation and + /// example. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string PathPattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).PathPattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).PathPattern = value ?? null; } + + /// Backing field for property. + private int? _sourcePartitionCount; + + /// The partition count of the blob input data source. Range 1 - 256. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public int? SourcePartitionCount { get => this._sourcePartitionCount; set => this._sourcePartitionCount = value; } + + /// + /// A list of one or more Azure Storage accounts. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public System.Collections.Generic.List StorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).StorageAccount = value ?? null /* arrayOf */; } + + /// + /// The time format. Wherever {time} appears in pathPattern, the value of this property is used as the time format instead. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string TimeFormat { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).TimeFormat; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal)__blobDataSourceProperties).TimeFormat = value ?? null; } + + /// Creates an new instance. + public BlobStreamInputDataSourceProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__blobDataSourceProperties), __blobDataSourceProperties); + await eventListener.AssertObjectIsValid(nameof(__blobDataSourceProperties), __blobDataSourceProperties); + } + } + /// The properties that are associated with a blob input containing stream data. + public partial interface IBlobStreamInputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourceProperties + { + /// The partition count of the blob input data source. Range 1 - 256. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The partition count of the blob input data source. Range 1 - 256.", + SerializedName = @"sourcePartitionCount", + PossibleTypes = new [] { typeof(int) })] + int? SourcePartitionCount { get; set; } + + } + /// The properties that are associated with a blob input containing stream data. + internal partial interface IBlobStreamInputDataSourcePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobDataSourcePropertiesInternal + { + /// The partition count of the blob input data source. Range 1 - 256. + int? SourcePartitionCount { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSourceProperties.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSourceProperties.json.cs index bc5bc6d74b27..c6fe493ff8db 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/BlobStreamInputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/BlobStreamInputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal BlobStreamInputDataSourceProperties(Microsoft.Azure.PowerShell.Cmdlets. { return; } - __blobDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.BlobDataSourceProperties(json); - {_sourcePartitionCount = If( json?.PropertyT("sourcePartitionCount"), out var __jsonSourcePartitionCount) ? (int?)__jsonSourcePartitionCount : SourcePartitionCount;} + __blobDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.BlobDataSourceProperties(json); + {_sourcePartitionCount = If( json?.PropertyT("sourcePartitionCount"), out var __jsonSourcePartitionCount) ? (int?)__jsonSourcePartitionCount : _sourcePartitionCount;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IBlobStreamInputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IBlobStreamInputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new BlobStreamInputDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBinding.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBinding.PowerShell.cs new file mode 100644 index 000000000000..3581a4016f70 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBinding.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The binding to a CSharp function. + [System.ComponentModel.TypeConverter(typeof(CSharpFunctionBindingTypeConverter))] + public partial class CSharpFunctionBinding + { + + /// + /// 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 CSharpFunctionBinding(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionBindingPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Script, global::System.Convert.ToString); + } + if (content.Contains("DllPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).DllPath = (string) content.GetValueForProperty("DllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).DllPath, global::System.Convert.ToString); + } + if (content.Contains("Class")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Class = (string) content.GetValueForProperty("Class",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Class, global::System.Convert.ToString); + } + if (content.Contains("Method")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Method = (string) content.GetValueForProperty("Method",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Method, 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 CSharpFunctionBinding(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionBindingPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Script, global::System.Convert.ToString); + } + if (content.Contains("DllPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).DllPath = (string) content.GetValueForProperty("DllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).DllPath, global::System.Convert.ToString); + } + if (content.Contains("Class")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Class = (string) content.GetValueForProperty("Class",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Class, global::System.Convert.ToString); + } + if (content.Contains("Method")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Method = (string) content.GetValueForProperty("Method",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal)this).Method, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBinding DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CSharpFunctionBinding(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBinding DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CSharpFunctionBinding(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBinding FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 binding to a CSharp function. + [System.ComponentModel.TypeConverter(typeof(CSharpFunctionBindingTypeConverter))] + public partial interface ICSharpFunctionBinding + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBinding.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBinding.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBinding.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBinding.TypeConverter.cs index 019336fbd17d..cd1be552c76e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBinding.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBinding.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBinding ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBinding ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBinding).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBinding).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBinding.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBinding.cs new file mode 100644 index 000000000000..b5e886aef5f2 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBinding.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The binding to a CSharp function. + public partial class CSharpFunctionBinding : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBinding, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionBinding(); + + /// The Csharp code containing a single function definition. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Class { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)Property).Class; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)Property).Class = value ?? null; } + + /// The Csharp code containing a single function definition. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string DllPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)Property).DllPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)Property).DllPath = value ?? null; } + + /// The Csharp code containing a single function definition. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Method { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)Property).Method; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)Property).Method = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionBindingProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingProperties _property; + + /// The binding properties associated with a CSharp function. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionBindingProperties()); set => this._property = value; } + + /// The Csharp code containing a single function definition. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Script { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)Property).Script; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)Property).Script = value ?? null; } + + /// Indicates the function binding type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Microsoft.StreamAnalytics/CLRUdf"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)__functionBinding).Type = "Microsoft.StreamAnalytics/CLRUdf"; } + + /// Creates an new instance. + public CSharpFunctionBinding() + { + this.__functionBinding.Type = "Microsoft.StreamAnalytics/CLRUdf"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__functionBinding), __functionBinding); + await eventListener.AssertObjectIsValid(nameof(__functionBinding), __functionBinding); + } + } + /// The binding to a CSharp function. + public partial interface ICSharpFunctionBinding : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding + { + /// The Csharp code containing a single function definition. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Csharp code containing a single function definition.", + SerializedName = @"class", + PossibleTypes = new [] { typeof(string) })] + string Class { get; set; } + /// The Csharp code containing a single function definition. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Csharp code containing a single function definition.", + SerializedName = @"dllPath", + PossibleTypes = new [] { typeof(string) })] + string DllPath { get; set; } + /// The Csharp code containing a single function definition. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Csharp code containing a single function definition.", + SerializedName = @"method", + PossibleTypes = new [] { typeof(string) })] + string Method { get; set; } + /// The Csharp code containing a single function definition. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Csharp code containing a single function definition.", + SerializedName = @"script", + PossibleTypes = new [] { typeof(string) })] + string Script { get; set; } + + } + /// The binding to a CSharp function. + internal partial interface ICSharpFunctionBindingInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal + { + /// The Csharp code containing a single function definition. + string Class { get; set; } + /// The Csharp code containing a single function definition. + string DllPath { get; set; } + /// The Csharp code containing a single function definition. + string Method { get; set; } + /// The binding properties associated with a CSharp function. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingProperties Property { get; set; } + /// The Csharp code containing a single function definition. + string Script { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBinding.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBinding.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBinding.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBinding.json.cs index 61669ff076d1..b882bceac069 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBinding.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBinding.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal CSharpFunctionBinding(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytic { return; } - __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionBinding(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionBindingProperties.FromJson(__jsonProperties) : Property;} + __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionBinding(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionBindingProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBinding. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBinding. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBinding. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBinding. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBinding FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBinding FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new CSharpFunctionBinding(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingProperties.PowerShell.cs new file mode 100644 index 000000000000..be4ab67f38c1 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingProperties.PowerShell.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The binding properties associated with a CSharp function. + [System.ComponentModel.TypeConverter(typeof(CSharpFunctionBindingPropertiesTypeConverter))] + public partial class CSharpFunctionBindingProperties + { + + /// + /// 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 CSharpFunctionBindingProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).Script, global::System.Convert.ToString); + } + if (content.Contains("DllPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).DllPath = (string) content.GetValueForProperty("DllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).DllPath, global::System.Convert.ToString); + } + if (content.Contains("Class")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).Class = (string) content.GetValueForProperty("Class",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).Class, global::System.Convert.ToString); + } + if (content.Contains("Method")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).Method = (string) content.GetValueForProperty("Method",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).Method, 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 CSharpFunctionBindingProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).Script, global::System.Convert.ToString); + } + if (content.Contains("DllPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).DllPath = (string) content.GetValueForProperty("DllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).DllPath, global::System.Convert.ToString); + } + if (content.Contains("Class")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).Class = (string) content.GetValueForProperty("Class",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).Class, global::System.Convert.ToString); + } + if (content.Contains("Method")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).Method = (string) content.GetValueForProperty("Method",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal)this).Method, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CSharpFunctionBindingProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CSharpFunctionBindingProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 binding properties associated with a CSharp function. + [System.ComponentModel.TypeConverter(typeof(CSharpFunctionBindingPropertiesTypeConverter))] + public partial interface ICSharpFunctionBindingProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingProperties.TypeConverter.cs index 647757d493b6..11e29da51093 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingProperties.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingProperties.cs index 938d8414171b..817e8cb6971f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The binding properties associated with a CSharp function. public partial class CSharpFunctionBindingProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingPropertiesInternal { /// Backing field for property. @@ -55,6 +55,9 @@ public partial interface ICSharpFunctionBindingProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Csharp code containing a single function definition.", SerializedName = @"class", PossibleTypes = new [] { typeof(string) })] @@ -63,6 +66,9 @@ public partial interface ICSharpFunctionBindingProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Csharp code containing a single function definition.", SerializedName = @"dllPath", PossibleTypes = new [] { typeof(string) })] @@ -71,6 +77,9 @@ public partial interface ICSharpFunctionBindingProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Csharp code containing a single function definition.", SerializedName = @"method", PossibleTypes = new [] { typeof(string) })] @@ -79,6 +88,9 @@ public partial interface ICSharpFunctionBindingProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The Csharp code containing a single function definition.", SerializedName = @"script", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingProperties.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingProperties.json.cs index d622325fc5c7..66065d806419 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,21 +65,21 @@ internal CSharpFunctionBindingProperties(Microsoft.Azure.PowerShell.Cmdlets.Stre { return; } - {_script = If( json?.PropertyT("script"), out var __jsonScript) ? (string)__jsonScript : (string)Script;} - {_dllPath = If( json?.PropertyT("dllPath"), out var __jsonDllPath) ? (string)__jsonDllPath : (string)DllPath;} - {_class = If( json?.PropertyT("class"), out var __jsonClass) ? (string)__jsonClass : (string)Class;} - {_method = If( json?.PropertyT("method"), out var __jsonMethod) ? (string)__jsonMethod : (string)Method;} + {_script = If( json?.PropertyT("script"), out var __jsonScript) ? (string)__jsonScript : (string)_script;} + {_dllPath = If( json?.PropertyT("dllPath"), out var __jsonDllPath) ? (string)__jsonDllPath : (string)_dllPath;} + {_class = If( json?.PropertyT("class"), out var __jsonClass) ? (string)__jsonClass : (string)_class;} + {_method = If( json?.PropertyT("method"), out var __jsonMethod) ? (string)__jsonMethod : (string)_method;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new CSharpFunctionBindingProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingRetrievalProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingRetrievalProperties.PowerShell.cs new file mode 100644 index 000000000000..ef9efee282ab --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingRetrievalProperties.PowerShell.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The binding retrieval properties associated with a CSharp function. + [System.ComponentModel.TypeConverter(typeof(CSharpFunctionBindingRetrievalPropertiesTypeConverter))] + public partial class CSharpFunctionBindingRetrievalProperties + { + + /// + /// 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 CSharpFunctionBindingRetrievalProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalPropertiesInternal)this).Script, global::System.Convert.ToString); + } + if (content.Contains("UdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalPropertiesInternal)this).UdfType = (string) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalPropertiesInternal)this).UdfType, 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 CSharpFunctionBindingRetrievalProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalPropertiesInternal)this).Script, global::System.Convert.ToString); + } + if (content.Contains("UdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalPropertiesInternal)this).UdfType = (string) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalPropertiesInternal)this).UdfType, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CSharpFunctionBindingRetrievalProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CSharpFunctionBindingRetrievalProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 binding retrieval properties associated with a CSharp function. + [System.ComponentModel.TypeConverter(typeof(CSharpFunctionBindingRetrievalPropertiesTypeConverter))] + public partial interface ICSharpFunctionBindingRetrievalProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingRetrievalProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingRetrievalProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingRetrievalProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingRetrievalProperties.TypeConverter.cs index 9bcc421d9452..6c586ceffe99 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingRetrievalProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingRetrievalProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingRetrievalProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingRetrievalProperties.cs similarity index 80% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingRetrievalProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingRetrievalProperties.cs index 9ef1dc62f54d..ea32116651af 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingRetrievalProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingRetrievalProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The binding retrieval properties associated with a CSharp function. public partial class CSharpFunctionBindingRetrievalProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalPropertiesInternal { /// Backing field for property. @@ -21,11 +21,11 @@ public partial class CSharpFunctionBindingRetrievalProperties : public string Script { get => this._script; set => this._script = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? _udfType; + private string _udfType; /// The function type. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? UdfType { get => this._udfType; set => this._udfType = value; } + public string UdfType { get => this._udfType; set => this._udfType = value; } /// /// Creates an new instance. @@ -43,6 +43,9 @@ public partial interface ICSharpFunctionBindingRetrievalProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The CSharp code containing a single function definition.", SerializedName = @"script", PossibleTypes = new [] { typeof(string) })] @@ -51,10 +54,14 @@ public partial interface ICSharpFunctionBindingRetrievalProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The function type.", SerializedName = @"udfType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? UdfType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string UdfType { get; set; } } /// The binding retrieval properties associated with a CSharp function. @@ -64,7 +71,8 @@ internal partial interface ICSharpFunctionBindingRetrievalPropertiesInternal /// The CSharp code containing a single function definition. string Script { get; set; } /// The function type. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? UdfType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string UdfType { get; set; } } } \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingRetrievalProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingRetrievalProperties.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingRetrievalProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingRetrievalProperties.json.cs index 99c3f4a7692c..989f32d4b06e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionBindingRetrievalProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionBindingRetrievalProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal CSharpFunctionBindingRetrievalProperties(Microsoft.Azure.PowerShell.Cmd { return; } - {_script = If( json?.PropertyT("script"), out var __jsonScript) ? (string)__jsonScript : (string)Script;} - {_udfType = If( json?.PropertyT("udfType"), out var __jsonUdfType) ? (string)__jsonUdfType : (string)UdfType;} + {_script = If( json?.PropertyT("script"), out var __jsonScript) ? (string)__jsonScript : (string)_script;} + {_udfType = If( json?.PropertyT("udfType"), out var __jsonUdfType) ? (string)__jsonUdfType : (string)_udfType;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionBindingRetrievalProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new CSharpFunctionBindingRetrievalProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs new file mode 100644 index 000000000000..b2e7c7324ec1 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// The parameters needed to retrieve the default function definition for a CSharp function. + /// + [System.ComponentModel.TypeConverter(typeof(CSharpFunctionRetrieveDefaultDefinitionParametersTypeConverter))] + public partial class CSharpFunctionRetrieveDefaultDefinitionParameters + { + + /// + /// 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 CSharpFunctionRetrieveDefaultDefinitionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("BindingRetrievalProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("BindingType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyUdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (string) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyScript")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript = (string) content.GetValueForProperty("BindingRetrievalPropertyScript",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript, 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 CSharpFunctionRetrieveDefaultDefinitionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("BindingRetrievalProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("BindingType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyUdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (string) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyScript")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript = (string) content.GetValueForProperty("BindingRetrievalPropertyScript",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CSharpFunctionRetrieveDefaultDefinitionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CSharpFunctionRetrieveDefaultDefinitionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 parameters needed to retrieve the default function definition for a CSharp function. + [System.ComponentModel.TypeConverter(typeof(CSharpFunctionRetrieveDefaultDefinitionParametersTypeConverter))] + public partial interface ICSharpFunctionRetrieveDefaultDefinitionParameters + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs index 99fe9168fc6d..29fb2258d544 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionRetrieveDefaultDefinitionParameters.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionRetrieveDefaultDefinitionParameters.cs new file mode 100644 index 000000000000..d287c0384c9c --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionRetrieveDefaultDefinitionParameters.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// The parameters needed to retrieve the default function definition for a CSharp function. + /// + public partial class CSharpFunctionRetrieveDefaultDefinitionParameters : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParameters, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionRetrieveDefaultDefinitionParameters(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalProperties _bindingRetrievalProperty; + + /// The binding retrieval properties associated with a CSharp function. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalProperties BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionBindingRetrievalProperties()); set => this._bindingRetrievalProperty = value; } + + /// The CSharp code containing a single function definition. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string BindingRetrievalPropertyScript { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).Script; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).Script = value ?? null; } + + /// The function type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string BindingRetrievalPropertyUdfType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType = value ?? null; } + + /// Indicates the function binding type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string BindingType { get => "Microsoft.StreamAnalytics/CLRUdf"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)__functionRetrieveDefaultDefinitionParameters).BindingType = "Microsoft.StreamAnalytics/CLRUdf"; } + + /// Internal Acessors for BindingRetrievalProperty + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParametersInternal.BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionBindingRetrievalProperties()); set { {_bindingRetrievalProperty = value;} } } + + /// + /// Creates an new instance. + /// + public CSharpFunctionRetrieveDefaultDefinitionParameters() + { + this.__functionRetrieveDefaultDefinitionParameters.BindingType = "Microsoft.StreamAnalytics/CLRUdf"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); + await eventListener.AssertObjectIsValid(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); + } + } + /// The parameters needed to retrieve the default function definition for a CSharp function. + public partial interface ICSharpFunctionRetrieveDefaultDefinitionParameters : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters + { + /// The CSharp code containing a single function definition. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The CSharp code containing a single function definition.", + SerializedName = @"script", + PossibleTypes = new [] { typeof(string) })] + string BindingRetrievalPropertyScript { get; set; } + /// The function type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The function type.", + SerializedName = @"udfType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string BindingRetrievalPropertyUdfType { get; set; } + + } + /// The parameters needed to retrieve the default function definition for a CSharp function. + internal partial interface ICSharpFunctionRetrieveDefaultDefinitionParametersInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal + { + /// The binding retrieval properties associated with a CSharp function. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionBindingRetrievalProperties BindingRetrievalProperty { get; set; } + /// The CSharp code containing a single function definition. + string BindingRetrievalPropertyScript { get; set; } + /// The function type. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string BindingRetrievalPropertyUdfType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionRetrieveDefaultDefinitionParameters.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionRetrieveDefaultDefinitionParameters.json.cs similarity index 92% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionRetrieveDefaultDefinitionParameters.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionRetrieveDefaultDefinitionParameters.json.cs index e0b0f0c4e77b..5090536e2b32 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CSharpFunctionRetrieveDefaultDefinitionParameters.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CSharpFunctionRetrieveDefaultDefinitionParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -68,19 +68,19 @@ internal CSharpFunctionRetrieveDefaultDefinitionParameters(Microsoft.Azure.Power { return; } - __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionRetrieveDefaultDefinitionParameters(json); - {_bindingRetrievalProperty = If( json?.PropertyT("bindingRetrievalProperties"), out var __jsonBindingRetrievalProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CSharpFunctionBindingRetrievalProperties.FromJson(__jsonBindingRetrievalProperties) : BindingRetrievalProperty;} + __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionRetrieveDefaultDefinitionParameters(json); + {_bindingRetrievalProperty = If( json?.PropertyT("bindingRetrievalProperties"), out var __jsonBindingRetrievalProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CSharpFunctionBindingRetrievalProperties.FromJson(__jsonBindingRetrievalProperties) : _bindingRetrievalProperty;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICSharpFunctionRetrieveDefaultDefinitionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICSharpFunctionRetrieveDefaultDefinitionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new CSharpFunctionRetrieveDefaultDefinitionParameters(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Cluster.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Cluster.PowerShell.cs new file mode 100644 index 000000000000..6a758dbe26fe --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Cluster.PowerShell.cs @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// A Stream Analytics Cluster object + [System.ComponentModel.TypeConverter(typeof(ClusterTypeConverter))] + public partial class Cluster + { + + /// + /// 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 Cluster(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterSkuTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Etag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).Etag = (string) content.GetValueForProperty("Etag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).Etag, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CreatedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).ClusterId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("CapacityAllocated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).CapacityAllocated = (int?) content.GetValueForProperty("CapacityAllocated",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).CapacityAllocated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CapacityAssigned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).CapacityAssigned = (int?) content.GetValueForProperty("CapacityAssigned",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).CapacityAssigned, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Cluster(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterSkuTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Etag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).Etag = (string) content.GetValueForProperty("Etag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).Etag, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("SkuCapacity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).SkuCapacity = (int?) content.GetValueForProperty("SkuCapacity",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).SkuCapacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CreatedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).ClusterId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("CapacityAllocated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).CapacityAllocated = (int?) content.GetValueForProperty("CapacityAllocated",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).CapacityAllocated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CapacityAssigned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).CapacityAssigned = (int?) content.GetValueForProperty("CapacityAssigned",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal)this).CapacityAssigned, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Cluster(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Cluster(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// A Stream Analytics Cluster object + [System.ComponentModel.TypeConverter(typeof(ClusterTypeConverter))] + public partial interface ICluster + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/Cluster.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Cluster.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/Cluster.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Cluster.TypeConverter.cs index 9827d7b36175..040c4905a7c9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/Cluster.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Cluster.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Cluster.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Cluster.cs new file mode 100644 index 000000000000..7b0f5fbab306 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Cluster.cs @@ -0,0 +1,318 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// A Stream Analytics Cluster object + public partial class Cluster : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResource(); + + /// Represents the number of streaming units currently being used on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public int? CapacityAllocated { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)Property).CapacityAllocated; } + + /// + /// Represents the sum of the SUs of all streaming jobs associated with the cluster. If all of the jobs were running, this + /// would be the capacity allocated. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public int? CapacityAssigned { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)Property).CapacityAssigned; } + + /// Unique identifier for the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)Property).ClusterId; } + + /// The date this cluster was created. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public global::System.DateTime? CreatedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)Property).CreatedDate; } + + /// Backing field for property. + private string _etag; + + /// + /// The current entity tag for the cluster. This is an opaque string. You can use it to detect whether the resource has changed + /// between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Etag { get => this._etag; } + + /// + /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Id; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)__trackedResource).Location = value ?? null; } + + /// Internal Acessors for CapacityAllocated + int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal.CapacityAllocated { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)Property).CapacityAllocated; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)Property).CapacityAllocated = value ?? default(int); } + + /// Internal Acessors for CapacityAssigned + int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal.CapacityAssigned { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)Property).CapacityAssigned; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)Property).CapacityAssigned = value ?? default(int); } + + /// Internal Acessors for ClusterId + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal.ClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)Property).ClusterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)Property).ClusterId = value ?? null; } + + /// Internal Acessors for CreatedDate + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal.CreatedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)Property).CreatedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)Property).CreatedDate = value ?? default(global::System.DateTime); } + + /// Internal Acessors for Etag + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal.Etag { get => this._etag; set { {_etag = value;} } } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for Sku + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSku Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterSku()); set { {_sku = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Name = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterProperties _property; + + /// The properties associated with a Stream Analytics cluster. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterProperties()); set => this._property = value; } + + /// + /// The status of the cluster provisioning. The three terminal states are: Succeeded, Failed and Canceled + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSku _sku; + + /// + /// The SKU of the cluster. This determines the size/capacity of the cluster. Required on PUT (CreateOrUpdate) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterSku()); set => this._sku = value; } + + /// + /// Denotes the number of streaming units the cluster can support. Valid values for this property are multiples of 36 with + /// a minimum value of 36 and maximum value of 216. Required on PUT (CreateOrUpdate) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public int? SkuCapacity { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSkuInternal)Sku).Capacity; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSkuInternal)Sku).Capacity = value ?? default(int); } + + /// + /// Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSkuInternal)Sku).Name = value ?? null; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// + /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Type; } + + /// Creates an new instance. + public Cluster() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// A Stream Analytics Cluster object + public partial interface ICluster : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResource + { + /// Represents the number of streaming units currently being used on the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the number of streaming units currently being used on the cluster.", + SerializedName = @"capacityAllocated", + PossibleTypes = new [] { typeof(int) })] + int? CapacityAllocated { get; } + /// + /// Represents the sum of the SUs of all streaming jobs associated with the cluster. If all of the jobs were running, this + /// would be the capacity allocated. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Represents the sum of the SUs of all streaming jobs associated with the cluster. If all of the jobs were running, this would be the capacity allocated.", + SerializedName = @"capacityAssigned", + PossibleTypes = new [] { typeof(int) })] + int? CapacityAssigned { get; } + /// Unique identifier for the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Unique identifier for the cluster.", + SerializedName = @"clusterId", + PossibleTypes = new [] { typeof(string) })] + string ClusterId { get; } + /// The date this cluster was created. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date this cluster was created.", + SerializedName = @"createdDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedDate { get; } + /// + /// The current entity tag for the cluster. This is an opaque string. You can use it to detect whether the resource has changed + /// between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current entity tag for the cluster. This is an opaque string. You can use it to detect whether the resource has changed between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency.", + SerializedName = @"etag", + PossibleTypes = new [] { typeof(string) })] + string Etag { get; } + /// + /// The status of the cluster provisioning. The three terminal states are: Succeeded, Failed and Canceled + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the cluster provisioning. The three terminal states are: Succeeded, Failed and Canceled", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "InProgress")] + string ProvisioningState { get; } + /// + /// Denotes the number of streaming units the cluster can support. Valid values for this property are multiples of 36 with + /// a minimum value of 36 and maximum value of 216. Required on PUT (CreateOrUpdate) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Denotes the number of streaming units the cluster can support. Valid values for this property are multiples of 36 with a minimum value of 36 and maximum value of 216. Required on PUT (CreateOrUpdate) requests.", + SerializedName = @"capacity", + PossibleTypes = new [] { typeof(int) })] + int? SkuCapacity { get; set; } + /// + /// Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Default")] + string SkuName { get; set; } + + } + /// A Stream Analytics Cluster object + internal partial interface IClusterInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal + { + /// Represents the number of streaming units currently being used on the cluster. + int? CapacityAllocated { get; set; } + /// + /// Represents the sum of the SUs of all streaming jobs associated with the cluster. If all of the jobs were running, this + /// would be the capacity allocated. + /// + int? CapacityAssigned { get; set; } + /// Unique identifier for the cluster. + string ClusterId { get; set; } + /// The date this cluster was created. + global::System.DateTime? CreatedDate { get; set; } + /// + /// The current entity tag for the cluster. This is an opaque string. You can use it to detect whether the resource has changed + /// between requests. You can also use it in the If-Match or If-None-Match headers for write operations for optimistic concurrency. + /// + string Etag { get; set; } + /// The properties associated with a Stream Analytics cluster. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterProperties Property { get; set; } + /// + /// The status of the cluster provisioning. The three terminal states are: Succeeded, Failed and Canceled + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "InProgress")] + string ProvisioningState { get; set; } + /// + /// The SKU of the cluster. This determines the size/capacity of the cluster. Required on PUT (CreateOrUpdate) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSku Sku { get; set; } + /// + /// Denotes the number of streaming units the cluster can support. Valid values for this property are multiples of 36 with + /// a minimum value of 36 and maximum value of 216. Required on PUT (CreateOrUpdate) requests. + /// + int? SkuCapacity { get; set; } + /// + /// Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Default")] + string SkuName { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/Cluster.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Cluster.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/Cluster.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Cluster.json.cs index 3a504d5a671f..19dcc31fdc40 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/Cluster.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Cluster.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,21 +65,21 @@ internal Cluster(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json { return; } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResource(json); - {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterSku.FromJson(__jsonSku) : Sku;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterProperties.FromJson(__jsonProperties) : Property;} - {_etag = If( json?.PropertyT("etag"), out var __jsonEtag) ? (string)__jsonEtag : (string)Etag;} + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResource(json); + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterSku.FromJson(__jsonSku) : _sku;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterProperties.FromJson(__jsonProperties) : _property;} + {_etag = If( json?.PropertyT("etag"), out var __jsonEtag) ? (string)__jsonEtag : (string)_etag;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new Cluster(json) : null; } @@ -106,7 +106,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode __trackedResource?.ToJson(container, serializationMode); AddIf( null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) this._sku.ToJson(null,serializationMode) : null, "sku" ,container.Add ); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._etag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._etag.ToString()) : null, "etag" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ClusterInfo.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterInfo.PowerShell.cs similarity index 78% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ClusterInfo.PowerShell.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterInfo.PowerShell.cs index 7018166e9a8c..f97486fa08c3 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ClusterInfo.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterInfo.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -55,7 +55,15 @@ public partial class ClusterInfo partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of 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. @@ -70,13 +78,13 @@ internal ClusterInfo(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfoInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfoInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfoInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfoInternal)this).Id, 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. @@ -91,33 +99,33 @@ internal ClusterInfo(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfoInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfoInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfoInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfoInternal)this).Id, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ClusterInfo(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ClusterInfo(content); } @@ -127,12 +135,24 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties associated with a Stream Analytics cluster. [System.ComponentModel.TypeConverter(typeof(ClusterInfoTypeConverter))] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ClusterInfo.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterInfo.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ClusterInfo.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterInfo.TypeConverter.cs index aa3071b45f98..4231e7413f82 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ClusterInfo.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterInfo.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ClusterInfo.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterInfo.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ClusterInfo.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterInfo.cs index aa7493507867..4b9e4deed740 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ClusterInfo.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterInfo.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties associated with a Stream Analytics cluster. public partial class ClusterInfo : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfoInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfoInternal { /// Backing field for property. @@ -34,6 +34,9 @@ public partial interface IClusterInfo : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The resource id of cluster.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ClusterInfo.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterInfo.json.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ClusterInfo.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterInfo.json.cs index 3e49f3e783f3..f7d124d9f8bd 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ClusterInfo.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterInfo.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,18 +65,18 @@ internal ClusterInfo(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime. { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IClusterInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ClusterInfo(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJob.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJob.PowerShell.cs new file mode 100644 index 000000000000..4144092d6df6 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJob.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// A streaming job. + [System.ComponentModel.TypeConverter(typeof(ClusterJobTypeConverter))] + public partial class ClusterJob + { + + /// + /// 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 ClusterJob(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("StreamingUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("JobState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal)this).JobState = (string) content.GetValueForProperty("JobState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal)this).JobState, 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 ClusterJob(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("StreamingUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("JobState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal)this).JobState = (string) content.GetValueForProperty("JobState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal)this).JobState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ClusterJob(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ClusterJob(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// A streaming job. + [System.ComponentModel.TypeConverter(typeof(ClusterJobTypeConverter))] + public partial interface IClusterJob + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJob.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJob.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJob.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJob.TypeConverter.cs index 32f78454685b..f5895f84475b 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJob.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJob.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJob.cs similarity index 76% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJob.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJob.cs index 302f3f5b3540..b3723f28e330 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJob.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJob.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// A streaming job. public partial class ClusterJob : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal { /// Backing field for property. @@ -21,20 +21,20 @@ public partial class ClusterJob : public string Id { get => this._id; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState? _jobState; + private string _jobState; /// The current execution state of the streaming job. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState? JobState { get => this._jobState; } + public string JobState { get => this._jobState; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for JobState - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal.JobState { get => this._jobState; set { {_jobState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal.JobState { get => this._jobState; set { {_jobState = value;} } } /// Internal Acessors for StreamingUnit - int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobInternal.StreamingUnit { get => this._streamingUnit; set { {_streamingUnit = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobInternal.StreamingUnit { get => this._streamingUnit; set { {_streamingUnit = value;} } } /// Backing field for property. private int? _streamingUnit; @@ -57,6 +57,9 @@ public partial interface IClusterJob : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource ID of the streaming job.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -65,14 +68,21 @@ public partial interface IClusterJob : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The current execution state of the streaming job.", SerializedName = @"jobState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState? JobState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Created", "Starting", "Running", "Stopping", "Stopped", "Deleting", "Failed", "Degraded", "Restarting", "Scaling")] + string JobState { get; } /// The number of streaming units that are used by the streaming job. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The number of streaming units that are used by the streaming job.", SerializedName = @"streamingUnits", PossibleTypes = new [] { typeof(int) })] @@ -86,7 +96,8 @@ internal partial interface IClusterJobInternal /// Resource ID of the streaming job. string Id { get; set; } /// The current execution state of the streaming job. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState? JobState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Created", "Starting", "Running", "Stopping", "Stopped", "Deleting", "Failed", "Degraded", "Restarting", "Scaling")] + string JobState { get; set; } /// The number of streaming units that are used by the streaming job. int? StreamingUnit { get; set; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJob.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJob.json.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJob.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJob.json.cs index a16c1e5d2cc2..f7ab23db8f59 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJob.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJob.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,20 +65,20 @@ internal ClusterJob(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.J { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_streamingUnit = If( json?.PropertyT("streamingUnits"), out var __jsonStreamingUnits) ? (int?)__jsonStreamingUnits : StreamingUnit;} - {_jobState = If( json?.PropertyT("jobState"), out var __jsonJobState) ? (string)__jsonJobState : (string)JobState;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_streamingUnit = If( json?.PropertyT("streamingUnits"), out var __jsonStreamingUnits) ? (int?)__jsonStreamingUnits : _streamingUnit;} + {_jobState = If( json?.PropertyT("jobState"), out var __jsonJobState) ? (string)__jsonJobState : (string)_jobState;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ClusterJob(json) : null; } @@ -102,15 +102,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._streamingUnit ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNumber((int)this._streamingUnit) : null, "streamingUnits" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._jobState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._jobState.ToString()) : null, "jobState" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJobListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJobListResult.PowerShell.cs new file mode 100644 index 000000000000..920db105adc0 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJobListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// A list of streaming jobs. Populated by a List operation. + [System.ComponentModel.TypeConverter(typeof(ClusterJobListResultTypeConverter))] + public partial class ClusterJobListResult + { + + /// + /// 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 ClusterJobListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterJobTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResultInternal)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 ClusterJobListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterJobTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ClusterJobListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ClusterJobListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// A list of streaming jobs. Populated by a List operation. + [System.ComponentModel.TypeConverter(typeof(ClusterJobListResultTypeConverter))] + public partial interface IClusterJobListResult + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJobListResult.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJobListResult.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJobListResult.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJobListResult.TypeConverter.cs index cb6cc5974219..6bc1fb283bbe 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJobListResult.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJobListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJobListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJobListResult.cs new file mode 100644 index 000000000000..b2e371293f12 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJobListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// A list of streaming jobs. Populated by a List operation. + public partial class ClusterJobListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResult, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The URL to fetch the next set of streaming jobs. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// A list of streaming jobs. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public ClusterJobListResult() + { + + } + } + /// A list of streaming jobs. Populated by a List operation. + public partial interface IClusterJobListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// The URL to fetch the next set of streaming jobs. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The URL to fetch the next set of streaming jobs.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// A list of streaming jobs. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list of streaming jobs.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob) })] + System.Collections.Generic.List Value { get; } + + } + /// A list of streaming jobs. Populated by a List operation. + internal partial interface IClusterJobListResultInternal + + { + /// The URL to fetch the next set of streaming jobs. + string NextLink { get; set; } + /// A list of streaming jobs. + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJobListResult.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJobListResult.json.cs similarity index 91% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJobListResult.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJobListResult.json.cs index 8e4a9c660b64..ced577e6f7ba 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterJobListResult.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterJobListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ClusterJobListResult(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterJob.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterJob.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ClusterJobListResult(json) : null; } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { @@ -113,7 +113,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode container.Add("value",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterListResult.PowerShell.cs new file mode 100644 index 000000000000..058a44fc5ec1 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// A list of clusters populated by a 'list' operation. + [System.ComponentModel.TypeConverter(typeof(ClusterListResultTypeConverter))] + public partial class ClusterListResult + { + + /// + /// 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 ClusterListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResultInternal)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 ClusterListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ClusterListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ClusterListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// A list of clusters populated by a 'list' operation. + [System.ComponentModel.TypeConverter(typeof(ClusterListResultTypeConverter))] + public partial interface IClusterListResult + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterListResult.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterListResult.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterListResult.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterListResult.TypeConverter.cs index 1f4918747346..3b6d7b1e0ec2 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterListResult.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterListResult.cs new file mode 100644 index 000000000000..9c1ad303756e --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// A list of clusters populated by a 'list' operation. + public partial class ClusterListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResult, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The URL to fetch the next set of clusters. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// A list of clusters. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public ClusterListResult() + { + + } + } + /// A list of clusters populated by a 'list' operation. + public partial interface IClusterListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// The URL to fetch the next set of clusters. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The URL to fetch the next set of clusters.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// A list of clusters. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list of clusters.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster) })] + System.Collections.Generic.List Value { get; } + + } + /// A list of clusters populated by a 'list' operation. + internal partial interface IClusterListResultInternal + + { + /// The URL to fetch the next set of clusters. + string NextLink { get; set; } + /// A list of clusters. + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterListResult.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterListResult.json.cs similarity index 91% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterListResult.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterListResult.json.cs index 8d6d21349b06..44742a54b46d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterListResult.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ClusterListResult(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Ru { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.Cluster.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Cluster.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ClusterListResult(json) : null; } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { @@ -113,7 +113,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode container.Add("value",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterProperties.PowerShell.cs new file mode 100644 index 000000000000..5fac6db5cab6 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterProperties.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties associated with a Stream Analytics cluster. + [System.ComponentModel.TypeConverter(typeof(ClusterPropertiesTypeConverter))] + public partial class ClusterProperties + { + + /// + /// 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 ClusterProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).ClusterId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("CapacityAllocated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).CapacityAllocated = (int?) content.GetValueForProperty("CapacityAllocated",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).CapacityAllocated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CapacityAssigned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).CapacityAssigned = (int?) content.GetValueForProperty("CapacityAssigned",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).CapacityAssigned, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ClusterProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).ClusterId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("CapacityAllocated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).CapacityAllocated = (int?) content.GetValueForProperty("CapacityAllocated",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).CapacityAllocated, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CapacityAssigned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).CapacityAssigned = (int?) content.GetValueForProperty("CapacityAssigned",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal)this).CapacityAssigned, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ClusterProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ClusterProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties associated with a Stream Analytics cluster. + [System.ComponentModel.TypeConverter(typeof(ClusterPropertiesTypeConverter))] + public partial interface IClusterProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterProperties.TypeConverter.cs index 27800251a5b0..dd80827036f1 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterProperties.cs similarity index 81% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterProperties.cs index 4f9f609f8597..f4ddd68175c3 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties associated with a Stream Analytics cluster. public partial class ClusterProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal { /// Backing field for property. @@ -45,28 +45,28 @@ public partial class ClusterProperties : public global::System.DateTime? CreatedDate { get => this._createdDate; } /// Internal Acessors for CapacityAllocated - int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal.CapacityAllocated { get => this._capacityAllocated; set { {_capacityAllocated = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal.CapacityAllocated { get => this._capacityAllocated; set { {_capacityAllocated = value;} } } /// Internal Acessors for CapacityAssigned - int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal.CapacityAssigned { get => this._capacityAssigned; set { {_capacityAssigned = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal.CapacityAssigned { get => this._capacityAssigned; set { {_capacityAssigned = value;} } } /// Internal Acessors for ClusterId - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal.ClusterId { get => this._clusterId; set { {_clusterId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal.ClusterId { get => this._clusterId; set { {_clusterId = value;} } } /// Internal Acessors for CreatedDate - global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal.CreatedDate { get => this._createdDate; set { {_createdDate = value;} } } + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal.CreatedDate { get => this._createdDate; set { {_createdDate = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState? _provisioningState; + private string _provisioningState; /// /// The status of the cluster provisioning. The three terminal states are: Succeeded, Failed and Canceled /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState? ProvisioningState { get => this._provisioningState; } + public string ProvisioningState { get => this._provisioningState; } /// Creates an new instance. public ClusterProperties() @@ -82,6 +82,9 @@ public partial interface IClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Represents the number of streaming units currently being used on the cluster.", SerializedName = @"capacityAllocated", PossibleTypes = new [] { typeof(int) })] @@ -93,6 +96,9 @@ public partial interface IClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Represents the sum of the SUs of all streaming jobs associated with the cluster. If all of the jobs were running, this would be the capacity allocated.", SerializedName = @"capacityAssigned", PossibleTypes = new [] { typeof(int) })] @@ -101,6 +107,9 @@ public partial interface IClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Unique identifier for the cluster.", SerializedName = @"clusterId", PossibleTypes = new [] { typeof(string) })] @@ -109,6 +118,9 @@ public partial interface IClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The date this cluster was created.", SerializedName = @"createdDate", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -119,10 +131,14 @@ public partial interface IClusterProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The status of the cluster provisioning. The three terminal states are: Succeeded, Failed and Canceled", SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState? ProvisioningState { get; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "InProgress")] + string ProvisioningState { get; } } /// The properties associated with a Stream Analytics cluster. @@ -143,7 +159,8 @@ internal partial interface IClusterPropertiesInternal /// /// The status of the cluster provisioning. The three terminal states are: Succeeded, Failed and Canceled /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState? ProvisioningState { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "InProgress")] + string ProvisioningState { get; set; } } } \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterProperties.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterProperties.json.cs index ce1a42f5a720..1d1d79160d28 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,22 +65,22 @@ internal ClusterProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Ru { return; } - {_createdDate = If( json?.PropertyT("createdDate"), out var __jsonCreatedDate) ? global::System.DateTime.TryParse((string)__jsonCreatedDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedDateValue) ? __jsonCreatedDateValue : CreatedDate : CreatedDate;} - {_clusterId = If( json?.PropertyT("clusterId"), out var __jsonClusterId) ? (string)__jsonClusterId : (string)ClusterId;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_capacityAllocated = If( json?.PropertyT("capacityAllocated"), out var __jsonCapacityAllocated) ? (int?)__jsonCapacityAllocated : CapacityAllocated;} - {_capacityAssigned = If( json?.PropertyT("capacityAssigned"), out var __jsonCapacityAssigned) ? (int?)__jsonCapacityAssigned : CapacityAssigned;} + {_createdDate = If( json?.PropertyT("createdDate"), out var __jsonCreatedDate) ? global::System.DateTime.TryParse((string)__jsonCreatedDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedDateValue) ? __jsonCreatedDateValue : _createdDate : _createdDate;} + {_clusterId = If( json?.PropertyT("clusterId"), out var __jsonClusterId) ? (string)__jsonClusterId : (string)_clusterId;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_capacityAllocated = If( json?.PropertyT("capacityAllocated"), out var __jsonCapacityAllocated) ? (int?)__jsonCapacityAllocated : _capacityAllocated;} + {_capacityAssigned = If( json?.PropertyT("capacityAssigned"), out var __jsonCapacityAssigned) ? (int?)__jsonCapacityAssigned : _capacityAssigned;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ClusterProperties(json) : null; } @@ -104,23 +104,23 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._createdDate ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._createdDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdDate" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._clusterId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._clusterId.ToString()) : null, "clusterId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._capacityAllocated ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNumber((int)this._capacityAllocated) : null, "capacityAllocated" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._capacityAssigned ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNumber((int)this._capacityAssigned) : null, "capacityAssigned" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterSku.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterSku.PowerShell.cs similarity index 75% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterSku.PowerShell.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterSku.PowerShell.cs index 94c716373104..ab1c204bfb92 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterSku.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterSku.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -57,7 +57,15 @@ public partial class ClusterSku partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of 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. @@ -72,17 +80,17 @@ internal ClusterSku(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSkuInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSkuInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSkuInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Capacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -97,37 +105,37 @@ internal ClusterSku(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSkuInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSkuInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSkuInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Capacity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSkuInternal)this).Capacity = (int?) content.GetValueForProperty("Capacity",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSkuInternal)this).Capacity, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSku DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSku DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ClusterSku(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ClusterSku(content); } @@ -137,12 +145,24 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 SKU of the cluster. This determines the size/capacity of the cluster. Required on PUT (CreateOrUpdate) requests. [System.ComponentModel.TypeConverter(typeof(ClusterSkuTypeConverter))] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterSku.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterSku.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterSku.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterSku.TypeConverter.cs index da1ebd91969a..0787e097530c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterSku.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterSku.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSku ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSku ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSku).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSku).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterSku.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterSku.cs similarity index 85% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterSku.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterSku.cs index 6f579cf73389..63f727b54f98 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterSku.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterSku.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301P /// The SKU of the cluster. This determines the size/capacity of the cluster. Required on PUT (CreateOrUpdate) requests. /// public partial class ClusterSku : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSku, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSkuInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSku, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSkuInternal { /// Backing field for property. @@ -26,13 +26,13 @@ public partial class ClusterSku : public int? Capacity { get => this._capacity; set => this._capacity = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName? _name; + private string _name; /// /// Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName? Name { get => this._name; set => this._name = value; } + public string Name { get => this._name; set => this._name = value; } /// Creates an new instance. public ClusterSku() @@ -51,6 +51,9 @@ public partial interface IClusterSku : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Denotes the number of streaming units the cluster can support. Valid values for this property are multiples of 36 with a minimum value of 36 and maximum value of 216. Required on PUT (CreateOrUpdate) requests.", SerializedName = @"capacity", PossibleTypes = new [] { typeof(int) })] @@ -61,10 +64,14 @@ public partial interface IClusterSku : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests.", SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName? Name { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Default")] + string Name { get; set; } } /// The SKU of the cluster. This determines the size/capacity of the cluster. Required on PUT (CreateOrUpdate) requests. @@ -79,7 +86,8 @@ internal partial interface IClusterSkuInternal /// /// Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName? Name { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Default")] + string Name { get; set; } } } \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterSku.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterSku.json.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterSku.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterSku.json.cs index ef4bffb23c4a..6e5430bc766b 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20200301Preview/ClusterSku.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ClusterSku.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -67,19 +67,19 @@ internal ClusterSku(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.J { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_capacity = If( json?.PropertyT("capacity"), out var __jsonCapacity) ? (int?)__jsonCapacity : Capacity;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_capacity = If( json?.PropertyT("capacity"), out var __jsonCapacity) ? (int?)__jsonCapacity : _capacity;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSku. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSku. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSku. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSku. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterSku FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterSku FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ClusterSku(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Compression.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Compression.PowerShell.cs similarity index 78% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Compression.PowerShell.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Compression.PowerShell.cs index ab36817900e1..2aede570b5ee 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Compression.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Compression.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -55,7 +55,15 @@ public partial class Compression partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into a new instance of 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. @@ -70,13 +78,13 @@ internal Compression(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompressionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompressionInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompressionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompressionInternal)this).Type, 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. @@ -91,33 +99,33 @@ internal Compression(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompressionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompressionInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompressionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompressionInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Compression(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Compression(content); } @@ -127,12 +135,24 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } } /// Describes how input data is compressed [System.ComponentModel.TypeConverter(typeof(CompressionTypeConverter))] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Compression.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Compression.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Compression.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Compression.TypeConverter.cs index c1890db55700..bb7f0542d5f9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Compression.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Compression.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Compression.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Compression.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Compression.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Compression.cs index 929ee65a71c6..85445ded22c3 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Compression.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Compression.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes how input data is compressed public partial class Compression : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompressionInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompressionInternal { /// Backing field for property. @@ -32,6 +32,9 @@ public partial interface ICompression : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Compression.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Compression.json.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Compression.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Compression.json.cs index 2bdd8608feed..b8a7d6a21768 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Compression.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Compression.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,18 +65,18 @@ internal Compression(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime. { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new Compression(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerialization.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerialization.PowerShell.cs new file mode 100644 index 000000000000..913fd2e697c4 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerialization.PowerShell.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// Describes how data from an input is serialized or how data is serialized when written to an output in CSV format. + /// + [System.ComponentModel.TypeConverter(typeof(CsvSerializationTypeConverter))] + public partial class CsvSerialization + { + + /// + /// 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 CsvSerialization(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CsvSerializationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Encoding")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationInternal)this).Encoding = (string) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationInternal)this).Encoding, global::System.Convert.ToString); + } + if (content.Contains("FieldDelimiter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationInternal)this).FieldDelimiter = (string) content.GetValueForProperty("FieldDelimiter",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationInternal)this).FieldDelimiter, 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 CsvSerialization(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CsvSerializationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Encoding")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationInternal)this).Encoding = (string) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationInternal)this).Encoding, global::System.Convert.ToString); + } + if (content.Contains("FieldDelimiter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationInternal)this).FieldDelimiter = (string) content.GetValueForProperty("FieldDelimiter",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationInternal)this).FieldDelimiter, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerialization DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CsvSerialization(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerialization DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CsvSerialization(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerialization FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes how data from an input is serialized or how data is serialized when written to an output in CSV format. + [System.ComponentModel.TypeConverter(typeof(CsvSerializationTypeConverter))] + public partial interface ICsvSerialization + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerialization.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerialization.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerialization.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerialization.TypeConverter.cs index 640b25a628af..d969c5a29908 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerialization.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerialization.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerialization ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerialization ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerialization).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerialization).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerialization.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerialization.cs new file mode 100644 index 000000000000..7a62f980ad2c --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// Describes how data from an input is serialized or how data is serialized when written to an output in CSV format. + /// + public partial class CsvSerialization : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerialization, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Serialization(); + + /// + /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. + /// Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Encoding { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationPropertiesInternal)Property).Encoding; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationPropertiesInternal)Property).Encoding = value ?? null; } + + /// + /// Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input + /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required + /// on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string FieldDelimiter { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationPropertiesInternal)Property).FieldDelimiter; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationPropertiesInternal)Property).FieldDelimiter = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CsvSerializationProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationProperties _property; + + /// + /// The properties that are associated with the CSV serialization type. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CsvSerializationProperties()); set => this._property = value; } + + /// + /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Csv"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)__serialization).Type = "Csv"; } + + /// Creates an new instance. + public CsvSerialization() + { + this.__serialization.Type = "Csv"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__serialization), __serialization); + await eventListener.AssertObjectIsValid(nameof(__serialization), __serialization); + } + } + /// Describes how data from an input is serialized or how data is serialized when written to an output in CSV format. + public partial interface ICsvSerialization : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization + { + /// + /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. + /// Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"encoding", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("UTF8")] + string Encoding { get; set; } + /// + /// Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input + /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required + /// on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"fieldDelimiter", + PossibleTypes = new [] { typeof(string) })] + string FieldDelimiter { get; set; } + + } + /// Describes how data from an input is serialized or how data is serialized when written to an output in CSV format. + internal partial interface ICsvSerializationInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal + { + /// + /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. + /// Required on PUT (CreateOrReplace) requests. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("UTF8")] + string Encoding { get; set; } + /// + /// Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input + /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required + /// on PUT (CreateOrReplace) requests. + /// + string FieldDelimiter { get; set; } + /// + /// The properties that are associated with the CSV serialization type. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerialization.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerialization.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerialization.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerialization.json.cs index 5a89ff455268..ad3b51b00513 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerialization.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerialization.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -67,19 +67,19 @@ internal CsvSerialization(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Run { return; } - __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Serialization(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CsvSerializationProperties.FromJson(__jsonProperties) : Property;} + __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Serialization(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CsvSerializationProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerialization. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerialization. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerialization. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerialization. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerialization FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerialization FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new CsvSerialization(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerializationProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerializationProperties.PowerShell.cs new file mode 100644 index 000000000000..657b693e7b1f --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerializationProperties.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with the CSV serialization type. + [System.ComponentModel.TypeConverter(typeof(CsvSerializationPropertiesTypeConverter))] + public partial class CsvSerializationProperties + { + + /// + /// 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 CsvSerializationProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("FieldDelimiter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationPropertiesInternal)this).FieldDelimiter = (string) content.GetValueForProperty("FieldDelimiter",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationPropertiesInternal)this).FieldDelimiter, global::System.Convert.ToString); + } + if (content.Contains("Encoding")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationPropertiesInternal)this).Encoding = (string) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationPropertiesInternal)this).Encoding, 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 CsvSerializationProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("FieldDelimiter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationPropertiesInternal)this).FieldDelimiter = (string) content.GetValueForProperty("FieldDelimiter",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationPropertiesInternal)this).FieldDelimiter, global::System.Convert.ToString); + } + if (content.Contains("Encoding")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationPropertiesInternal)this).Encoding = (string) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationPropertiesInternal)this).Encoding, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CsvSerializationProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CsvSerializationProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with the CSV serialization type. + [System.ComponentModel.TypeConverter(typeof(CsvSerializationPropertiesTypeConverter))] + public partial interface ICsvSerializationProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerializationProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerializationProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerializationProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerializationProperties.TypeConverter.cs index d9d0d0b86b6e..e4336998ab6f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerializationProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerializationProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerializationProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerializationProperties.cs similarity index 87% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerializationProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerializationProperties.cs index 24211419734c..039856e61750 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerializationProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerializationProperties.cs @@ -3,25 +3,25 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with the CSV serialization type. public partial class CsvSerializationProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding? _encoding; + private string _encoding; /// /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. /// Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding? Encoding { get => this._encoding; set => this._encoding = value; } + public string Encoding { get => this._encoding; set => this._encoding = value; } /// Backing field for property. private string _fieldDelimiter; @@ -51,10 +51,14 @@ public partial interface ICsvSerializationProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.", SerializedName = @"encoding", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding? Encoding { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("UTF8")] + string Encoding { get; set; } /// /// Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required @@ -63,6 +67,9 @@ public partial interface ICsvSerializationProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required on PUT (CreateOrReplace) requests.", SerializedName = @"fieldDelimiter", PossibleTypes = new [] { typeof(string) })] @@ -77,7 +84,8 @@ internal partial interface ICsvSerializationPropertiesInternal /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. /// Required on PUT (CreateOrReplace) requests. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding? Encoding { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("UTF8")] + string Encoding { get; set; } /// /// Specifies the delimiter that will be used to separate comma-separated value (CSV) records. See https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input /// or https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for a list of supported values. Required diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerializationProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerializationProperties.json.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerializationProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerializationProperties.json.cs index 8255cb673d3a..9b889efca46e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CsvSerializationProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CsvSerializationProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal CsvSerializationProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamAna { return; } - {_fieldDelimiter = If( json?.PropertyT("fieldDelimiter"), out var __jsonFieldDelimiter) ? (string)__jsonFieldDelimiter : (string)FieldDelimiter;} - {_encoding = If( json?.PropertyT("encoding"), out var __jsonEncoding) ? (string)__jsonEncoding : (string)Encoding;} + {_fieldDelimiter = If( json?.PropertyT("fieldDelimiter"), out var __jsonFieldDelimiter) ? (string)__jsonFieldDelimiter : (string)_fieldDelimiter;} + {_encoding = If( json?.PropertyT("encoding"), out var __jsonEncoding) ? (string)__jsonEncoding : (string)_encoding;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICsvSerializationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICsvSerializationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new CsvSerializationProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerialization.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerialization.PowerShell.cs new file mode 100644 index 000000000000..bb6fb61e91bf --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerialization.PowerShell.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// Describes how data from an input is serialized or how data is serialized when written to an output in custom format. + /// + [System.ComponentModel.TypeConverter(typeof(CustomClrSerializationTypeConverter))] + public partial class CustomClrSerialization + { + + /// + /// 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 CustomClrSerialization(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CustomClrSerializationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SerializationDllPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationInternal)this).SerializationDllPath = (string) content.GetValueForProperty("SerializationDllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationInternal)this).SerializationDllPath, global::System.Convert.ToString); + } + if (content.Contains("SerializationClassName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationInternal)this).SerializationClassName = (string) content.GetValueForProperty("SerializationClassName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationInternal)this).SerializationClassName, 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 CustomClrSerialization(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CustomClrSerializationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SerializationDllPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationInternal)this).SerializationDllPath = (string) content.GetValueForProperty("SerializationDllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationInternal)this).SerializationDllPath, global::System.Convert.ToString); + } + if (content.Contains("SerializationClassName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationInternal)this).SerializationClassName = (string) content.GetValueForProperty("SerializationClassName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationInternal)this).SerializationClassName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerialization DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomClrSerialization(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerialization DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomClrSerialization(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerialization FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes how data from an input is serialized or how data is serialized when written to an output in custom format. + [System.ComponentModel.TypeConverter(typeof(CustomClrSerializationTypeConverter))] + public partial interface ICustomClrSerialization + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerialization.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerialization.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerialization.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerialization.TypeConverter.cs index 6888e3ba14c8..a99cc22888db 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerialization.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerialization.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerialization ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerialization ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerialization).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerialization).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerialization.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerialization.cs new file mode 100644 index 000000000000..20a53edfd058 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerialization.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// Describes how data from an input is serialized or how data is serialized when written to an output in custom format. + /// + public partial class CustomClrSerialization : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerialization, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Serialization(); + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CustomClrSerializationProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationProperties _property; + + /// + /// The properties that are associated with the CustomClr serialization type. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CustomClrSerializationProperties()); set => this._property = value; } + + /// The serialization class name. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SerializationClassName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationPropertiesInternal)Property).SerializationClassName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationPropertiesInternal)Property).SerializationClassName = value ?? null; } + + /// The serialization library path. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SerializationDllPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationPropertiesInternal)Property).SerializationDllPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationPropertiesInternal)Property).SerializationDllPath = value ?? null; } + + /// + /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "CustomClr"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)__serialization).Type = "CustomClr"; } + + /// Creates an new instance. + public CustomClrSerialization() + { + this.__serialization.Type = "CustomClr"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__serialization), __serialization); + await eventListener.AssertObjectIsValid(nameof(__serialization), __serialization); + } + } + /// Describes how data from an input is serialized or how data is serialized when written to an output in custom format. + public partial interface ICustomClrSerialization : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization + { + /// The serialization class name. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The serialization class name.", + SerializedName = @"serializationClassName", + PossibleTypes = new [] { typeof(string) })] + string SerializationClassName { get; set; } + /// The serialization library path. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The serialization library path.", + SerializedName = @"serializationDllPath", + PossibleTypes = new [] { typeof(string) })] + string SerializationDllPath { get; set; } + + } + /// Describes how data from an input is serialized or how data is serialized when written to an output in custom format. + internal partial interface ICustomClrSerializationInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal + { + /// + /// The properties that are associated with the CustomClr serialization type. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationProperties Property { get; set; } + /// The serialization class name. + string SerializationClassName { get; set; } + /// The serialization library path. + string SerializationDllPath { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerialization.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerialization.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerialization.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerialization.json.cs index dd07e8391580..dcafc07159e2 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerialization.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerialization.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -67,19 +67,19 @@ internal CustomClrSerialization(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalyti { return; } - __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Serialization(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.CustomClrSerializationProperties.FromJson(__jsonProperties) : Property;} + __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Serialization(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CustomClrSerializationProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerialization. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerialization. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerialization. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerialization. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerialization FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerialization FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new CustomClrSerialization(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerializationProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerializationProperties.PowerShell.cs new file mode 100644 index 000000000000..0392fef1f960 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerializationProperties.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with the CustomClr serialization type. + [System.ComponentModel.TypeConverter(typeof(CustomClrSerializationPropertiesTypeConverter))] + public partial class CustomClrSerializationProperties + { + + /// + /// 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 CustomClrSerializationProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SerializationDllPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationPropertiesInternal)this).SerializationDllPath = (string) content.GetValueForProperty("SerializationDllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationPropertiesInternal)this).SerializationDllPath, global::System.Convert.ToString); + } + if (content.Contains("SerializationClassName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationPropertiesInternal)this).SerializationClassName = (string) content.GetValueForProperty("SerializationClassName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationPropertiesInternal)this).SerializationClassName, 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 CustomClrSerializationProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SerializationDllPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationPropertiesInternal)this).SerializationDllPath = (string) content.GetValueForProperty("SerializationDllPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationPropertiesInternal)this).SerializationDllPath, global::System.Convert.ToString); + } + if (content.Contains("SerializationClassName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationPropertiesInternal)this).SerializationClassName = (string) content.GetValueForProperty("SerializationClassName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationPropertiesInternal)this).SerializationClassName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomClrSerializationProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomClrSerializationProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with the CustomClr serialization type. + [System.ComponentModel.TypeConverter(typeof(CustomClrSerializationPropertiesTypeConverter))] + public partial interface ICustomClrSerializationProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerializationProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerializationProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerializationProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerializationProperties.TypeConverter.cs index 604412fa1575..4ee8d4475dd8 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerializationProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerializationProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerializationProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerializationProperties.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerializationProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerializationProperties.cs index 6871ba96fa64..926f718ff3ba 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerializationProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerializationProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with the CustomClr serialization type. public partial class CustomClrSerializationProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationPropertiesInternal { /// Backing field for property. @@ -41,6 +41,9 @@ public partial interface ICustomClrSerializationProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The serialization class name.", SerializedName = @"serializationClassName", PossibleTypes = new [] { typeof(string) })] @@ -49,6 +52,9 @@ public partial interface ICustomClrSerializationProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The serialization library path.", SerializedName = @"serializationDllPath", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerializationProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerializationProperties.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerializationProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerializationProperties.json.cs index c6ec9989a94e..ccbadb48b6bd 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/CustomClrSerializationProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/CustomClrSerializationProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal CustomClrSerializationProperties(Microsoft.Azure.PowerShell.Cmdlets.Str { return; } - {_serializationDllPath = If( json?.PropertyT("serializationDllPath"), out var __jsonSerializationDllPath) ? (string)__jsonSerializationDllPath : (string)SerializationDllPath;} - {_serializationClassName = If( json?.PropertyT("serializationClassName"), out var __jsonSerializationClassName) ? (string)__jsonSerializationClassName : (string)SerializationClassName;} + {_serializationDllPath = If( json?.PropertyT("serializationDllPath"), out var __jsonSerializationDllPath) ? (string)__jsonSerializationDllPath : (string)_serializationDllPath;} + {_serializationClassName = If( json?.PropertyT("serializationClassName"), out var __jsonSerializationClassName) ? (string)__jsonSerializationClassName : (string)_serializationClassName;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICustomClrSerializationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICustomClrSerializationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new CustomClrSerializationProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DiagnosticCondition.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DiagnosticCondition.PowerShell.cs new file mode 100644 index 000000000000..2119c91e0230 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DiagnosticCondition.PowerShell.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// Condition applicable to the resource, or to the job overall, that warrant customer attention. + /// + [System.ComponentModel.TypeConverter(typeof(DiagnosticConditionTypeConverter))] + public partial class DiagnosticCondition + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticCondition DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DiagnosticCondition(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticCondition DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DiagnosticCondition(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DiagnosticCondition(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Since")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal)this).Since = (string) content.GetValueForProperty("Since",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal)this).Since, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal)this).Message, 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 DiagnosticCondition(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Since")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal)this).Since = (string) content.GetValueForProperty("Since",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal)this).Since, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal)this).Message, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticCondition FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Condition applicable to the resource, or to the job overall, that warrant customer attention. + [System.ComponentModel.TypeConverter(typeof(DiagnosticConditionTypeConverter))] + public partial interface IDiagnosticCondition + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DiagnosticCondition.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DiagnosticCondition.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DiagnosticCondition.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DiagnosticCondition.TypeConverter.cs index a10c71508f9d..29e170a863ec 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DiagnosticCondition.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DiagnosticCondition.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticCondition ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticCondition).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DiagnosticCondition.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DiagnosticCondition.cs similarity index 90% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DiagnosticCondition.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DiagnosticCondition.cs index 2996ed9ee27d..489c734573fd 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DiagnosticCondition.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DiagnosticCondition.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401P /// Condition applicable to the resource, or to the job overall, that warrant customer attention. /// public partial class DiagnosticCondition : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticCondition, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal { /// Backing field for property. @@ -32,13 +32,13 @@ public partial class DiagnosticCondition : public string Message { get => this._message; } /// Internal Acessors for Code - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal.Code { get => this._code; set { {_code = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal.Code { get => this._code; set { {_code = value;} } } /// Internal Acessors for Message - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal.Message { get => this._message; set { {_message = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal.Message { get => this._message; set { {_message = value;} } } /// Internal Acessors for Since - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticConditionInternal.Since { get => this._since; set { {_since = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticConditionInternal.Since { get => this._since; set { {_since = value;} } } /// Backing field for property. private string _since; @@ -64,6 +64,9 @@ public partial interface IDiagnosticCondition : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The opaque diagnostic code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -74,6 +77,9 @@ public partial interface IDiagnosticCondition : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The human-readable message describing the condition in detail. Localized in the Accept-Language of the client request.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -85,6 +91,9 @@ public partial interface IDiagnosticCondition : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The UTC timestamp of when the condition started. Customers should be able to find a corresponding event in the ops log around this time.", SerializedName = @"since", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DiagnosticCondition.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DiagnosticCondition.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DiagnosticCondition.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DiagnosticCondition.json.cs index e889d703dc02..ce2626669e73 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DiagnosticCondition.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DiagnosticCondition.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -67,20 +67,20 @@ internal DiagnosticCondition(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics. { return; } - {_since = If( json?.PropertyT("since"), out var __jsonSince) ? (string)__jsonSince : (string)Since;} - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_since = If( json?.PropertyT("since"), out var __jsonSince) ? (string)__jsonSince : (string)_since;} + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticCondition. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticCondition. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticCondition FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new DiagnosticCondition(json) : null; } @@ -104,15 +104,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._since)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._since.ToString()) : null, "since" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Diagnostics.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Diagnostics.PowerShell.cs new file mode 100644 index 000000000000..75e3083ae560 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Diagnostics.PowerShell.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. + /// + [System.ComponentModel.TypeConverter(typeof(DiagnosticsTypeConverter))] + public partial class Diagnostics + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Diagnostics(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Diagnostics(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Diagnostics(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Condition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticsInternal)this).Condition = (System.Collections.Generic.List) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticsInternal)this).Condition, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticConditionTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Diagnostics(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Condition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticsInternal)this).Condition = (System.Collections.Generic.List) content.GetValueForProperty("Condition",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticsInternal)this).Condition, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticConditionTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. + [System.ComponentModel.TypeConverter(typeof(DiagnosticsTypeConverter))] + public partial interface IDiagnostics + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Diagnostics.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Diagnostics.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Diagnostics.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Diagnostics.TypeConverter.cs index 2314ebbf2820..3b7104f553ce 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Diagnostics.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Diagnostics.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Diagnostics.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Diagnostics.cs new file mode 100644 index 000000000000..bd578f11a565 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Diagnostics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. + /// + public partial class Diagnostics : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticsInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _condition; + + /// + /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List Condition { get => this._condition; } + + /// Internal Acessors for Condition + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticsInternal.Condition { get => this._condition; set { {_condition = value;} } } + + /// Creates an new instance. + public Diagnostics() + { + + } + } + /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. + public partial interface IDiagnostics : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// + /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention.", + SerializedName = @"conditions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticCondition) })] + System.Collections.Generic.List Condition { get; } + + } + /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. + internal partial interface IDiagnosticsInternal + + { + /// + /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. + /// + System.Collections.Generic.List Condition { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Diagnostics.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Diagnostics.json.cs similarity index 90% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Diagnostics.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Diagnostics.json.cs index 8ef634273bbc..fc6e9b607b9f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Diagnostics.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Diagnostics.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -67,18 +67,18 @@ internal Diagnostics(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime. { return; } - {_condition = If( json?.PropertyT("conditions"), out var __jsonConditions) ? If( __jsonConditions as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnosticCondition) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DiagnosticCondition.FromJson(__u) )) ))() : null : Condition;} + {_condition = If( json?.PropertyT("conditions"), out var __jsonConditions) ? If( __jsonConditions as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticCondition) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticCondition.FromJson(__u) )) ))() : null : _condition;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new Diagnostics(json) : null; } @@ -102,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { if (null != this._condition) { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSource.PowerShell.cs new file mode 100644 index 000000000000..201c9c7931d4 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSource.PowerShell.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes a DocumentDB output data source. + [System.ComponentModel.TypeConverter(typeof(DocumentDbOutputDataSourceTypeConverter))] + public partial class DocumentDbOutputDataSource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DocumentDbOutputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DocumentDbOutputDataSource(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DocumentDbOutputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DocumentDbOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).AccountId, global::System.Convert.ToString); + } + if (content.Contains("AccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).AccountKey, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("CollectionNamePattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).CollectionNamePattern = (string) content.GetValueForProperty("CollectionNamePattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).CollectionNamePattern, global::System.Convert.ToString); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("DocumentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).DocumentId = (string) content.GetValueForProperty("DocumentId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).DocumentId, 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 DocumentDbOutputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DocumentDbOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).AccountId, global::System.Convert.ToString); + } + if (content.Contains("AccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).AccountKey, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("CollectionNamePattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).CollectionNamePattern = (string) content.GetValueForProperty("CollectionNamePattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).CollectionNamePattern, global::System.Convert.ToString); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("DocumentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).DocumentId = (string) content.GetValueForProperty("DocumentId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal)this).DocumentId, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes a DocumentDB output data source. + [System.ComponentModel.TypeConverter(typeof(DocumentDbOutputDataSourceTypeConverter))] + public partial interface IDocumentDbOutputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSource.TypeConverter.cs index 701dc97df6d9..954829281093 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSource.cs similarity index 77% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSource.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSource.cs index f99f22e06150..7051543a7eb5 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSource.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSource.cs @@ -3,31 +3,31 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes a DocumentDB output data source. public partial class DocumentDbOutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(); /// The DocumentDB account name or ID. Required on PUT (CreateOrReplace) requests. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string AccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)Property).AccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)Property).AccountId = value ?? null; } + public string AccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)Property).AccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)Property).AccountId = value ?? null; } /// /// The account key for the DocumentDB account. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string AccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)Property).AccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)Property).AccountKey = value ?? null; } + public string AccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)Property).AccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)Property).AccountKey = value ?? null; } /// /// The collection name pattern for the collections to be used. The collection name format can be constructed using the optional @@ -35,49 +35,50 @@ public partial class DocumentDbOutputDataSource : /// for more information. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string CollectionNamePattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)Property).CollectionNamePattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)Property).CollectionNamePattern = value ?? null; } + public string CollectionNamePattern { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)Property).CollectionNamePattern; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)Property).CollectionNamePattern = value ?? null; } /// /// The name of the DocumentDB database. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Database { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)Property).Database; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)Property).Database = value ?? null; } + public string Database { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)Property).Database; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)Property).Database = value ?? null; } /// /// The name of the field in output events used to specify the primary key which insert or update operations are based on. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string DocumentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)Property).DocumentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)Property).DocumentId = value ?? null; } + public string DocumentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)Property).DocumentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)Property).DocumentId = value ?? null; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DocumentDbOutputDataSourceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DocumentDbOutputDataSourceProperties()); set { {_property = value;} } } /// /// The name of the field in output events used to specify the key for partitioning output across collections. If 'collectionNamePattern' /// contains the {partition} token, this property is required to be specified. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string PartitionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)Property).PartitionKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal)Property).PartitionKey = value ?? null; } + public string PartitionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)Property).PartitionKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)Property).PartitionKey = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceProperties _property; /// /// The properties that are associated with a DocumentDB output. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DocumentDbOutputDataSourceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DocumentDbOutputDataSourceProperties()); set => this._property = value; } /// /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)__outputDataSource).Type = value ; } + public string Type { get => "Microsoft.Storage/DocumentDB"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)__outputDataSource).Type = "Microsoft.Storage/DocumentDB"; } /// Creates an new instance. public DocumentDbOutputDataSource() { - + this.__outputDataSource.Type = "Microsoft.Storage/DocumentDB"; } /// Validates that this object meets the validation criteria. @@ -95,12 +96,15 @@ public DocumentDbOutputDataSource() /// Describes a DocumentDB output data source. public partial interface IDocumentDbOutputDataSource : Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource { /// The DocumentDB account name or ID. Required on PUT (CreateOrReplace) requests. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The DocumentDB account name or ID. Required on PUT (CreateOrReplace) requests.", SerializedName = @"accountId", PossibleTypes = new [] { typeof(string) })] @@ -111,6 +115,9 @@ public partial interface IDocumentDbOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The account key for the DocumentDB account. Required on PUT (CreateOrReplace) requests.", SerializedName = @"accountKey", PossibleTypes = new [] { typeof(string) })] @@ -123,6 +130,9 @@ public partial interface IDocumentDbOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The collection name pattern for the collections to be used. The collection name format can be constructed using the optional {partition} token, where partitions start from 0. See the DocumentDB section of https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for more information. Required on PUT (CreateOrReplace) requests.", SerializedName = @"collectionNamePattern", PossibleTypes = new [] { typeof(string) })] @@ -133,6 +143,9 @@ public partial interface IDocumentDbOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the DocumentDB database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"database", PossibleTypes = new [] { typeof(string) })] @@ -143,6 +156,9 @@ public partial interface IDocumentDbOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the field in output events used to specify the primary key which insert or update operations are based on.", SerializedName = @"documentId", PossibleTypes = new [] { typeof(string) })] @@ -154,6 +170,9 @@ public partial interface IDocumentDbOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the field in output events used to specify the key for partitioning output across collections. If 'collectionNamePattern' contains the {partition} token, this property is required to be specified.", SerializedName = @"partitionKey", PossibleTypes = new [] { typeof(string) })] @@ -162,7 +181,7 @@ public partial interface IDocumentDbOutputDataSource : } /// Describes a DocumentDB output data source. internal partial interface IDocumentDbOutputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal { /// The DocumentDB account name or ID. Required on PUT (CreateOrReplace) requests. string AccountId { get; set; } @@ -192,7 +211,7 @@ internal partial interface IDocumentDbOutputDataSourceInternal : /// /// The properties that are associated with a DocumentDB output. Required on PUT (CreateOrReplace) requests. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceProperties Property { get; set; } } } \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSource.json.cs index 9a931b68fb0e..3c2233da5ee3 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal DocumentDbOutputDataSource(Microsoft.Azure.PowerShell.Cmdlets.StreamAna { return; } - __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.DocumentDbOutputDataSourceProperties.FromJson(__jsonProperties) : Property;} + __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DocumentDbOutputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new DocumentDbOutputDataSource(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..8b6be9dadde6 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSourceProperties.PowerShell.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with a DocumentDB output. + [System.ComponentModel.TypeConverter(typeof(DocumentDbOutputDataSourcePropertiesTypeConverter))] + public partial class DocumentDbOutputDataSourceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DocumentDbOutputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DocumentDbOutputDataSourceProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DocumentDbOutputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountId, global::System.Convert.ToString); + } + if (content.Contains("AccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountKey, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("CollectionNamePattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).CollectionNamePattern = (string) content.GetValueForProperty("CollectionNamePattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).CollectionNamePattern, global::System.Convert.ToString); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("DocumentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).DocumentId = (string) content.GetValueForProperty("DocumentId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).DocumentId, 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 DocumentDbOutputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountId = (string) content.GetValueForProperty("AccountId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountId, global::System.Convert.ToString); + } + if (content.Contains("AccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).AccountKey, global::System.Convert.ToString); + } + if (content.Contains("Database")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).Database = (string) content.GetValueForProperty("Database",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).Database, global::System.Convert.ToString); + } + if (content.Contains("CollectionNamePattern")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).CollectionNamePattern = (string) content.GetValueForProperty("CollectionNamePattern",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).CollectionNamePattern, global::System.Convert.ToString); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("DocumentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).DocumentId = (string) content.GetValueForProperty("DocumentId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal)this).DocumentId, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with a DocumentDB output. + [System.ComponentModel.TypeConverter(typeof(DocumentDbOutputDataSourcePropertiesTypeConverter))] + public partial interface IDocumentDbOutputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSourceProperties.TypeConverter.cs index 9f766aa475d0..834b2b83d9c4 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSourceProperties.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSourceProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSourceProperties.cs index bd07bd7a8727..831f45035585 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSourceProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSourceProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with a DocumentDB output. public partial class DocumentDbOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourcePropertiesInternal { /// Backing field for property. @@ -82,6 +82,9 @@ public partial interface IDocumentDbOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The DocumentDB account name or ID. Required on PUT (CreateOrReplace) requests.", SerializedName = @"accountId", PossibleTypes = new [] { typeof(string) })] @@ -92,6 +95,9 @@ public partial interface IDocumentDbOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The account key for the DocumentDB account. Required on PUT (CreateOrReplace) requests.", SerializedName = @"accountKey", PossibleTypes = new [] { typeof(string) })] @@ -104,6 +110,9 @@ public partial interface IDocumentDbOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The collection name pattern for the collections to be used. The collection name format can be constructed using the optional {partition} token, where partitions start from 0. See the DocumentDB section of https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output for more information. Required on PUT (CreateOrReplace) requests.", SerializedName = @"collectionNamePattern", PossibleTypes = new [] { typeof(string) })] @@ -114,6 +123,9 @@ public partial interface IDocumentDbOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the DocumentDB database. Required on PUT (CreateOrReplace) requests.", SerializedName = @"database", PossibleTypes = new [] { typeof(string) })] @@ -124,6 +136,9 @@ public partial interface IDocumentDbOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the field in output events used to specify the primary key which insert or update operations are based on.", SerializedName = @"documentId", PossibleTypes = new [] { typeof(string) })] @@ -135,6 +150,9 @@ public partial interface IDocumentDbOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the field in output events used to specify the key for partitioning output across collections. If 'collectionNamePattern' contains the {partition} token, this property is required to be specified.", SerializedName = @"partitionKey", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSourceProperties.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSourceProperties.json.cs index c348a5947b4f..c1794476bca8 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/DocumentDbOutputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/DocumentDbOutputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,23 +65,23 @@ internal DocumentDbOutputDataSourceProperties(Microsoft.Azure.PowerShell.Cmdlets { return; } - {_accountId = If( json?.PropertyT("accountId"), out var __jsonAccountId) ? (string)__jsonAccountId : (string)AccountId;} - {_accountKey = If( json?.PropertyT("accountKey"), out var __jsonAccountKey) ? (string)__jsonAccountKey : (string)AccountKey;} - {_database = If( json?.PropertyT("database"), out var __jsonDatabase) ? (string)__jsonDatabase : (string)Database;} - {_collectionNamePattern = If( json?.PropertyT("collectionNamePattern"), out var __jsonCollectionNamePattern) ? (string)__jsonCollectionNamePattern : (string)CollectionNamePattern;} - {_partitionKey = If( json?.PropertyT("partitionKey"), out var __jsonPartitionKey) ? (string)__jsonPartitionKey : (string)PartitionKey;} - {_documentId = If( json?.PropertyT("documentId"), out var __jsonDocumentId) ? (string)__jsonDocumentId : (string)DocumentId;} + {_accountId = If( json?.PropertyT("accountId"), out var __jsonAccountId) ? (string)__jsonAccountId : (string)_accountId;} + {_accountKey = If( json?.PropertyT("accountKey"), out var __jsonAccountKey) ? (string)__jsonAccountKey : (string)_accountKey;} + {_database = If( json?.PropertyT("database"), out var __jsonDatabase) ? (string)__jsonDatabase : (string)_database;} + {_collectionNamePattern = If( json?.PropertyT("collectionNamePattern"), out var __jsonCollectionNamePattern) ? (string)__jsonCollectionNamePattern : (string)_collectionNamePattern;} + {_partitionKey = If( json?.PropertyT("partitionKey"), out var __jsonPartitionKey) ? (string)__jsonPartitionKey : (string)_partitionKey;} + {_documentId = If( json?.PropertyT("documentId"), out var __jsonDocumentId) ? (string)__jsonDocumentId : (string)_documentId;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDocumentDbOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDocumentDbOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new DocumentDbOutputDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error.PowerShell.cs new file mode 100644 index 000000000000..cccae501d932 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Common error representation. + [System.ComponentModel.TypeConverter(typeof(ErrorTypeConverter))] + public partial class Error + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Error(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Error(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Error(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Error1 = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1) content.GetValueForProperty("Error1",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Error1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error1TypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ErrorDetailsTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Error(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Error1 = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1) content.GetValueForProperty("Error1",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Error1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error1TypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ErrorDetailsTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Common error representation. + [System.ComponentModel.TypeConverter(typeof(ErrorTypeConverter))] + public partial interface IError + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Error.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error.TypeConverter.cs similarity index 98% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Error.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error.TypeConverter.cs index 92bb1094156e..fee1d2f53a9b 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Error.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error.cs new file mode 100644 index 000000000000..699e547af282 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Common error representation. + public partial class Error : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal + { + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)Error1).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)Error1).Code = value ?? null; } + + /// Error details. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)Error1).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)Error1).Detail = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1 _error1; + + /// Error definition properties. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1 Error1 { get => (this._error1 = this._error1 ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error1()); set => this._error1 = value; } + + /// Error message. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)Error1).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)Error1).Message = value ?? null; } + + /// Internal Acessors for Error1 + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorInternal.Error1 { get => (this._error1 = this._error1 ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error1()); set { {_error1 = value;} } } + + /// Error target. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)Error1).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)Error1).Target = value ?? null; } + + /// Creates an new instance. + public Error() + { + + } + } + /// Common error representation. + public partial interface IError : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// Error details. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetails) })] + System.Collections.Generic.List Detail { get; set; } + /// Error message. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// Error target. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; set; } + + } + /// Common error representation. + internal partial interface IErrorInternal + + { + /// Error code. + string Code { get; set; } + /// Error details. + System.Collections.Generic.List Detail { get; set; } + /// Error definition properties. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1 Error1 { get; set; } + /// Error message. + string Message { get; set; } + /// Error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Error.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error.json.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Error.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error.json.cs index 0c3383cae2a7..66f82c78055b 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/Error.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,18 +65,18 @@ internal Error(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.J { return; } - {_error1 = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ErrorAutoGenerated.FromJson(__jsonError) : Error1;} + {_error1 = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error1.FromJson(__jsonError) : _error1;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new Error(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error1.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error1.PowerShell.cs new file mode 100644 index 000000000000..c47ad9605503 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error1.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Error definition properties. + [System.ComponentModel.TypeConverter(typeof(Error1TypeConverter))] + public partial class Error1 + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1 DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Error1(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1 DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Error1(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Error1(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ErrorDetailsTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Error1(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ErrorDetailsTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1 FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Error definition properties. + [System.ComponentModel.TypeConverter(typeof(Error1TypeConverter))] + public partial interface IError1 + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error1.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error1.TypeConverter.cs new file mode 100644 index 000000000000..4856b1fe29d0 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error1.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class Error1TypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1 ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Error1.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Error1.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Error1.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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error1.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error1.cs new file mode 100644 index 000000000000..1a8ddc957290 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error1.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Error definition properties. + public partial class Error1 : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1Internal + { + + /// Backing field for property. + private string _code; + + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Code { get => this._code; set => this._code = value; } + + /// Backing field for property. + private System.Collections.Generic.List _detail; + + /// Error details. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List Detail { get => this._detail; set => this._detail = value; } + + /// Backing field for property. + private string _message; + + /// Error message. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Backing field for property. + private string _target; + + /// Error target. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Target { get => this._target; set => this._target = value; } + + /// Creates an new instance. + public Error1() + { + + } + } + /// Error definition properties. + public partial interface IError1 : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// Error code. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// Error details. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetails) })] + System.Collections.Generic.List Detail { get; set; } + /// Error message. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// Error target. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; set; } + + } + /// Error definition properties. + internal partial interface IError1Internal + + { + /// Error code. + string Code { get; set; } + /// Error details. + System.Collections.Generic.List Detail { get; set; } + /// Error message. + string Message { get; set; } + /// Error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error1.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error1.json.cs new file mode 100644 index 000000000000..7ef63de4b370 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Error1.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Error definition properties. + public partial class Error1 + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. + internal Error1(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)_target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetails) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ErrorDetails.FromJson(__u) )) ))() : null : _detail;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError1 FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new Error1(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorDetails.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorDetails.PowerShell.cs new file mode 100644 index 000000000000..287d57ba83c2 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorDetails.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Common error details representation. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailsTypeConverter))] + public partial class ErrorDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorDetails(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetailsInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetailsInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetailsInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetailsInternal)this).Message, 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 ErrorDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetailsInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetailsInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetailsInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetailsInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetailsInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetailsInternal)this).Message, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Common error details representation. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailsTypeConverter))] + public partial interface IErrorDetails + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorDetails.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorDetails.TypeConverter.cs similarity index 98% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorDetails.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorDetails.TypeConverter.cs index 865294bd0241..24805be61c65 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorDetails.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorDetails.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetails ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetails).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorDetails.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorDetails.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorDetails.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorDetails.cs index 389f8c6997ac..947c9c7b1c19 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorDetails.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorDetails.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Common error details representation. public partial class ErrorDetails : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetailsInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetails, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetailsInternal { /// Backing field for property. @@ -48,6 +48,9 @@ public partial interface IErrorDetails : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Error code.", SerializedName = @"code", PossibleTypes = new [] { typeof(string) })] @@ -56,6 +59,9 @@ public partial interface IErrorDetails : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Error message.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] @@ -64,6 +70,9 @@ public partial interface IErrorDetails : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Error target.", SerializedName = @"target", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorDetails.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorDetails.json.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorDetails.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorDetails.json.cs index 93d031d6b80b..72a6c9b758fd 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ApiV1/ErrorDetails.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorDetails.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1 +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,20 +65,20 @@ internal ErrorDetails(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime { return; } - {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} - {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} - {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)_target;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetails. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetails. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IErrorDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ErrorDetails(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs new file mode 100644 index 000000000000..090b72e3562c --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes the error that occurred. + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial class ErrorResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal)this).Message, 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 ErrorResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal)this).Message, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes the error that occurred. + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial interface IErrorResponse + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs new file mode 100644 index 000000000000..56f9bb847747 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorResponse.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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorResponse.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorResponse.cs new file mode 100644 index 000000000000..6701508c2e2f --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorResponse.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Describes the error that occurred. + public partial class ErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal + { + + /// Backing field for property. + private string _code; + + /// Error code associated with the error that occurred. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Code { get => this._code; } + + /// Backing field for property. + private string _message; + + /// Describes the error in detail. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal.Message { get => this._message; set { {_message = value;} } } + + /// Creates an new instance. + public ErrorResponse() + { + + } + } + /// Describes the error that occurred. + public partial interface IErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// Error code associated with the error that occurred. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Error code associated with the error that occurred.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// Describes the error in detail. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Describes the error in detail.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + + } + /// Describes the error that occurred. + internal partial interface IErrorResponseInternal + + { + /// Error code associated with the error that occurred. + string Code { get; set; } + /// Describes the error in detail. + string Message { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorResponse.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorResponse.json.cs new file mode 100644 index 000000000000..a766f6eeaef6 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ErrorResponse.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Describes the error that occurred. + public partial class ErrorResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..66e4decd4687 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubDataSourceProperties.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The common properties that are associated with Event Hub data sources. + [System.ComponentModel.TypeConverter(typeof(EventHubDataSourcePropertiesTypeConverter))] + public partial class EventHubDataSourceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EventHubDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EventHubDataSourceProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EventHubDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("EventHubName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)this).EventHubName, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, 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 EventHubDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("EventHubName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)this).EventHubName, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 common properties that are associated with Event Hub data sources. + [System.ComponentModel.TypeConverter(typeof(EventHubDataSourcePropertiesTypeConverter))] + public partial interface IEventHubDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubDataSourceProperties.TypeConverter.cs index 3eb2f1e8b2b8..a77a1703d26e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubDataSourceProperties.cs new file mode 100644 index 000000000000..eec7fef2f8c3 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubDataSourceProperties.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The common properties that are associated with Event Hub data sources. + public partial class EventHubDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourceProperties __serviceBusDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusDataSourceProperties(); + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).AuthenticationMode = value ?? null; } + + /// Backing field for property. + private string _eventHubName; + + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string EventHubName { get => this._eventHubName; set => this._eventHubName = value; } + + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).ServiceBusNamespace = value ?? null; } + + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyKey = value ?? null; } + + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyName = value ?? null; } + + /// Creates an new instance. + public EventHubDataSourceProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__serviceBusDataSourceProperties), __serviceBusDataSourceProperties); + await eventListener.AssertObjectIsValid(nameof(__serviceBusDataSourceProperties), __serviceBusDataSourceProperties); + } + } + /// The common properties that are associated with Event Hub data sources. + public partial interface IEventHubDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourceProperties + { + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Event Hub. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + string EventHubName { get; set; } + + } + /// The common properties that are associated with Event Hub data sources. + internal partial interface IEventHubDataSourcePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal + { + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + string EventHubName { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubDataSourceProperties.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubDataSourceProperties.json.cs index 5f354a7da7cd..3064538f8e78 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal EventHubDataSourceProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamA { return; } - __serviceBusDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusDataSourceProperties(json); - {_eventHubName = If( json?.PropertyT("eventHubName"), out var __jsonEventHubName) ? (string)__jsonEventHubName : (string)EventHubName;} + __serviceBusDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusDataSourceProperties(json); + {_eventHubName = If( json?.PropertyT("eventHubName"), out var __jsonEventHubName) ? (string)__jsonEventHubName : (string)_eventHubName;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new EventHubDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSource.PowerShell.cs new file mode 100644 index 000000000000..de5918df1a43 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSource.PowerShell.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes an Event Hub output data source. + [System.ComponentModel.TypeConverter(typeof(EventHubOutputDataSourceTypeConverter))] + public partial class EventHubOutputDataSource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EventHubOutputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EventHubOutputDataSource(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EventHubOutputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("EventHubName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("PropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).PropertyColumn = (System.Collections.Generic.List) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).PropertyColumn, __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 EventHubOutputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("EventHubName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("PropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).PropertyColumn = (System.Collections.Generic.List) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToList(__y, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes an Event Hub output data source. + [System.ComponentModel.TypeConverter(typeof(EventHubOutputDataSourceTypeConverter))] + public partial interface IEventHubOutputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSource.TypeConverter.cs index e9d73876630d..f553adaf805f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSource.cs new file mode 100644 index 000000000000..a506b5919092 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSource.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Describes an Event Hub output data source. + public partial class EventHubOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(); + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? null; } + + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string EventHubName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)Property).EventHubName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)Property).EventHubName = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubOutputDataSourceProperties()); set { {_property = value;} } } + + /// The key/column that is used to determine to which partition to send event data. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string PartitionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)Property).PartitionKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)Property).PartitionKey = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties _property; + + /// + /// The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubOutputDataSourceProperties()); set => this._property = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List PropertyColumn { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)Property).PropertyColumn; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)Property).PropertyColumn = value ?? null /* arrayOf */; } + + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace = value ?? null; } + + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey = value ?? null; } + + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName = value ?? null; } + + /// + /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Microsoft.ServiceBus/EventHub"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)__outputDataSource).Type = "Microsoft.ServiceBus/EventHub"; } + + /// Creates an new instance. + public EventHubOutputDataSource() + { + this.__outputDataSource.Type = "Microsoft.ServiceBus/EventHub"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); + await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); + } + } + /// Describes an Event Hub output data source. + public partial interface IEventHubOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource + { + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Authentication Mode.", + SerializedName = @"authenticationMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Event Hub. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + string EventHubName { get; set; } + /// The key/column that is used to determine to which partition to send event data. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The key/column that is used to determine to which partition to send event data.", + SerializedName = @"partitionKey", + PossibleTypes = new [] { typeof(string) })] + string PartitionKey { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"propertyColumns", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List PropertyColumn { get; set; } + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"serviceBusNamespace", + PossibleTypes = new [] { typeof(string) })] + string ServiceBusNamespace { get; set; } + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"sharedAccessPolicyKey", + PossibleTypes = new [] { typeof(string) })] + string SharedAccessPolicyKey { get; set; } + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"sharedAccessPolicyName", + PossibleTypes = new [] { typeof(string) })] + string SharedAccessPolicyName { get; set; } + + } + /// Describes an Event Hub output data source. + internal partial interface IEventHubOutputDataSourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal + { + /// Authentication Mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + string EventHubName { get; set; } + /// The key/column that is used to determine to which partition to send event data. + string PartitionKey { get; set; } + /// + /// The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties Property { get; set; } + + System.Collections.Generic.List PropertyColumn { get; set; } + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + string ServiceBusNamespace { get; set; } + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + string SharedAccessPolicyKey { get; set; } + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + string SharedAccessPolicyName { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSource.json.cs index 814ee57ecde5..ac06548c30cc 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal EventHubOutputDataSource(Microsoft.Azure.PowerShell.Cmdlets.StreamAnaly { return; } - __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubOutputDataSourceProperties.FromJson(__jsonProperties) : Property;} + __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubOutputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new EventHubOutputDataSource(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..6bedbb81184c --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSourceProperties.PowerShell.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with an Event Hub output. + [System.ComponentModel.TypeConverter(typeof(EventHubOutputDataSourcePropertiesTypeConverter))] + public partial class EventHubOutputDataSourceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EventHubOutputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EventHubOutputDataSourceProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EventHubOutputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("PropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)this).PropertyColumn = (System.Collections.Generic.List) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("EventHubName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)this).EventHubName, 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 EventHubOutputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("PropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)this).PropertyColumn = (System.Collections.Generic.List) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("EventHubName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)this).EventHubName, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with an Event Hub output. + [System.ComponentModel.TypeConverter(typeof(EventHubOutputDataSourcePropertiesTypeConverter))] + public partial interface IEventHubOutputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSourceProperties.TypeConverter.cs index 9740018d46c6..15905039afdb 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSourceProperties.cs new file mode 100644 index 000000000000..9073113b3392 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSourceProperties.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with an Event Hub output. + public partial class EventHubOutputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourceProperties __eventHubDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubDataSourceProperties(); + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).AuthenticationMode = value ?? null; } + + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string EventHubName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)__eventHubDataSourceProperties).EventHubName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)__eventHubDataSourceProperties).EventHubName = value ?? null; } + + /// Backing field for property. + private string _partitionKey; + + /// The key/column that is used to determine to which partition to send event data. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string PartitionKey { get => this._partitionKey; set => this._partitionKey = value; } + + /// Backing field for property. + private System.Collections.Generic.List _propertyColumn; + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List PropertyColumn { get => this._propertyColumn; set => this._propertyColumn = value; } + + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).ServiceBusNamespace = value ?? null; } + + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyKey = value ?? null; } + + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyName = value ?? null; } + + /// Creates an new instance. + public EventHubOutputDataSourceProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__eventHubDataSourceProperties), __eventHubDataSourceProperties); + await eventListener.AssertObjectIsValid(nameof(__eventHubDataSourceProperties), __eventHubDataSourceProperties); + } + } + /// The properties that are associated with an Event Hub output. + public partial interface IEventHubOutputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourceProperties + { + /// The key/column that is used to determine to which partition to send event data. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The key/column that is used to determine to which partition to send event data.", + SerializedName = @"partitionKey", + PossibleTypes = new [] { typeof(string) })] + string PartitionKey { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"propertyColumns", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List PropertyColumn { get; set; } + + } + /// The properties that are associated with an Event Hub output. + internal partial interface IEventHubOutputDataSourcePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal + { + /// The key/column that is used to determine to which partition to send event data. + string PartitionKey { get; set; } + + System.Collections.Generic.List PropertyColumn { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSourceProperties.json.cs similarity index 91% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSourceProperties.json.cs index d41b37857ab4..a1e457490aa2 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubOutputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubOutputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,20 +65,20 @@ internal EventHubOutputDataSourceProperties(Microsoft.Azure.PowerShell.Cmdlets.S { return; } - __eventHubDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubDataSourceProperties(json); - {_partitionKey = If( json?.PropertyT("partitionKey"), out var __jsonPartitionKey) ? (string)__jsonPartitionKey : (string)PartitionKey;} - {_propertyColumn = If( json?.PropertyT("propertyColumns"), out var __jsonPropertyColumns) ? If( __jsonPropertyColumns as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : PropertyColumn;} + __eventHubDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubDataSourceProperties(json); + {_partitionKey = If( json?.PropertyT("partitionKey"), out var __jsonPartitionKey) ? (string)__jsonPartitionKey : (string)_partitionKey;} + {_propertyColumn = If( json?.PropertyT("propertyColumns"), out var __jsonPropertyColumns) ? If( __jsonPropertyColumns as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _propertyColumn;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new EventHubOutputDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSource.PowerShell.cs new file mode 100644 index 000000000000..1efc312b92f9 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSource.PowerShell.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes an Event Hub input data source that contains stream data. + [System.ComponentModel.TypeConverter(typeof(EventHubStreamInputDataSourceTypeConverter))] + public partial class EventHubStreamInputDataSource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EventHubStreamInputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EventHubStreamInputDataSource(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EventHubStreamInputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("EventHubName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); + } + if (content.Contains("ConsumerGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).ConsumerGroupName, 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 EventHubStreamInputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("EventHubName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); + } + if (content.Contains("ConsumerGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal)this).ConsumerGroupName, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes an Event Hub input data source that contains stream data. + [System.ComponentModel.TypeConverter(typeof(EventHubStreamInputDataSourceTypeConverter))] + public partial interface IEventHubStreamInputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSource.TypeConverter.cs index 7bc78cc0df1e..c1a769bcde2c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSource.cs new file mode 100644 index 000000000000..5448cf317a9f --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSource.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Describes an Event Hub input data source that contains stream data. + public partial class EventHubStreamInputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamInputDataSource(); + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? null; } + + /// + /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer + /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, + /// the input uses the Event Hub’s default consumer group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ConsumerGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourcePropertiesInternal)Property).ConsumerGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourcePropertiesInternal)Property).ConsumerGroupName = value ?? null; } + + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string EventHubName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)Property).EventHubName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)Property).EventHubName = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubStreamInputDataSourceProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties _property; + + /// + /// The properties that are associated with an Event Hub input containing stream data. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubStreamInputDataSourceProperties()); set => this._property = value; } + + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace = value ?? null; } + + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey = value ?? null; } + + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName = value ?? null; } + + /// + /// Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Microsoft.ServiceBus/EventHub"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)__streamInputDataSource).Type = "Microsoft.ServiceBus/EventHub"; } + + /// Creates an new instance. + public EventHubStreamInputDataSource() + { + this.__streamInputDataSource.Type = "Microsoft.ServiceBus/EventHub"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__streamInputDataSource), __streamInputDataSource); + await eventListener.AssertObjectIsValid(nameof(__streamInputDataSource), __streamInputDataSource); + } + } + /// Describes an Event Hub input data source that contains stream data. + public partial interface IEventHubStreamInputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource + { + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Authentication Mode.", + SerializedName = @"authenticationMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// + /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer + /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, + /// the input uses the Event Hub’s default consumer group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, the input uses the Event Hub’s default consumer group.", + SerializedName = @"consumerGroupName", + PossibleTypes = new [] { typeof(string) })] + string ConsumerGroupName { get; set; } + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Event Hub. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + string EventHubName { get; set; } + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"serviceBusNamespace", + PossibleTypes = new [] { typeof(string) })] + string ServiceBusNamespace { get; set; } + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"sharedAccessPolicyKey", + PossibleTypes = new [] { typeof(string) })] + string SharedAccessPolicyKey { get; set; } + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"sharedAccessPolicyName", + PossibleTypes = new [] { typeof(string) })] + string SharedAccessPolicyName { get; set; } + + } + /// Describes an Event Hub input data source that contains stream data. + internal partial interface IEventHubStreamInputDataSourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal + { + /// Authentication Mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// + /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer + /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, + /// the input uses the Event Hub’s default consumer group. + /// + string ConsumerGroupName { get; set; } + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + string EventHubName { get; set; } + /// + /// The properties that are associated with an Event Hub input containing stream data. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties Property { get; set; } + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + string ServiceBusNamespace { get; set; } + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + string SharedAccessPolicyKey { get; set; } + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + string SharedAccessPolicyName { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSource.json.cs index 9127c4c02bdd..023e20dba71a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal EventHubStreamInputDataSource(Microsoft.Azure.PowerShell.Cmdlets.Stream { return; } - __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamInputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubStreamInputDataSourceProperties.FromJson(__jsonProperties) : Property;} + __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamInputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubStreamInputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new EventHubStreamInputDataSource(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..7c9249fb6cda --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSourceProperties.PowerShell.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// The properties that are associated with a Event Hub input containing stream data. + /// + [System.ComponentModel.TypeConverter(typeof(EventHubStreamInputDataSourcePropertiesTypeConverter))] + public partial class EventHubStreamInputDataSourceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EventHubStreamInputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EventHubStreamInputDataSourceProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EventHubStreamInputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ConsumerGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("EventHubName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)this).EventHubName, 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 EventHubStreamInputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ConsumerGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("EventHubName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)this).EventHubName, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with a Event Hub input containing stream data. + [System.ComponentModel.TypeConverter(typeof(EventHubStreamInputDataSourcePropertiesTypeConverter))] + public partial interface IEventHubStreamInputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSourceProperties.TypeConverter.cs index eeb06a3a817c..c5112561c1b5 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSourceProperties.cs new file mode 100644 index 000000000000..bf059422bfb2 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSourceProperties.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// The properties that are associated with a Event Hub input containing stream data. + /// + public partial class EventHubStreamInputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourcePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourceProperties __eventHubDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubDataSourceProperties(); + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).AuthenticationMode = value ?? null; } + + /// Backing field for property. + private string _consumerGroupName; + + /// + /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer + /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, + /// the input uses the Event Hub’s default consumer group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string ConsumerGroupName { get => this._consumerGroupName; set => this._consumerGroupName = value; } + + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string EventHubName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)__eventHubDataSourceProperties).EventHubName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)__eventHubDataSourceProperties).EventHubName = value ?? null; } + + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).ServiceBusNamespace = value ?? null; } + + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyKey = value ?? null; } + + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__eventHubDataSourceProperties).SharedAccessPolicyName = value ?? null; } + + /// Creates an new instance. + public EventHubStreamInputDataSourceProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__eventHubDataSourceProperties), __eventHubDataSourceProperties); + await eventListener.AssertObjectIsValid(nameof(__eventHubDataSourceProperties), __eventHubDataSourceProperties); + } + } + /// The properties that are associated with a Event Hub input containing stream data. + public partial interface IEventHubStreamInputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourceProperties + { + /// + /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer + /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, + /// the input uses the Event Hub’s default consumer group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, the input uses the Event Hub’s default consumer group.", + SerializedName = @"consumerGroupName", + PossibleTypes = new [] { typeof(string) })] + string ConsumerGroupName { get; set; } + + } + /// The properties that are associated with a Event Hub input containing stream data. + internal partial interface IEventHubStreamInputDataSourcePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal + { + /// + /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer + /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, + /// the input uses the Event Hub’s default consumer group. + /// + string ConsumerGroupName { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSourceProperties.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSourceProperties.json.cs index 67f81f72118f..c43a30a4a2ec 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubStreamInputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubStreamInputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -67,19 +67,19 @@ internal EventHubStreamInputDataSourceProperties(Microsoft.Azure.PowerShell.Cmdl { return; } - __eventHubDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubDataSourceProperties(json); - {_consumerGroupName = If( json?.PropertyT("consumerGroupName"), out var __jsonConsumerGroupName) ? (string)__jsonConsumerGroupName : (string)ConsumerGroupName;} + __eventHubDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubDataSourceProperties(json); + {_consumerGroupName = If( json?.PropertyT("consumerGroupName"), out var __jsonConsumerGroupName) ? (string)__jsonConsumerGroupName : (string)_consumerGroupName;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubStreamInputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new EventHubStreamInputDataSourceProperties(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2OutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2OutputDataSource.PowerShell.cs new file mode 100644 index 000000000000..7e5a09597e4c --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2OutputDataSource.PowerShell.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes an Event Hub output data source. + [System.ComponentModel.TypeConverter(typeof(EventHubV2OutputDataSourceTypeConverter))] + public partial class EventHubV2OutputDataSource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EventHubV2OutputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EventHubV2OutputDataSource(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EventHubV2OutputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("EventHubName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("PropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).PropertyColumn = (System.Collections.Generic.List) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).PropertyColumn, __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 EventHubV2OutputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("EventHubName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("PropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).PropertyColumn = (System.Collections.Generic.List) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToList(__y, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes an Event Hub output data source. + [System.ComponentModel.TypeConverter(typeof(EventHubV2OutputDataSourceTypeConverter))] + public partial interface IEventHubV2OutputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2OutputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2OutputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2OutputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2OutputDataSource.TypeConverter.cs index 5335c526e038..b1d0638d64f0 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2OutputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2OutputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2OutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2OutputDataSource.cs new file mode 100644 index 000000000000..1f193cbd56ff --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2OutputDataSource.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Describes an Event Hub output data source. + public partial class EventHubV2OutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(); + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? null; } + + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string EventHubName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)Property).EventHubName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)Property).EventHubName = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubOutputDataSourceProperties()); set { {_property = value;} } } + + /// The key/column that is used to determine to which partition to send event data. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string PartitionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)Property).PartitionKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)Property).PartitionKey = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties _property; + + /// + /// The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubOutputDataSourceProperties()); set => this._property = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List PropertyColumn { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)Property).PropertyColumn; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourcePropertiesInternal)Property).PropertyColumn = value ?? null /* arrayOf */; } + + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace = value ?? null; } + + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey = value ?? null; } + + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName = value ?? null; } + + /// + /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Microsoft.EventHub/EventHub"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)__outputDataSource).Type = "Microsoft.EventHub/EventHub"; } + + /// Creates an new instance. + public EventHubV2OutputDataSource() + { + this.__outputDataSource.Type = "Microsoft.EventHub/EventHub"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); + await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); + } + } + /// Describes an Event Hub output data source. + public partial interface IEventHubV2OutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource + { + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Authentication Mode.", + SerializedName = @"authenticationMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Event Hub. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + string EventHubName { get; set; } + /// The key/column that is used to determine to which partition to send event data. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The key/column that is used to determine to which partition to send event data.", + SerializedName = @"partitionKey", + PossibleTypes = new [] { typeof(string) })] + string PartitionKey { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"propertyColumns", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List PropertyColumn { get; set; } + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"serviceBusNamespace", + PossibleTypes = new [] { typeof(string) })] + string ServiceBusNamespace { get; set; } + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"sharedAccessPolicyKey", + PossibleTypes = new [] { typeof(string) })] + string SharedAccessPolicyKey { get; set; } + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"sharedAccessPolicyName", + PossibleTypes = new [] { typeof(string) })] + string SharedAccessPolicyName { get; set; } + + } + /// Describes an Event Hub output data source. + internal partial interface IEventHubV2OutputDataSourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal + { + /// Authentication Mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + string EventHubName { get; set; } + /// The key/column that is used to determine to which partition to send event data. + string PartitionKey { get; set; } + /// + /// The properties that are associated with an Event Hub output. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubOutputDataSourceProperties Property { get; set; } + + System.Collections.Generic.List PropertyColumn { get; set; } + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + string ServiceBusNamespace { get; set; } + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + string SharedAccessPolicyKey { get; set; } + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + string SharedAccessPolicyName { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2OutputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2OutputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2OutputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2OutputDataSource.json.cs index 4d918392f660..21005707c327 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2OutputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2OutputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal EventHubV2OutputDataSource(Microsoft.Azure.PowerShell.Cmdlets.StreamAna { return; } - __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubOutputDataSourceProperties.FromJson(__jsonProperties) : Property;} + __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubOutputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2OutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2OutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new EventHubV2OutputDataSource(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2StreamInputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2StreamInputDataSource.PowerShell.cs new file mode 100644 index 000000000000..36508ce78f75 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2StreamInputDataSource.PowerShell.cs @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes an Event Hub input data source that contains stream data. + [System.ComponentModel.TypeConverter(typeof(EventHubV2StreamInputDataSourceTypeConverter))] + public partial class EventHubV2StreamInputDataSource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EventHubV2StreamInputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EventHubV2StreamInputDataSource(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EventHubV2StreamInputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("EventHubName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); + } + if (content.Contains("ConsumerGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).ConsumerGroupName, 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 EventHubV2StreamInputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("EventHubName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).EventHubName = (string) content.GetValueForProperty("EventHubName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).EventHubName, global::System.Convert.ToString); + } + if (content.Contains("ConsumerGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal)this).ConsumerGroupName, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes an Event Hub input data source that contains stream data. + [System.ComponentModel.TypeConverter(typeof(EventHubV2StreamInputDataSourceTypeConverter))] + public partial interface IEventHubV2StreamInputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2StreamInputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2StreamInputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2StreamInputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2StreamInputDataSource.TypeConverter.cs index b84e7255c8af..fc46fdaba46f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2StreamInputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2StreamInputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2StreamInputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2StreamInputDataSource.cs new file mode 100644 index 000000000000..628b673fc7d6 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2StreamInputDataSource.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Describes an Event Hub input data source that contains stream data. + public partial class EventHubV2StreamInputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamInputDataSource(); + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? null; } + + /// + /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer + /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, + /// the input uses the Event Hub’s default consumer group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ConsumerGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourcePropertiesInternal)Property).ConsumerGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourcePropertiesInternal)Property).ConsumerGroupName = value ?? null; } + + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string EventHubName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)Property).EventHubName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubDataSourcePropertiesInternal)Property).EventHubName = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubStreamInputDataSourceProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties _property; + + /// + /// The properties that are associated with an Event Hub input containing stream data. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubStreamInputDataSourceProperties()); set => this._property = value; } + + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace = value ?? null; } + + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey = value ?? null; } + + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName = value ?? null; } + + /// + /// Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Microsoft.EventHub/EventHub"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)__streamInputDataSource).Type = "Microsoft.EventHub/EventHub"; } + + /// Creates an new instance. + public EventHubV2StreamInputDataSource() + { + this.__streamInputDataSource.Type = "Microsoft.EventHub/EventHub"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__streamInputDataSource), __streamInputDataSource); + await eventListener.AssertObjectIsValid(nameof(__streamInputDataSource), __streamInputDataSource); + } + } + /// Describes an Event Hub input data source that contains stream data. + public partial interface IEventHubV2StreamInputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource + { + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Authentication Mode.", + SerializedName = @"authenticationMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// + /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer + /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, + /// the input uses the Event Hub’s default consumer group. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, the input uses the Event Hub’s default consumer group.", + SerializedName = @"consumerGroupName", + PossibleTypes = new [] { typeof(string) })] + string ConsumerGroupName { get; set; } + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Event Hub. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"eventHubName", + PossibleTypes = new [] { typeof(string) })] + string EventHubName { get; set; } + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"serviceBusNamespace", + PossibleTypes = new [] { typeof(string) })] + string ServiceBusNamespace { get; set; } + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"sharedAccessPolicyKey", + PossibleTypes = new [] { typeof(string) })] + string SharedAccessPolicyKey { get; set; } + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"sharedAccessPolicyName", + PossibleTypes = new [] { typeof(string) })] + string SharedAccessPolicyName { get; set; } + + } + /// Describes an Event Hub input data source that contains stream data. + internal partial interface IEventHubV2StreamInputDataSourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal + { + /// Authentication Mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// + /// The name of an Event Hub Consumer Group that should be used to read events from the Event Hub. Specifying distinct consumer + /// group names for multiple inputs allows each of those inputs to receive the same events from the Event Hub. If not specified, + /// the input uses the Event Hub’s default consumer group. + /// + string ConsumerGroupName { get; set; } + /// The name of the Event Hub. Required on PUT (CreateOrReplace) requests. + string EventHubName { get; set; } + /// + /// The properties that are associated with an Event Hub input containing stream data. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubStreamInputDataSourceProperties Property { get; set; } + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + string ServiceBusNamespace { get; set; } + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + string SharedAccessPolicyKey { get; set; } + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + string SharedAccessPolicyName { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2StreamInputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2StreamInputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2StreamInputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2StreamInputDataSource.json.cs index cc393acce288..3d9d6437ce45 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/EventHubV2StreamInputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/EventHubV2StreamInputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,19 +65,19 @@ internal EventHubV2StreamInputDataSource(Microsoft.Azure.PowerShell.Cmdlets.Stre { return; } - __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamInputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.EventHubStreamInputDataSourceProperties.FromJson(__jsonProperties) : Property;} + __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamInputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.EventHubStreamInputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IEventHubV2StreamInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IEventHubV2StreamInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new EventHubV2StreamInputDataSource(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/External.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/External.PowerShell.cs new file mode 100644 index 000000000000..7a61cb9c359f --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/External.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The storage account where the custom code artifacts are located. + [System.ComponentModel.TypeConverter(typeof(ExternalTypeConverter))] + public partial class External + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new External(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new External(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal External(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).StorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("Path")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).Path, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).StorageAccountName = (string) content.GetValueForProperty("StorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).StorageAccountName, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).StorageAccountKey = (string) content.GetValueForProperty("StorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).StorageAccountKey, 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 External(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).StorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount) content.GetValueForProperty("StorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).StorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom); + } + if (content.Contains("Container")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).Container = (string) content.GetValueForProperty("Container",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).Container, global::System.Convert.ToString); + } + if (content.Contains("Path")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).Path = (string) content.GetValueForProperty("Path",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).Path, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).StorageAccountName = (string) content.GetValueForProperty("StorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).StorageAccountName, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).StorageAccountKey = (string) content.GetValueForProperty("StorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)this).StorageAccountKey, 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 storage account where the custom code artifacts are located. + [System.ComponentModel.TypeConverter(typeof(ExternalTypeConverter))] + public partial interface IExternal + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/External.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/External.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/External.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/External.TypeConverter.cs index 1ab935f3226e..f5c8f92709ca 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/External.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/External.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/External.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/External.cs similarity index 79% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/External.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/External.cs index 9fd8030fee58..7d22ed8e6dc0 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/External.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/External.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The storage account where the custom code artifacts are located. public partial class External : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal { /// Backing field for property. @@ -20,7 +20,7 @@ public partial class External : public string Container { get => this._container; set => this._container = value; } /// Internal Acessors for StorageAccount - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternalInternal.StorageAccount { get => (this._storageAccount = this._storageAccount ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccount()); set { {_storageAccount = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal.StorageAccount { get => (this._storageAccount = this._storageAccount ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccount()); set { {_storageAccount = value;} } } /// Backing field for property. private string _path; @@ -29,23 +29,23 @@ public partial class External : public string Path { get => this._path; set => this._path = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount _storageAccount; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount _storageAccount; /// The properties that are associated with an Azure Storage account [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount StorageAccount { get => (this._storageAccount = this._storageAccount ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccount()); set => this._storageAccount = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount StorageAccount { get => (this._storageAccount = this._storageAccount ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccount()); set => this._storageAccount = value; } /// /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string StorageAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)StorageAccount).AccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)StorageAccount).AccountKey = value ?? null; } + public string StorageAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)StorageAccount).AccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)StorageAccount).AccountKey = value ?? null; } /// /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string StorageAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)StorageAccount).AccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal)StorageAccount).AccountName = value ?? null; } + public string StorageAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)StorageAccount).AccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)StorageAccount).AccountName = value ?? null; } /// Creates an new instance. public External() @@ -60,6 +60,9 @@ public partial interface IExternal : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"container", PossibleTypes = new [] { typeof(string) })] @@ -68,6 +71,9 @@ public partial interface IExternal : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"path", PossibleTypes = new [] { typeof(string) })] @@ -78,6 +84,9 @@ public partial interface IExternal : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", SerializedName = @"accountKey", PossibleTypes = new [] { typeof(string) })] @@ -88,6 +97,9 @@ public partial interface IExternal : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", SerializedName = @"accountName", PossibleTypes = new [] { typeof(string) })] @@ -102,7 +114,7 @@ internal partial interface IExternalInternal string Path { get; set; } /// The properties that are associated with an Azure Storage account - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount StorageAccount { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount StorageAccount { get; set; } /// /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. /// diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/External.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/External.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/External.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/External.json.cs index eab07569e916..5e5ffe1c54cb 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/External.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/External.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -65,20 +65,20 @@ internal External(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Jso { return; } - {_storageAccount = If( json?.PropertyT("storageAccount"), out var __jsonStorageAccount) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccount.FromJson(__jsonStorageAccount) : StorageAccount;} - {_container = If( json?.PropertyT("container"), out var __jsonContainer) ? (string)__jsonContainer : (string)Container;} - {_path = If( json?.PropertyT("path"), out var __jsonPath) ? (string)__jsonPath : (string)Path;} + {_storageAccount = If( json?.PropertyT("storageAccount"), out var __jsonStorageAccount) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccount.FromJson(__jsonStorageAccount) : _storageAccount;} + {_container = If( json?.PropertyT("container"), out var __jsonContainer) ? (string)__jsonContainer : (string)_container;} + {_path = If( json?.PropertyT("path"), out var __jsonPath) ? (string)__jsonPath : (string)_path;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IExternal FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new External(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Function.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Function.PowerShell.cs new file mode 100644 index 000000000000..f3b0edab8120 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Function.PowerShell.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// A function object, containing all information associated with the named function. All functions are contained under a + /// streaming job. + /// + [System.ComponentModel.TypeConverter(typeof(FunctionTypeConverter))] + public partial class Function + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Function(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Function(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Function(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).ETag, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).ConfigurationProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) content.GetValueForProperty("ConfigurationProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).ConfigurationProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("PropertiesType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).PropertiesType = (string) content.GetValueForProperty("PropertiesType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).PropertiesType, 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 Function(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).ETag, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ConfigurationProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).ConfigurationProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) content.GetValueForProperty("ConfigurationProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).ConfigurationProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("PropertiesType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).PropertiesType = (string) content.GetValueForProperty("PropertiesType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).PropertiesType, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// A function object, containing all information associated with the named function. All functions are contained under a + /// streaming job. + [System.ComponentModel.TypeConverter(typeof(FunctionTypeConverter))] + public partial interface IFunction + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Function.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Function.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Function.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Function.TypeConverter.cs index eba6e9bf8764..6fd1742de96e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Function.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Function.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Function.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Function.cs new file mode 100644 index 000000000000..b076c86b003b --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Function.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// A function object, containing all information associated with the named function. All functions are contained under a + /// streaming job. + /// + public partial class Function : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubResource(); + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration ConfigurationProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)Property).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)Property).Property = value ?? null /* model class */; } + + /// Backing field for property. + private string _eTag; + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string ETag { get => this._eTag; set => this._eTag = value; } + + /// Resource Id + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Name = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Type = value ?? null; } + + /// Resource name + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Name; } + + /// Indicates the type of function. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string PropertiesType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)Property).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)Property).Type = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties _property; + + /// The properties that are associated with a function. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionProperties()); set => this._property = value; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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); } + + /// Resource type + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Type; } + + /// Creates an new instance. + public Function() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("ETag", out var __eTagHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInternal)this).ETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader0) is string __headerETagHeader0 ? __headerETagHeader0 : (string)null; + } + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__subResource), __subResource); + await eventListener.AssertObjectIsValid(nameof(__subResource), __subResource); + } + } + /// A function object, containing all information associated with the named function. All functions are contained under a + /// streaming job. + public partial interface IFunction : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource + { + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) })] + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration ConfigurationProperty { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"ETag", + PossibleTypes = new [] { typeof(string) })] + string ETag { get; set; } + /// Indicates the type of function. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates the type of function.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string PropertiesType { get; set; } + + } + /// A function object, containing all information associated with the named function. All functions are contained under a + /// streaming job. + internal partial interface IFunctionInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration ConfigurationProperty { get; set; } + + string ETag { get; set; } + /// Indicates the type of function. + string PropertiesType { get; set; } + /// The properties that are associated with a function. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Function.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Function.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Function.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Function.json.cs index 6140aa08a7d6..5c5d9dcdc7f5 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Function.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Function.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -57,13 +57,13 @@ public partial class Function partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new Function(json) : null; } @@ -80,8 +80,8 @@ internal Function(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Jso { return; } - __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionProperties.FromJson(__jsonProperties) : Property;} + __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionBinding.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionBinding.PowerShell.cs similarity index 78% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionBinding.PowerShell.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionBinding.PowerShell.cs index 90760ac3a7c5..5dcedc427a2d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionBinding.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionBinding.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -58,29 +58,35 @@ public partial class FunctionBinding partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new FunctionBinding(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new FunctionBinding(content); } @@ -90,10 +96,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. @@ -108,13 +114,13 @@ internal FunctionBinding(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type, 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. @@ -129,7 +135,7 @@ internal FunctionBinding(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -138,6 +144,18 @@ internal FunctionBinding(global::System.Management.Automation.PSObject content) /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the /// endpoint. diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionBinding.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionBinding.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionBinding.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionBinding.TypeConverter.cs index e14368140fed..36ff70ed1707 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionBinding.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionBinding.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionBinding.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionBinding.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionBinding.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionBinding.cs index 9f4256deb2f4..af164c3adad8 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionBinding.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionBinding.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -12,8 +12,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401P /// endpoint. /// public partial class FunctionBinding : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBindingInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal { /// Backing field for property. @@ -38,6 +38,9 @@ public partial interface IFunctionBinding : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates the function binding type.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionBinding.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionBinding.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionBinding.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionBinding.json.cs index d3a46e2a4674..d2e0b9f1b799 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionBinding.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionBinding.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -57,15 +57,15 @@ public partial class FunctionBinding partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding. - /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding interface is polymorphic, - /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding interface is polymorphic, and the + /// precise model class that will get deserialized is determined at runtime based on the payload. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionBinding FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json)) { @@ -107,7 +107,7 @@ internal FunctionBinding(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runt { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionConfiguration.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionConfiguration.PowerShell.cs new file mode 100644 index 000000000000..1c16f1ef8963 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionConfiguration.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(FunctionConfigurationTypeConverter))] + public partial class FunctionConfiguration + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FunctionConfiguration(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FunctionConfiguration(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FunctionConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfigurationInternal)this).Input = (System.Collections.Generic.List) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfigurationInternal)this).Input, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionInputTypeConverter.ConvertFrom)); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfigurationInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfigurationInternal)this).Output, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionOutputTypeConverter.ConvertFrom); + } + if (content.Contains("Binding")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfigurationInternal)this).Binding = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding) content.GetValueForProperty("Binding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfigurationInternal)this).Binding, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionBindingTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FunctionConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfigurationInternal)this).Input = (System.Collections.Generic.List) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfigurationInternal)this).Input, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionInputTypeConverter.ConvertFrom)); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfigurationInternal)this).Output = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfigurationInternal)this).Output, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionOutputTypeConverter.ConvertFrom); + } + if (content.Contains("Binding")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfigurationInternal)this).Binding = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding) content.GetValueForProperty("Binding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfigurationInternal)this).Binding, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionBindingTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + [System.ComponentModel.TypeConverter(typeof(FunctionConfigurationTypeConverter))] + public partial interface IFunctionConfiguration + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionConfiguration.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionConfiguration.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionConfiguration.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionConfiguration.TypeConverter.cs index 1c0931d8ac0a..413e47348022 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionConfiguration.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionConfiguration.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionConfiguration.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionConfiguration.cs new file mode 100644 index 000000000000..650a745bc002 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionConfiguration.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + public partial class FunctionConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfigurationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding _binding; + + /// + /// The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the + /// endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding Binding { get => (this._binding = this._binding ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionBinding()); set => this._binding = value; } + + /// Backing field for property. + private System.Collections.Generic.List _input; + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List Input { get => this._input; set => this._input = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput _output; + + /// Describes the output of a function. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput Output { get => (this._output = this._output ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionOutput()); set => this._output = value; } + + /// Creates an new instance. + public FunctionConfiguration() + { + + } + } + public partial interface IFunctionConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// + /// The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the + /// endpoint. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint.", + SerializedName = @"binding", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding) })] + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding Binding { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"inputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInput) })] + System.Collections.Generic.List Input { get; set; } + /// Describes the output of a function. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Describes the output of a function.", + SerializedName = @"output", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput) })] + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput Output { get; set; } + + } + internal partial interface IFunctionConfigurationInternal + + { + /// + /// The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the + /// endpoint. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding Binding { get; set; } + + System.Collections.Generic.List Input { get; set; } + /// Describes the output of a function. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput Output { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionConfiguration.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionConfiguration.json.cs similarity index 89% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionConfiguration.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionConfiguration.json.cs index 92e66b8186ce..af474771f81a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionConfiguration.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionConfiguration.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -53,13 +53,13 @@ public partial class FunctionConfiguration partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new FunctionConfiguration(json) : null; } @@ -76,9 +76,9 @@ internal FunctionConfiguration(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytic { return; } - {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? If( __jsonInputs as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionInput.FromJson(__u) )) ))() : null : Input;} - {_output = If( json?.PropertyT("output"), out var __jsonOutput) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionOutput.FromJson(__jsonOutput) : Output;} - {_binding = If( json?.PropertyT("binding"), out var __jsonBinding) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionBinding.FromJson(__jsonBinding) : Binding;} + {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? If( __jsonInputs as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInput) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionInput.FromJson(__u) )) ))() : null : _input;} + {_output = If( json?.PropertyT("output"), out var __jsonOutput) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionOutput.FromJson(__jsonOutput) : _output;} + {_binding = If( json?.PropertyT("binding"), out var __jsonBinding) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionBinding.FromJson(__jsonBinding) : _binding;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionInput.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionInput.PowerShell.cs new file mode 100644 index 000000000000..79f74fa5efaf --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionInput.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes one input parameter of a function. + [System.ComponentModel.TypeConverter(typeof(FunctionInputTypeConverter))] + public partial class FunctionInput + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FunctionInput(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FunctionInput(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FunctionInput(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DataType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInputInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInputInternal)this).DataType, global::System.Convert.ToString); + } + if (content.Contains("IsConfigurationParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInputInternal)this).IsConfigurationParameter = (bool?) content.GetValueForProperty("IsConfigurationParameter",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInputInternal)this).IsConfigurationParameter, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FunctionInput(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DataType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInputInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInputInternal)this).DataType, global::System.Convert.ToString); + } + if (content.Contains("IsConfigurationParameter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInputInternal)this).IsConfigurationParameter = (bool?) content.GetValueForProperty("IsConfigurationParameter",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInputInternal)this).IsConfigurationParameter, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes one input parameter of a function. + [System.ComponentModel.TypeConverter(typeof(FunctionInputTypeConverter))] + public partial interface IFunctionInput + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionInput.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionInput.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionInput.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionInput.TypeConverter.cs index ef88e541eb23..2031258ea468 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionInput.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionInput.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInput ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInput).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionInput.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionInput.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionInput.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionInput.cs index 653fc7c5652b..c7eaa21cedaa 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionInput.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionInput.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes one input parameter of a function. public partial class FunctionInput : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInputInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInput, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInputInternal { /// Backing field for property. @@ -50,6 +50,9 @@ public partial interface IFunctionInput : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx", SerializedName = @"dataType", PossibleTypes = new [] { typeof(string) })] @@ -61,6 +64,9 @@ public partial interface IFunctionInput : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false.", SerializedName = @"isConfigurationParameter", PossibleTypes = new [] { typeof(bool) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionInput.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionInput.json.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionInput.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionInput.json.cs index f1b969f2ba26..f2fd744bd395 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionInput.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionInput.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class FunctionInput partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInput. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInput. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new FunctionInput(json) : null; } @@ -77,8 +77,8 @@ internal FunctionInput(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtim { return; } - {_dataType = If( json?.PropertyT("dataType"), out var __jsonDataType) ? (string)__jsonDataType : (string)DataType;} - {_isConfigurationParameter = If( json?.PropertyT("isConfigurationParameter"), out var __jsonIsConfigurationParameter) ? (bool?)__jsonIsConfigurationParameter : IsConfigurationParameter;} + {_dataType = If( json?.PropertyT("dataType"), out var __jsonDataType) ? (string)__jsonDataType : (string)_dataType;} + {_isConfigurationParameter = If( json?.PropertyT("isConfigurationParameter"), out var __jsonIsConfigurationParameter) ? (bool?)__jsonIsConfigurationParameter : _isConfigurationParameter;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionListResult.PowerShell.cs new file mode 100644 index 000000000000..f689048b8fd3 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Object containing a list of functions under a streaming job. + [System.ComponentModel.TypeConverter(typeof(FunctionListResultTypeConverter))] + public partial class FunctionListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FunctionListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FunctionListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FunctionListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResultInternal)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 FunctionListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Object containing a list of functions under a streaming job. + [System.ComponentModel.TypeConverter(typeof(FunctionListResultTypeConverter))] + public partial interface IFunctionListResult + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionListResult.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionListResult.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionListResult.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionListResult.TypeConverter.cs index 96971a8bf448..f66086b201a6 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionListResult.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionListResult.cs new file mode 100644 index 000000000000..ce05e8b78fe4 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Object containing a list of functions under a streaming job. + public partial class FunctionListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResult, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The link (url) to the next page of results. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// A list of functions under a streaming job. Populated by a 'List' operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public FunctionListResult() + { + + } + } + /// Object containing a list of functions under a streaming job. + public partial interface IFunctionListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// The link (url) to the next page of results. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The link (url) to the next page of results.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// A list of functions under a streaming job. Populated by a 'List' operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list of functions under a streaming job. Populated by a 'List' operation.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) })] + System.Collections.Generic.List Value { get; } + + } + /// Object containing a list of functions under a streaming job. + internal partial interface IFunctionListResultInternal + + { + /// The link (url) to the next page of results. + string NextLink { get; set; } + /// A list of functions under a streaming job. Populated by a 'List' operation. + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionListResult.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionListResult.json.cs similarity index 91% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionListResult.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionListResult.json.cs index 882d4d508c0e..d534f0c5e95c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionListResult.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class FunctionListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new FunctionListResult(json) : null; } @@ -77,8 +77,8 @@ internal FunctionListResult(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.R { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Function.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { @@ -113,7 +113,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode container.Add("value",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionOutput.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionOutput.PowerShell.cs similarity index 77% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionOutput.PowerShell.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionOutput.PowerShell.cs index 3fbe31742bcd..cd3043c29be7 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionOutput.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionOutput.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -55,29 +55,35 @@ public partial class FunctionOutput partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new FunctionOutput(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new FunctionOutput(content); } @@ -87,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. @@ -105,13 +111,13 @@ internal FunctionOutput(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("DataType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutputInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutputInternal)this).DataType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutputInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutputInternal)this).DataType, 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. @@ -126,7 +132,7 @@ internal FunctionOutput(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("DataType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutputInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutputInternal)this).DataType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutputInternal)this).DataType = (string) content.GetValueForProperty("DataType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutputInternal)this).DataType, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -135,6 +141,18 @@ internal FunctionOutput(global::System.Management.Automation.PSObject content) /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } } /// Describes the output of a function. [System.ComponentModel.TypeConverter(typeof(FunctionOutputTypeConverter))] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionOutput.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionOutput.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionOutput.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionOutput.TypeConverter.cs index 52769005491e..3d622574d1e4 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionOutput.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionOutput.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionOutput.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionOutput.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionOutput.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionOutput.cs index 2b6ed8a1bf9e..50e63af2e403 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionOutput.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionOutput.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes the output of a function. public partial class FunctionOutput : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutputInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutputInternal { /// Backing field for property. @@ -40,6 +40,9 @@ public partial interface IFunctionOutput : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The (Azure Stream Analytics supported) data type of the function output. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx", SerializedName = @"dataType", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionOutput.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionOutput.json.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionOutput.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionOutput.json.cs index 459935880413..11cc80695e4d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionOutput.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionOutput.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class FunctionOutput partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionOutput FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionOutput FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new FunctionOutput(json) : null; } @@ -77,7 +77,7 @@ internal FunctionOutput(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runti { return; } - {_dataType = If( json?.PropertyT("dataType"), out var __jsonDataType) ? (string)__jsonDataType : (string)DataType;} + {_dataType = If( json?.PropertyT("dataType"), out var __jsonDataType) ? (string)__jsonDataType : (string)_dataType;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionProperties.PowerShell.cs new file mode 100644 index 000000000000..c8de47c0b9b9 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionProperties.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with a function. + [System.ComponentModel.TypeConverter(typeof(FunctionPropertiesTypeConverter))] + public partial class FunctionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FunctionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FunctionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FunctionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionConfigurationTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FunctionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionConfigurationTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with a function. + [System.ComponentModel.TypeConverter(typeof(FunctionPropertiesTypeConverter))] + public partial interface IFunctionProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionProperties.TypeConverter.cs index 21eb5379c449..581fe1b48463 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionProperties.cs similarity index 81% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionProperties.cs index 0650861123ec..cd91b2c024b3 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionProperties.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with a function. public partial class FunctionProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration _property; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration _property; [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionConfiguration()); set => this._property = value; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionConfiguration()); set => this._property = value; } /// Backing field for property. private string _type; @@ -39,14 +39,20 @@ public partial interface IFunctionProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration Property { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) })] + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration Property { get; set; } /// Indicates the type of function. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates the type of function.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] @@ -57,7 +63,7 @@ public partial interface IFunctionProperties : internal partial interface IFunctionPropertiesInternal { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration Property { get; set; } /// Indicates the type of function. string Type { get; set; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionProperties.json.cs similarity index 92% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionProperties.json.cs index 6db53aa31a74..578e4351356f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,15 +54,15 @@ public partial class FunctionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties. - /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties interface is - /// polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties interface is polymorphic, and + /// the precise model class that will get deserialized is determined at runtime based on the payload. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json)) { @@ -96,8 +96,8 @@ internal FunctionProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.R { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionConfiguration.FromJson(__jsonProperties) : Property;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionConfiguration.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionRetrieveDefaultDefinitionParameters.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionRetrieveDefaultDefinitionParameters.PowerShell.cs similarity index 75% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionRetrieveDefaultDefinitionParameters.PowerShell.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionRetrieveDefaultDefinitionParameters.PowerShell.cs index e5ef167af26b..6d94c8c83eff 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionRetrieveDefaultDefinitionParameters.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionRetrieveDefaultDefinitionParameters.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -57,29 +57,37 @@ public partial class FunctionRetrieveDefaultDefinitionParameters partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new FunctionRetrieveDefaultDefinitionParameters(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new FunctionRetrieveDefaultDefinitionParameters(content); } @@ -92,10 +100,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. @@ -110,13 +118,13 @@ internal FunctionRetrieveDefaultDefinitionParameters(global::System.Collections. // actually deserialize if (content.Contains("BindingType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, 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. @@ -131,7 +139,7 @@ internal FunctionRetrieveDefaultDefinitionParameters(global::System.Management.A // actually deserialize if (content.Contains("BindingType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -140,6 +148,18 @@ internal FunctionRetrieveDefaultDefinitionParameters(global::System.Management.A /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } } /// Parameters used to specify the type of function to retrieve the default definition for. [System.ComponentModel.TypeConverter(typeof(FunctionRetrieveDefaultDefinitionParametersTypeConverter))] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs index d7f24c326080..1198acefd806 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionRetrieveDefaultDefinitionParameters.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionRetrieveDefaultDefinitionParameters.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionRetrieveDefaultDefinitionParameters.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionRetrieveDefaultDefinitionParameters.cs index 319a182b966e..294c98dff357 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionRetrieveDefaultDefinitionParameters.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionRetrieveDefaultDefinitionParameters.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401P /// Parameters used to specify the type of function to retrieve the default definition for. /// public partial class FunctionRetrieveDefaultDefinitionParameters : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal { /// Backing field for property. @@ -38,6 +38,9 @@ public partial interface IFunctionRetrieveDefaultDefinitionParameters : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates the function binding type.", SerializedName = @"bindingType", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionRetrieveDefaultDefinitionParameters.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionRetrieveDefaultDefinitionParameters.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionRetrieveDefaultDefinitionParameters.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionRetrieveDefaultDefinitionParameters.json.cs index b463d7be3022..17ecc4fb2811 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/FunctionRetrieveDefaultDefinitionParameters.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/FunctionRetrieveDefaultDefinitionParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -56,16 +56,15 @@ public partial class FunctionRetrieveDefaultDefinitionParameters partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters. - /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters - /// interface is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the - /// payload. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters interface + /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json)) { @@ -107,7 +106,7 @@ internal FunctionRetrieveDefaultDefinitionParameters(Microsoft.Azure.PowerShell. { return; } - {_bindingType = If( json?.PropertyT("bindingType"), out var __jsonBindingType) ? (string)__jsonBindingType : (string)BindingType;} + {_bindingType = If( json?.PropertyT("bindingType"), out var __jsonBindingType) ? (string)__jsonBindingType : (string)_bindingType;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Identity.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Identity.PowerShell.cs new file mode 100644 index 000000000000..591b7a1c1882 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Identity.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes how identity is verified + [System.ComponentModel.TypeConverter(typeof(IdentityTypeConverter))] + public partial class Identity + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Identity(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Identity(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Identity(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)this).Type, 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 Identity(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes how identity is verified + [System.ComponentModel.TypeConverter(typeof(IdentityTypeConverter))] + public partial interface IIdentity + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Identity.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Identity.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Identity.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Identity.TypeConverter.cs index bce50e8e74aa..eba3d7a9c621 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Identity.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Identity.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Identity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Identity.cs similarity index 92% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Identity.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Identity.cs index 62a4582709fe..cff5340e4269 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Identity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Identity.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes how identity is verified public partial class Identity : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentity, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentity, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal { /// Backing field for property. @@ -44,6 +44,9 @@ public partial interface IIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"principalId", PossibleTypes = new [] { typeof(string) })] @@ -52,6 +55,9 @@ public partial interface IIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"tenantId", PossibleTypes = new [] { typeof(string) })] @@ -60,6 +66,9 @@ public partial interface IIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Identity.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Identity.json.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Identity.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Identity.json.cs index afa930e7b946..440c0507c206 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Identity.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Identity.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class Identity partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new Identity(json) : null; } @@ -77,9 +77,9 @@ internal Identity(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Jso { return; } - {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)TenantId;} - {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)PrincipalId;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)_tenantId;} + {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)_principalId;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Input.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Input.PowerShell.cs new file mode 100644 index 000000000000..03654e4ea8df --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Input.PowerShell.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// An input object, containing all information associated with the named input. All inputs are contained under a streaming + /// job. + /// + [System.ComponentModel.TypeConverter(typeof(InputTypeConverter))] + public partial class Input + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Input(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Input(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Input(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputInternal)this).ETag, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type, 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 Input(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputInternal)this).ETag, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// An input object, containing all information associated with the named input. All inputs are contained under a streaming + /// job. + [System.ComponentModel.TypeConverter(typeof(InputTypeConverter))] + public partial interface IInput + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Input.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Input.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Input.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Input.TypeConverter.cs index 4bf527586a44..1044445d8ee1 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Input.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Input.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Input.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Input.cs new file mode 100644 index 000000000000..460b091b6d45 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Input.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// An input object, containing all information associated with the named input. All inputs are contained under a streaming + /// job. + /// + public partial class Input : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubResource(); + + /// Backing field for property. + private string _eTag; + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string ETag { get => this._eTag; set => this._eTag = value; } + + /// Resource Id + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Name = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Type = value ?? null; } + + /// Resource name + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties _property; + + /// + /// The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputProperties()); set => this._property = value; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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); } + + /// Resource type + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Type; } + + /// Creates an new instance. + public Input() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("ETag", out var __eTagHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputInternal)this).ETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader0) is string __headerETagHeader0 ? __headerETagHeader0 : (string)null; + } + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__subResource), __subResource); + await eventListener.AssertObjectIsValid(nameof(__subResource), __subResource); + } + } + /// An input object, containing all information associated with the named input. All inputs are contained under a streaming + /// job. + public partial interface IInput : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource + { + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"ETag", + PossibleTypes = new [] { typeof(string) })] + string ETag { get; set; } + /// + /// The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties) })] + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties Property { get; set; } + + } + /// An input object, containing all information associated with the named input. All inputs are contained under a streaming + /// job. + internal partial interface IInputInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal + { + string ETag { get; set; } + /// + /// The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Input.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Input.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Input.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Input.json.cs index cd058f688990..b9188bb0157e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Input.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Input.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -57,13 +57,13 @@ public partial class Input partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new Input(json) : null; } @@ -80,8 +80,8 @@ internal Input(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.J { return; } - __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputProperties.FromJson(__jsonProperties) : Property;} + __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputListResult.PowerShell.cs new file mode 100644 index 000000000000..46f2ff197f04 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Object containing a list of inputs under a streaming job. + [System.ComponentModel.TypeConverter(typeof(InputListResultTypeConverter))] + public partial class InputListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new InputListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new InputListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal InputListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResultInternal)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 InputListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Object containing a list of inputs under a streaming job. + [System.ComponentModel.TypeConverter(typeof(InputListResultTypeConverter))] + public partial interface IInputListResult + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputListResult.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputListResult.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputListResult.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputListResult.TypeConverter.cs index df6d23778302..58cd5d33233d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputListResult.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputListResult.cs new file mode 100644 index 000000000000..ee3ebfc9ebad --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Object containing a list of inputs under a streaming job. + public partial class InputListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResult, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The link (url) to the next page of results. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// A list of inputs under a streaming job. Populated by a 'List' operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public InputListResult() + { + + } + } + /// Object containing a list of inputs under a streaming job. + public partial interface IInputListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// The link (url) to the next page of results. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The link (url) to the next page of results.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// A list of inputs under a streaming job. Populated by a 'List' operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list of inputs under a streaming job. Populated by a 'List' operation.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) })] + System.Collections.Generic.List Value { get; } + + } + /// Object containing a list of inputs under a streaming job. + internal partial interface IInputListResultInternal + + { + /// The link (url) to the next page of results. + string NextLink { get; set; } + /// A list of inputs under a streaming job. Populated by a 'List' operation. + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputListResult.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputListResult.json.cs similarity index 91% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputListResult.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputListResult.json.cs index f51c2aa909bc..d81a66bbefd3 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputListResult.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class InputListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new InputListResult(json) : null; } @@ -77,8 +77,8 @@ internal InputListResult(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runt { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Input.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { @@ -113,7 +113,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode container.Add("value",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputProperties.PowerShell.cs new file mode 100644 index 000000000000..988b8da830ef --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputProperties.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with an input. + [System.ComponentModel.TypeConverter(typeof(InputPropertiesTypeConverter))] + public partial class InputProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new InputProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new InputProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal InputProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Serialization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SerializationTypeConverter.ConvertFrom); + } + if (content.Contains("Diagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticsTypeConverter.ConvertFrom); + } + if (content.Contains("Compression")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Compression = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression) content.GetValueForProperty("Compression",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Compression, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CompressionTypeConverter.ConvertFrom); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).PartitionKey, 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 InputProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Serialization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SerializationTypeConverter.ConvertFrom); + } + if (content.Contains("Diagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticsTypeConverter.ConvertFrom); + } + if (content.Contains("Compression")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Compression = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression) content.GetValueForProperty("Compression",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Compression, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CompressionTypeConverter.ConvertFrom); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).PartitionKey, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with an input. + [System.ComponentModel.TypeConverter(typeof(InputPropertiesTypeConverter))] + public partial interface IInputProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputProperties.TypeConverter.cs index c873a4a7d337..2d08027cf375 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputProperties.cs similarity index 80% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputProperties.cs index d3eafc4923be..24939d448a32 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputProperties.cs @@ -3,34 +3,34 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with an input. public partial class InputProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression _compression; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression _compression; /// Describes how input data is compressed [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression Compression { get => (this._compression = this._compression ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Compression()); set => this._compression = value; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression Compression { get => (this._compression = this._compression ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Compression()); set => this._compression = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics _diagnostic; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics _diagnostic; /// /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics Diagnostic { get => (this._diagnostic = this._diagnostic ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Diagnostics()); } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics Diagnostic { get => (this._diagnostic = this._diagnostic ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Diagnostics()); } /// Internal Acessors for Diagnostic - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputPropertiesInternal.Diagnostic { get => (this._diagnostic = this._diagnostic ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Diagnostics()); set { {_diagnostic = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal.Diagnostic { get => (this._diagnostic = this._diagnostic ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Diagnostics()); set { {_diagnostic = value;} } } /// Backing field for property. private string _partitionKey; @@ -42,14 +42,14 @@ public partial class InputProperties : public string PartitionKey { get => this._partitionKey; set => this._partitionKey = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization _serialization; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization _serialization; /// /// Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) /// requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization Serialization { get => (this._serialization = this._serialization ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Serialization()); set => this._serialization = value; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization Serialization { get => (this._serialization = this._serialization ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Serialization()); set => this._serialization = value; } /// Backing field for property. private string _type; @@ -74,26 +74,35 @@ public partial interface IInputProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Describes how input data is compressed", SerializedName = @"compression", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression Compression { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression) })] + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression Compression { get; set; } /// /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention.", SerializedName = @"diagnostics", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics Diagnostic { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics) })] + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics Diagnostic { get; } /// /// partitionKey Describes a key in the input data which is used for partitioning the input data /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"partitionKey Describes a key in the input data which is used for partitioning the input data", SerializedName = @"partitionKey", PossibleTypes = new [] { typeof(string) })] @@ -105,16 +114,22 @@ public partial interface IInputProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests.", SerializedName = @"serialization", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization Serialization { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization) })] + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization Serialization { get; set; } /// /// Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] @@ -126,11 +141,11 @@ internal partial interface IInputPropertiesInternal { /// Describes how input data is compressed - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ICompression Compression { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression Compression { get; set; } /// /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IDiagnostics Diagnostic { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics Diagnostic { get; set; } /// /// partitionKey Describes a key in the input data which is used for partitioning the input data /// @@ -139,7 +154,7 @@ internal partial interface IInputPropertiesInternal /// Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) /// requests. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization Serialization { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization Serialization { get; set; } /// /// Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests. /// diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputProperties.json.cs similarity index 91% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputProperties.json.cs index 05222822d16c..ce9140ebac41 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/InputProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/InputProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,15 +54,15 @@ public partial class InputProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties. - /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties interface is polymorphic, - /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties interface is polymorphic, and the + /// precise model class that will get deserialized is determined at runtime based on the payload. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json)) { @@ -96,11 +96,11 @@ internal InputProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runt { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} - {_serialization = If( json?.PropertyT("serialization"), out var __jsonSerialization) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Serialization.FromJson(__jsonSerialization) : Serialization;} - {_diagnostic = If( json?.PropertyT("diagnostics"), out var __jsonDiagnostics) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Diagnostics.FromJson(__jsonDiagnostics) : Diagnostic;} - {_compression = If( json?.PropertyT("compression"), out var __jsonCompression) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Compression.FromJson(__jsonCompression) : Compression;} - {_partitionKey = If( json?.PropertyT("partitionKey"), out var __jsonPartitionKey) ? (string)__jsonPartitionKey : (string)PartitionKey;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_serialization = If( json?.PropertyT("serialization"), out var __jsonSerialization) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Serialization.FromJson(__jsonSerialization) : _serialization;} + {_diagnostic = If( json?.PropertyT("diagnostics"), out var __jsonDiagnostics) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Diagnostics.FromJson(__jsonDiagnostics) : _diagnostic;} + {_compression = If( json?.PropertyT("compression"), out var __jsonCompression) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Compression.FromJson(__jsonCompression) : _compression;} + {_partitionKey = If( json?.PropertyT("partitionKey"), out var __jsonPartitionKey) ? (string)__jsonPartitionKey : (string)_partitionKey;} AfterFromJson(json); } @@ -125,7 +125,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode } AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); AddIf( null != this._serialization ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) this._serialization.ToJson(null,serializationMode) : null, "serialization" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._diagnostic ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) this._diagnostic.ToJson(null,serializationMode) : null, "diagnostics" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSource.PowerShell.cs new file mode 100644 index 000000000000..ddd6b906b2f7 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSource.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes an IoT Hub input data source that contains stream data. + [System.ComponentModel.TypeConverter(typeof(IoTHubStreamInputDataSourceTypeConverter))] + public partial class IoTHubStreamInputDataSource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new IoTHubStreamInputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new IoTHubStreamInputDataSource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal IoTHubStreamInputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IoTHubStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("IotHubNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).IotHubNamespace = (string) content.GetValueForProperty("IotHubNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).IotHubNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("ConsumerGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).ConsumerGroupName, global::System.Convert.ToString); + } + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).Endpoint, 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 IoTHubStreamInputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IoTHubStreamInputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("IotHubNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).IotHubNamespace = (string) content.GetValueForProperty("IotHubNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).IotHubNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("ConsumerGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).ConsumerGroupName, global::System.Convert.ToString); + } + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal)this).Endpoint, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes an IoT Hub input data source that contains stream data. + [System.ComponentModel.TypeConverter(typeof(IoTHubStreamInputDataSourceTypeConverter))] + public partial interface IIoTHubStreamInputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSource.TypeConverter.cs index 83ed6b643700..4b97422ad022 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSource.cs similarity index 75% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSource.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSource.cs index b91e6cc8bc10..dadcdbfd01cb 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSource.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSource.cs @@ -3,74 +3,75 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes an IoT Hub input data source that contains stream data. public partial class IoTHubStreamInputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamInputDataSource(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamInputDataSource(); /// /// The name of an IoT Hub Consumer Group that should be used to read events from the IoT Hub. If not specified, the input /// uses the Iot Hub’s default consumer group. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string ConsumerGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)Property).ConsumerGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)Property).ConsumerGroupName = value ?? null; } + public string ConsumerGroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)Property).ConsumerGroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)Property).ConsumerGroupName = value ?? null; } /// /// The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.). /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string Endpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)Property).Endpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)Property).Endpoint = value ?? null; } + public string Endpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)Property).Endpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)Property).Endpoint = value ?? null; } /// The name or the URI of the IoT Hub. Required on PUT (CreateOrReplace) requests. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string IotHubNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)Property).IotHubNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)Property).IotHubNamespace = value ?? null; } + public string IotHubNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)Property).IotHubNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)Property).IotHubNamespace = value ?? null; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IoTHubStreamInputDataSourceProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IoTHubStreamInputDataSourceProperties()); set { {_property = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceProperties _property; /// /// The properties that are associated with an IoT Hub input containing stream data. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IoTHubStreamInputDataSourceProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IoTHubStreamInputDataSourceProperties()); set => this._property = value; } /// /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)Property).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)Property).SharedAccessPolicyKey = value ?? null; } + public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)Property).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)Property).SharedAccessPolicyKey = value ?? null; } /// /// The shared access policy name for the IoT Hub. This policy must contain at least the Service connect permission. Required /// on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] - public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)Property).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal)Property).SharedAccessPolicyName = value ?? null; } + public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)Property).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)Property).SharedAccessPolicyName = value ?? null; } /// /// Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)__streamInputDataSource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)__streamInputDataSource).Type = value ; } + public string Type { get => "Microsoft.Devices/IotHubs"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)__streamInputDataSource).Type = "Microsoft.Devices/IotHubs"; } /// Creates an new instance. public IoTHubStreamInputDataSource() { - + this.__streamInputDataSource.Type = "Microsoft.Devices/IotHubs"; } /// Validates that this object meets the validation criteria. @@ -88,7 +89,7 @@ public IoTHubStreamInputDataSource() /// Describes an IoT Hub input data source that contains stream data. public partial interface IIoTHubStreamInputDataSource : Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource { /// /// The name of an IoT Hub Consumer Group that should be used to read events from the IoT Hub. If not specified, the input @@ -97,6 +98,9 @@ public partial interface IIoTHubStreamInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of an IoT Hub Consumer Group that should be used to read events from the IoT Hub. If not specified, the input uses the Iot Hub’s default consumer group.", SerializedName = @"consumerGroupName", PossibleTypes = new [] { typeof(string) })] @@ -107,6 +111,9 @@ public partial interface IIoTHubStreamInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.).", SerializedName = @"endpoint", PossibleTypes = new [] { typeof(string) })] @@ -115,6 +122,9 @@ public partial interface IIoTHubStreamInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name or the URI of the IoT Hub. Required on PUT (CreateOrReplace) requests.", SerializedName = @"iotHubNamespace", PossibleTypes = new [] { typeof(string) })] @@ -125,6 +135,9 @@ public partial interface IIoTHubStreamInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", SerializedName = @"sharedAccessPolicyKey", PossibleTypes = new [] { typeof(string) })] @@ -136,6 +149,9 @@ public partial interface IIoTHubStreamInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The shared access policy name for the IoT Hub. This policy must contain at least the Service connect permission. Required on PUT (CreateOrReplace) requests.", SerializedName = @"sharedAccessPolicyName", PossibleTypes = new [] { typeof(string) })] @@ -144,7 +160,7 @@ public partial interface IIoTHubStreamInputDataSource : } /// Describes an IoT Hub input data source that contains stream data. internal partial interface IIoTHubStreamInputDataSourceInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal { /// /// The name of an IoT Hub Consumer Group that should be used to read events from the IoT Hub. If not specified, the input @@ -160,7 +176,7 @@ internal partial interface IIoTHubStreamInputDataSourceInternal : /// /// The properties that are associated with an IoT Hub input containing stream data. Required on PUT (CreateOrReplace) requests. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceProperties Property { get; set; } /// /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. /// diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSource.json.cs index 450275a36dbf..f21309b58858 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class IoTHubStreamInputDataSource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new IoTHubStreamInputDataSource(json) : null; } @@ -77,8 +77,8 @@ internal IoTHubStreamInputDataSource(Microsoft.Azure.PowerShell.Cmdlets.StreamAn { return; } - __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamInputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IoTHubStreamInputDataSourceProperties.FromJson(__jsonProperties) : Property;} + __streamInputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamInputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IoTHubStreamInputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..3b2465663011 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSourceProperties.PowerShell.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with a IoT Hub input containing stream data. + [System.ComponentModel.TypeConverter(typeof(IoTHubStreamInputDataSourcePropertiesTypeConverter))] + public partial class IoTHubStreamInputDataSourceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new IoTHubStreamInputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new IoTHubStreamInputDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal IoTHubStreamInputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IotHubNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).IotHubNamespace = (string) content.GetValueForProperty("IotHubNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).IotHubNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("ConsumerGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName, global::System.Convert.ToString); + } + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).Endpoint, 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 IoTHubStreamInputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IotHubNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).IotHubNamespace = (string) content.GetValueForProperty("IotHubNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).IotHubNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("ConsumerGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName = (string) content.GetValueForProperty("ConsumerGroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).ConsumerGroupName, global::System.Convert.ToString); + } + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal)this).Endpoint, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with a IoT Hub input containing stream data. + [System.ComponentModel.TypeConverter(typeof(IoTHubStreamInputDataSourcePropertiesTypeConverter))] + public partial interface IIoTHubStreamInputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSourceProperties.TypeConverter.cs index 8e94af93a37f..359a973c4207 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSourceProperties.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSourceProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSourceProperties.cs index dc4a915ee6eb..39361c6db635 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSourceProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSourceProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with a IoT Hub input containing stream data. public partial class IoTHubStreamInputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourcePropertiesInternal { /// Backing field for property. @@ -75,6 +75,9 @@ public partial interface IIoTHubStreamInputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of an IoT Hub Consumer Group that should be used to read events from the IoT Hub. If not specified, the input uses the Iot Hub’s default consumer group.", SerializedName = @"consumerGroupName", PossibleTypes = new [] { typeof(string) })] @@ -85,6 +88,9 @@ public partial interface IIoTHubStreamInputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The IoT Hub endpoint to connect to (ie. messages/events, messages/operationsMonitoringEvents, etc.).", SerializedName = @"endpoint", PossibleTypes = new [] { typeof(string) })] @@ -93,6 +99,9 @@ public partial interface IIoTHubStreamInputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name or the URI of the IoT Hub. Required on PUT (CreateOrReplace) requests.", SerializedName = @"iotHubNamespace", PossibleTypes = new [] { typeof(string) })] @@ -103,6 +112,9 @@ public partial interface IIoTHubStreamInputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", SerializedName = @"sharedAccessPolicyKey", PossibleTypes = new [] { typeof(string) })] @@ -114,6 +126,9 @@ public partial interface IIoTHubStreamInputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The shared access policy name for the IoT Hub. This policy must contain at least the Service connect permission. Required on PUT (CreateOrReplace) requests.", SerializedName = @"sharedAccessPolicyName", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSourceProperties.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSourceProperties.json.cs index 76a6cf9d879c..3dc958bd8f0b 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/IoTHubStreamInputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/IoTHubStreamInputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class IoTHubStreamInputDataSourceProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IIoTHubStreamInputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIoTHubStreamInputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new IoTHubStreamInputDataSourceProperties(json) : null; } @@ -77,11 +77,11 @@ internal IoTHubStreamInputDataSourceProperties(Microsoft.Azure.PowerShell.Cmdlet { return; } - {_iotHubNamespace = If( json?.PropertyT("iotHubNamespace"), out var __jsonIotHubNamespace) ? (string)__jsonIotHubNamespace : (string)IotHubNamespace;} - {_sharedAccessPolicyName = If( json?.PropertyT("sharedAccessPolicyName"), out var __jsonSharedAccessPolicyName) ? (string)__jsonSharedAccessPolicyName : (string)SharedAccessPolicyName;} - {_sharedAccessPolicyKey = If( json?.PropertyT("sharedAccessPolicyKey"), out var __jsonSharedAccessPolicyKey) ? (string)__jsonSharedAccessPolicyKey : (string)SharedAccessPolicyKey;} - {_consumerGroupName = If( json?.PropertyT("consumerGroupName"), out var __jsonConsumerGroupName) ? (string)__jsonConsumerGroupName : (string)ConsumerGroupName;} - {_endpoint = If( json?.PropertyT("endpoint"), out var __jsonEndpoint) ? (string)__jsonEndpoint : (string)Endpoint;} + {_iotHubNamespace = If( json?.PropertyT("iotHubNamespace"), out var __jsonIotHubNamespace) ? (string)__jsonIotHubNamespace : (string)_iotHubNamespace;} + {_sharedAccessPolicyName = If( json?.PropertyT("sharedAccessPolicyName"), out var __jsonSharedAccessPolicyName) ? (string)__jsonSharedAccessPolicyName : (string)_sharedAccessPolicyName;} + {_sharedAccessPolicyKey = If( json?.PropertyT("sharedAccessPolicyKey"), out var __jsonSharedAccessPolicyKey) ? (string)__jsonSharedAccessPolicyKey : (string)_sharedAccessPolicyKey;} + {_consumerGroupName = If( json?.PropertyT("consumerGroupName"), out var __jsonConsumerGroupName) ? (string)__jsonConsumerGroupName : (string)_consumerGroupName;} + {_endpoint = If( json?.PropertyT("endpoint"), out var __jsonEndpoint) ? (string)__jsonEndpoint : (string)_endpoint;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBinding.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBinding.PowerShell.cs new file mode 100644 index 000000000000..c08bb01bb101 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBinding.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The binding to a JavaScript function. + [System.ComponentModel.TypeConverter(typeof(JavaScriptFunctionBindingTypeConverter))] + public partial class JavaScriptFunctionBinding + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBinding DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new JavaScriptFunctionBinding(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBinding DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new JavaScriptFunctionBinding(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBinding FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal JavaScriptFunctionBinding(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionBindingPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingInternal)this).Script, 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 JavaScriptFunctionBinding(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionBindingPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingInternal)this).Script, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 binding to a JavaScript function. + [System.ComponentModel.TypeConverter(typeof(JavaScriptFunctionBindingTypeConverter))] + public partial interface IJavaScriptFunctionBinding + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBinding.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBinding.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBinding.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBinding.TypeConverter.cs index 6771f81b39c2..3bc848d44616 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBinding.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBinding.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBinding ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBinding ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBinding).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBinding).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBinding.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBinding.cs new file mode 100644 index 000000000000..3dbd3e2f6db7 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBinding.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The binding to a JavaScript function. + public partial class JavaScriptFunctionBinding : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBinding, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionBinding(); + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionBindingProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingProperties _property; + + /// The binding properties associated with a JavaScript function. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionBindingProperties()); set => this._property = value; } + + /// + /// The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }' + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Script { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingPropertiesInternal)Property).Script; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingPropertiesInternal)Property).Script = value ?? null; } + + /// Indicates the function binding type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Microsoft.StreamAnalytics/JavascriptUdf"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal)__functionBinding).Type = "Microsoft.StreamAnalytics/JavascriptUdf"; } + + /// Creates an new instance. + public JavaScriptFunctionBinding() + { + this.__functionBinding.Type = "Microsoft.StreamAnalytics/JavascriptUdf"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__functionBinding), __functionBinding); + await eventListener.AssertObjectIsValid(nameof(__functionBinding), __functionBinding); + } + } + /// The binding to a JavaScript function. + public partial interface IJavaScriptFunctionBinding : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBinding + { + /// + /// The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }' + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }'", + SerializedName = @"script", + PossibleTypes = new [] { typeof(string) })] + string Script { get; set; } + + } + /// The binding to a JavaScript function. + internal partial interface IJavaScriptFunctionBindingInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionBindingInternal + { + /// The binding properties associated with a JavaScript function. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingProperties Property { get; set; } + /// + /// The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }' + /// + string Script { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBinding.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBinding.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBinding.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBinding.json.cs index 9ff28f59d15a..a4d2bb01a361 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBinding.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBinding.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class JavaScriptFunctionBinding partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBinding. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBinding. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBinding. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBinding. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBinding FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBinding FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new JavaScriptFunctionBinding(json) : null; } @@ -77,8 +77,8 @@ internal JavaScriptFunctionBinding(Microsoft.Azure.PowerShell.Cmdlets.StreamAnal { return; } - __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionBinding(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionBindingProperties.FromJson(__jsonProperties) : Property;} + __functionBinding = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionBinding(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionBindingProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingProperties.PowerShell.cs similarity index 76% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingProperties.PowerShell.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingProperties.PowerShell.cs index f49778ccbdbf..f6479cc04339 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingProperties.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -55,29 +55,37 @@ public partial class JavaScriptFunctionBindingProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new JavaScriptFunctionBindingProperties(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new JavaScriptFunctionBindingProperties(content); } @@ -89,10 +97,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. @@ -107,13 +115,13 @@ internal JavaScriptFunctionBindingProperties(global::System.Collections.IDiction // actually deserialize if (content.Contains("Script")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingPropertiesInternal)this).Script, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingPropertiesInternal)this).Script, 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. @@ -128,7 +136,7 @@ internal JavaScriptFunctionBindingProperties(global::System.Management.Automatio // actually deserialize if (content.Contains("Script")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingPropertiesInternal)this).Script, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingPropertiesInternal)this).Script, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -137,6 +145,18 @@ internal JavaScriptFunctionBindingProperties(global::System.Management.Automatio /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 binding properties associated with a JavaScript function. [System.ComponentModel.TypeConverter(typeof(JavaScriptFunctionBindingPropertiesTypeConverter))] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingProperties.TypeConverter.cs index 135622c7d259..5e17bcfd0585 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingProperties.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingProperties.cs index 893ea605d58e..f685aecb5030 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The binding properties associated with a JavaScript function. public partial class JavaScriptFunctionBindingProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingPropertiesInternal { /// Backing field for property. @@ -38,6 +38,9 @@ public partial interface IJavaScriptFunctionBindingProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }'", SerializedName = @"script", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingProperties.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingProperties.json.cs index 8f845cbc5548..eda826beaeda 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class JavaScriptFunctionBindingProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new JavaScriptFunctionBindingProperties(json) : null; } @@ -77,7 +77,7 @@ internal JavaScriptFunctionBindingProperties(Microsoft.Azure.PowerShell.Cmdlets. { return; } - {_script = If( json?.PropertyT("script"), out var __jsonScript) ? (string)__jsonScript : (string)Script;} + {_script = If( json?.PropertyT("script"), out var __jsonScript) ? (string)__jsonScript : (string)_script;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingRetrievalProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingRetrievalProperties.PowerShell.cs new file mode 100644 index 000000000000..3af9d550a442 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingRetrievalProperties.PowerShell.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The binding retrieval properties associated with a JavaScript function. + [System.ComponentModel.TypeConverter(typeof(JavaScriptFunctionBindingRetrievalPropertiesTypeConverter))] + public partial class JavaScriptFunctionBindingRetrievalProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new JavaScriptFunctionBindingRetrievalProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new JavaScriptFunctionBindingRetrievalProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal JavaScriptFunctionBindingRetrievalProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).Script, global::System.Convert.ToString); + } + if (content.Contains("UdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).UdfType = (string) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).UdfType, 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 JavaScriptFunctionBindingRetrievalProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Script")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).Script = (string) content.GetValueForProperty("Script",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).Script, global::System.Convert.ToString); + } + if (content.Contains("UdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).UdfType = (string) content.GetValueForProperty("UdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalPropertiesInternal)this).UdfType, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 binding retrieval properties associated with a JavaScript function. + [System.ComponentModel.TypeConverter(typeof(JavaScriptFunctionBindingRetrievalPropertiesTypeConverter))] + public partial interface IJavaScriptFunctionBindingRetrievalProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingRetrievalProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingRetrievalProperties.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingRetrievalProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingRetrievalProperties.TypeConverter.cs index 9c85d5b2fed7..9a5fb96d340e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingRetrievalProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingRetrievalProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingRetrievalProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingRetrievalProperties.cs similarity index 82% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingRetrievalProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingRetrievalProperties.cs index 97a3dcd63c50..1e5022e73039 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingRetrievalProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingRetrievalProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The binding retrieval properties associated with a JavaScript function. public partial class JavaScriptFunctionBindingRetrievalProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalPropertiesInternal { /// Backing field for property. @@ -23,11 +23,11 @@ public partial class JavaScriptFunctionBindingRetrievalProperties : public string Script { get => this._script; set => this._script = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? _udfType; + private string _udfType; /// The function type. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? UdfType { get => this._udfType; set => this._udfType = value; } + public string UdfType { get => this._udfType; set => this._udfType = value; } /// /// Creates an new instance. @@ -47,6 +47,9 @@ public partial interface IJavaScriptFunctionBindingRetrievalProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }'.", SerializedName = @"script", PossibleTypes = new [] { typeof(string) })] @@ -55,10 +58,14 @@ public partial interface IJavaScriptFunctionBindingRetrievalProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The function type.", SerializedName = @"udfType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? UdfType { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string UdfType { get; set; } } /// The binding retrieval properties associated with a JavaScript function. @@ -70,7 +77,8 @@ internal partial interface IJavaScriptFunctionBindingRetrievalPropertiesInternal /// string Script { get; set; } /// The function type. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType? UdfType { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string UdfType { get; set; } } } \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingRetrievalProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingRetrievalProperties.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingRetrievalProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingRetrievalProperties.json.cs index b74cbb8895e9..32b0a35a19cc 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionBindingRetrievalProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionBindingRetrievalProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class JavaScriptFunctionBindingRetrievalProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionBindingRetrievalProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new JavaScriptFunctionBindingRetrievalProperties(json) : null; } @@ -78,8 +78,8 @@ internal JavaScriptFunctionBindingRetrievalProperties(Microsoft.Azure.PowerShell { return; } - {_script = If( json?.PropertyT("script"), out var __jsonScript) ? (string)__jsonScript : (string)Script;} - {_udfType = If( json?.PropertyT("udfType"), out var __jsonUdfType) ? (string)__jsonUdfType : (string)UdfType;} + {_script = If( json?.PropertyT("script"), out var __jsonScript) ? (string)__jsonScript : (string)_script;} + {_udfType = If( json?.PropertyT("udfType"), out var __jsonUdfType) ? (string)__jsonUdfType : (string)_udfType;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs new file mode 100644 index 000000000000..6e4ab4697079 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionRetrieveDefaultDefinitionParameters.PowerShell.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// The parameters needed to retrieve the default function definition for a JavaScript function. + /// + [System.ComponentModel.TypeConverter(typeof(JavaScriptFunctionRetrieveDefaultDefinitionParametersTypeConverter))] + public partial class JavaScriptFunctionRetrieveDefaultDefinitionParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new JavaScriptFunctionRetrieveDefaultDefinitionParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new JavaScriptFunctionRetrieveDefaultDefinitionParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal JavaScriptFunctionRetrieveDefaultDefinitionParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("BindingRetrievalProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("BindingType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyUdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (string) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyScript")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript = (string) content.GetValueForProperty("BindingRetrievalPropertyScript",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript, 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 JavaScriptFunctionRetrieveDefaultDefinitionParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("BindingRetrievalProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalProperties) content.GetValueForProperty("BindingRetrievalProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionBindingRetrievalPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("BindingType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType = (string) content.GetValueForProperty("BindingType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyUdfType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType = (string) content.GetValueForProperty("BindingRetrievalPropertyUdfType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyUdfType, global::System.Convert.ToString); + } + if (content.Contains("BindingRetrievalPropertyScript")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript = (string) content.GetValueForProperty("BindingRetrievalPropertyScript",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal)this).BindingRetrievalPropertyScript, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 parameters needed to retrieve the default function definition for a JavaScript function. + [System.ComponentModel.TypeConverter(typeof(JavaScriptFunctionRetrieveDefaultDefinitionParametersTypeConverter))] + public partial interface IJavaScriptFunctionRetrieveDefaultDefinitionParameters + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs index c6d0ce6e6927..fb1a90d920b6 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionRetrieveDefaultDefinitionParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionRetrieveDefaultDefinitionParameters.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionRetrieveDefaultDefinitionParameters.cs new file mode 100644 index 000000000000..f78111ae379a --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionRetrieveDefaultDefinitionParameters.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// The parameters needed to retrieve the default function definition for a JavaScript function. + /// + public partial class JavaScriptFunctionRetrieveDefaultDefinitionParameters : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParameters, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionRetrieveDefaultDefinitionParameters(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalProperties _bindingRetrievalProperty; + + /// The binding retrieval properties associated with a JavaScript function. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalProperties BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionBindingRetrievalProperties()); set => this._bindingRetrievalProperty = value; } + + /// + /// The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string BindingRetrievalPropertyScript { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).Script; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).Script = value ?? null; } + + /// The function type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string BindingRetrievalPropertyUdfType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalPropertiesInternal)BindingRetrievalProperty).UdfType = value ?? null; } + + /// Indicates the function binding type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string BindingType { get => "Microsoft.StreamAnalytics/JavascriptUdf"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal)__functionRetrieveDefaultDefinitionParameters).BindingType = "Microsoft.StreamAnalytics/JavascriptUdf"; } + + /// Internal Acessors for BindingRetrievalProperty + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal.BindingRetrievalProperty { get => (this._bindingRetrievalProperty = this._bindingRetrievalProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionBindingRetrievalProperties()); set { {_bindingRetrievalProperty = value;} } } + + /// + /// Creates an new instance. + /// + public JavaScriptFunctionRetrieveDefaultDefinitionParameters() + { + this.__functionRetrieveDefaultDefinitionParameters.BindingType = "Microsoft.StreamAnalytics/JavascriptUdf"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); + await eventListener.AssertObjectIsValid(nameof(__functionRetrieveDefaultDefinitionParameters), __functionRetrieveDefaultDefinitionParameters); + } + } + /// The parameters needed to retrieve the default function definition for a JavaScript function. + public partial interface IJavaScriptFunctionRetrieveDefaultDefinitionParameters : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters + { + /// + /// The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }'.", + SerializedName = @"script", + PossibleTypes = new [] { typeof(string) })] + string BindingRetrievalPropertyScript { get; set; } + /// The function type. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The function type.", + SerializedName = @"udfType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string BindingRetrievalPropertyUdfType { get; set; } + + } + /// The parameters needed to retrieve the default function definition for a JavaScript function. + internal partial interface IJavaScriptFunctionRetrieveDefaultDefinitionParametersInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParametersInternal + { + /// The binding retrieval properties associated with a JavaScript function. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionBindingRetrievalProperties BindingRetrievalProperty { get; set; } + /// + /// The JavaScript code containing a single function definition. For example: 'function (x, y) { return x + y; }'. + /// + string BindingRetrievalPropertyScript { get; set; } + /// The function type. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Scalar")] + string BindingRetrievalPropertyUdfType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionRetrieveDefaultDefinitionParameters.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionRetrieveDefaultDefinitionParameters.json.cs similarity index 91% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionRetrieveDefaultDefinitionParameters.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionRetrieveDefaultDefinitionParameters.json.cs index 1eb5ee132fbd..a9917cbe9a97 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JavaScriptFunctionRetrieveDefaultDefinitionParameters.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JavaScriptFunctionRetrieveDefaultDefinitionParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class JavaScriptFunctionRetrieveDefaultDefinitionParameters partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJavaScriptFunctionRetrieveDefaultDefinitionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJavaScriptFunctionRetrieveDefaultDefinitionParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new JavaScriptFunctionRetrieveDefaultDefinitionParameters(json) : null; } @@ -80,8 +80,8 @@ internal JavaScriptFunctionRetrieveDefaultDefinitionParameters(Microsoft.Azure.P { return; } - __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionRetrieveDefaultDefinitionParameters(json); - {_bindingRetrievalProperty = If( json?.PropertyT("bindingRetrievalProperties"), out var __jsonBindingRetrievalProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JavaScriptFunctionBindingRetrievalProperties.FromJson(__jsonBindingRetrievalProperties) : BindingRetrievalProperty;} + __functionRetrieveDefaultDefinitionParameters = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionRetrieveDefaultDefinitionParameters(json); + {_bindingRetrievalProperty = If( json?.PropertyT("bindingRetrievalProperties"), out var __jsonBindingRetrievalProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JavaScriptFunctionBindingRetrievalProperties.FromJson(__jsonBindingRetrievalProperties) : _bindingRetrievalProperty;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JobStorageAccount.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JobStorageAccount.PowerShell.cs new file mode 100644 index 000000000000..b61555a49b4a --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JobStorageAccount.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with an Azure Storage account with MSI + [System.ComponentModel.TypeConverter(typeof(JobStorageAccountTypeConverter))] + public partial class JobStorageAccount + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new JobStorageAccount(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new JobStorageAccount(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal JobStorageAccount(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccountInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccountInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("AccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountName, global::System.Convert.ToString); + } + if (content.Contains("AccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountKey, 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 JobStorageAccount(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccountInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccountInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("AccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountName, global::System.Convert.ToString); + } + if (content.Contains("AccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountKey, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with an Azure Storage account with MSI + [System.ComponentModel.TypeConverter(typeof(JobStorageAccountTypeConverter))] + public partial interface IJobStorageAccount + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JobStorageAccount.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JobStorageAccount.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JobStorageAccount.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JobStorageAccount.TypeConverter.cs index 012e572c13f4..1849287ad474 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JobStorageAccount.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JobStorageAccount.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JobStorageAccount.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JobStorageAccount.cs new file mode 100644 index 000000000000..e069b0c53fe5 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JobStorageAccount.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with an Azure Storage account with MSI + public partial class JobStorageAccount : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccountInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount __storageAccount = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccount(); + + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string AccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)__storageAccount).AccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)__storageAccount).AccountKey = value ?? null; } + + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string AccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)__storageAccount).AccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)__storageAccount).AccountName = value ?? null; } + + /// Backing field for property. + private string _authenticationMode; + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string AuthenticationMode { get => this._authenticationMode; set => this._authenticationMode = value; } + + /// Creates an new instance. + public JobStorageAccount() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__storageAccount), __storageAccount); + await eventListener.AssertObjectIsValid(nameof(__storageAccount), __storageAccount); + } + } + /// The properties that are associated with an Azure Storage account with MSI + public partial interface IJobStorageAccount : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount + { + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Authentication Mode.", + SerializedName = @"authenticationMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + + } + /// The properties that are associated with an Azure Storage account with MSI + internal partial interface IJobStorageAccountInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal + { + /// Authentication Mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JobStorageAccount.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JobStorageAccount.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JobStorageAccount.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JobStorageAccount.json.cs index 9f1edce0333a..a218a59910e9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JobStorageAccount.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JobStorageAccount.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class JobStorageAccount partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJobStorageAccount FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new JobStorageAccount(json) : null; } @@ -77,8 +77,8 @@ internal JobStorageAccount(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Ru { return; } - __storageAccount = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StorageAccount(json); - {_authenticationMode = If( json?.PropertyT("authenticationMode"), out var __jsonAuthenticationMode) ? (string)__jsonAuthenticationMode : (string)AuthenticationMode;} + __storageAccount = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccount(json); + {_authenticationMode = If( json?.PropertyT("authenticationMode"), out var __jsonAuthenticationMode) ? (string)__jsonAuthenticationMode : (string)_authenticationMode;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerialization.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerialization.PowerShell.cs new file mode 100644 index 000000000000..2d31d84a75bf --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerialization.PowerShell.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// Describes how data from an input is serialized or how data is serialized when written to an output in JSON format. + /// + [System.ComponentModel.TypeConverter(typeof(JsonSerializationTypeConverter))] + public partial class JsonSerialization + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerialization DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new JsonSerialization(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerialization DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new JsonSerialization(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerialization FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal JsonSerialization(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JsonSerializationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Encoding")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationInternal)this).Encoding = (string) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationInternal)this).Encoding, global::System.Convert.ToString); + } + if (content.Contains("Format")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationInternal)this).Format = (string) content.GetValueForProperty("Format",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationInternal)this).Format, 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 JsonSerialization(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JsonSerializationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Encoding")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationInternal)this).Encoding = (string) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationInternal)this).Encoding, global::System.Convert.ToString); + } + if (content.Contains("Format")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationInternal)this).Format = (string) content.GetValueForProperty("Format",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationInternal)this).Format, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes how data from an input is serialized or how data is serialized when written to an output in JSON format. + [System.ComponentModel.TypeConverter(typeof(JsonSerializationTypeConverter))] + public partial interface IJsonSerialization + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerialization.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerialization.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerialization.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerialization.TypeConverter.cs index 9f5f19c2e516..4e6adabd02cd 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerialization.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerialization.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerialization ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerialization ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerialization).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerialization).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerialization.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerialization.cs new file mode 100644 index 000000000000..1708b9ca1091 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// Describes how data from an input is serialized or how data is serialized when written to an output in JSON format. + /// + public partial class JsonSerialization : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerialization, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Serialization(); + + /// + /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. + /// Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Encoding { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationPropertiesInternal)Property).Encoding; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationPropertiesInternal)Property).Encoding = value ?? null; } + + /// + /// This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies + /// the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the + /// output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be + /// formatted as an array of JSON objects. Default value is 'lineSeparated' if left null. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Format { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationPropertiesInternal)Property).Format; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationPropertiesInternal)Property).Format = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JsonSerializationProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationProperties _property; + + /// + /// The properties that are associated with the JSON serialization type. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JsonSerializationProperties()); set => this._property = value; } + + /// + /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Json"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)__serialization).Type = "Json"; } + + /// Creates an new instance. + public JsonSerialization() + { + this.__serialization.Type = "Json"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__serialization), __serialization); + await eventListener.AssertObjectIsValid(nameof(__serialization), __serialization); + } + } + /// Describes how data from an input is serialized or how data is serialized when written to an output in JSON format. + public partial interface IJsonSerialization : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization + { + /// + /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. + /// Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"encoding", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("UTF8")] + string Encoding { get; set; } + /// + /// This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies + /// the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the + /// output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be + /// formatted as an array of JSON objects. Default value is 'lineSeparated' if left null. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be formatted as an array of JSON objects. Default value is 'lineSeparated' if left null.", + SerializedName = @"format", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("LineSeparated", "Array")] + string Format { get; set; } + + } + /// Describes how data from an input is serialized or how data is serialized when written to an output in JSON format. + internal partial interface IJsonSerializationInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal + { + /// + /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. + /// Required on PUT (CreateOrReplace) requests. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("UTF8")] + string Encoding { get; set; } + /// + /// This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies + /// the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the + /// output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be + /// formatted as an array of JSON objects. Default value is 'lineSeparated' if left null. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("LineSeparated", "Array")] + string Format { get; set; } + /// + /// The properties that are associated with the JSON serialization type. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerialization.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerialization.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerialization.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerialization.json.cs index c217cd32b194..d54a17b89a73 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerialization.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerialization.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class JsonSerialization partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerialization. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerialization. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerialization. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerialization. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerialization FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerialization FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new JsonSerialization(json) : null; } @@ -79,8 +79,8 @@ internal JsonSerialization(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Ru { return; } - __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Serialization(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JsonSerializationProperties.FromJson(__jsonProperties) : Property;} + __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Serialization(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JsonSerializationProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerializationProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerializationProperties.PowerShell.cs new file mode 100644 index 000000000000..824df84b186a --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerializationProperties.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with the JSON serialization type. + [System.ComponentModel.TypeConverter(typeof(JsonSerializationPropertiesTypeConverter))] + public partial class JsonSerializationProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new JsonSerializationProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new JsonSerializationProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal JsonSerializationProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Encoding")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationPropertiesInternal)this).Encoding = (string) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationPropertiesInternal)this).Encoding, global::System.Convert.ToString); + } + if (content.Contains("Format")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationPropertiesInternal)this).Format = (string) content.GetValueForProperty("Format",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationPropertiesInternal)this).Format, 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 JsonSerializationProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Encoding")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationPropertiesInternal)this).Encoding = (string) content.GetValueForProperty("Encoding",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationPropertiesInternal)this).Encoding, global::System.Convert.ToString); + } + if (content.Contains("Format")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationPropertiesInternal)this).Format = (string) content.GetValueForProperty("Format",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationPropertiesInternal)this).Format, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with the JSON serialization type. + [System.ComponentModel.TypeConverter(typeof(JsonSerializationPropertiesTypeConverter))] + public partial interface IJsonSerializationProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerializationProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerializationProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerializationProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerializationProperties.TypeConverter.cs index bd7609637548..43c1df7cb621 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerializationProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerializationProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerializationProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerializationProperties.cs similarity index 79% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerializationProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerializationProperties.cs index d4e1b3076062..2d75e4e34f98 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerializationProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerializationProperties.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with the JSON serialization type. public partial class JsonSerializationProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding? _encoding; + private string _encoding; /// /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. /// Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding? Encoding { get => this._encoding; set => this._encoding = value; } + public string Encoding { get => this._encoding; set => this._encoding = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat? _format; + private string _format; /// /// This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies @@ -33,7 +33,7 @@ public partial class JsonSerializationProperties : /// formatted as an array of JSON objects. Default value is 'lineSeparated' if left null. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat? Format { get => this._format; set => this._format = value; } + public string Format { get => this._format; set => this._format = value; } /// Creates an new instance. public JsonSerializationProperties() @@ -52,10 +52,14 @@ public partial interface IJsonSerializationProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. Required on PUT (CreateOrReplace) requests.", SerializedName = @"encoding", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding? Encoding { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("UTF8")] + string Encoding { get; set; } /// /// This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies /// the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the @@ -65,10 +69,14 @@ public partial interface IJsonSerializationProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be formatted as an array of JSON objects. Default value is 'lineSeparated' if left null.", SerializedName = @"format", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat? Format { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("LineSeparated", "Array")] + string Format { get; set; } } /// The properties that are associated with the JSON serialization type. @@ -79,14 +87,16 @@ internal partial interface IJsonSerializationPropertiesInternal /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. /// Required on PUT (CreateOrReplace) requests. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding? Encoding { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("UTF8")] + string Encoding { get; set; } /// /// This property only applies to JSON serialization of outputs only. It is not applicable to inputs. This property specifies /// the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating the /// output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will be /// formatted as an array of JSON objects. Default value is 'lineSeparated' if left null. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat? Format { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("LineSeparated", "Array")] + string Format { get; set; } } } \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerializationProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerializationProperties.json.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerializationProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerializationProperties.json.cs index 198d3fa0e1f1..146ddb9c2022 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/JsonSerializationProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/JsonSerializationProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class JsonSerializationProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IJsonSerializationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJsonSerializationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new JsonSerializationProperties(json) : null; } @@ -77,8 +77,8 @@ internal JsonSerializationProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamAn { return; } - {_encoding = If( json?.PropertyT("encoding"), out var __jsonEncoding) ? (string)__jsonEncoding : (string)Encoding;} - {_format = If( json?.PropertyT("format"), out var __jsonFormat) ? (string)__jsonFormat : (string)Format;} + {_encoding = If( json?.PropertyT("encoding"), out var __jsonEncoding) ? (string)__jsonEncoding : (string)_encoding;} + {_format = If( json?.PropertyT("format"), out var __jsonFormat) ? (string)__jsonFormat : (string)_format;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OAuthBasedDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OAuthBasedDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..253e191a3bf5 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OAuthBasedDataSourceProperties.PowerShell.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// The properties that are associated with data sources that use OAuth as their authentication model. + /// + [System.ComponentModel.TypeConverter(typeof(OAuthBasedDataSourcePropertiesTypeConverter))] + public partial class OAuthBasedDataSourceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OAuthBasedDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OAuthBasedDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OAuthBasedDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RefreshToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken, global::System.Convert.ToString); + } + if (content.Contains("TokenUserPrincipalName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); + } + if (content.Contains("TokenUserDisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName, 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 OAuthBasedDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RefreshToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken, global::System.Convert.ToString); + } + if (content.Contains("TokenUserPrincipalName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); + } + if (content.Contains("TokenUserDisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with data sources that use OAuth as their authentication model. + [System.ComponentModel.TypeConverter(typeof(OAuthBasedDataSourcePropertiesTypeConverter))] + public partial interface IOAuthBasedDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OAuthBasedDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OAuthBasedDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OAuthBasedDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OAuthBasedDataSourceProperties.TypeConverter.cs index 1ad876a529f6..71da3ca214f0 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OAuthBasedDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OAuthBasedDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OAuthBasedDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OAuthBasedDataSourceProperties.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OAuthBasedDataSourceProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OAuthBasedDataSourceProperties.cs index bf98283517e9..79c699faab0c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OAuthBasedDataSourceProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OAuthBasedDataSourceProperties.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401P /// The properties that are associated with data sources that use OAuth as their authentication model. /// public partial class OAuthBasedDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal { /// Backing field for property. @@ -66,6 +66,9 @@ public partial interface IOAuthBasedDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests.", SerializedName = @"refreshToken", PossibleTypes = new [] { typeof(string) })] @@ -77,6 +80,9 @@ public partial interface IOAuthBasedDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The user display name of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", SerializedName = @"tokenUserDisplayName", PossibleTypes = new [] { typeof(string) })] @@ -88,6 +94,9 @@ public partial interface IOAuthBasedDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", SerializedName = @"tokenUserPrincipalName", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OAuthBasedDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OAuthBasedDataSourceProperties.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OAuthBasedDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OAuthBasedDataSourceProperties.json.cs index 396d193e3396..1c96b5b62305 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OAuthBasedDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OAuthBasedDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class OAuthBasedDataSourceProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new OAuthBasedDataSourceProperties(json) : null; } @@ -79,9 +79,9 @@ internal OAuthBasedDataSourceProperties(Microsoft.Azure.PowerShell.Cmdlets.Strea { return; } - {_refreshToken = If( json?.PropertyT("refreshToken"), out var __jsonRefreshToken) ? (string)__jsonRefreshToken : (string)RefreshToken;} - {_tokenUserPrincipalName = If( json?.PropertyT("tokenUserPrincipalName"), out var __jsonTokenUserPrincipalName) ? (string)__jsonTokenUserPrincipalName : (string)TokenUserPrincipalName;} - {_tokenUserDisplayName = If( json?.PropertyT("tokenUserDisplayName"), out var __jsonTokenUserDisplayName) ? (string)__jsonTokenUserDisplayName : (string)TokenUserDisplayName;} + {_refreshToken = If( json?.PropertyT("refreshToken"), out var __jsonRefreshToken) ? (string)__jsonRefreshToken : (string)_refreshToken;} + {_tokenUserPrincipalName = If( json?.PropertyT("tokenUserPrincipalName"), out var __jsonTokenUserPrincipalName) ? (string)__jsonTokenUserPrincipalName : (string)_tokenUserPrincipalName;} + {_tokenUserDisplayName = If( json?.PropertyT("tokenUserDisplayName"), out var __jsonTokenUserDisplayName) ? (string)__jsonTokenUserDisplayName : (string)_tokenUserDisplayName;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Operation.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Operation.PowerShell.cs new file mode 100644 index 000000000000..a568fa029fcb --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Operation.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// A Stream Analytics REST API operation + [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] + public partial class Operation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Operation(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Operation(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Operation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Operation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// A Stream Analytics REST API operation + [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] + public partial interface IOperation + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Operation.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Operation.TypeConverter.cs new file mode 100644 index 000000000000..0d468634ec13 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Operation.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Operation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Operation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Operation.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Operation.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Operation.cs new file mode 100644 index 000000000000..a48e2269f28f --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Operation.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// A Stream Analytics REST API operation + public partial class Operation : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplay _display; + + /// + /// Contains the localized display information for this particular operation / action. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OperationDisplay()); } + + /// The localized friendly description for the operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)Display).Description; } + + /// The localized friendly name for the operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)Display).Operation; } + + /// The localized friendly form of the resource provider name. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)Display).Provider; } + + /// + /// The localized friendly form of the resource type related to this action/operation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)Display).Resource; } + + /// Internal Acessors for Display + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OperationDisplay()); set { {_display = value;} } } + + /// Internal Acessors for DisplayDescription + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)Display).Description = value ?? null; } + + /// Internal Acessors for DisplayOperation + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)Display).Operation = value ?? null; } + + /// Internal Acessors for DisplayProvider + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)Display).Provider = value ?? null; } + + /// Internal Acessors for DisplayResource + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)Display).Resource = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationInternal.Name { get => this._name; set { {_name = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the operation being performed on this particular object. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Creates an new instance. + public Operation() + { + + } + } + /// A Stream Analytics REST API operation + public partial interface IOperation : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// The localized friendly description for the operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly description for the operation.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string DisplayDescription { get; } + /// The localized friendly name for the operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly name for the operation.", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string DisplayOperation { get; } + /// The localized friendly form of the resource provider name. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly form of the resource provider name.", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string DisplayProvider { get; } + /// + /// The localized friendly form of the resource type related to this action/operation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly form of the resource type related to this action/operation.", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string DisplayResource { get; } + /// The name of the operation being performed on this particular object. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the operation being performed on this particular object.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + + } + /// A Stream Analytics REST API operation + internal partial interface IOperationInternal + + { + /// + /// Contains the localized display information for this particular operation / action. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplay Display { get; set; } + /// The localized friendly description for the operation. + string DisplayDescription { get; set; } + /// The localized friendly name for the operation. + string DisplayOperation { get; set; } + /// The localized friendly form of the resource provider name. + string DisplayProvider { get; set; } + /// + /// The localized friendly form of the resource type related to this action/operation. + /// + string DisplayResource { get; set; } + /// The name of the operation being performed on this particular object. + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Operation.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Operation.json.cs new file mode 100644 index 000000000000..663f3572fb69 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Operation.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// A Stream Analytics REST API operation + public partial class Operation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new Operation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. + internal Operation(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OperationDisplay.FromJson(__jsonDisplay) : _display;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs new file mode 100644 index 000000000000..5af2cec671fd --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationDisplay.PowerShell.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// Contains the localized display information for this particular operation / action. + /// + [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] + public partial class OperationDisplay + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationDisplay(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationDisplay(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationDisplay(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationDisplay(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Contains the localized display information for this particular operation / action. + [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] + public partial interface IOperationDisplay + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs new file mode 100644 index 000000000000..dd5a647a6f28 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationDisplayTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplay ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplay).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationDisplay.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationDisplay.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationDisplay.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationDisplay.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationDisplay.cs new file mode 100644 index 000000000000..19f8bb3c9bf0 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationDisplay.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// Contains the localized display information for this particular operation / action. + /// + public partial class OperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplay, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal + { + + /// Backing field for property. + private string _description; + + /// The localized friendly description for the operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Description { get => this._description; } + + /// Internal Acessors for Description + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } + + /// Internal Acessors for Operation + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } + + /// Internal Acessors for Provider + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } + + /// Internal Acessors for Resource + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } + + /// Backing field for property. + private string _operation; + + /// The localized friendly name for the operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Operation { get => this._operation; } + + /// Backing field for property. + private string _provider; + + /// The localized friendly form of the resource provider name. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Provider { get => this._provider; } + + /// Backing field for property. + private string _resource; + + /// + /// The localized friendly form of the resource type related to this action/operation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Resource { get => this._resource; } + + /// Creates an new instance. + public OperationDisplay() + { + + } + } + /// Contains the localized display information for this particular operation / action. + public partial interface IOperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// The localized friendly description for the operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly description for the operation.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; } + /// The localized friendly name for the operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly name for the operation.", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string Operation { get; } + /// The localized friendly form of the resource provider name. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly form of the resource provider name.", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string Provider { get; } + /// + /// The localized friendly form of the resource type related to this action/operation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly form of the resource type related to this action/operation.", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string Resource { get; } + + } + /// Contains the localized display information for this particular operation / action. + internal partial interface IOperationDisplayInternal + + { + /// The localized friendly description for the operation. + string Description { get; set; } + /// The localized friendly name for the operation. + string Operation { get; set; } + /// The localized friendly form of the resource provider name. + string Provider { get; set; } + /// + /// The localized friendly form of the resource type related to this action/operation. + /// + string Resource { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationDisplay.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationDisplay.json.cs new file mode 100644 index 000000000000..ca8911654211 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationDisplay.json.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// Contains the localized display information for this particular operation / action. + /// + public partial class OperationDisplay + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplay. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplay. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. + internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)_provider;} + {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)_resource;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)_operation;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationListResult.PowerShell.cs new file mode 100644 index 000000000000..03120b97e93f --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationListResult.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// Result of the request to list Stream Analytics operations. It contains a list of operations and a URL link to get the + /// next set of results. + /// + [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] + public partial class OperationListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the request to list Stream Analytics operations. It contains a list of operations and a URL link to get the + /// next set of results. + [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] + public partial interface IOperationListResult + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs new file mode 100644 index 000000000000..7364c618aee4 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationListResult.cs new file mode 100644 index 000000000000..4c0f643a5918 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationListResult.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// Result of the request to list Stream Analytics operations. It contains a list of operations and a URL link to get the + /// next set of results. + /// + public partial class OperationListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResult, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of operation list results if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// + /// List of Stream Analytics operations supported by the Microsoft.StreamAnalytics resource provider. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public OperationListResult() + { + + } + } + /// Result of the request to list Stream Analytics operations. It contains a list of operations and a URL link to get the + /// next set of results. + public partial interface IOperationListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// URL to get the next set of operation list results if there are any. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"URL to get the next set of operation list results if there are any.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// + /// List of Stream Analytics operations supported by the Microsoft.StreamAnalytics resource provider. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of Stream Analytics operations supported by the Microsoft.StreamAnalytics resource provider.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation) })] + System.Collections.Generic.List Value { get; } + + } + /// Result of the request to list Stream Analytics operations. It contains a list of operations and a URL link to get the + /// next set of results. + internal partial interface IOperationListResultInternal + + { + /// URL to get the next set of operation list results if there are any. + string NextLink { get; set; } + /// + /// List of Stream Analytics operations supported by the Microsoft.StreamAnalytics resource provider. + /// + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationListResult.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationListResult.json.cs new file mode 100644 index 000000000000..5d1771facf05 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OperationListResult.json.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// Result of the request to list Stream Analytics operations. It contains a list of operations and a URL link to get the + /// next set of results. + /// + public partial class OperationListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new OperationListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. + internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Operation.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Output.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Output.PowerShell.cs new file mode 100644 index 000000000000..487d81844831 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Output.PowerShell.cs @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// An output object, containing all information associated with the named output. All outputs are contained under a streaming + /// job. + /// + [System.ComponentModel.TypeConverter(typeof(OutputTypeConverter))] + public partial class Output + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Output(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Output(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Output(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).ETag, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Serialization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SerializationTypeConverter.ConvertFrom); + } + if (content.Contains("Diagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticsTypeConverter.ConvertFrom); + } + if (content.Contains("Datasource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSourceTypeConverter.ConvertFrom); + } + if (content.Contains("TimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).TimeWindow = (string) content.GetValueForProperty("TimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).TimeWindow, global::System.Convert.ToString); + } + if (content.Contains("SizeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).SizeWindow = (float?) content.GetValueForProperty("SizeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).SizeWindow, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("DiagnosticCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).DiagnosticCondition = (System.Collections.Generic.List) content.GetValueForProperty("DiagnosticCondition",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).DiagnosticCondition, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticConditionTypeConverter.ConvertFrom)); + } + if (content.Contains("SerializationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).SerializationType = (string) content.GetValueForProperty("SerializationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).SerializationType, 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 Output(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).ETag, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Serialization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SerializationTypeConverter.ConvertFrom); + } + if (content.Contains("Diagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticsTypeConverter.ConvertFrom); + } + if (content.Contains("Datasource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSourceTypeConverter.ConvertFrom); + } + if (content.Contains("TimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).TimeWindow = (string) content.GetValueForProperty("TimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).TimeWindow, global::System.Convert.ToString); + } + if (content.Contains("SizeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).SizeWindow = (float?) content.GetValueForProperty("SizeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).SizeWindow, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("DiagnosticCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).DiagnosticCondition = (System.Collections.Generic.List) content.GetValueForProperty("DiagnosticCondition",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).DiagnosticCondition, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticConditionTypeConverter.ConvertFrom)); + } + if (content.Contains("SerializationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).SerializationType = (string) content.GetValueForProperty("SerializationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).SerializationType, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// An output object, containing all information associated with the named output. All outputs are contained under a streaming + /// job. + [System.ComponentModel.TypeConverter(typeof(OutputTypeConverter))] + public partial interface IOutput + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Output.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Output.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Output.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Output.TypeConverter.cs index 9015de7e92cd..1994f8785b8a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Output.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Output.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Output.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Output.cs new file mode 100644 index 000000000000..e1572207146f --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Output.cs @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// An output object, containing all information associated with the named output. All outputs are contained under a streaming + /// job. + /// + public partial class Output : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubResource(); + + /// + /// Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource Datasource { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).Datasource; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).Datasource = value ?? null /* model class */; } + + /// + /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List DiagnosticCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).DiagnosticCondition; } + + /// Backing field for property. + private string _eTag; + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string ETag { get => this._eTag; set => this._eTag = value; } + + /// Resource Id + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Id; } + + /// Internal Acessors for Diagnostic + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal.Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).Diagnostic = value ?? null /* model class */; } + + /// Internal Acessors for DiagnosticCondition + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal.DiagnosticCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).DiagnosticCondition; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).DiagnosticCondition = value ?? null /* arrayOf */; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputProperties()); set { {_property = value;} } } + + /// Internal Acessors for Serialization + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal.Serialization { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).Serialization; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).Serialization = value ?? null /* model class */; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Name = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Type = value ?? null; } + + /// Resource name + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputProperties _property; + + /// + /// The properties that are associated with an output. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputProperties()); set => this._property = value; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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); } + + /// + /// Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization Serialization { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).Serialization; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).Serialization = value ?? null /* model class */; } + + /// + /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SerializationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).SerializationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).SerializationType = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public float? SizeWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).SizeWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).SizeWindow = value ?? default(float); } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string TimeWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).TimeWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)Property).TimeWindow = value ?? null; } + + /// Resource type + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Type; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("ETag", out var __eTagHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputInternal)this).ETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader0) is string __headerETagHeader0 ? __headerETagHeader0 : (string)null; + } + } + + /// Creates an new instance. + public Output() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__subResource), __subResource); + await eventListener.AssertObjectIsValid(nameof(__subResource), __subResource); + } + } + /// An output object, containing all information associated with the named output. All outputs are contained under a streaming + /// job. + public partial interface IOutput : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource + { + /// + /// Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"datasource", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource) })] + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource Datasource { get; set; } + /// + /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention.", + SerializedName = @"conditions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticCondition) })] + System.Collections.Generic.List DiagnosticCondition { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"ETag", + PossibleTypes = new [] { typeof(string) })] + string ETag { get; set; } + /// + /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] + string SerializationType { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"sizeWindow", + PossibleTypes = new [] { typeof(float) })] + float? SizeWindow { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"timeWindow", + PossibleTypes = new [] { typeof(string) })] + string TimeWindow { get; set; } + + } + /// An output object, containing all information associated with the named output. All outputs are contained under a streaming + /// job. + internal partial interface IOutputInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal + { + /// + /// Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource Datasource { get; set; } + /// + /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics Diagnostic { get; set; } + /// + /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. + /// + System.Collections.Generic.List DiagnosticCondition { get; set; } + + string ETag { get; set; } + /// + /// The properties that are associated with an output. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputProperties Property { get; set; } + /// + /// Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) + /// requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization Serialization { get; set; } + /// + /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] + string SerializationType { get; set; } + + float? SizeWindow { get; set; } + + string TimeWindow { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Output.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Output.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Output.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Output.json.cs index b93c8b7047b8..00ed1b9472f9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Output.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Output.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -57,13 +57,13 @@ public partial class Output partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new Output(json) : null; } @@ -80,8 +80,8 @@ internal Output(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json. { return; } - __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputProperties.FromJson(__jsonProperties) : Property;} + __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputDataSource.PowerShell.cs similarity index 77% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputDataSource.PowerShell.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputDataSource.PowerShell.cs index 1c34d9418fa6..1671ff58ed9f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputDataSource.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputDataSource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -55,29 +55,35 @@ public partial class OutputDataSource partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OutputDataSource(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OutputDataSource(content); } @@ -87,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. @@ -105,13 +111,13 @@ internal OutputDataSource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, 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. @@ -126,7 +132,7 @@ internal OutputDataSource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -135,6 +141,18 @@ internal OutputDataSource(global::System.Management.Automation.PSObject content) /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } } /// Describes the data source that output will be written to. [System.ComponentModel.TypeConverter(typeof(OutputDataSourceTypeConverter))] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputDataSource.TypeConverter.cs index ad881016901c..96d96fda1db9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputDataSource.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputDataSource.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputDataSource.cs index eb1d2456f283..cf41526eb8f4 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputDataSource.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputDataSource.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes the data source that output will be written to. public partial class OutputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSourceInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal { /// Backing field for property. @@ -38,6 +38,9 @@ public partial interface IOutputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputDataSource.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputDataSource.json.cs index 6009ea789e17..03b4b34ad4c3 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,15 +54,15 @@ public partial class OutputDataSource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource. - /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource interface is - /// polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource interface is polymorphic, and the + /// precise model class that will get deserialized is determined at runtime based on the payload. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json)) { @@ -136,7 +136,7 @@ internal OutputDataSource(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Run { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputListResult.PowerShell.cs new file mode 100644 index 000000000000..18127caf653f --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Object containing a list of outputs under a streaming job. + [System.ComponentModel.TypeConverter(typeof(OutputListResultTypeConverter))] + public partial class OutputListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OutputListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OutputListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OutputListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResultInternal)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 OutputListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Object containing a list of outputs under a streaming job. + [System.ComponentModel.TypeConverter(typeof(OutputListResultTypeConverter))] + public partial interface IOutputListResult + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputListResult.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputListResult.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputListResult.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputListResult.TypeConverter.cs index ca0f1242d662..dc6953a0b02d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputListResult.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputListResult.cs new file mode 100644 index 000000000000..ddc34955d914 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Object containing a list of outputs under a streaming job. + public partial class OutputListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResult, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The link (url) to the next page of results. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// A list of outputs under a streaming job. Populated by a 'List' operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public OutputListResult() + { + + } + } + /// Object containing a list of outputs under a streaming job. + public partial interface IOutputListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// The link (url) to the next page of results. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The link (url) to the next page of results.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// A list of outputs under a streaming job. Populated by a 'List' operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list of outputs under a streaming job. Populated by a 'List' operation.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) })] + System.Collections.Generic.List Value { get; } + + } + /// Object containing a list of outputs under a streaming job. + internal partial interface IOutputListResultInternal + + { + /// The link (url) to the next page of results. + string NextLink { get; set; } + /// A list of outputs under a streaming job. Populated by a 'List' operation. + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputListResult.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputListResult.json.cs similarity index 91% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputListResult.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputListResult.json.cs index 25dd5d94665b..cc21ffc89311 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputListResult.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class OutputListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new OutputListResult(json) : null; } @@ -77,8 +77,8 @@ internal OutputListResult(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Run { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Output.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { @@ -113,7 +113,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode container.Add("value",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputProperties.PowerShell.cs new file mode 100644 index 000000000000..d57314b4005f --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputProperties.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with an output. + [System.ComponentModel.TypeConverter(typeof(OutputPropertiesTypeConverter))] + public partial class OutputProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OutputProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OutputProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OutputProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Serialization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SerializationTypeConverter.ConvertFrom); + } + if (content.Contains("Diagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticsTypeConverter.ConvertFrom); + } + if (content.Contains("Datasource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSourceTypeConverter.ConvertFrom); + } + if (content.Contains("TimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).TimeWindow = (string) content.GetValueForProperty("TimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).TimeWindow, global::System.Convert.ToString); + } + if (content.Contains("SizeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).SizeWindow = (float?) content.GetValueForProperty("SizeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).SizeWindow, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("DiagnosticCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).DiagnosticCondition = (System.Collections.Generic.List) content.GetValueForProperty("DiagnosticCondition",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).DiagnosticCondition, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticConditionTypeConverter.ConvertFrom)); + } + if (content.Contains("SerializationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).SerializationType = (string) content.GetValueForProperty("SerializationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).SerializationType, 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 OutputProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Serialization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SerializationTypeConverter.ConvertFrom); + } + if (content.Contains("Diagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticsTypeConverter.ConvertFrom); + } + if (content.Contains("Datasource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSourceTypeConverter.ConvertFrom); + } + if (content.Contains("TimeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).TimeWindow = (string) content.GetValueForProperty("TimeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).TimeWindow, global::System.Convert.ToString); + } + if (content.Contains("SizeWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).SizeWindow = (float?) content.GetValueForProperty("SizeWindow",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).SizeWindow, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("DiagnosticCondition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).DiagnosticCondition = (System.Collections.Generic.List) content.GetValueForProperty("DiagnosticCondition",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).DiagnosticCondition, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticConditionTypeConverter.ConvertFrom)); + } + if (content.Contains("SerializationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).SerializationType = (string) content.GetValueForProperty("SerializationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal)this).SerializationType, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with an output. + [System.ComponentModel.TypeConverter(typeof(OutputPropertiesTypeConverter))] + public partial interface IOutputProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputProperties.TypeConverter.cs index 8baf64ea68af..432ddfe0cc40 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputProperties.cs new file mode 100644 index 000000000000..790fcf3c7a5a --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputProperties.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with an output. + public partial class OutputProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource _datasource; + + /// + /// Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource Datasource { get => (this._datasource = this._datasource ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource()); set => this._datasource = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics _diagnostic; + + /// + /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics Diagnostic { get => (this._diagnostic = this._diagnostic ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Diagnostics()); } + + /// + /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List DiagnosticCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticsInternal)Diagnostic).Condition; } + + /// Internal Acessors for Diagnostic + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal.Diagnostic { get => (this._diagnostic = this._diagnostic ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Diagnostics()); set { {_diagnostic = value;} } } + + /// Internal Acessors for DiagnosticCondition + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal.DiagnosticCondition { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticsInternal)Diagnostic).Condition; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticsInternal)Diagnostic).Condition = value ?? null /* arrayOf */; } + + /// Internal Acessors for Serialization + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputPropertiesInternal.Serialization { get => (this._serialization = this._serialization ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Serialization()); set { {_serialization = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization _serialization; + + /// + /// Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization Serialization { get => (this._serialization = this._serialization ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Serialization()); set => this._serialization = value; } + + /// + /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SerializationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)Serialization).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)Serialization).Type = value ?? null; } + + /// Backing field for property. + private float? _sizeWindow; + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public float? SizeWindow { get => this._sizeWindow; set => this._sizeWindow = value; } + + /// Backing field for property. + private string _timeWindow; + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string TimeWindow { get => this._timeWindow; set => this._timeWindow = value; } + + /// Creates an new instance. + public OutputProperties() + { + + } + } + /// The properties that are associated with an output. + public partial interface IOutputProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// + /// Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"datasource", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource) })] + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource Datasource { get; set; } + /// + /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention.", + SerializedName = @"conditions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnosticCondition) })] + System.Collections.Generic.List DiagnosticCondition { get; } + /// + /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] + string SerializationType { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"sizeWindow", + PossibleTypes = new [] { typeof(float) })] + float? SizeWindow { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"timeWindow", + PossibleTypes = new [] { typeof(string) })] + string TimeWindow { get; set; } + + } + /// The properties that are associated with an output. + internal partial interface IOutputPropertiesInternal + + { + /// + /// Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource Datasource { get; set; } + /// + /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics Diagnostic { get; set; } + /// + /// A collection of zero or more conditions applicable to the resource, or to the job overall, that warrant customer attention. + /// + System.Collections.Generic.List DiagnosticCondition { get; set; } + /// + /// Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) + /// requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization Serialization { get; set; } + /// + /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] + string SerializationType { get; set; } + + float? SizeWindow { get; set; } + + string TimeWindow { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputProperties.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputProperties.json.cs index 1c22866fedee..796dcaae2b0e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/OutputProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/OutputProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class OutputProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new OutputProperties(json) : null; } @@ -77,11 +77,11 @@ internal OutputProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Run { return; } - {_serialization = If( json?.PropertyT("serialization"), out var __jsonSerialization) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Serialization.FromJson(__jsonSerialization) : Serialization;} - {_diagnostic = If( json?.PropertyT("diagnostics"), out var __jsonDiagnostics) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Diagnostics.FromJson(__jsonDiagnostics) : Diagnostic;} - {_datasource = If( json?.PropertyT("datasource"), out var __jsonDatasource) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource.FromJson(__jsonDatasource) : Datasource;} - {_timeWindow = If( json?.PropertyT("timeWindow"), out var __jsonTimeWindow) ? (string)__jsonTimeWindow : (string)TimeWindow;} - {_sizeWindow = If( json?.PropertyT("sizeWindow"), out var __jsonSizeWindow) ? (float?)__jsonSizeWindow : SizeWindow;} + {_serialization = If( json?.PropertyT("serialization"), out var __jsonSerialization) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Serialization.FromJson(__jsonSerialization) : _serialization;} + {_diagnostic = If( json?.PropertyT("diagnostics"), out var __jsonDiagnostics) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Diagnostics.FromJson(__jsonDiagnostics) : _diagnostic;} + {_datasource = If( json?.PropertyT("datasource"), out var __jsonDatasource) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource.FromJson(__jsonDatasource) : _datasource;} + {_timeWindow = If( json?.PropertyT("timeWindow"), out var __jsonTimeWindow) ? (string)__jsonTimeWindow : (string)_timeWindow;} + {_sizeWindow = If( json?.PropertyT("sizeWindow"), out var __jsonSizeWindow) ? (float?)__jsonSizeWindow : _sizeWindow;} AfterFromJson(json); } @@ -105,7 +105,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode return container; } AddIf( null != this._serialization ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) this._serialization.ToJson(null,serializationMode) : null, "serialization" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._diagnostic ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) this._diagnostic.ToJson(null,serializationMode) : null, "diagnostics" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ParquetSerialization.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ParquetSerialization.PowerShell.cs new file mode 100644 index 000000000000..1153643cddf2 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ParquetSerialization.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// Describes how data from an input is serialized or how data is serialized when written to an output in Parquet format. + /// + [System.ComponentModel.TypeConverter(typeof(ParquetSerializationTypeConverter))] + public partial class ParquetSerialization + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IParquetSerialization DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ParquetSerialization(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IParquetSerialization DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ParquetSerialization(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IParquetSerialization FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ParquetSerialization(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IParquetSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IParquetSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type, 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 ParquetSerialization(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IParquetSerializationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAny) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IParquetSerializationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.AnyTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes how data from an input is serialized or how data is serialized when written to an output in Parquet format. + [System.ComponentModel.TypeConverter(typeof(ParquetSerializationTypeConverter))] + public partial interface IParquetSerialization + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ParquetSerialization.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ParquetSerialization.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ParquetSerialization.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ParquetSerialization.TypeConverter.cs index 1d7055db759f..22313042be02 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ParquetSerialization.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ParquetSerialization.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IParquetSerialization ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IParquetSerialization ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IParquetSerialization).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IParquetSerialization).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ParquetSerialization.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ParquetSerialization.cs similarity index 84% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ParquetSerialization.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ParquetSerialization.cs index 4af67d5e36cd..5217a93f9bbb 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ParquetSerialization.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ParquetSerialization.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -11,15 +11,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401P /// Describes how data from an input is serialized or how data is serialized when written to an output in Parquet format. /// public partial class ParquetSerialization : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IParquetSerialization, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IParquetSerializationInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IParquetSerialization, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IParquetSerializationInternal, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Serialization(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Serialization(); /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAny _property; @@ -33,13 +33,14 @@ public partial class ParquetSerialization : /// /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)__serialization).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)__serialization).Type = value ; } + public string Type { get => "Parquet"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)__serialization).Type = "Parquet"; } /// Creates an new instance. public ParquetSerialization() { - + this.__serialization.Type = "Parquet"; } /// Validates that this object meets the validation criteria. @@ -57,7 +58,7 @@ public ParquetSerialization() /// Describes how data from an input is serialized or how data is serialized when written to an output in Parquet format. public partial interface IParquetSerialization : Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization { /// /// The properties that are associated with the Parquet serialization type. Required on PUT (CreateOrReplace) requests. @@ -65,6 +66,9 @@ public partial interface IParquetSerialization : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The properties that are associated with the Parquet serialization type. Required on PUT (CreateOrReplace) requests.", SerializedName = @"properties", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IAny) })] @@ -73,7 +77,7 @@ public partial interface IParquetSerialization : } /// Describes how data from an input is serialized or how data is serialized when written to an output in Parquet format. internal partial interface IParquetSerializationInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal { /// /// The properties that are associated with the Parquet serialization type. Required on PUT (CreateOrReplace) requests. diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ParquetSerialization.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ParquetSerialization.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ParquetSerialization.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ParquetSerialization.json.cs index b05fdeee4746..5fef7a93db28 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ParquetSerialization.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ParquetSerialization.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class ParquetSerialization partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IParquetSerialization. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IParquetSerialization. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IParquetSerialization. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IParquetSerialization. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IParquetSerialization FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IParquetSerialization FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ParquetSerialization(json) : null; } @@ -79,8 +79,8 @@ internal ParquetSerialization(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics { return; } - __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Serialization(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Any.FromJson(__jsonProperties) : Property;} + __serialization = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Serialization(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Any.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSource.PowerShell.cs new file mode 100644 index 000000000000..a2ca1565ed75 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSource.PowerShell.cs @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes a Power BI output data source. + [System.ComponentModel.TypeConverter(typeof(PowerBiOutputDataSourceTypeConverter))] + public partial class PowerBiOutputDataSource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PowerBiOutputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PowerBiOutputDataSource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PowerBiOutputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.PowerBiOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("RefreshToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).RefreshToken, global::System.Convert.ToString); + } + if (content.Contains("TokenUserPrincipalName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); + } + if (content.Contains("TokenUserDisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).TokenUserDisplayName, global::System.Convert.ToString); + } + if (content.Contains("Dataset")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).Dataset = (string) content.GetValueForProperty("Dataset",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).Dataset, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("GroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).GroupId, global::System.Convert.ToString); + } + if (content.Contains("GroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).GroupName = (string) content.GetValueForProperty("GroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).GroupName, 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 PowerBiOutputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.PowerBiOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("RefreshToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).RefreshToken, global::System.Convert.ToString); + } + if (content.Contains("TokenUserPrincipalName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); + } + if (content.Contains("TokenUserDisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).TokenUserDisplayName, global::System.Convert.ToString); + } + if (content.Contains("Dataset")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).Dataset = (string) content.GetValueForProperty("Dataset",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).Dataset, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("GroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).GroupId, global::System.Convert.ToString); + } + if (content.Contains("GroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).GroupName = (string) content.GetValueForProperty("GroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal)this).GroupName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes a Power BI output data source. + [System.ComponentModel.TypeConverter(typeof(PowerBiOutputDataSourceTypeConverter))] + public partial interface IPowerBiOutputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSource.TypeConverter.cs index 640415796e8f..7f61ce90ee78 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSource.cs new file mode 100644 index 000000000000..9300a5bb477e --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSource.cs @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Describes a Power BI output data source. + public partial class PowerBiOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(); + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? null; } + + /// The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Dataset { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)Property).Dataset; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)Property).Dataset = value ?? null; } + + /// The ID of the Power BI group. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string GroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)Property).GroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)Property).GroupId = value ?? null; } + + /// + /// The name of the Power BI group. Use this property to help remember which specific Power BI group id was used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string GroupName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)Property).GroupName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)Property).GroupName = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.PowerBiOutputDataSourceProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceProperties _property; + + /// + /// The properties that are associated with a Power BI output. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.PowerBiOutputDataSourceProperties()); set => this._property = value; } + + /// + /// A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. + /// A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value + /// here when creating the data source and then going to the Azure Portal to authenticate the data source which will update + /// this property with a valid refresh token. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string RefreshToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)Property).RefreshToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)Property).RefreshToken = value ?? null; } + + /// + /// The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Table { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)Property).Table; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)Property).Table = value ?? null; } + + /// + /// The user display name of the user that was used to obtain the refresh token. Use this property to help remember which + /// user was used to obtain the refresh token. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string TokenUserDisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserDisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserDisplayName = value ?? null; } + + /// + /// The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember + /// which user was used to obtain the refresh token. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string TokenUserPrincipalName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserPrincipalName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)Property).TokenUserPrincipalName = value ?? null; } + + /// + /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "PowerBI"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)__outputDataSource).Type = "PowerBI"; } + + /// Creates an new instance. + public PowerBiOutputDataSource() + { + this.__outputDataSource.Type = "PowerBI"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); + await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); + } + } + /// Describes a Power BI output data source. + public partial interface IPowerBiOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource + { + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Authentication Mode.", + SerializedName = @"authenticationMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"dataset", + PossibleTypes = new [] { typeof(string) })] + string Dataset { get; set; } + /// The ID of the Power BI group. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The ID of the Power BI group.", + SerializedName = @"groupId", + PossibleTypes = new [] { typeof(string) })] + string GroupId { get; set; } + /// + /// The name of the Power BI group. Use this property to help remember which specific Power BI group id was used. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Power BI group. Use this property to help remember which specific Power BI group id was used.", + SerializedName = @"groupName", + PossibleTypes = new [] { typeof(string) })] + string GroupName { get; set; } + /// + /// A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. + /// A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value + /// here when creating the data source and then going to the Azure Portal to authenticate the data source which will update + /// this property with a valid refresh token. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value here when creating the data source and then going to the Azure Portal to authenticate the data source which will update this property with a valid refresh token. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"refreshToken", + PossibleTypes = new [] { typeof(string) })] + string RefreshToken { get; set; } + /// + /// The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"table", + PossibleTypes = new [] { typeof(string) })] + string Table { get; set; } + /// + /// The user display name of the user that was used to obtain the refresh token. Use this property to help remember which + /// user was used to obtain the refresh token. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The user display name of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", + SerializedName = @"tokenUserDisplayName", + PossibleTypes = new [] { typeof(string) })] + string TokenUserDisplayName { get; set; } + /// + /// The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember + /// which user was used to obtain the refresh token. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember which user was used to obtain the refresh token.", + SerializedName = @"tokenUserPrincipalName", + PossibleTypes = new [] { typeof(string) })] + string TokenUserPrincipalName { get; set; } + + } + /// Describes a Power BI output data source. + internal partial interface IPowerBiOutputDataSourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal + { + /// Authentication Mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests. + string Dataset { get; set; } + /// The ID of the Power BI group. + string GroupId { get; set; } + /// + /// The name of the Power BI group. Use this property to help remember which specific Power BI group id was used. + /// + string GroupName { get; set; } + /// + /// The properties that are associated with a Power BI output. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceProperties Property { get; set; } + /// + /// A refresh token that can be used to obtain a valid access token that can then be used to authenticate with the data source. + /// A valid refresh token is currently only obtainable via the Azure Portal. It is recommended to put a dummy string value + /// here when creating the data source and then going to the Azure Portal to authenticate the data source which will update + /// this property with a valid refresh token. Required on PUT (CreateOrReplace) requests. + /// + string RefreshToken { get; set; } + /// + /// The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests. + /// + string Table { get; set; } + /// + /// The user display name of the user that was used to obtain the refresh token. Use this property to help remember which + /// user was used to obtain the refresh token. + /// + string TokenUserDisplayName { get; set; } + /// + /// The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember + /// which user was used to obtain the refresh token. + /// + string TokenUserPrincipalName { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSource.json.cs index 5484c1497887..24228a3f6ce8 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PowerBiOutputDataSource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new PowerBiOutputDataSource(json) : null; } @@ -77,8 +77,8 @@ internal PowerBiOutputDataSource(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalyt { return; } - __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.PowerBiOutputDataSourceProperties.FromJson(__jsonProperties) : Property;} + __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.PowerBiOutputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..b33f60baa5cd --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSourceProperties.PowerShell.cs @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with a Power BI output. + [System.ComponentModel.TypeConverter(typeof(PowerBiOutputDataSourcePropertiesTypeConverter))] + public partial class PowerBiOutputDataSourceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PowerBiOutputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PowerBiOutputDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PowerBiOutputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Dataset")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).Dataset = (string) content.GetValueForProperty("Dataset",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).Dataset, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("GroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).GroupId, global::System.Convert.ToString); + } + if (content.Contains("GroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).GroupName = (string) content.GetValueForProperty("GroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).GroupName, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("RefreshToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken, global::System.Convert.ToString); + } + if (content.Contains("TokenUserPrincipalName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); + } + if (content.Contains("TokenUserDisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName, 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 PowerBiOutputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Dataset")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).Dataset = (string) content.GetValueForProperty("Dataset",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).Dataset, global::System.Convert.ToString); + } + if (content.Contains("Table")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).Table = (string) content.GetValueForProperty("Table",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).Table, global::System.Convert.ToString); + } + if (content.Contains("GroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).GroupId, global::System.Convert.ToString); + } + if (content.Contains("GroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).GroupName = (string) content.GetValueForProperty("GroupName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).GroupName, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("RefreshToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken = (string) content.GetValueForProperty("RefreshToken",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).RefreshToken, global::System.Convert.ToString); + } + if (content.Contains("TokenUserPrincipalName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName = (string) content.GetValueForProperty("TokenUserPrincipalName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserPrincipalName, global::System.Convert.ToString); + } + if (content.Contains("TokenUserDisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName = (string) content.GetValueForProperty("TokenUserDisplayName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)this).TokenUserDisplayName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with a Power BI output. + [System.ComponentModel.TypeConverter(typeof(PowerBiOutputDataSourcePropertiesTypeConverter))] + public partial interface IPowerBiOutputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSourceProperties.TypeConverter.cs index 85beca96cd5f..984cf622eafb 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSourceProperties.cs similarity index 80% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSourceProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSourceProperties.cs index 4a80ddaacef0..a613745ba6e7 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSourceProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSourceProperties.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with a Power BI output. public partial class PowerBiOutputDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourcePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourcePropertiesInternal, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourceProperties __oAuthBasedDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OAuthBasedDataSourceProperties(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourceProperties __oAuthBasedDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OAuthBasedDataSourceProperties(); /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? _authenticationMode; + private string _authenticationMode; /// Authentication Mode. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => this._authenticationMode; set => this._authenticationMode = value; } + public string AuthenticationMode { get => this._authenticationMode; set => this._authenticationMode = value; } /// Backing field for property. private string _dataset; @@ -56,7 +56,7 @@ public partial class PowerBiOutputDataSourceProperties : /// this property with a valid refresh token. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string RefreshToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).RefreshToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).RefreshToken = value ?? null; } + public string RefreshToken { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).RefreshToken; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).RefreshToken = value ?? null; } /// Backing field for property. private string _table; @@ -72,14 +72,14 @@ public partial class PowerBiOutputDataSourceProperties : /// user was used to obtain the refresh token. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string TokenUserDisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserDisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserDisplayName = value ?? null; } + public string TokenUserDisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserDisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserDisplayName = value ?? null; } /// /// The user principal name (UPN) of the user that was used to obtain the refresh token. Use this property to help remember /// which user was used to obtain the refresh token. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] - public string TokenUserPrincipalName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserPrincipalName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserPrincipalName = value ?? null; } + public string TokenUserPrincipalName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserPrincipalName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal)__oAuthBasedDataSourceProperties).TokenUserPrincipalName = value ?? null; } /// Creates an new instance. public PowerBiOutputDataSourceProperties() @@ -102,20 +102,27 @@ public PowerBiOutputDataSourceProperties() /// The properties that are associated with a Power BI output. public partial interface IPowerBiOutputDataSourceProperties : Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourceProperties + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourceProperties { /// Authentication Mode. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Authentication Mode.", SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } /// The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests.", SerializedName = @"dataset", PossibleTypes = new [] { typeof(string) })] @@ -124,6 +131,9 @@ public partial interface IPowerBiOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The ID of the Power BI group.", SerializedName = @"groupId", PossibleTypes = new [] { typeof(string) })] @@ -134,6 +144,9 @@ public partial interface IPowerBiOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Power BI group. Use this property to help remember which specific Power BI group id was used.", SerializedName = @"groupName", PossibleTypes = new [] { typeof(string) })] @@ -144,6 +157,9 @@ public partial interface IPowerBiOutputDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Power BI table under the specified dataset. Required on PUT (CreateOrReplace) requests.", SerializedName = @"table", PossibleTypes = new [] { typeof(string) })] @@ -152,10 +168,11 @@ public partial interface IPowerBiOutputDataSourceProperties : } /// The properties that are associated with a Power BI output. internal partial interface IPowerBiOutputDataSourcePropertiesInternal : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOAuthBasedDataSourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOAuthBasedDataSourcePropertiesInternal { /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } /// The name of the Power BI dataset. Required on PUT (CreateOrReplace) requests. string Dataset { get; set; } /// The ID of the Power BI group. diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSourceProperties.json.cs similarity index 92% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSourceProperties.json.cs index ef067e81a20a..1ad3437c93a0 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/PowerBiOutputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/PowerBiOutputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PowerBiOutputDataSourceProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IPowerBiOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IPowerBiOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new PowerBiOutputDataSourceProperties(json) : null; } @@ -77,12 +77,12 @@ internal PowerBiOutputDataSourceProperties(Microsoft.Azure.PowerShell.Cmdlets.St { return; } - __oAuthBasedDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OAuthBasedDataSourceProperties(json); - {_dataset = If( json?.PropertyT("dataset"), out var __jsonDataset) ? (string)__jsonDataset : (string)Dataset;} - {_table = If( json?.PropertyT("table"), out var __jsonTable) ? (string)__jsonTable : (string)Table;} - {_groupId = If( json?.PropertyT("groupId"), out var __jsonGroupId) ? (string)__jsonGroupId : (string)GroupId;} - {_groupName = If( json?.PropertyT("groupName"), out var __jsonGroupName) ? (string)__jsonGroupName : (string)GroupName;} - {_authenticationMode = If( json?.PropertyT("authenticationMode"), out var __jsonAuthenticationMode) ? (string)__jsonAuthenticationMode : (string)AuthenticationMode;} + __oAuthBasedDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OAuthBasedDataSourceProperties(json); + {_dataset = If( json?.PropertyT("dataset"), out var __jsonDataset) ? (string)__jsonDataset : (string)_dataset;} + {_table = If( json?.PropertyT("table"), out var __jsonTable) ? (string)__jsonTable : (string)_table;} + {_groupId = If( json?.PropertyT("groupId"), out var __jsonGroupId) ? (string)__jsonGroupId : (string)_groupId;} + {_groupName = If( json?.PropertyT("groupName"), out var __jsonGroupName) ? (string)__jsonGroupName : (string)_groupName;} + {_authenticationMode = If( json?.PropertyT("authenticationMode"), out var __jsonAuthenticationMode) ? (string)__jsonAuthenticationMode : (string)_authenticationMode;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputDataSource.PowerShell.cs similarity index 77% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputDataSource.PowerShell.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputDataSource.PowerShell.cs index 08c9e674826c..06183e459dd9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputDataSource.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputDataSource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -55,29 +55,35 @@ public partial class ReferenceInputDataSource partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ReferenceInputDataSource(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ReferenceInputDataSource(content); } @@ -87,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. @@ -105,13 +111,13 @@ internal ReferenceInputDataSource(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)this).Type, 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. @@ -126,7 +132,7 @@ internal ReferenceInputDataSource(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -135,6 +141,18 @@ internal ReferenceInputDataSource(global::System.Management.Automation.PSObject /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } } /// Describes an input data source that contains reference data. [System.ComponentModel.TypeConverter(typeof(ReferenceInputDataSourceTypeConverter))] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputDataSource.TypeConverter.cs index 42e2d0d3d5fa..3a08860fe3ff 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputDataSource.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputDataSource.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputDataSource.cs index 8de7899017ce..ea4c077723b6 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputDataSource.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputDataSource.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes an input data source that contains reference data. public partial class ReferenceInputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSourceInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal { /// Backing field for property. @@ -38,6 +38,9 @@ public partial interface IReferenceInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputDataSource.json.cs index 8c50a0c30cdd..1c44d57a4449 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,15 +54,15 @@ public partial class ReferenceInputDataSource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource. - /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource interface - /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json)) { @@ -96,7 +96,7 @@ internal ReferenceInputDataSource(Microsoft.Azure.PowerShell.Cmdlets.StreamAnaly { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputProperties.PowerShell.cs new file mode 100644 index 000000000000..d3587c7e1703 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputProperties.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with an input containing reference data. + [System.ComponentModel.TypeConverter(typeof(ReferenceInputPropertiesTypeConverter))] + public partial class ReferenceInputProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ReferenceInputProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ReferenceInputProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ReferenceInputProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Datasource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputPropertiesInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputPropertiesInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ReferenceInputDataSourceTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Serialization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SerializationTypeConverter.ConvertFrom); + } + if (content.Contains("Diagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticsTypeConverter.ConvertFrom); + } + if (content.Contains("Compression")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Compression = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression) content.GetValueForProperty("Compression",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Compression, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CompressionTypeConverter.ConvertFrom); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("DatasourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputPropertiesInternal)this).DatasourceType = (string) content.GetValueForProperty("DatasourceType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputPropertiesInternal)this).DatasourceType, 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 ReferenceInputProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Datasource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputPropertiesInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputPropertiesInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ReferenceInputDataSourceTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Serialization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SerializationTypeConverter.ConvertFrom); + } + if (content.Contains("Diagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticsTypeConverter.ConvertFrom); + } + if (content.Contains("Compression")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Compression = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression) content.GetValueForProperty("Compression",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Compression, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CompressionTypeConverter.ConvertFrom); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("DatasourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputPropertiesInternal)this).DatasourceType = (string) content.GetValueForProperty("DatasourceType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputPropertiesInternal)this).DatasourceType, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with an input containing reference data. + [System.ComponentModel.TypeConverter(typeof(ReferenceInputPropertiesTypeConverter))] + public partial interface IReferenceInputProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputProperties.TypeConverter.cs index 7cee02d7be59..2b37afc7c008 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputProperties.cs new file mode 100644 index 000000000000..c5e33abe18ff --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputProperties.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with an input containing reference data. + public partial class ReferenceInputProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties __inputProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputProperties(); + + /// Describes how input data is compressed + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression Compression { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Compression; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Compression = value ?? null /* model class */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource _datasource; + + /// + /// Describes an input data source that contains reference data. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource Datasource { get => (this._datasource = this._datasource ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ReferenceInputDataSource()); set => this._datasource = value; } + + /// + /// Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string DatasourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)Datasource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSourceInternal)Datasource).Type = value ?? null; } + + /// + /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Diagnostic; } + + /// Internal Acessors for Diagnostic + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal.Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Diagnostic = value ?? null /* model class */; } + + /// Internal Acessors for Datasource + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputPropertiesInternal.Datasource { get => (this._datasource = this._datasource ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ReferenceInputDataSource()); set { {_datasource = value;} } } + + /// + /// partitionKey Describes a key in the input data which is used for partitioning the input data + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string PartitionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).PartitionKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).PartitionKey = value ?? null; } + + /// + /// Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization Serialization { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Serialization; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Serialization = value ?? null /* model class */; } + + /// + /// Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Reference"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Type = "Reference"; } + + /// Creates an new instance. + public ReferenceInputProperties() + { + this.__inputProperties.Type = "Reference"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__inputProperties), __inputProperties); + await eventListener.AssertObjectIsValid(nameof(__inputProperties), __inputProperties); + } + } + /// The properties that are associated with an input containing reference data. + public partial interface IReferenceInputProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties + { + /// + /// Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string DatasourceType { get; set; } + + } + /// The properties that are associated with an input containing reference data. + internal partial interface IReferenceInputPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal + { + /// + /// Describes an input data source that contains reference data. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputDataSource Datasource { get; set; } + /// + /// Indicates the type of input data source containing reference data. Required on PUT (CreateOrReplace) requests. + /// + string DatasourceType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputProperties.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputProperties.json.cs index 9e55a92770c5..d78abf7dea1f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ReferenceInputProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ReferenceInputProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ReferenceInputProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IReferenceInputProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IReferenceInputProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ReferenceInputProperties(json) : null; } @@ -77,8 +77,8 @@ internal ReferenceInputProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamAnaly { return; } - __inputProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputProperties(json); - {_datasource = If( json?.PropertyT("datasource"), out var __jsonDatasource) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ReferenceInputDataSource.FromJson(__jsonDatasource) : Datasource;} + __inputProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputProperties(json); + {_datasource = If( json?.PropertyT("datasource"), out var __jsonDatasource) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ReferenceInputDataSource.FromJson(__jsonDatasource) : _datasource;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Resource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Resource.PowerShell.cs new file mode 100644 index 000000000000..994b5cbb2501 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Resource.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial class Resource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Resource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Resource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Resource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type, 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 Resource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial interface IResource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Resource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Resource.TypeConverter.cs new file mode 100644 index 000000000000..2ddc1f937153 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Resource.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Resource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Resource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Resource.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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Resource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Resource.cs new file mode 100644 index 000000000000..9d28694bdec3 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Resource.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + public partial class Resource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal + { + + /// Backing field for property. + private string _id; + + /// + /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private string _type; + + /// + /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public Resource() + { + + } + } + public partial interface IResource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// + /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the resource", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// + /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + internal partial interface IResourceInternal + + { + /// + /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + string Id { get; set; } + /// The name of the resource + string Name { get; set; } + /// + /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + /// + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Resource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Resource.json.cs new file mode 100644 index 000000000000..cdef8f36875c --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Resource.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + public partial class Resource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new Resource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. + internal Resource(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ResourceTestStatus.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ResourceTestStatus.PowerShell.cs new file mode 100644 index 000000000000..bc3cd3cdae3e --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ResourceTestStatus.PowerShell.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// Describes the status of the test operation along with error information, if applicable. + /// + [System.ComponentModel.TypeConverter(typeof(ResourceTestStatusTypeConverter))] + public partial class ResourceTestStatus + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ResourceTestStatus(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ResourceTestStatus(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ResourceTestStatus(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponse) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ErrorResponseTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Message, 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 ResourceTestStatus(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponse) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ErrorResponseTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes the status of the test operation along with error information, if applicable. + [System.ComponentModel.TypeConverter(typeof(ResourceTestStatusTypeConverter))] + public partial interface IResourceTestStatus + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ResourceTestStatus.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ResourceTestStatus.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ResourceTestStatus.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ResourceTestStatus.TypeConverter.cs index 3272fe86a46d..36e6e158e784 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ResourceTestStatus.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ResourceTestStatus.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ResourceTestStatus.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ResourceTestStatus.cs new file mode 100644 index 000000000000..dccb1b38e2f6 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ResourceTestStatus.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// Describes the status of the test operation along with error information, if applicable. + /// + public partial class ResourceTestStatus : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal + { + + /// Error code associated with the error that occurred. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal)Error).Code; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponse _error; + + /// Describes the error that occurred. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponse Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ErrorResponse()); } + + /// Describes the error in detail. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal)Error).Message; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal)Error).Code = value ?? null; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponse Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ErrorResponse()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponseInternal)Error).Message = value ?? null; } + + /// Internal Acessors for Status + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatusInternal.Status { get => this._status; set { {_status = value;} } } + + /// Backing field for property. + private string _status; + + /// The status of the test operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Status { get => this._status; } + + /// Creates an new instance. + public ResourceTestStatus() + { + + } + } + /// Describes the status of the test operation along with error information, if applicable. + public partial interface IResourceTestStatus : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// Error code associated with the error that occurred. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Error code associated with the error that occurred.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// Describes the error in detail. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Describes the error in detail.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The status of the test operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The status of the test operation.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + string Status { get; } + + } + /// Describes the status of the test operation along with error information, if applicable. + internal partial interface IResourceTestStatusInternal + + { + /// Error code associated with the error that occurred. + string Code { get; set; } + /// Describes the error that occurred. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IErrorResponse Error { get; set; } + /// Describes the error in detail. + string Message { get; set; } + /// The status of the test operation. + string Status { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ResourceTestStatus.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ResourceTestStatus.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ResourceTestStatus.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ResourceTestStatus.json.cs index de60d59c1a8e..9c746aa0e228 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ResourceTestStatus.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ResourceTestStatus.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class ResourceTestStatus partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ResourceTestStatus(json) : null; } @@ -79,8 +79,8 @@ internal ResourceTestStatus(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.R { return; } - {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ErrorResponse.FromJson(__jsonError) : Error;} - {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ErrorResponse.FromJson(__jsonError) : _error;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} AfterFromJson(json); } @@ -103,11 +103,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ScalarFunctionProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ScalarFunctionProperties.PowerShell.cs new file mode 100644 index 000000000000..94fd08f7f85e --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ScalarFunctionProperties.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with a scalar function. + [System.ComponentModel.TypeConverter(typeof(ScalarFunctionPropertiesTypeConverter))] + public partial class ScalarFunctionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IScalarFunctionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ScalarFunctionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IScalarFunctionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ScalarFunctionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IScalarFunctionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ScalarFunctionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionConfigurationTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ScalarFunctionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionConfigurationTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with a scalar function. + [System.ComponentModel.TypeConverter(typeof(ScalarFunctionPropertiesTypeConverter))] + public partial interface IScalarFunctionProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ScalarFunctionProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ScalarFunctionProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ScalarFunctionProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ScalarFunctionProperties.TypeConverter.cs index 17fda0ce5dc6..351948cb276a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ScalarFunctionProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ScalarFunctionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IScalarFunctionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IScalarFunctionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IScalarFunctionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IScalarFunctionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ScalarFunctionProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ScalarFunctionProperties.cs new file mode 100644 index 000000000000..51a79b052dfb --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ScalarFunctionProperties.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with a scalar function. + public partial class ScalarFunctionProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IScalarFunctionProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IScalarFunctionPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties __functionProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionProperties(); + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration Property { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)__functionProperties).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)__functionProperties).Property = value ?? null /* model class */; } + + /// Indicates the type of function. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Scalar"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal)__functionProperties).Type = "Scalar"; } + + /// Creates an new instance. + public ScalarFunctionProperties() + { + this.__functionProperties.Type = "Scalar"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__functionProperties), __functionProperties); + await eventListener.AssertObjectIsValid(nameof(__functionProperties), __functionProperties); + } + } + /// The properties that are associated with a scalar function. + public partial interface IScalarFunctionProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionProperties + { + + } + /// The properties that are associated with a scalar function. + internal partial interface IScalarFunctionPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionPropertiesInternal + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ScalarFunctionProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ScalarFunctionProperties.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ScalarFunctionProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ScalarFunctionProperties.json.cs index 8db61a479dfc..69b7bd92a47b 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ScalarFunctionProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ScalarFunctionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ScalarFunctionProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IScalarFunctionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IScalarFunctionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IScalarFunctionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IScalarFunctionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IScalarFunctionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IScalarFunctionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ScalarFunctionProperties(json) : null; } @@ -77,7 +77,7 @@ internal ScalarFunctionProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamAnaly { return; } - __functionProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionProperties(json); + __functionProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionProperties(json); AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Serialization.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Serialization.PowerShell.cs similarity index 78% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Serialization.PowerShell.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Serialization.PowerShell.cs index bb37c1490677..bb45abc019e5 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Serialization.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Serialization.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -57,29 +57,35 @@ public partial class Serialization partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new Serialization(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new Serialization(content); } @@ -89,10 +95,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. @@ -107,13 +113,13 @@ internal Serialization(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type, 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. @@ -128,7 +134,7 @@ internal Serialization(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -137,6 +143,18 @@ internal Serialization(global::System.Management.Automation.PSObject content) /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } } /// Describes how data from an input is serialized or how data is serialized when written to an output. [System.ComponentModel.TypeConverter(typeof(SerializationTypeConverter))] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Serialization.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Serialization.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Serialization.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Serialization.TypeConverter.cs index 72f896475fa8..16279d1f8736 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Serialization.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Serialization.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Serialization.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Serialization.cs similarity index 77% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Serialization.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Serialization.cs index 6ddba96187d0..f2c5900ffca9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Serialization.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Serialization.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -11,18 +11,18 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401P /// Describes how data from an input is serialized or how data is serialized when written to an output. /// public partial class Serialization : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerializationInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerializationInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType _type; + private string _type; /// /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType Type { get => this._type; set => this._type = value; } + public string Type { get => this._type; set => this._type = value; } /// Creates an new instance. public Serialization() @@ -40,10 +40,14 @@ public partial interface ISerialization : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType Type { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] + string Type { get; set; } } /// Describes how data from an input is serialized or how data is serialized when written to an output. @@ -53,7 +57,8 @@ internal partial interface ISerializationInternal /// /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType Type { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] + string Type { get; set; } } } \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Serialization.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Serialization.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Serialization.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Serialization.json.cs index edea99f221e2..b57518f76d20 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Serialization.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Serialization.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -56,15 +56,15 @@ public partial class Serialization partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization. - /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization interface is polymorphic, - /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization interface is polymorphic, and the precise + /// model class that will get deserialized is determined at runtime based on the payload. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISerialization FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json)) { @@ -110,7 +110,7 @@ internal Serialization(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtim { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..dcf6f489236a --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusDataSourceProperties.PowerShell.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// The common properties that are associated with Service Bus data sources (Queues, Topics, Event Hubs, etc.). + /// + [System.ComponentModel.TypeConverter(typeof(ServiceBusDataSourcePropertiesTypeConverter))] + public partial class ServiceBusDataSourceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ServiceBusDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ServiceBusDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ServiceBusDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, 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 ServiceBusDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 common properties that are associated with Service Bus data sources (Queues, Topics, Event Hubs, etc.). + [System.ComponentModel.TypeConverter(typeof(ServiceBusDataSourcePropertiesTypeConverter))] + public partial interface IServiceBusDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusDataSourceProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusDataSourceProperties.TypeConverter.cs index 2516a6cfb8d7..c00a4f3f5f6c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusDataSourceProperties.cs similarity index 87% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusDataSourceProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusDataSourceProperties.cs index fa1e42ab1548..04495ca03f98 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusDataSourceProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusDataSourceProperties.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -11,16 +11,16 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401P /// The common properties that are associated with Service Bus data sources (Queues, Topics, Event Hubs, etc.). /// public partial class ServiceBusDataSourceProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourceProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourcePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? _authenticationMode; + private string _authenticationMode; /// Authentication Mode. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get => this._authenticationMode; set => this._authenticationMode = value; } + public string AuthenticationMode { get => this._authenticationMode; set => this._authenticationMode = value; } /// Backing field for property. private string _serviceBusNamespace; @@ -65,10 +65,14 @@ public partial interface IServiceBusDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Authentication Mode.", SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } /// /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT /// (CreateOrReplace) requests. @@ -76,6 +80,9 @@ public partial interface IServiceBusDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", SerializedName = @"serviceBusNamespace", PossibleTypes = new [] { typeof(string) })] @@ -86,6 +93,9 @@ public partial interface IServiceBusDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", SerializedName = @"sharedAccessPolicyKey", PossibleTypes = new [] { typeof(string) })] @@ -97,6 +107,9 @@ public partial interface IServiceBusDataSourceProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", SerializedName = @"sharedAccessPolicyName", PossibleTypes = new [] { typeof(string) })] @@ -108,7 +121,8 @@ internal partial interface IServiceBusDataSourcePropertiesInternal { /// Authentication Mode. - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode? AuthenticationMode { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } /// /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT /// (CreateOrReplace) requests. diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusDataSourceProperties.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusDataSourceProperties.json.cs index b95f3734aeb8..e7a797ef7711 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class ServiceBusDataSourceProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ServiceBusDataSourceProperties(json) : null; } @@ -79,10 +79,10 @@ internal ServiceBusDataSourceProperties(Microsoft.Azure.PowerShell.Cmdlets.Strea { return; } - {_serviceBusNamespace = If( json?.PropertyT("serviceBusNamespace"), out var __jsonServiceBusNamespace) ? (string)__jsonServiceBusNamespace : (string)ServiceBusNamespace;} - {_sharedAccessPolicyName = If( json?.PropertyT("sharedAccessPolicyName"), out var __jsonSharedAccessPolicyName) ? (string)__jsonSharedAccessPolicyName : (string)SharedAccessPolicyName;} - {_sharedAccessPolicyKey = If( json?.PropertyT("sharedAccessPolicyKey"), out var __jsonSharedAccessPolicyKey) ? (string)__jsonSharedAccessPolicyKey : (string)SharedAccessPolicyKey;} - {_authenticationMode = If( json?.PropertyT("authenticationMode"), out var __jsonAuthenticationMode) ? (string)__jsonAuthenticationMode : (string)AuthenticationMode;} + {_serviceBusNamespace = If( json?.PropertyT("serviceBusNamespace"), out var __jsonServiceBusNamespace) ? (string)__jsonServiceBusNamespace : (string)_serviceBusNamespace;} + {_sharedAccessPolicyName = If( json?.PropertyT("sharedAccessPolicyName"), out var __jsonSharedAccessPolicyName) ? (string)__jsonSharedAccessPolicyName : (string)_sharedAccessPolicyName;} + {_sharedAccessPolicyKey = If( json?.PropertyT("sharedAccessPolicyKey"), out var __jsonSharedAccessPolicyKey) ? (string)__jsonSharedAccessPolicyKey : (string)_sharedAccessPolicyKey;} + {_authenticationMode = If( json?.PropertyT("authenticationMode"), out var __jsonAuthenticationMode) ? (string)__jsonAuthenticationMode : (string)_authenticationMode;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSource.PowerShell.cs new file mode 100644 index 000000000000..10a3d4d8acc2 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSource.PowerShell.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes a Service Bus Queue output data source. + [System.ComponentModel.TypeConverter(typeof(ServiceBusQueueOutputDataSourceTypeConverter))] + public partial class ServiceBusQueueOutputDataSource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ServiceBusQueueOutputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ServiceBusQueueOutputDataSource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ServiceBusQueueOutputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("QueueName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).QueueName = (string) content.GetValueForProperty("QueueName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).QueueName, global::System.Convert.ToString); + } + if (content.Contains("PropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).PropertyColumn = (System.Collections.Generic.List) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("SystemPropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ServiceBusQueueOutputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("QueueName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).QueueName = (string) content.GetValueForProperty("QueueName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).QueueName, global::System.Convert.ToString); + } + if (content.Contains("PropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).PropertyColumn = (System.Collections.Generic.List) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("SystemPropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes a Service Bus Queue output data source. + [System.ComponentModel.TypeConverter(typeof(ServiceBusQueueOutputDataSourceTypeConverter))] + public partial interface IServiceBusQueueOutputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSource.TypeConverter.cs index 92aee6ea9dd8..b688b9ed1129 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSource.cs new file mode 100644 index 000000000000..c9c3c30d5864 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSource.cs @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Describes a Service Bus Queue output data source. + public partial class ServiceBusQueueOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(); + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourceProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceProperties _property; + + /// + /// The properties that are associated with a Service Bus Queue output. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourceProperties()); set => this._property = value; } + + /// + /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List PropertyColumn { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)Property).PropertyColumn; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)Property).PropertyColumn = value ?? null /* arrayOf */; } + + /// The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string QueueName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)Property).QueueName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)Property).QueueName = value ?? null; } + + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace = value ?? null; } + + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey = value ?? null; } + + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName = value ?? null; } + + /// Dictionary of + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)Property).SystemPropertyColumn; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)Property).SystemPropertyColumn = value ?? null /* model class */; } + + /// + /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Microsoft.ServiceBus/Queue"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)__outputDataSource).Type = "Microsoft.ServiceBus/Queue"; } + + /// Creates an new instance. + public ServiceBusQueueOutputDataSource() + { + this.__outputDataSource.Type = "Microsoft.ServiceBus/Queue"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); + await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); + } + } + /// Describes a Service Bus Queue output data source. + public partial interface IServiceBusQueueOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource + { + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Authentication Mode.", + SerializedName = @"authenticationMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// + /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A string array of the names of output columns to be attached to Service Bus messages as custom properties.", + SerializedName = @"propertyColumns", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List PropertyColumn { get; set; } + /// The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"queueName", + PossibleTypes = new [] { typeof(string) })] + string QueueName { get; set; } + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"serviceBusNamespace", + PossibleTypes = new [] { typeof(string) })] + string ServiceBusNamespace { get; set; } + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"sharedAccessPolicyKey", + PossibleTypes = new [] { typeof(string) })] + string SharedAccessPolicyKey { get; set; } + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"sharedAccessPolicyName", + PossibleTypes = new [] { typeof(string) })] + string SharedAccessPolicyName { get; set; } + /// Dictionary of + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Dictionary of ", + SerializedName = @"systemPropertyColumns", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns) })] + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } + + } + /// Describes a Service Bus Queue output data source. + internal partial interface IServiceBusQueueOutputDataSourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal + { + /// Authentication Mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// + /// The properties that are associated with a Service Bus Queue output. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceProperties Property { get; set; } + /// + /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. + /// + System.Collections.Generic.List PropertyColumn { get; set; } + /// The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests. + string QueueName { get; set; } + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + string ServiceBusNamespace { get; set; } + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + string SharedAccessPolicyKey { get; set; } + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + string SharedAccessPolicyName { get; set; } + /// Dictionary of + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSource.json.cs index 9d94b20f4a1c..8f486919aed3 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ServiceBusQueueOutputDataSource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ServiceBusQueueOutputDataSource(json) : null; } @@ -77,8 +77,8 @@ internal ServiceBusQueueOutputDataSource(Microsoft.Azure.PowerShell.Cmdlets.Stre { return; } - __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourceProperties.FromJson(__jsonProperties) : Property;} + __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..f384d4d3baa5 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourceProperties.PowerShell.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with a Service Bus Queue output. + [System.ComponentModel.TypeConverter(typeof(ServiceBusQueueOutputDataSourcePropertiesTypeConverter))] + public partial class ServiceBusQueueOutputDataSourceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ServiceBusQueueOutputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ServiceBusQueueOutputDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ServiceBusQueueOutputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("QueueName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)this).QueueName = (string) content.GetValueForProperty("QueueName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)this).QueueName, global::System.Convert.ToString); + } + if (content.Contains("PropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)this).PropertyColumn = (System.Collections.Generic.List) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("SystemPropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, 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 ServiceBusQueueOutputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("QueueName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)this).QueueName = (string) content.GetValueForProperty("QueueName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)this).QueueName, global::System.Convert.ToString); + } + if (content.Contains("PropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)this).PropertyColumn = (System.Collections.Generic.List) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("SystemPropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with a Service Bus Queue output. + [System.ComponentModel.TypeConverter(typeof(ServiceBusQueueOutputDataSourcePropertiesTypeConverter))] + public partial interface IServiceBusQueueOutputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourceProperties.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourceProperties.TypeConverter.cs index 31ff23b3a479..ee246b2d6f54 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourceProperties.cs new file mode 100644 index 000000000000..d3ea736f5440 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourceProperties.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with a Service Bus Queue output. + public partial class ServiceBusQueueOutputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourceProperties __serviceBusDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusDataSourceProperties(); + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).AuthenticationMode = value ?? null; } + + /// Backing field for property. + private System.Collections.Generic.List _propertyColumn; + + /// + /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List PropertyColumn { get => this._propertyColumn; set => this._propertyColumn = value; } + + /// Backing field for property. + private string _queueName; + + /// The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string QueueName { get => this._queueName; set => this._queueName = value; } + + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).ServiceBusNamespace = value ?? null; } + + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyKey = value ?? null; } + + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns _systemPropertyColumn; + + /// Dictionary of + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get => (this._systemPropertyColumn = this._systemPropertyColumn ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns()); set => this._systemPropertyColumn = value; } + + /// + /// Creates an new instance. + /// + public ServiceBusQueueOutputDataSourceProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__serviceBusDataSourceProperties), __serviceBusDataSourceProperties); + await eventListener.AssertObjectIsValid(nameof(__serviceBusDataSourceProperties), __serviceBusDataSourceProperties); + } + } + /// The properties that are associated with a Service Bus Queue output. + public partial interface IServiceBusQueueOutputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourceProperties + { + /// + /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A string array of the names of output columns to be attached to Service Bus messages as custom properties.", + SerializedName = @"propertyColumns", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List PropertyColumn { get; set; } + /// The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"queueName", + PossibleTypes = new [] { typeof(string) })] + string QueueName { get; set; } + /// Dictionary of + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Dictionary of ", + SerializedName = @"systemPropertyColumns", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns) })] + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } + + } + /// The properties that are associated with a Service Bus Queue output. + internal partial interface IServiceBusQueueOutputDataSourcePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal + { + /// + /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. + /// + System.Collections.Generic.List PropertyColumn { get; set; } + /// The name of the Service Bus Queue. Required on PUT (CreateOrReplace) requests. + string QueueName { get; set; } + /// Dictionary of + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourceProperties.json.cs similarity index 90% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourceProperties.json.cs index f3dfe457c805..14deb1359902 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ServiceBusQueueOutputDataSourceProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ServiceBusQueueOutputDataSourceProperties(json) : null; } @@ -77,10 +77,10 @@ internal ServiceBusQueueOutputDataSourceProperties(Microsoft.Azure.PowerShell.Cm { return; } - __serviceBusDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusDataSourceProperties(json); - {_queueName = If( json?.PropertyT("queueName"), out var __jsonQueueName) ? (string)__jsonQueueName : (string)QueueName;} - {_propertyColumn = If( json?.PropertyT("propertyColumns"), out var __jsonPropertyColumns) ? If( __jsonPropertyColumns as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : PropertyColumn;} - {_systemPropertyColumn = If( json?.PropertyT("systemPropertyColumns"), out var __jsonSystemPropertyColumns) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.FromJson(__jsonSystemPropertyColumns) : SystemPropertyColumn;} + __serviceBusDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusDataSourceProperties(json); + {_queueName = If( json?.PropertyT("queueName"), out var __jsonQueueName) ? (string)__jsonQueueName : (string)_queueName;} + {_propertyColumn = If( json?.PropertyT("propertyColumns"), out var __jsonPropertyColumns) ? If( __jsonPropertyColumns as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _propertyColumn;} + {_systemPropertyColumn = If( json?.PropertyT("systemPropertyColumns"), out var __jsonSystemPropertyColumns) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.FromJson(__jsonSystemPropertyColumns) : _systemPropertyColumn;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.PowerShell.cs similarity index 79% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.PowerShell.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.PowerShell.cs index e2838484cdba..f64b53b2d153 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -55,29 +55,37 @@ public partial class ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColu partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns(content); } @@ -90,10 +98,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. @@ -112,7 +120,7 @@ internal ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns(global:: } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -134,6 +142,18 @@ internal ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns(global:: /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } } /// Dictionary of [System.ComponentModel.TypeConverter(typeof(ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter))] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.TypeConverter.cs index 1822a83584cb..4c6ab193df23 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there /// is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.cs similarity index 87% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.cs index 668ec4ed8440..8fe7380f3d92 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Dictionary of public partial class ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumnsInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumnsInternal { /// diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.dictionary.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.dictionary.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.dictionary.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.dictionary.cs index 2830062df1bc..2365fc2018e0 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.dictionary.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.json.cs index 17b2a3f3b133..97a592bc190f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColu partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ServiceBusQueueOutputDataSourcePropertiesSystemPropertyColumns(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSource.PowerShell.cs new file mode 100644 index 000000000000..61457463eb02 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSource.PowerShell.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes a Service Bus Topic output data source. + [System.ComponentModel.TypeConverter(typeof(ServiceBusTopicOutputDataSourceTypeConverter))] + public partial class ServiceBusTopicOutputDataSource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ServiceBusTopicOutputDataSource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ServiceBusTopicOutputDataSource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ServiceBusTopicOutputDataSource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("TopicName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).TopicName = (string) content.GetValueForProperty("TopicName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).TopicName, global::System.Convert.ToString); + } + if (content.Contains("PropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).PropertyColumn = (System.Collections.Generic.List) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("SystemPropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ServiceBusTopicOutputDataSource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourcePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("TopicName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).TopicName = (string) content.GetValueForProperty("TopicName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).TopicName, global::System.Convert.ToString); + } + if (content.Contains("PropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).PropertyColumn = (System.Collections.Generic.List) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("SystemPropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes a Service Bus Topic output data source. + [System.ComponentModel.TypeConverter(typeof(ServiceBusTopicOutputDataSourceTypeConverter))] + public partial interface IServiceBusTopicOutputDataSource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSource.TypeConverter.cs index 358820fb7355..7a24915bf8ed 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSource.cs new file mode 100644 index 000000000000..1c780b89331d --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSource.cs @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Describes a Service Bus Topic output data source. + public partial class ServiceBusTopicOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(); + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).AuthenticationMode = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourceProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceProperties _property; + + /// + /// The properties that are associated with a Service Bus Topic output. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourceProperties()); set => this._property = value; } + + /// + /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List PropertyColumn { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)Property).PropertyColumn; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)Property).PropertyColumn = value ?? null /* arrayOf */; } + + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).ServiceBusNamespace = value ?? null; } + + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyKey = value ?? null; } + + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)Property).SharedAccessPolicyName = value ?? null; } + + /// Dictionary of + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)Property).SystemPropertyColumn; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)Property).SystemPropertyColumn = value ?? null /* model class */; } + + /// The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string TopicName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)Property).TopicName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)Property).TopicName = value ?? null; } + + /// + /// Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Microsoft.ServiceBus/Topic"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal)__outputDataSource).Type = "Microsoft.ServiceBus/Topic"; } + + /// Creates an new instance. + public ServiceBusTopicOutputDataSource() + { + this.__outputDataSource.Type = "Microsoft.ServiceBus/Topic"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__outputDataSource), __outputDataSource); + await eventListener.AssertObjectIsValid(nameof(__outputDataSource), __outputDataSource); + } + } + /// Describes a Service Bus Topic output data source. + public partial interface IServiceBusTopicOutputDataSource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource + { + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Authentication Mode.", + SerializedName = @"authenticationMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// + /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A string array of the names of output columns to be attached to Service Bus messages as custom properties.", + SerializedName = @"propertyColumns", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List PropertyColumn { get; set; } + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"serviceBusNamespace", + PossibleTypes = new [] { typeof(string) })] + string ServiceBusNamespace { get; set; } + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"sharedAccessPolicyKey", + PossibleTypes = new [] { typeof(string) })] + string SharedAccessPolicyKey { get; set; } + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"sharedAccessPolicyName", + PossibleTypes = new [] { typeof(string) })] + string SharedAccessPolicyName { get; set; } + /// Dictionary of + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Dictionary of ", + SerializedName = @"systemPropertyColumns", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns) })] + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } + /// The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + string TopicName { get; set; } + + } + /// Describes a Service Bus Topic output data source. + internal partial interface IServiceBusTopicOutputDataSourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSourceInternal + { + /// Authentication Mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string AuthenticationMode { get; set; } + /// + /// The properties that are associated with a Service Bus Topic output. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceProperties Property { get; set; } + /// + /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. + /// + System.Collections.Generic.List PropertyColumn { get; set; } + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + string ServiceBusNamespace { get; set; } + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + string SharedAccessPolicyKey { get; set; } + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + string SharedAccessPolicyName { get; set; } + /// Dictionary of + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } + /// The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests. + string TopicName { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSource.json.cs index 9134a0f9879c..2ad6c1160320 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ServiceBusTopicOutputDataSource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ServiceBusTopicOutputDataSource(json) : null; } @@ -77,8 +77,8 @@ internal ServiceBusTopicOutputDataSource(Microsoft.Azure.PowerShell.Cmdlets.Stre { return; } - __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputDataSource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourceProperties.FromJson(__jsonProperties) : Property;} + __outputDataSource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputDataSource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourceProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourceProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourceProperties.PowerShell.cs new file mode 100644 index 000000000000..ea7a6e229d6e --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourceProperties.PowerShell.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with a Service Bus Topic output. + [System.ComponentModel.TypeConverter(typeof(ServiceBusTopicOutputDataSourcePropertiesTypeConverter))] + public partial class ServiceBusTopicOutputDataSourceProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ServiceBusTopicOutputDataSourceProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ServiceBusTopicOutputDataSourceProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ServiceBusTopicOutputDataSourceProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TopicName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)this).TopicName = (string) content.GetValueForProperty("TopicName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)this).TopicName, global::System.Convert.ToString); + } + if (content.Contains("PropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)this).PropertyColumn = (System.Collections.Generic.List) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("SystemPropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, 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 ServiceBusTopicOutputDataSourceProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TopicName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)this).TopicName = (string) content.GetValueForProperty("TopicName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)this).TopicName, global::System.Convert.ToString); + } + if (content.Contains("PropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)this).PropertyColumn = (System.Collections.Generic.List) content.GetValueForProperty("PropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)this).PropertyColumn, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("SystemPropertyColumn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)this).SystemPropertyColumn = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns) content.GetValueForProperty("SystemPropertyColumn",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal)this).SystemPropertyColumn, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter.ConvertFrom); + } + if (content.Contains("ServiceBusNamespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace = (string) content.GetValueForProperty("ServiceBusNamespace",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).ServiceBusNamespace, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName = (string) content.GetValueForProperty("SharedAccessPolicyName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyName, global::System.Convert.ToString); + } + if (content.Contains("SharedAccessPolicyKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey = (string) content.GetValueForProperty("SharedAccessPolicyKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).SharedAccessPolicyKey, global::System.Convert.ToString); + } + if (content.Contains("AuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode = (string) content.GetValueForProperty("AuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)this).AuthenticationMode, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with a Service Bus Topic output. + [System.ComponentModel.TypeConverter(typeof(ServiceBusTopicOutputDataSourcePropertiesTypeConverter))] + public partial interface IServiceBusTopicOutputDataSourceProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourceProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourceProperties.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourceProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourceProperties.TypeConverter.cs index 92c68c6bb7c3..cdc0d9e41797 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourceProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourceProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourceProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourceProperties.cs new file mode 100644 index 000000000000..a7e7bb8fcfba --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourceProperties.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with a Service Bus Topic output. + public partial class ServiceBusTopicOutputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourceProperties __serviceBusDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusDataSourceProperties(); + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string AuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).AuthenticationMode = value ?? null; } + + /// Backing field for property. + private System.Collections.Generic.List _propertyColumn; + + /// + /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List PropertyColumn { get => this._propertyColumn; set => this._propertyColumn = value; } + + /// + /// The namespace that is associated with the desired Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT + /// (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string ServiceBusNamespace { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).ServiceBusNamespace; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).ServiceBusNamespace = value ?? null; } + + /// + /// The shared access policy key for the specified shared access policy. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string SharedAccessPolicyKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyKey = value ?? null; } + + /// + /// The shared access policy name for the Event Hub, Service Bus Queue, Service Bus Topic, etc. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string SharedAccessPolicyName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal)__serviceBusDataSourceProperties).SharedAccessPolicyName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns _systemPropertyColumn; + + /// Dictionary of + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get => (this._systemPropertyColumn = this._systemPropertyColumn ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns()); set => this._systemPropertyColumn = value; } + + /// Backing field for property. + private string _topicName; + + /// The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string TopicName { get => this._topicName; set => this._topicName = value; } + + /// + /// Creates an new instance. + /// + public ServiceBusTopicOutputDataSourceProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__serviceBusDataSourceProperties), __serviceBusDataSourceProperties); + await eventListener.AssertObjectIsValid(nameof(__serviceBusDataSourceProperties), __serviceBusDataSourceProperties); + } + } + /// The properties that are associated with a Service Bus Topic output. + public partial interface IServiceBusTopicOutputDataSourceProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourceProperties + { + /// + /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A string array of the names of output columns to be attached to Service Bus messages as custom properties.", + SerializedName = @"propertyColumns", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List PropertyColumn { get; set; } + /// Dictionary of + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Dictionary of ", + SerializedName = @"systemPropertyColumns", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns) })] + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } + /// The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"topicName", + PossibleTypes = new [] { typeof(string) })] + string TopicName { get; set; } + + } + /// The properties that are associated with a Service Bus Topic output. + internal partial interface IServiceBusTopicOutputDataSourcePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusDataSourcePropertiesInternal + { + /// + /// A string array of the names of output columns to be attached to Service Bus messages as custom properties. + /// + System.Collections.Generic.List PropertyColumn { get; set; } + /// Dictionary of + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns SystemPropertyColumn { get; set; } + /// The name of the Service Bus Topic. Required on PUT (CreateOrReplace) requests. + string TopicName { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourceProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourceProperties.json.cs similarity index 90% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourceProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourceProperties.json.cs index 2447f9f81e5f..0a84f9b8387a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourceProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourceProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ServiceBusTopicOutputDataSourceProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ServiceBusTopicOutputDataSourceProperties(json) : null; } @@ -77,10 +77,10 @@ internal ServiceBusTopicOutputDataSourceProperties(Microsoft.Azure.PowerShell.Cm { return; } - __serviceBusDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusDataSourceProperties(json); - {_topicName = If( json?.PropertyT("topicName"), out var __jsonTopicName) ? (string)__jsonTopicName : (string)TopicName;} - {_propertyColumn = If( json?.PropertyT("propertyColumns"), out var __jsonPropertyColumns) ? If( __jsonPropertyColumns as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : PropertyColumn;} - {_systemPropertyColumn = If( json?.PropertyT("systemPropertyColumns"), out var __jsonSystemPropertyColumns) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.FromJson(__jsonSystemPropertyColumns) : SystemPropertyColumn;} + __serviceBusDataSourceProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusDataSourceProperties(json); + {_topicName = If( json?.PropertyT("topicName"), out var __jsonTopicName) ? (string)__jsonTopicName : (string)_topicName;} + {_propertyColumn = If( json?.PropertyT("propertyColumns"), out var __jsonPropertyColumns) ? If( __jsonPropertyColumns as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _propertyColumn;} + {_systemPropertyColumn = If( json?.PropertyT("systemPropertyColumns"), out var __jsonSystemPropertyColumns) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.FromJson(__jsonSystemPropertyColumns) : _systemPropertyColumn;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.PowerShell.cs similarity index 79% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.PowerShell.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.PowerShell.cs index 3b9346ec5e8d..35acc435ef98 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -55,29 +55,37 @@ public partial class ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColu partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. /// - /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns(content); } @@ -90,10 +98,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170 /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. @@ -112,7 +120,7 @@ internal ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns(global:: } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -134,6 +142,18 @@ internal ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns(global:: /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } } /// Dictionary of [System.ComponentModel.TypeConverter(typeof(ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumnsTypeConverter))] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.TypeConverter.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.TypeConverter.cs index 6000f2641c2e..431964277beb 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there /// is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.cs similarity index 87% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.cs index dbd71eae027c..65ed6815b655 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Dictionary of public partial class ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumnsInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumnsInternal { /// diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.dictionary.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.dictionary.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.dictionary.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.dictionary.cs index f7da53c0ea0b..7a03af3c33ba 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.dictionary.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.json.cs index 29c2552148b7..47c0596d058a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColu partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new ServiceBusTopicOutputDataSourcePropertiesSystemPropertyColumns(json) : null; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StartStreamingJobParameters.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StartStreamingJobParameters.PowerShell.cs new file mode 100644 index 000000000000..bad102c37972 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StartStreamingJobParameters.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Parameters supplied to the Start Streaming Job operation. + [System.ComponentModel.TypeConverter(typeof(StartStreamingJobParametersTypeConverter))] + public partial class StartStreamingJobParameters + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParameters DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StartStreamingJobParameters(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParameters DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StartStreamingJobParameters(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StartStreamingJobParameters(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OutputStartMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParametersInternal)this).OutputStartMode = (string) content.GetValueForProperty("OutputStartMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParametersInternal)this).OutputStartMode, global::System.Convert.ToString); + } + if (content.Contains("OutputStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParametersInternal)this).OutputStartTime = (global::System.DateTime?) content.GetValueForProperty("OutputStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParametersInternal)this).OutputStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal StartStreamingJobParameters(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OutputStartMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParametersInternal)this).OutputStartMode = (string) content.GetValueForProperty("OutputStartMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParametersInternal)this).OutputStartMode, global::System.Convert.ToString); + } + if (content.Contains("OutputStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParametersInternal)this).OutputStartTime = (global::System.DateTime?) content.GetValueForProperty("OutputStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParametersInternal)this).OutputStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Parameters supplied to the Start Streaming Job operation. + [System.ComponentModel.TypeConverter(typeof(StartStreamingJobParametersTypeConverter))] + public partial interface IStartStreamingJobParameters + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StartStreamingJobParameters.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StartStreamingJobParameters.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StartStreamingJobParameters.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StartStreamingJobParameters.TypeConverter.cs index 18c4a94e8052..dcaadb1ec63c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StartStreamingJobParameters.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StartStreamingJobParameters.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParameters ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParameters ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParameters).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParameters).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StartStreamingJobParameters.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StartStreamingJobParameters.cs similarity index 86% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StartStreamingJobParameters.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StartStreamingJobParameters.cs index 3fe03dc66841..874f985252bc 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StartStreamingJobParameters.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StartStreamingJobParameters.cs @@ -3,18 +3,18 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Parameters supplied to the Start Streaming Job operation. public partial class StartStreamingJobParameters : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParameters, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParametersInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParameters, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParametersInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode? _outputStartMode; + private string _outputStartMode; /// /// Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event @@ -22,7 +22,7 @@ public partial class StartStreamingJobParameters : /// or start from the last event output time. /// [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode? OutputStartMode { get => this._outputStartMode; set => this._outputStartMode = value; } + public string OutputStartMode { get => this._outputStartMode; set => this._outputStartMode = value; } /// Backing field for property. private global::System.DateTime? _outputStartTime; @@ -53,10 +53,14 @@ public partial interface IStartStreamingJobParameters : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time.", SerializedName = @"outputStartMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode) })] - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode? OutputStartMode { get; set; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] + string OutputStartMode { get; set; } /// /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null /// to indicate that the output event stream will start whenever the streaming job is started. This property must have a value @@ -65,6 +69,9 @@ public partial interface IStartStreamingJobParameters : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. This property must have a value if outputStartMode is set to CustomTime.", SerializedName = @"outputStartTime", PossibleTypes = new [] { typeof(global::System.DateTime) })] @@ -80,7 +87,8 @@ internal partial interface IStartStreamingJobParametersInternal /// stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, /// or start from the last event output time. /// - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode? OutputStartMode { get; set; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] + string OutputStartMode { get; set; } /// /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null /// to indicate that the output event stream will start whenever the streaming job is started. This property must have a value diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StartStreamingJobParameters.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StartStreamingJobParameters.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StartStreamingJobParameters.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StartStreamingJobParameters.json.cs index f73054e3275d..30dd7222dbb2 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StartStreamingJobParameters.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StartStreamingJobParameters.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class StartStreamingJobParameters partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParameters. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParameters. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParameters. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParameters. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParameters FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new StartStreamingJobParameters(json) : null; } @@ -77,8 +77,8 @@ internal StartStreamingJobParameters(Microsoft.Azure.PowerShell.Cmdlets.StreamAn { return; } - {_outputStartMode = If( json?.PropertyT("outputStartMode"), out var __jsonOutputStartMode) ? (string)__jsonOutputStartMode : (string)OutputStartMode;} - {_outputStartTime = If( json?.PropertyT("outputStartTime"), out var __jsonOutputStartTime) ? global::System.DateTime.TryParse((string)__jsonOutputStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOutputStartTimeValue) ? __jsonOutputStartTimeValue : OutputStartTime : OutputStartTime;} + {_outputStartMode = If( json?.PropertyT("outputStartMode"), out var __jsonOutputStartMode) ? (string)__jsonOutputStartMode : (string)_outputStartMode;} + {_outputStartTime = If( json?.PropertyT("outputStartTime"), out var __jsonOutputStartTime) ? global::System.DateTime.TryParse((string)__jsonOutputStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOutputStartTimeValue) ? __jsonOutputStartTimeValue : _outputStartTime : _outputStartTime;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StorageAccount.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StorageAccount.PowerShell.cs new file mode 100644 index 000000000000..607bc7871357 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StorageAccount.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with an Azure Storage account + [System.ComponentModel.TypeConverter(typeof(StorageAccountTypeConverter))] + public partial class StorageAccount + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StorageAccount(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StorageAccount(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StorageAccount(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountName, global::System.Convert.ToString); + } + if (content.Contains("AccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountKey, 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 StorageAccount(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountName = (string) content.GetValueForProperty("AccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountName, global::System.Convert.ToString); + } + if (content.Contains("AccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountKey = (string) content.GetValueForProperty("AccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)this).AccountKey, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with an Azure Storage account + [System.ComponentModel.TypeConverter(typeof(StorageAccountTypeConverter))] + public partial interface IStorageAccount + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StorageAccount.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StorageAccount.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StorageAccount.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StorageAccount.TypeConverter.cs index d23c5a6ca599..783fa55a410c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StorageAccount.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StorageAccount.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StorageAccount.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StorageAccount.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StorageAccount.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StorageAccount.cs index 355865d4690e..d90f08bf6d66 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StorageAccount.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StorageAccount.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with an Azure Storage account public partial class StorageAccount : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccountInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal { /// Backing field for property. @@ -47,6 +47,9 @@ public partial interface IStorageAccount : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", SerializedName = @"accountKey", PossibleTypes = new [] { typeof(string) })] @@ -57,6 +60,9 @@ public partial interface IStorageAccount : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", SerializedName = @"accountName", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StorageAccount.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StorageAccount.json.cs similarity index 96% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StorageAccount.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StorageAccount.json.cs index a59ffd1f1cbf..97a31425b7ef 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StorageAccount.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StorageAccount.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class StorageAccount partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStorageAccount FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new StorageAccount(json) : null; } @@ -77,8 +77,8 @@ internal StorageAccount(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runti { return; } - {_accountName = If( json?.PropertyT("accountName"), out var __jsonAccountName) ? (string)__jsonAccountName : (string)AccountName;} - {_accountKey = If( json?.PropertyT("accountKey"), out var __jsonAccountKey) ? (string)__jsonAccountKey : (string)AccountKey;} + {_accountName = If( json?.PropertyT("accountName"), out var __jsonAccountName) ? (string)__jsonAccountName : (string)_accountName;} + {_accountKey = If( json?.PropertyT("accountKey"), out var __jsonAccountKey) ? (string)__jsonAccountKey : (string)_accountKey;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamAnalyticsIdentity.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamAnalyticsIdentity.PowerShell.cs index 83b262530d0a..adf1686e5c18 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamAnalyticsIdentity.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamAnalyticsIdentity.PowerShell.cs @@ -53,6 +53,14 @@ public partial class StreamAnalyticsIdentity 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 . @@ -204,6 +212,18 @@ internal StreamAnalyticsIdentity(global::System.Management.Automation.PSObject c /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } } [System.ComponentModel.TypeConverter(typeof(StreamAnalyticsIdentityTypeConverter))] public partial interface IStreamAnalyticsIdentity diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamAnalyticsIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamAnalyticsIdentity.cs index 963d6939ea4c..7d919b60418a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamAnalyticsIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamAnalyticsIdentity.cs @@ -98,6 +98,9 @@ public partial interface IStreamAnalyticsIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the cluster.", SerializedName = @"clusterName", PossibleTypes = new [] { typeof(string) })] @@ -106,6 +109,9 @@ public partial interface IStreamAnalyticsIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the function.", SerializedName = @"functionName", PossibleTypes = new [] { typeof(string) })] @@ -114,6 +120,9 @@ public partial interface IStreamAnalyticsIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Resource identity path", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -122,6 +131,9 @@ public partial interface IStreamAnalyticsIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the input.", SerializedName = @"inputName", PossibleTypes = new [] { typeof(string) })] @@ -130,6 +142,9 @@ public partial interface IStreamAnalyticsIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the streaming job.", SerializedName = @"jobName", PossibleTypes = new [] { typeof(string) })] @@ -141,6 +156,9 @@ public partial interface IStreamAnalyticsIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] @@ -149,6 +167,9 @@ public partial interface IStreamAnalyticsIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the output.", SerializedName = @"outputName", PossibleTypes = new [] { typeof(string) })] @@ -157,6 +178,9 @@ public partial interface IStreamAnalyticsIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the resource group. The name is case insensitive.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] @@ -165,6 +189,9 @@ public partial interface IStreamAnalyticsIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] @@ -173,6 +200,9 @@ public partial interface IStreamAnalyticsIdentity : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"The name of the transformation.", SerializedName = @"transformationName", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamAnalyticsIdentity.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamAnalyticsIdentity.json.cs index eed728b1cd91..f3fec20ac83f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamAnalyticsIdentity.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamAnalyticsIdentity.json.cs @@ -76,16 +76,16 @@ internal StreamAnalyticsIdentity(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalyt { return; } - {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} - {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} - {_clusterName = If( json?.PropertyT("clusterName"), out var __jsonClusterName) ? (string)__jsonClusterName : (string)ClusterName;} - {_jobName = If( json?.PropertyT("jobName"), out var __jsonJobName) ? (string)__jsonJobName : (string)JobName;} - {_functionName = If( json?.PropertyT("functionName"), out var __jsonFunctionName) ? (string)__jsonFunctionName : (string)FunctionName;} - {_outputName = If( json?.PropertyT("outputName"), out var __jsonOutputName) ? (string)__jsonOutputName : (string)OutputName;} - {_inputName = If( json?.PropertyT("inputName"), out var __jsonInputName) ? (string)__jsonInputName : (string)InputName;} - {_transformationName = If( json?.PropertyT("transformationName"), out var __jsonTransformationName) ? (string)__jsonTransformationName : (string)TransformationName;} - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)_subscriptionId;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)_resourceGroupName;} + {_clusterName = If( json?.PropertyT("clusterName"), out var __jsonClusterName) ? (string)__jsonClusterName : (string)_clusterName;} + {_jobName = If( json?.PropertyT("jobName"), out var __jsonJobName) ? (string)__jsonJobName : (string)_jobName;} + {_functionName = If( json?.PropertyT("functionName"), out var __jsonFunctionName) ? (string)__jsonFunctionName : (string)_functionName;} + {_outputName = If( json?.PropertyT("outputName"), out var __jsonOutputName) ? (string)__jsonOutputName : (string)_outputName;} + {_inputName = If( json?.PropertyT("inputName"), out var __jsonInputName) ? (string)__jsonInputName : (string)_inputName;} + {_transformationName = If( json?.PropertyT("transformationName"), out var __jsonTransformationName) ? (string)__jsonTransformationName : (string)_transformationName;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputDataSource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputDataSource.PowerShell.cs similarity index 77% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputDataSource.PowerShell.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputDataSource.PowerShell.cs index 0615d320d299..72ff32859236 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputDataSource.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputDataSource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -55,29 +55,35 @@ public partial class StreamInputDataSource partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new StreamInputDataSource(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new StreamInputDataSource(content); } @@ -87,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. @@ -105,13 +111,13 @@ internal StreamInputDataSource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type, 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. @@ -126,7 +132,7 @@ internal StreamInputDataSource(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -135,6 +141,18 @@ internal StreamInputDataSource(global::System.Management.Automation.PSObject con /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } } /// Describes an input data source that contains stream data. [System.ComponentModel.TypeConverter(typeof(StreamInputDataSourceTypeConverter))] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputDataSource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputDataSource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputDataSource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputDataSource.TypeConverter.cs index a7fb6463327e..2beb7ff9a583 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputDataSource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputDataSource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputDataSource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputDataSource.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputDataSource.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputDataSource.cs index 487bf65bef23..5e3e8aedccad 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputDataSource.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputDataSource.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes an input data source that contains stream data. public partial class StreamInputDataSource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSourceInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal { /// Backing field for property. @@ -38,6 +38,9 @@ public partial interface IStreamInputDataSource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = true, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputDataSource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputDataSource.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputDataSource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputDataSource.json.cs index 12d0c815bcb7..b6f34baf1a1d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputDataSource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputDataSource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,15 +54,15 @@ public partial class StreamInputDataSource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource. - /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource interface - /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource interface is polymorphic, and + /// the precise model class that will get deserialized is determined at runtime based on the payload. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json)) { @@ -104,7 +104,7 @@ internal StreamInputDataSource(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytic { return; } - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputProperties.PowerShell.cs new file mode 100644 index 000000000000..09cb70b4176c --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputProperties.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with an input containing stream data. + [System.ComponentModel.TypeConverter(typeof(StreamInputPropertiesTypeConverter))] + public partial class StreamInputProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StreamInputProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StreamInputProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StreamInputProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Datasource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputPropertiesInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputPropertiesInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamInputDataSourceTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Serialization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SerializationTypeConverter.ConvertFrom); + } + if (content.Contains("Diagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticsTypeConverter.ConvertFrom); + } + if (content.Contains("Compression")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Compression = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression) content.GetValueForProperty("Compression",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Compression, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CompressionTypeConverter.ConvertFrom); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("DatasourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputPropertiesInternal)this).DatasourceType = (string) content.GetValueForProperty("DatasourceType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputPropertiesInternal)this).DatasourceType, 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 StreamInputProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Datasource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputPropertiesInternal)this).Datasource = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource) content.GetValueForProperty("Datasource",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputPropertiesInternal)this).Datasource, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamInputDataSourceTypeConverter.ConvertFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Serialization")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Serialization = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization) content.GetValueForProperty("Serialization",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Serialization, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SerializationTypeConverter.ConvertFrom); + } + if (content.Contains("Diagnostic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Diagnostic = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics) content.GetValueForProperty("Diagnostic",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Diagnostic, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.DiagnosticsTypeConverter.ConvertFrom); + } + if (content.Contains("Compression")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Compression = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression) content.GetValueForProperty("Compression",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).Compression, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.CompressionTypeConverter.ConvertFrom); + } + if (content.Contains("PartitionKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).PartitionKey = (string) content.GetValueForProperty("PartitionKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)this).PartitionKey, global::System.Convert.ToString); + } + if (content.Contains("DatasourceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputPropertiesInternal)this).DatasourceType = (string) content.GetValueForProperty("DatasourceType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputPropertiesInternal)this).DatasourceType, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with an input containing stream data. + [System.ComponentModel.TypeConverter(typeof(StreamInputPropertiesTypeConverter))] + public partial interface IStreamInputProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputProperties.TypeConverter.cs index 8910666d484f..76f6c71397be 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputProperties.cs new file mode 100644 index 000000000000..9e7150d862aa --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputProperties.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with an input containing stream data. + public partial class StreamInputProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties __inputProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputProperties(); + + /// Describes how input data is compressed + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICompression Compression { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Compression; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Compression = value ?? null /* model class */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource _datasource; + + /// + /// Describes an input data source that contains stream data. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource Datasource { get => (this._datasource = this._datasource ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamInputDataSource()); set => this._datasource = value; } + + /// + /// Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string DatasourceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)Datasource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSourceInternal)Datasource).Type = value ?? null; } + + /// + /// Describes conditions applicable to the Input, Output, or the job overall, that warrant customer attention. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Diagnostic; } + + /// Internal Acessors for Diagnostic + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IDiagnostics Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal.Diagnostic { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Diagnostic; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Diagnostic = value ?? null /* model class */; } + + /// Internal Acessors for Datasource + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputPropertiesInternal.Datasource { get => (this._datasource = this._datasource ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamInputDataSource()); set { {_datasource = value;} } } + + /// + /// partitionKey Describes a key in the input data which is used for partitioning the input data + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string PartitionKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).PartitionKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).PartitionKey = value ?? null; } + + /// + /// Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) + /// requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISerialization Serialization { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Serialization; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Serialization = value ?? null /* model class */; } + + /// + /// Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => "Stream"; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal)__inputProperties).Type = "Stream"; } + + /// Creates an new instance. + public StreamInputProperties() + { + this.__inputProperties.Type = "Stream"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__inputProperties), __inputProperties); + await eventListener.AssertObjectIsValid(nameof(__inputProperties), __inputProperties); + } + } + /// The properties that are associated with an input containing stream data. + public partial interface IStreamInputProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties + { + /// + /// Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string DatasourceType { get; set; } + + } + /// The properties that are associated with an input containing stream data. + internal partial interface IStreamInputPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputPropertiesInternal + { + /// + /// Describes an input data source that contains stream data. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputDataSource Datasource { get; set; } + /// + /// Indicates the type of input data source containing stream data. Required on PUT (CreateOrReplace) requests. + /// + string DatasourceType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputProperties.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputProperties.json.cs index b7cd6ddd5f28..67ed49182b5c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamInputProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamInputProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class StreamInputProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamInputProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamInputProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new StreamInputProperties(json) : null; } @@ -77,8 +77,8 @@ internal StreamInputProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytic { return; } - __inputProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputProperties(json); - {_datasource = If( json?.PropertyT("datasource"), out var __jsonDatasource) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamInputDataSource.FromJson(__jsonDatasource) : Datasource;} + __inputProperties = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputProperties(json); + {_datasource = If( json?.PropertyT("datasource"), out var __jsonDatasource) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamInputDataSource.FromJson(__jsonDatasource) : _datasource;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJob.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJob.PowerShell.cs new file mode 100644 index 000000000000..ca4962ed83bf --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJob.PowerShell.cs @@ -0,0 +1,566 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// A streaming job object, containing all information associated with the named streaming job. + /// + [System.ComponentModel.TypeConverter(typeof(StreamingJobTypeConverter))] + public partial class StreamingJob + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StreamingJob(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StreamingJob(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StreamingJob(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IdentityTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ETag, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Transformation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Transformation = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation) content.GetValueForProperty("Transformation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Transformation, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TransformationTypeConverter.ConvertFrom); + } + if (content.Contains("JobType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobType = (string) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobType, global::System.Convert.ToString); + } + if (content.Contains("CompatibilityLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).CompatibilityLevel = (string) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).CompatibilityLevel, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobSkuTypeConverter.ConvertFrom); + } + if (content.Contains("JobStorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount) content.GetValueForProperty("JobStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JobStorageAccountTypeConverter.ConvertFrom); + } + if (content.Contains("External")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).External = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal) content.GetValueForProperty("External",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).External, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ExternalTypeConverter.ConvertFrom); + } + if (content.Contains("Cluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterInfoTypeConverter.ConvertFrom); + } + if (content.Contains("JobId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobId = (string) content.GetValueForProperty("JobId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("JobState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobState = (string) content.GetValueForProperty("JobState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobState, global::System.Convert.ToString); + } + if (content.Contains("OutputStartMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).OutputStartMode = (string) content.GetValueForProperty("OutputStartMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).OutputStartMode, global::System.Convert.ToString); + } + if (content.Contains("OutputStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).OutputStartTime = (global::System.DateTime?) content.GetValueForProperty("OutputStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).OutputStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastOutputEventTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).LastOutputEventTime = (global::System.DateTime?) content.GetValueForProperty("LastOutputEventTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).LastOutputEventTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EventsOutOfOrderPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).EventsOutOfOrderPolicy = (string) content.GetValueForProperty("EventsOutOfOrderPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).EventsOutOfOrderPolicy, global::System.Convert.ToString); + } + if (content.Contains("OutputErrorPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).OutputErrorPolicy = (string) content.GetValueForProperty("OutputErrorPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).OutputErrorPolicy, global::System.Convert.ToString); + } + if (content.Contains("EventsOutOfOrderMaxDelayInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).EventsOutOfOrderMaxDelayInSecond = (int?) content.GetValueForProperty("EventsOutOfOrderMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).EventsOutOfOrderMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EventsLateArrivalMaxDelayInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).EventsLateArrivalMaxDelayInSecond = (int?) content.GetValueForProperty("EventsLateArrivalMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).EventsLateArrivalMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataLocale")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).DataLocale = (string) content.GetValueForProperty("DataLocale",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).DataLocale, global::System.Convert.ToString); + } + if (content.Contains("CreatedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Input = (System.Collections.Generic.List) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Input, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputTypeConverter.ConvertFrom)); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Output = (System.Collections.Generic.List) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Output, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputTypeConverter.ConvertFrom)); + } + if (content.Contains("Function")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Function = (System.Collections.Generic.List) content.GetValueForProperty("Function",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Function, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionTypeConverter.ConvertFrom)); + } + if (content.Contains("ContentStoragePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ContentStoragePolicy = (string) content.GetValueForProperty("ContentStoragePolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ContentStoragePolicy, global::System.Convert.ToString); + } + if (content.Contains("TransformationProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties) content.GetValueForProperty("TransformationProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TransformationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("JobStorageAccountAuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccountAuthenticationMode = (string) content.GetValueForProperty("JobStorageAccountAuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccountAuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ExternalStorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ExternalStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount) content.GetValueForProperty("ExternalStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ExternalStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("TransformationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationId = (string) content.GetValueForProperty("TransformationId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationId, global::System.Convert.ToString); + } + if (content.Contains("TransformationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationName = (string) content.GetValueForProperty("TransformationName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationName, global::System.Convert.ToString); + } + if (content.Contains("TransformationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationType = (string) content.GetValueForProperty("TransformationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationType, global::System.Convert.ToString); + } + if (content.Contains("TransformationETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationETag = (string) content.GetValueForProperty("TransformationETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationETag, global::System.Convert.ToString); + } + if (content.Contains("StreamingUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Query")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Query, global::System.Convert.ToString); + } + if (content.Contains("JobStorageAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccountName = (string) content.GetValueForProperty("JobStorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccountName, global::System.Convert.ToString); + } + if (content.Contains("JobStorageAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccountKey = (string) content.GetValueForProperty("JobStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccountKey, global::System.Convert.ToString); + } + if (content.Contains("ExternalContainer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ExternalContainer = (string) content.GetValueForProperty("ExternalContainer",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ExternalContainer, global::System.Convert.ToString); + } + if (content.Contains("ExternalPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ExternalPath = (string) content.GetValueForProperty("ExternalPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ExternalPath, global::System.Convert.ToString); + } + if (content.Contains("ClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ClusterId, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).StorageAccountName = (string) content.GetValueForProperty("StorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).StorageAccountName, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).StorageAccountKey = (string) content.GetValueForProperty("StorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).StorageAccountKey, 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 StreamingJob(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IdentityTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ETag, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Transformation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Transformation = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation) content.GetValueForProperty("Transformation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Transformation, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TransformationTypeConverter.ConvertFrom); + } + if (content.Contains("JobType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobType = (string) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobType, global::System.Convert.ToString); + } + if (content.Contains("CompatibilityLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).CompatibilityLevel = (string) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).CompatibilityLevel, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobSkuTypeConverter.ConvertFrom); + } + if (content.Contains("JobStorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount) content.GetValueForProperty("JobStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JobStorageAccountTypeConverter.ConvertFrom); + } + if (content.Contains("External")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).External = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal) content.GetValueForProperty("External",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).External, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ExternalTypeConverter.ConvertFrom); + } + if (content.Contains("Cluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterInfoTypeConverter.ConvertFrom); + } + if (content.Contains("JobId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobId = (string) content.GetValueForProperty("JobId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("JobState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobState = (string) content.GetValueForProperty("JobState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobState, global::System.Convert.ToString); + } + if (content.Contains("OutputStartMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).OutputStartMode = (string) content.GetValueForProperty("OutputStartMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).OutputStartMode, global::System.Convert.ToString); + } + if (content.Contains("OutputStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).OutputStartTime = (global::System.DateTime?) content.GetValueForProperty("OutputStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).OutputStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastOutputEventTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).LastOutputEventTime = (global::System.DateTime?) content.GetValueForProperty("LastOutputEventTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).LastOutputEventTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EventsOutOfOrderPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).EventsOutOfOrderPolicy = (string) content.GetValueForProperty("EventsOutOfOrderPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).EventsOutOfOrderPolicy, global::System.Convert.ToString); + } + if (content.Contains("OutputErrorPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).OutputErrorPolicy = (string) content.GetValueForProperty("OutputErrorPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).OutputErrorPolicy, global::System.Convert.ToString); + } + if (content.Contains("EventsOutOfOrderMaxDelayInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).EventsOutOfOrderMaxDelayInSecond = (int?) content.GetValueForProperty("EventsOutOfOrderMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).EventsOutOfOrderMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EventsLateArrivalMaxDelayInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).EventsLateArrivalMaxDelayInSecond = (int?) content.GetValueForProperty("EventsLateArrivalMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).EventsLateArrivalMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataLocale")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).DataLocale = (string) content.GetValueForProperty("DataLocale",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).DataLocale, global::System.Convert.ToString); + } + if (content.Contains("CreatedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Input = (System.Collections.Generic.List) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Input, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputTypeConverter.ConvertFrom)); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Output = (System.Collections.Generic.List) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Output, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputTypeConverter.ConvertFrom)); + } + if (content.Contains("Function")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Function = (System.Collections.Generic.List) content.GetValueForProperty("Function",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Function, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionTypeConverter.ConvertFrom)); + } + if (content.Contains("ContentStoragePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ContentStoragePolicy = (string) content.GetValueForProperty("ContentStoragePolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ContentStoragePolicy, global::System.Convert.ToString); + } + if (content.Contains("TransformationProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties) content.GetValueForProperty("TransformationProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TransformationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("JobStorageAccountAuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccountAuthenticationMode = (string) content.GetValueForProperty("JobStorageAccountAuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccountAuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ExternalStorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ExternalStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount) content.GetValueForProperty("ExternalStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ExternalStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("TransformationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationId = (string) content.GetValueForProperty("TransformationId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationId, global::System.Convert.ToString); + } + if (content.Contains("TransformationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationName = (string) content.GetValueForProperty("TransformationName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationName, global::System.Convert.ToString); + } + if (content.Contains("TransformationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationType = (string) content.GetValueForProperty("TransformationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationType, global::System.Convert.ToString); + } + if (content.Contains("TransformationETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationETag = (string) content.GetValueForProperty("TransformationETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationETag, global::System.Convert.ToString); + } + if (content.Contains("StreamingUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Query")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).Query, global::System.Convert.ToString); + } + if (content.Contains("JobStorageAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccountName = (string) content.GetValueForProperty("JobStorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccountName, global::System.Convert.ToString); + } + if (content.Contains("JobStorageAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccountKey = (string) content.GetValueForProperty("JobStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).JobStorageAccountKey, global::System.Convert.ToString); + } + if (content.Contains("ExternalContainer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ExternalContainer = (string) content.GetValueForProperty("ExternalContainer",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ExternalContainer, global::System.Convert.ToString); + } + if (content.Contains("ExternalPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ExternalPath = (string) content.GetValueForProperty("ExternalPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ExternalPath, global::System.Convert.ToString); + } + if (content.Contains("ClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ClusterId, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).StorageAccountName = (string) content.GetValueForProperty("StorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).StorageAccountName, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).StorageAccountKey = (string) content.GetValueForProperty("StorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).StorageAccountKey, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// A streaming job object, containing all information associated with the named streaming job. + [System.ComponentModel.TypeConverter(typeof(StreamingJobTypeConverter))] + public partial interface IStreamingJob + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJob.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJob.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJob.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJob.TypeConverter.cs index 6ef53feabdd7..cf2da9be557d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJob.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJob.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJob.cs new file mode 100644 index 000000000000..f01d8ffa4845 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJob.cs @@ -0,0 +1,1017 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// A streaming job object, containing all information associated with the named streaming job. + /// + public partial class StreamingJob : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResource(); + + /// The resource id of cluster. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).ClusterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).ClusterId = value ?? null; } + + /// Controls certain runtime behaviors of the streaming job. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string CompatibilityLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).CompatibilityLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).CompatibilityLevel = value ?? null; } + + /// + /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify + /// jobStorageAccount property. . + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ContentStoragePolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).ContentStoragePolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).ContentStoragePolicy = value ?? null; } + + /// + /// Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public global::System.DateTime? CreatedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).CreatedDate; } + + /// + /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. + /// Defaults to 'en-US' if none specified. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string DataLocale { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).DataLocale; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).DataLocale = value ?? null; } + + /// Backing field for property. + private string _eTag; + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string ETag { get => this._eTag; set => this._eTag = value; } + + /// + /// The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 + /// (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a + /// value of -1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public int? EventsLateArrivalMaxDelayInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).EventsLateArrivalMaxDelayInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).EventsLateArrivalMaxDelayInSecond = value ?? default(int); } + + /// + /// The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public int? EventsOutOfOrderMaxDelayInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).EventsOutOfOrderMaxDelayInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).EventsOutOfOrderMaxDelayInSecond = value ?? default(int); } + + /// + /// Indicates the policy to apply to events that arrive out of order in the input event stream. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string EventsOutOfOrderPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).EventsOutOfOrderPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).EventsOutOfOrderPolicy = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ExternalContainer { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).ExternalContainer; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).ExternalContainer = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ExternalPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).ExternalPath; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).ExternalPath = value ?? null; } + + /// + /// A list of one or more functions for the streaming job. The name property for each function is required when specifying + /// this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available + /// for the individual transformation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Function { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).Function; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).Function = value ?? null /* arrayOf */; } + + /// + /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Id; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentity _identity; + + /// + /// Describes the system-assigned managed identity assigned to this job that can be used to authenticate with inputs and outputs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Identity()); set => this._identity = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)Identity).PrincipalId = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)Identity).TenantId = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentityInternal)Identity).Type = value ?? null; } + + /// + /// A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property + /// in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual + /// input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Input { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).Input; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).Input = value ?? null /* arrayOf */; } + + /// + /// A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string JobId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobId; } + + /// Describes the state of the streaming job. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string JobState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobState; } + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string JobStorageAccountAuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobStorageAccountAuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobStorageAccountAuthenticationMode = value ?? null; } + + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string JobStorageAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobStorageAccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobStorageAccountKey = value ?? null; } + + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string JobStorageAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobStorageAccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobStorageAccountName = value ?? null; } + + /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string JobType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobType = value ?? null; } + + /// + /// Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating + /// that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in + /// that set. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public global::System.DateTime? LastOutputEventTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).LastOutputEventTime; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)__trackedResource).Location = value ?? null; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Name = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Type = value ?? null; } + + /// Internal Acessors for Cluster + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.Cluster { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).Cluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).Cluster = value ?? null /* model class */; } + + /// Internal Acessors for CreatedDate + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.CreatedDate { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).CreatedDate; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).CreatedDate = value ?? default(global::System.DateTime); } + + /// Internal Acessors for External + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.External { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).External; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).External = value ?? null /* model class */; } + + /// Internal Acessors for ExternalStorageAccount + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.ExternalStorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).ExternalStorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).ExternalStorageAccount = value ?? null /* model class */; } + + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentity Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Identity()); set { {_identity = value;} } } + + /// Internal Acessors for JobId + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.JobId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobId = value ?? null; } + + /// Internal Acessors for JobState + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.JobState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobState = value ?? null; } + + /// Internal Acessors for JobStorageAccount + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.JobStorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobStorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).JobStorageAccount = value ?? null /* model class */; } + + /// Internal Acessors for LastOutputEventTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.LastOutputEventTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).LastOutputEventTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).LastOutputEventTime = value ?? default(global::System.DateTime); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for Sku + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).Sku = value ?? null /* model class */; } + + /// Internal Acessors for Transformation + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.Transformation { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).Transformation; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).Transformation = value ?? null /* model class */; } + + /// Internal Acessors for TransformationId + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.TransformationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).TransformationId; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).TransformationId = value ?? null; } + + /// Internal Acessors for TransformationName + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.TransformationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).TransformationName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).TransformationName = value ?? null; } + + /// Internal Acessors for TransformationProperty + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.TransformationProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).TransformationProperty; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).TransformationProperty = value ?? null /* model class */; } + + /// Internal Acessors for TransformationType + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal.TransformationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).TransformationType; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).TransformationType = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Name; } + + /// + /// A list of one or more outputs for the streaming job. The name property for each output is required when specifying this + /// property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available + /// for the individual output. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Output { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).Output; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).Output = value ?? null /* arrayOf */; } + + /// + /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to + /// being malformed (missing column values, column values of wrong type or size). + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string OutputErrorPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).OutputErrorPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).OutputErrorPolicy = value ?? null; } + + /// + /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may + /// be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream + /// should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, + /// or start from the last event output time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string OutputStartMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).OutputStartMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).OutputStartMode = value ?? null; } + + /// + /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null + /// to indicate that the output event stream will start whenever the streaming job is started. This property must have a value + /// if outputStartMode is set to CustomTime. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public global::System.DateTime? OutputStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).OutputStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).OutputStartTime = value ?? default(global::System.DateTime); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobProperties _property; + + /// + /// The properties that are associated with a streaming job. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobProperties()); set => this._property = value; } + + /// Describes the provisioning status of the streaming job. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).ProvisioningState; } + + /// + /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language + /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Query { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).Query; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).Query = value ?? null; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 name of the SKU. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).SkuName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).SkuName = value ?? null; } + + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string StorageAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).StorageAccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).StorageAccountKey = value ?? null; } + + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string StorageAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).StorageAccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).StorageAccountName = value ?? null; } + + /// Specifies the number of streaming units that the streaming job uses. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public int? StreamingUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).StreamingUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).StreamingUnit = value ?? default(int); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string TransformationETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).TransformationETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).TransformationETag = value ?? null; } + + /// Resource Id + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string TransformationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).TransformationId; } + + /// Resource name + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string TransformationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).TransformationName; } + + /// Resource type + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string TransformationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)Property).TransformationType; } + + /// + /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__trackedResource).Type; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("ETag", out var __eTagHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).ETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader0) is string __headerETagHeader0 ? __headerETagHeader0 : (string)null; + } + if (headers.TryGetValues("ETag", out var __eTagHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobInternal)this).TransformationETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader1) is string __headerETagHeader1 ? __headerETagHeader1 : (string)null; + } + } + + /// Creates an new instance. + public StreamingJob() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// A streaming job object, containing all information associated with the named streaming job. + public partial interface IStreamingJob : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResource + { + /// The resource id of cluster. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The resource id of cluster.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ClusterId { get; set; } + /// Controls certain runtime behaviors of the streaming job. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Controls certain runtime behaviors of the streaming job.", + SerializedName = @"compatibilityLevel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("1.0")] + string CompatibilityLevel { get; set; } + /// + /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify + /// jobStorageAccount property. . + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. .", + SerializedName = @"contentStoragePolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("SystemAccount", "JobStorageAccount")] + string ContentStoragePolicy { get; set; } + /// + /// Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created.", + SerializedName = @"createdDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedDate { get; } + /// + /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. + /// Defaults to 'en-US' if none specified. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to 'en-US' if none specified.", + SerializedName = @"dataLocale", + PossibleTypes = new [] { typeof(string) })] + string DataLocale { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"ETag", + PossibleTypes = new [] { typeof(string) })] + string ETag { get; set; } + /// + /// The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 + /// (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a + /// value of -1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a value of -1.", + SerializedName = @"eventsLateArrivalMaxDelayInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? EventsLateArrivalMaxDelayInSecond { get; set; } + /// + /// The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order.", + SerializedName = @"eventsOutOfOrderMaxDelayInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? EventsOutOfOrderMaxDelayInSecond { get; set; } + /// + /// Indicates the policy to apply to events that arrive out of order in the input event stream. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates the policy to apply to events that arrive out of order in the input event stream.", + SerializedName = @"eventsOutOfOrderPolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Adjust", "Drop")] + string EventsOutOfOrderPolicy { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"container", + PossibleTypes = new [] { typeof(string) })] + string ExternalContainer { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"path", + PossibleTypes = new [] { typeof(string) })] + string ExternalPath { get; set; } + /// + /// A list of one or more functions for the streaming job. The name property for each function is required when specifying + /// this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available + /// for the individual transformation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of one or more functions for the streaming job. The name property for each function is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual transformation.", + SerializedName = @"functions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) })] + System.Collections.Generic.List Function { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string IdentityPrincipalId { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string IdentityTenantId { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string IdentityType { get; set; } + /// + /// A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property + /// in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual + /// input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual input.", + SerializedName = @"inputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) })] + System.Collections.Generic.List Input { get; set; } + /// + /// A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job.", + SerializedName = @"jobId", + PossibleTypes = new [] { typeof(string) })] + string JobId { get; } + /// Describes the state of the streaming job. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Describes the state of the streaming job.", + SerializedName = @"jobState", + PossibleTypes = new [] { typeof(string) })] + string JobState { get; } + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Authentication Mode.", + SerializedName = @"authenticationMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string JobStorageAccountAuthenticationMode { get; set; } + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"accountKey", + PossibleTypes = new [] { typeof(string) })] + string JobStorageAccountKey { get; set; } + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"accountName", + PossibleTypes = new [] { typeof(string) })] + string JobStorageAccountName { get; set; } + /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Describes the type of the job. Valid modes are `Cloud` and 'Edge'.", + SerializedName = @"jobType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Cloud", "Edge")] + string JobType { get; set; } + /// + /// Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating + /// that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in + /// that set. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in that set.", + SerializedName = @"lastOutputEventTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastOutputEventTime { get; } + /// + /// A list of one or more outputs for the streaming job. The name property for each output is required when specifying this + /// property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available + /// for the individual output. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output.", + SerializedName = @"outputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) })] + System.Collections.Generic.List Output { get; set; } + /// + /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to + /// being malformed (missing column values, column values of wrong type or size). + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size).", + SerializedName = @"outputErrorPolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Stop", "Drop")] + string OutputErrorPolicy { get; set; } + /// + /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may + /// be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream + /// should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, + /// or start from the last event output time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"This property should only be utilized when it is desired that the job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time.", + SerializedName = @"outputStartMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] + string OutputStartMode { get; set; } + /// + /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null + /// to indicate that the output event stream will start whenever the streaming job is started. This property must have a value + /// if outputStartMode is set to CustomTime. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. This property must have a value if outputStartMode is set to CustomTime.", + SerializedName = @"outputStartTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OutputStartTime { get; set; } + /// Describes the provisioning status of the streaming job. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Describes the provisioning status of the streaming job.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// + /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language + /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests.", + SerializedName = @"query", + PossibleTypes = new [] { typeof(string) })] + string Query { get; set; } + /// The name of the SKU. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the SKU. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Standard")] + string SkuName { get; set; } + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"accountKey", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountKey { get; set; } + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"accountName", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountName { get; set; } + /// Specifies the number of streaming units that the streaming job uses. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of streaming units that the streaming job uses.", + SerializedName = @"streamingUnits", + PossibleTypes = new [] { typeof(int) })] + int? StreamingUnit { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"ETag", + PossibleTypes = new [] { typeof(string) })] + string TransformationETag { get; set; } + /// Resource Id + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Resource Id", + SerializedName = @"ResourceGroupName", + PossibleTypes = new [] { typeof(string) })] + string TransformationId { get; } + /// Resource name + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Resource name", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string TransformationName { get; } + /// Resource type + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Resource type", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string TransformationType { get; } + + } + /// A streaming job object, containing all information associated with the named streaming job. + internal partial interface IStreamingJobInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal + { + /// The cluster which streaming jobs will run on. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo Cluster { get; set; } + /// The resource id of cluster. + string ClusterId { get; set; } + /// Controls certain runtime behaviors of the streaming job. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("1.0")] + string CompatibilityLevel { get; set; } + /// + /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify + /// jobStorageAccount property. . + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("SystemAccount", "JobStorageAccount")] + string ContentStoragePolicy { get; set; } + /// + /// Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created. + /// + global::System.DateTime? CreatedDate { get; set; } + /// + /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. + /// Defaults to 'en-US' if none specified. + /// + string DataLocale { get; set; } + + string ETag { get; set; } + /// + /// The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 + /// (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a + /// value of -1. + /// + int? EventsLateArrivalMaxDelayInSecond { get; set; } + /// + /// The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. + /// + int? EventsOutOfOrderMaxDelayInSecond { get; set; } + /// + /// Indicates the policy to apply to events that arrive out of order in the input event stream. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Adjust", "Drop")] + string EventsOutOfOrderPolicy { get; set; } + /// The storage account where the custom code artifacts are located. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal External { get; set; } + + string ExternalContainer { get; set; } + + string ExternalPath { get; set; } + /// The properties that are associated with an Azure Storage account + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount ExternalStorageAccount { get; set; } + /// + /// A list of one or more functions for the streaming job. The name property for each function is required when specifying + /// this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available + /// for the individual transformation. + /// + System.Collections.Generic.List Function { get; set; } + /// + /// Describes the system-assigned managed identity assigned to this job that can be used to authenticate with inputs and outputs. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IIdentity Identity { get; set; } + + string IdentityPrincipalId { get; set; } + + string IdentityTenantId { get; set; } + + string IdentityType { get; set; } + /// + /// A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property + /// in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual + /// input. + /// + System.Collections.Generic.List Input { get; set; } + /// + /// A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job. + /// + string JobId { get; set; } + /// Describes the state of the streaming job. + string JobState { get; set; } + /// The properties that are associated with an Azure Storage account with MSI + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount JobStorageAccount { get; set; } + /// Authentication Mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string JobStorageAccountAuthenticationMode { get; set; } + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + string JobStorageAccountKey { get; set; } + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + string JobStorageAccountName { get; set; } + /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Cloud", "Edge")] + string JobType { get; set; } + /// + /// Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating + /// that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in + /// that set. + /// + global::System.DateTime? LastOutputEventTime { get; set; } + /// + /// A list of one or more outputs for the streaming job. The name property for each output is required when specifying this + /// property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available + /// for the individual output. + /// + System.Collections.Generic.List Output { get; set; } + /// + /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to + /// being malformed (missing column values, column values of wrong type or size). + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Stop", "Drop")] + string OutputErrorPolicy { get; set; } + /// + /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may + /// be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream + /// should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, + /// or start from the last event output time. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] + string OutputStartMode { get; set; } + /// + /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null + /// to indicate that the output event stream will start whenever the streaming job is started. This property must have a value + /// if outputStartMode is set to CustomTime. + /// + global::System.DateTime? OutputStartTime { get; set; } + /// + /// The properties that are associated with a streaming job. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobProperties Property { get; set; } + /// Describes the provisioning status of the streaming job. + string ProvisioningState { get; set; } + /// + /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language + /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. + /// + string Query { get; set; } + /// + /// Describes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku Sku { get; set; } + /// The name of the SKU. Required on PUT (CreateOrReplace) requests. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Standard")] + string SkuName { get; set; } + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + string StorageAccountKey { get; set; } + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + string StorageAccountName { get; set; } + /// Specifies the number of streaming units that the streaming job uses. + int? StreamingUnit { get; set; } + /// + /// Indicates the query and the number of streaming units to use for the streaming job. The name property of the transformation + /// is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You + /// must use the PATCH API available for the individual transformation. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation Transformation { get; set; } + + string TransformationETag { get; set; } + /// Resource Id + string TransformationId { get; set; } + /// Resource name + string TransformationName { get; set; } + /// + /// The properties that are associated with a transformation. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties TransformationProperty { get; set; } + /// Resource type + string TransformationType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJob.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJob.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJob.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJob.json.cs index bb0c2dda378e..e111c953fb60 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJob.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJob.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class StreamingJob partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new StreamingJob(json) : null; } @@ -79,9 +79,9 @@ internal StreamingJob(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime { return; } - __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.TrackedResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobProperties.FromJson(__jsonProperties) : Property;} - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Identity.FromJson(__jsonIdentity) : Identity;} + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobProperties.FromJson(__jsonProperties) : _property;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Identity.FromJson(__jsonIdentity) : _identity;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobListResult.PowerShell.cs new file mode 100644 index 000000000000..55afc76256f8 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Object containing a list of streaming jobs. + [System.ComponentModel.TypeConverter(typeof(StreamingJobListResultTypeConverter))] + public partial class StreamingJobListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StreamingJobListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StreamingJobListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StreamingJobListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResultInternal)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 StreamingJobListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Object containing a list of streaming jobs. + [System.ComponentModel.TypeConverter(typeof(StreamingJobListResultTypeConverter))] + public partial interface IStreamingJobListResult + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobListResult.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobListResult.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobListResult.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobListResult.TypeConverter.cs index 1884d1ed4443..746db37f91d8 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobListResult.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobListResult.cs new file mode 100644 index 000000000000..87f5cb6c2d9e --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Object containing a list of streaming jobs. + public partial class StreamingJobListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResult, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The link (url) to the next page of results. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// A list of streaming jobs. Populated by a 'List' operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public StreamingJobListResult() + { + + } + } + /// Object containing a list of streaming jobs. + public partial interface IStreamingJobListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// The link (url) to the next page of results. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The link (url) to the next page of results.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// A list of streaming jobs. Populated by a 'List' operation. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list of streaming jobs. Populated by a 'List' operation.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob) })] + System.Collections.Generic.List Value { get; } + + } + /// Object containing a list of streaming jobs. + internal partial interface IStreamingJobListResultInternal + + { + /// The link (url) to the next page of results. + string NextLink { get; set; } + /// A list of streaming jobs. Populated by a 'List' operation. + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobListResult.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobListResult.json.cs similarity index 91% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobListResult.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobListResult.json.cs index cdc8f698f2e4..7c7c0f645c0d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobListResult.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class StreamingJobListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new StreamingJobListResult(json) : null; } @@ -77,8 +77,8 @@ internal StreamingJobListResult(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalyti { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJob.FromJson(__u) )) ))() : null : Value;} - {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJob.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { @@ -113,7 +113,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode container.Add("value",__w); } } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobProperties.PowerShell.cs new file mode 100644 index 000000000000..14b22fc49c49 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobProperties.PowerShell.cs @@ -0,0 +1,476 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with a streaming job. + [System.ComponentModel.TypeConverter(typeof(StreamingJobPropertiesTypeConverter))] + public partial class StreamingJobProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new StreamingJobProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new StreamingJobProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal StreamingJobProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobSkuTypeConverter.ConvertFrom); + } + if (content.Contains("Transformation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Transformation = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation) content.GetValueForProperty("Transformation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Transformation, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TransformationTypeConverter.ConvertFrom); + } + if (content.Contains("JobStorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount) content.GetValueForProperty("JobStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JobStorageAccountTypeConverter.ConvertFrom); + } + if (content.Contains("External")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).External = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal) content.GetValueForProperty("External",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).External, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ExternalTypeConverter.ConvertFrom); + } + if (content.Contains("Cluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterInfoTypeConverter.ConvertFrom); + } + if (content.Contains("JobId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobId = (string) content.GetValueForProperty("JobId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("JobState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobState = (string) content.GetValueForProperty("JobState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobState, global::System.Convert.ToString); + } + if (content.Contains("JobType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobType = (string) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobType, global::System.Convert.ToString); + } + if (content.Contains("OutputStartMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).OutputStartMode = (string) content.GetValueForProperty("OutputStartMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).OutputStartMode, global::System.Convert.ToString); + } + if (content.Contains("OutputStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).OutputStartTime = (global::System.DateTime?) content.GetValueForProperty("OutputStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).OutputStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastOutputEventTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).LastOutputEventTime = (global::System.DateTime?) content.GetValueForProperty("LastOutputEventTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).LastOutputEventTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EventsOutOfOrderPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).EventsOutOfOrderPolicy = (string) content.GetValueForProperty("EventsOutOfOrderPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).EventsOutOfOrderPolicy, global::System.Convert.ToString); + } + if (content.Contains("OutputErrorPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).OutputErrorPolicy = (string) content.GetValueForProperty("OutputErrorPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).OutputErrorPolicy, global::System.Convert.ToString); + } + if (content.Contains("EventsOutOfOrderMaxDelayInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).EventsOutOfOrderMaxDelayInSecond = (int?) content.GetValueForProperty("EventsOutOfOrderMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).EventsOutOfOrderMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EventsLateArrivalMaxDelayInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).EventsLateArrivalMaxDelayInSecond = (int?) content.GetValueForProperty("EventsLateArrivalMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).EventsLateArrivalMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataLocale")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).DataLocale = (string) content.GetValueForProperty("DataLocale",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).DataLocale, global::System.Convert.ToString); + } + if (content.Contains("CompatibilityLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).CompatibilityLevel = (string) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).CompatibilityLevel, global::System.Convert.ToString); + } + if (content.Contains("CreatedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Input = (System.Collections.Generic.List) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Input, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputTypeConverter.ConvertFrom)); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Output = (System.Collections.Generic.List) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Output, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputTypeConverter.ConvertFrom)); + } + if (content.Contains("Function")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Function = (System.Collections.Generic.List) content.GetValueForProperty("Function",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Function, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionTypeConverter.ConvertFrom)); + } + if (content.Contains("ContentStoragePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ContentStoragePolicy = (string) content.GetValueForProperty("ContentStoragePolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ContentStoragePolicy, global::System.Convert.ToString); + } + if (content.Contains("TransformationProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties) content.GetValueForProperty("TransformationProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TransformationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("JobStorageAccountAuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccountAuthenticationMode = (string) content.GetValueForProperty("JobStorageAccountAuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccountAuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ExternalStorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ExternalStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount) content.GetValueForProperty("ExternalStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ExternalStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("TransformationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationId = (string) content.GetValueForProperty("TransformationId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationId, global::System.Convert.ToString); + } + if (content.Contains("TransformationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationName = (string) content.GetValueForProperty("TransformationName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationName, global::System.Convert.ToString); + } + if (content.Contains("TransformationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationType = (string) content.GetValueForProperty("TransformationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationType, global::System.Convert.ToString); + } + if (content.Contains("TransformationETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationETag = (string) content.GetValueForProperty("TransformationETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationETag, global::System.Convert.ToString); + } + if (content.Contains("StreamingUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Query")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Query, global::System.Convert.ToString); + } + if (content.Contains("JobStorageAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccountName = (string) content.GetValueForProperty("JobStorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccountName, global::System.Convert.ToString); + } + if (content.Contains("JobStorageAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccountKey = (string) content.GetValueForProperty("JobStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccountKey, global::System.Convert.ToString); + } + if (content.Contains("ExternalContainer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ExternalContainer = (string) content.GetValueForProperty("ExternalContainer",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ExternalContainer, global::System.Convert.ToString); + } + if (content.Contains("ExternalPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ExternalPath = (string) content.GetValueForProperty("ExternalPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ExternalPath, global::System.Convert.ToString); + } + if (content.Contains("ClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ClusterId, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).StorageAccountName = (string) content.GetValueForProperty("StorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).StorageAccountName, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).StorageAccountKey = (string) content.GetValueForProperty("StorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).StorageAccountKey, 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 StreamingJobProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobSkuTypeConverter.ConvertFrom); + } + if (content.Contains("Transformation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Transformation = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation) content.GetValueForProperty("Transformation",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Transformation, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TransformationTypeConverter.ConvertFrom); + } + if (content.Contains("JobStorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount) content.GetValueForProperty("JobStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JobStorageAccountTypeConverter.ConvertFrom); + } + if (content.Contains("External")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).External = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal) content.GetValueForProperty("External",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).External, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ExternalTypeConverter.ConvertFrom); + } + if (content.Contains("Cluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Cluster = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo) content.GetValueForProperty("Cluster",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Cluster, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterInfoTypeConverter.ConvertFrom); + } + if (content.Contains("JobId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobId = (string) content.GetValueForProperty("JobId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("JobState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobState = (string) content.GetValueForProperty("JobState",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobState, global::System.Convert.ToString); + } + if (content.Contains("JobType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobType = (string) content.GetValueForProperty("JobType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobType, global::System.Convert.ToString); + } + if (content.Contains("OutputStartMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).OutputStartMode = (string) content.GetValueForProperty("OutputStartMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).OutputStartMode, global::System.Convert.ToString); + } + if (content.Contains("OutputStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).OutputStartTime = (global::System.DateTime?) content.GetValueForProperty("OutputStartTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).OutputStartTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastOutputEventTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).LastOutputEventTime = (global::System.DateTime?) content.GetValueForProperty("LastOutputEventTime",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).LastOutputEventTime, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("EventsOutOfOrderPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).EventsOutOfOrderPolicy = (string) content.GetValueForProperty("EventsOutOfOrderPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).EventsOutOfOrderPolicy, global::System.Convert.ToString); + } + if (content.Contains("OutputErrorPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).OutputErrorPolicy = (string) content.GetValueForProperty("OutputErrorPolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).OutputErrorPolicy, global::System.Convert.ToString); + } + if (content.Contains("EventsOutOfOrderMaxDelayInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).EventsOutOfOrderMaxDelayInSecond = (int?) content.GetValueForProperty("EventsOutOfOrderMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).EventsOutOfOrderMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EventsLateArrivalMaxDelayInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).EventsLateArrivalMaxDelayInSecond = (int?) content.GetValueForProperty("EventsLateArrivalMaxDelayInSecond",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).EventsLateArrivalMaxDelayInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataLocale")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).DataLocale = (string) content.GetValueForProperty("DataLocale",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).DataLocale, global::System.Convert.ToString); + } + if (content.Contains("CompatibilityLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).CompatibilityLevel = (string) content.GetValueForProperty("CompatibilityLevel",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).CompatibilityLevel, global::System.Convert.ToString); + } + if (content.Contains("CreatedDate")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).CreatedDate = (global::System.DateTime?) content.GetValueForProperty("CreatedDate",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).CreatedDate, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Input")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Input = (System.Collections.Generic.List) content.GetValueForProperty("Input",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Input, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputTypeConverter.ConvertFrom)); + } + if (content.Contains("Output")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Output = (System.Collections.Generic.List) content.GetValueForProperty("Output",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Output, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputTypeConverter.ConvertFrom)); + } + if (content.Contains("Function")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Function = (System.Collections.Generic.List) content.GetValueForProperty("Function",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Function, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionTypeConverter.ConvertFrom)); + } + if (content.Contains("ContentStoragePolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ContentStoragePolicy = (string) content.GetValueForProperty("ContentStoragePolicy",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ContentStoragePolicy, global::System.Convert.ToString); + } + if (content.Contains("TransformationProperty")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationProperty = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties) content.GetValueForProperty("TransformationProperty",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationProperty, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TransformationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("JobStorageAccountAuthenticationMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccountAuthenticationMode = (string) content.GetValueForProperty("JobStorageAccountAuthenticationMode",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccountAuthenticationMode, global::System.Convert.ToString); + } + if (content.Contains("ExternalStorageAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ExternalStorageAccount = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount) content.GetValueForProperty("ExternalStorageAccount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ExternalStorageAccount, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StorageAccountTypeConverter.ConvertFrom); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).SkuName = (string) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).SkuName, global::System.Convert.ToString); + } + if (content.Contains("TransformationId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationId = (string) content.GetValueForProperty("TransformationId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationId, global::System.Convert.ToString); + } + if (content.Contains("TransformationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationName = (string) content.GetValueForProperty("TransformationName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationName, global::System.Convert.ToString); + } + if (content.Contains("TransformationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationType = (string) content.GetValueForProperty("TransformationType",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationType, global::System.Convert.ToString); + } + if (content.Contains("TransformationETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationETag = (string) content.GetValueForProperty("TransformationETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationETag, global::System.Convert.ToString); + } + if (content.Contains("StreamingUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Query")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).Query, global::System.Convert.ToString); + } + if (content.Contains("JobStorageAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccountName = (string) content.GetValueForProperty("JobStorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccountName, global::System.Convert.ToString); + } + if (content.Contains("JobStorageAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccountKey = (string) content.GetValueForProperty("JobStorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).JobStorageAccountKey, global::System.Convert.ToString); + } + if (content.Contains("ExternalContainer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ExternalContainer = (string) content.GetValueForProperty("ExternalContainer",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ExternalContainer, global::System.Convert.ToString); + } + if (content.Contains("ExternalPath")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ExternalPath = (string) content.GetValueForProperty("ExternalPath",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ExternalPath, global::System.Convert.ToString); + } + if (content.Contains("ClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ClusterId = (string) content.GetValueForProperty("ClusterId",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).ClusterId, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).StorageAccountName = (string) content.GetValueForProperty("StorageAccountName",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).StorageAccountName, global::System.Convert.ToString); + } + if (content.Contains("StorageAccountKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).StorageAccountKey = (string) content.GetValueForProperty("StorageAccountKey",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).StorageAccountKey, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with a streaming job. + [System.ComponentModel.TypeConverter(typeof(StreamingJobPropertiesTypeConverter))] + public partial interface IStreamingJobProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobProperties.TypeConverter.cs index a19ca796e6ac..0ec88de560ec 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobProperties.cs new file mode 100644 index 000000000000..fe35f92a77a7 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobProperties.cs @@ -0,0 +1,951 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with a streaming job. + public partial class StreamingJobProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo _cluster; + + /// The cluster which streaming jobs will run on. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo Cluster { get => (this._cluster = this._cluster ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterInfo()); set => this._cluster = value; } + + /// The resource id of cluster. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfoInternal)Cluster).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfoInternal)Cluster).Id = value ?? null; } + + /// Backing field for property. + private string _compatibilityLevel; + + /// Controls certain runtime behaviors of the streaming job. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string CompatibilityLevel { get => this._compatibilityLevel; set => this._compatibilityLevel = value; } + + /// Backing field for property. + private string _contentStoragePolicy; + + /// + /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify + /// jobStorageAccount property. . + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string ContentStoragePolicy { get => this._contentStoragePolicy; set => this._contentStoragePolicy = value; } + + /// Backing field for property. + private global::System.DateTime? _createdDate; + + /// + /// Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public global::System.DateTime? CreatedDate { get => this._createdDate; } + + /// Backing field for property. + private string _dataLocale; + + /// + /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. + /// Defaults to 'en-US' if none specified. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string DataLocale { get => this._dataLocale; set => this._dataLocale = value; } + + /// Backing field for property. + private int? _eventsLateArrivalMaxDelayInSecond; + + /// + /// The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 + /// (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a + /// value of -1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public int? EventsLateArrivalMaxDelayInSecond { get => this._eventsLateArrivalMaxDelayInSecond; set => this._eventsLateArrivalMaxDelayInSecond = value; } + + /// Backing field for property. + private int? _eventsOutOfOrderMaxDelayInSecond; + + /// + /// The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public int? EventsOutOfOrderMaxDelayInSecond { get => this._eventsOutOfOrderMaxDelayInSecond; set => this._eventsOutOfOrderMaxDelayInSecond = value; } + + /// Backing field for property. + private string _eventsOutOfOrderPolicy; + + /// + /// Indicates the policy to apply to events that arrive out of order in the input event stream. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string EventsOutOfOrderPolicy { get => this._eventsOutOfOrderPolicy; set => this._eventsOutOfOrderPolicy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal _external; + + /// The storage account where the custom code artifacts are located. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal External { get => (this._external = this._external ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.External()); set => this._external = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ExternalContainer { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)External).Container; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)External).Container = value ?? null; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string ExternalPath { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)External).Path; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)External).Path = value ?? null; } + + /// Backing field for property. + private System.Collections.Generic.List _function; + + /// + /// A list of one or more functions for the streaming job. The name property for each function is required when specifying + /// this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available + /// for the individual transformation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List Function { get => this._function; set => this._function = value; } + + /// Backing field for property. + private System.Collections.Generic.List _input; + + /// + /// A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property + /// in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual + /// input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List Input { get => this._input; set => this._input = value; } + + /// Backing field for property. + private string _jobId; + + /// + /// A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string JobId { get => this._jobId; } + + /// Backing field for property. + private string _jobState; + + /// Describes the state of the streaming job. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string JobState { get => this._jobState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount _jobStorageAccount; + + /// The properties that are associated with an Azure Storage account with MSI + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount JobStorageAccount { get => (this._jobStorageAccount = this._jobStorageAccount ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JobStorageAccount()); set => this._jobStorageAccount = value; } + + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string JobStorageAccountAuthenticationMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccountInternal)JobStorageAccount).AuthenticationMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccountInternal)JobStorageAccount).AuthenticationMode = value ?? null; } + + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string JobStorageAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)JobStorageAccount).AccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)JobStorageAccount).AccountKey = value ?? null; } + + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string JobStorageAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)JobStorageAccount).AccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccountInternal)JobStorageAccount).AccountName = value ?? null; } + + /// Backing field for property. + private string _jobType; + + /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string JobType { get => this._jobType; set => this._jobType = value; } + + /// Backing field for property. + private global::System.DateTime? _lastOutputEventTime; + + /// + /// Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating + /// that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in + /// that set. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public global::System.DateTime? LastOutputEventTime { get => this._lastOutputEventTime; } + + /// Internal Acessors for Cluster + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal.Cluster { get => (this._cluster = this._cluster ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterInfo()); set { {_cluster = value;} } } + + /// Internal Acessors for CreatedDate + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal.CreatedDate { get => this._createdDate; set { {_createdDate = value;} } } + + /// Internal Acessors for External + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal.External { get => (this._external = this._external ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.External()); set { {_external = value;} } } + + /// Internal Acessors for ExternalStorageAccount + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal.ExternalStorageAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)External).StorageAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)External).StorageAccount = value ?? null /* model class */; } + + /// Internal Acessors for JobId + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal.JobId { get => this._jobId; set { {_jobId = value;} } } + + /// Internal Acessors for JobState + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal.JobState { get => this._jobState; set { {_jobState = value;} } } + + /// Internal Acessors for JobStorageAccount + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal.JobStorageAccount { get => (this._jobStorageAccount = this._jobStorageAccount ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JobStorageAccount()); set { {_jobStorageAccount = value;} } } + + /// Internal Acessors for LastOutputEventTime + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal.LastOutputEventTime { get => this._lastOutputEventTime; set { {_lastOutputEventTime = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for Sku + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobSku()); set { {_sku = value;} } } + + /// Internal Acessors for Transformation + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal.Transformation { get => (this._transformation = this._transformation ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation()); set { {_transformation = value;} } } + + /// Internal Acessors for TransformationId + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal.TransformationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)Transformation).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)Transformation).Id = value ?? null; } + + /// Internal Acessors for TransformationName + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal.TransformationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)Transformation).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)Transformation).Name = value ?? null; } + + /// Internal Acessors for TransformationProperty + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal.TransformationProperty { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)Transformation).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)Transformation).Property = value ?? null /* model class */; } + + /// Internal Acessors for TransformationType + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal.TransformationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)Transformation).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)Transformation).Type = value ?? null; } + + /// Backing field for property. + private System.Collections.Generic.List _output; + + /// + /// A list of one or more outputs for the streaming job. The name property for each output is required when specifying this + /// property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available + /// for the individual output. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List Output { get => this._output; set => this._output = value; } + + /// Backing field for property. + private string _outputErrorPolicy; + + /// + /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to + /// being malformed (missing column values, column values of wrong type or size). + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string OutputErrorPolicy { get => this._outputErrorPolicy; set => this._outputErrorPolicy = value; } + + /// Backing field for property. + private string _outputStartMode; + + /// + /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may + /// be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream + /// should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, + /// or start from the last event output time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string OutputStartMode { get => this._outputStartMode; set => this._outputStartMode = value; } + + /// Backing field for property. + private global::System.DateTime? _outputStartTime; + + /// + /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null + /// to indicate that the output event stream will start whenever the streaming job is started. This property must have a value + /// if outputStartMode is set to CustomTime. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public global::System.DateTime? OutputStartTime { get => this._outputStartTime; set => this._outputStartTime = value; } + + /// Backing field for property. + private string _provisioningState; + + /// Describes the provisioning status of the streaming job. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// + /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language + /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Query { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)Transformation).Query; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)Transformation).Query = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku _sku; + + /// + /// Describes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobSku()); set => this._sku = value; } + + /// The name of the SKU. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSkuInternal)Sku).Name = value ?? null; } + + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string StorageAccountKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)External).StorageAccountKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)External).StorageAccountKey = value ?? null; } + + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string StorageAccountName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)External).StorageAccountName; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternalInternal)External).StorageAccountName = value ?? null; } + + /// Specifies the number of streaming units that the streaming job uses. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public int? StreamingUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)Transformation).StreamingUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)Transformation).StreamingUnit = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation _transformation; + + /// + /// Indicates the query and the number of streaming units to use for the streaming job. The name property of the transformation + /// is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You + /// must use the PATCH API available for the individual transformation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation Transformation { get => (this._transformation = this._transformation ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation()); set => this._transformation = value; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string TransformationETag { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)Transformation).ETag; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)Transformation).ETag = value ?? null; } + + /// Resource Id + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string TransformationId { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)Transformation).Id; } + + /// Resource name + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string TransformationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)Transformation).Name; } + + /// Resource type + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string TransformationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)Transformation).Type; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("ETag", out var __eTagHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobPropertiesInternal)this).TransformationETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader0) is string __headerETagHeader0 ? __headerETagHeader0 : (string)null; + } + } + + /// Creates an new instance. + public StreamingJobProperties() + { + + } + } + /// The properties that are associated with a streaming job. + public partial interface IStreamingJobProperties : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// The resource id of cluster. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The resource id of cluster.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string ClusterId { get; set; } + /// Controls certain runtime behaviors of the streaming job. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Controls certain runtime behaviors of the streaming job.", + SerializedName = @"compatibilityLevel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("1.0")] + string CompatibilityLevel { get; set; } + /// + /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify + /// jobStorageAccount property. . + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. .", + SerializedName = @"contentStoragePolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("SystemAccount", "JobStorageAccount")] + string ContentStoragePolicy { get; set; } + /// + /// Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created.", + SerializedName = @"createdDate", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedDate { get; } + /// + /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. + /// Defaults to 'en-US' if none specified. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to 'en-US' if none specified.", + SerializedName = @"dataLocale", + PossibleTypes = new [] { typeof(string) })] + string DataLocale { get; set; } + /// + /// The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 + /// (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a + /// value of -1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a value of -1.", + SerializedName = @"eventsLateArrivalMaxDelayInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? EventsLateArrivalMaxDelayInSecond { get; set; } + /// + /// The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order.", + SerializedName = @"eventsOutOfOrderMaxDelayInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? EventsOutOfOrderMaxDelayInSecond { get; set; } + /// + /// Indicates the policy to apply to events that arrive out of order in the input event stream. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates the policy to apply to events that arrive out of order in the input event stream.", + SerializedName = @"eventsOutOfOrderPolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Adjust", "Drop")] + string EventsOutOfOrderPolicy { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"container", + PossibleTypes = new [] { typeof(string) })] + string ExternalContainer { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"path", + PossibleTypes = new [] { typeof(string) })] + string ExternalPath { get; set; } + /// + /// A list of one or more functions for the streaming job. The name property for each function is required when specifying + /// this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available + /// for the individual transformation. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of one or more functions for the streaming job. The name property for each function is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual transformation.", + SerializedName = @"functions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) })] + System.Collections.Generic.List Function { get; set; } + /// + /// A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property + /// in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual + /// input. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual input.", + SerializedName = @"inputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) })] + System.Collections.Generic.List Input { get; set; } + /// + /// A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job.", + SerializedName = @"jobId", + PossibleTypes = new [] { typeof(string) })] + string JobId { get; } + /// Describes the state of the streaming job. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Describes the state of the streaming job.", + SerializedName = @"jobState", + PossibleTypes = new [] { typeof(string) })] + string JobState { get; } + /// Authentication Mode. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Authentication Mode.", + SerializedName = @"authenticationMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string JobStorageAccountAuthenticationMode { get; set; } + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"accountKey", + PossibleTypes = new [] { typeof(string) })] + string JobStorageAccountKey { get; set; } + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"accountName", + PossibleTypes = new [] { typeof(string) })] + string JobStorageAccountName { get; set; } + /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Describes the type of the job. Valid modes are `Cloud` and 'Edge'.", + SerializedName = @"jobType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Cloud", "Edge")] + string JobType { get; set; } + /// + /// Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating + /// that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in + /// that set. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in that set.", + SerializedName = @"lastOutputEventTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastOutputEventTime { get; } + /// + /// A list of one or more outputs for the streaming job. The name property for each output is required when specifying this + /// property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available + /// for the individual output. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output.", + SerializedName = @"outputs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) })] + System.Collections.Generic.List Output { get; set; } + /// + /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to + /// being malformed (missing column values, column values of wrong type or size). + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size).", + SerializedName = @"outputErrorPolicy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Stop", "Drop")] + string OutputErrorPolicy { get; set; } + /// + /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may + /// be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream + /// should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, + /// or start from the last event output time. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"This property should only be utilized when it is desired that the job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time.", + SerializedName = @"outputStartMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] + string OutputStartMode { get; set; } + /// + /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null + /// to indicate that the output event stream will start whenever the streaming job is started. This property must have a value + /// if outputStartMode is set to CustomTime. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. This property must have a value if outputStartMode is set to CustomTime.", + SerializedName = @"outputStartTime", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? OutputStartTime { get; set; } + /// Describes the provisioning status of the streaming job. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Describes the provisioning status of the streaming job.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// + /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language + /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests.", + SerializedName = @"query", + PossibleTypes = new [] { typeof(string) })] + string Query { get; set; } + /// The name of the SKU. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the SKU. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Standard")] + string SkuName { get; set; } + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"accountKey", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountKey { get; set; } + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"accountName", + PossibleTypes = new [] { typeof(string) })] + string StorageAccountName { get; set; } + /// Specifies the number of streaming units that the streaming job uses. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of streaming units that the streaming job uses.", + SerializedName = @"streamingUnits", + PossibleTypes = new [] { typeof(int) })] + int? StreamingUnit { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"ETag", + PossibleTypes = new [] { typeof(string) })] + string TransformationETag { get; set; } + /// Resource Id + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Resource Id", + SerializedName = @"ResourceGroupName", + PossibleTypes = new [] { typeof(string) })] + string TransformationId { get; } + /// Resource name + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Resource name", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string TransformationName { get; } + /// Resource type + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Resource type", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string TransformationType { get; } + + } + /// The properties that are associated with a streaming job. + internal partial interface IStreamingJobPropertiesInternal + + { + /// The cluster which streaming jobs will run on. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterInfo Cluster { get; set; } + /// The resource id of cluster. + string ClusterId { get; set; } + /// Controls certain runtime behaviors of the streaming job. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("1.0")] + string CompatibilityLevel { get; set; } + /// + /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify + /// jobStorageAccount property. . + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("SystemAccount", "JobStorageAccount")] + string ContentStoragePolicy { get; set; } + /// + /// Value is an ISO-8601 formatted UTC timestamp indicating when the streaming job was created. + /// + global::System.DateTime? CreatedDate { get; set; } + /// + /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. + /// Defaults to 'en-US' if none specified. + /// + string DataLocale { get; set; } + /// + /// The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 + /// (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a + /// value of -1. + /// + int? EventsLateArrivalMaxDelayInSecond { get; set; } + /// + /// The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. + /// + int? EventsOutOfOrderMaxDelayInSecond { get; set; } + /// + /// Indicates the policy to apply to events that arrive out of order in the input event stream. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Adjust", "Drop")] + string EventsOutOfOrderPolicy { get; set; } + /// The storage account where the custom code artifacts are located. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IExternal External { get; set; } + + string ExternalContainer { get; set; } + + string ExternalPath { get; set; } + /// The properties that are associated with an Azure Storage account + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStorageAccount ExternalStorageAccount { get; set; } + /// + /// A list of one or more functions for the streaming job. The name property for each function is required when specifying + /// this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available + /// for the individual transformation. + /// + System.Collections.Generic.List Function { get; set; } + /// + /// A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property + /// in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual + /// input. + /// + System.Collections.Generic.List Input { get; set; } + /// + /// A GUID uniquely identifying the streaming job. This GUID is generated upon creation of the streaming job. + /// + string JobId { get; set; } + /// Describes the state of the streaming job. + string JobState { get; set; } + /// The properties that are associated with an Azure Storage account with MSI + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IJobStorageAccount JobStorageAccount { get; set; } + /// Authentication Mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + string JobStorageAccountAuthenticationMode { get; set; } + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + string JobStorageAccountKey { get; set; } + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + string JobStorageAccountName { get; set; } + /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Cloud", "Edge")] + string JobType { get; set; } + /// + /// Value is either an ISO-8601 formatted timestamp indicating the last output event time of the streaming job or null indicating + /// that output has not yet been produced. In case of multiple outputs or multiple streams, this shows the latest value in + /// that set. + /// + global::System.DateTime? LastOutputEventTime { get; set; } + /// + /// A list of one or more outputs for the streaming job. The name property for each output is required when specifying this + /// property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available + /// for the individual output. + /// + System.Collections.Generic.List Output { get; set; } + /// + /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to + /// being malformed (missing column values, column values of wrong type or size). + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Stop", "Drop")] + string OutputErrorPolicy { get; set; } + /// + /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may + /// be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream + /// should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, + /// or start from the last event output time. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] + string OutputStartMode { get; set; } + /// + /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null + /// to indicate that the output event stream will start whenever the streaming job is started. This property must have a value + /// if outputStartMode is set to CustomTime. + /// + global::System.DateTime? OutputStartTime { get; set; } + /// Describes the provisioning status of the streaming job. + string ProvisioningState { get; set; } + /// + /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language + /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. + /// + string Query { get; set; } + /// + /// Describes the SKU of the streaming job. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku Sku { get; set; } + /// The name of the SKU. Required on PUT (CreateOrReplace) requests. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Standard")] + string SkuName { get; set; } + /// + /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + string StorageAccountKey { get; set; } + /// + /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. + /// + string StorageAccountName { get; set; } + /// Specifies the number of streaming units that the streaming job uses. + int? StreamingUnit { get; set; } + /// + /// Indicates the query and the number of streaming units to use for the streaming job. The name property of the transformation + /// is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You + /// must use the PATCH API available for the individual transformation. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation Transformation { get; set; } + + string TransformationETag { get; set; } + /// Resource Id + string TransformationId { get; set; } + /// Resource name + string TransformationName { get; set; } + /// + /// The properties that are associated with a transformation. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties TransformationProperty { get; set; } + /// Resource type + string TransformationType { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobProperties.json.cs similarity index 86% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobProperties.json.cs index e13609c51416..83c14d78c63c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class StreamingJobProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new StreamingJobProperties(json) : null; } @@ -77,29 +77,29 @@ internal StreamingJobProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalyti { return; } - {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobSku.FromJson(__jsonSku) : Sku;} - {_transformation = If( json?.PropertyT("transformation"), out var __jsonTransformation) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Transformation.FromJson(__jsonTransformation) : Transformation;} - {_jobStorageAccount = If( json?.PropertyT("jobStorageAccount"), out var __jsonJobStorageAccount) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.JobStorageAccount.FromJson(__jsonJobStorageAccount) : JobStorageAccount;} - {_external = If( json?.PropertyT("externals"), out var __jsonExternals) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.External.FromJson(__jsonExternals) : External;} - {_cluster = If( json?.PropertyT("cluster"), out var __jsonCluster) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ClusterInfo.FromJson(__jsonCluster) : Cluster;} - {_jobId = If( json?.PropertyT("jobId"), out var __jsonJobId) ? (string)__jsonJobId : (string)JobId;} - {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} - {_jobState = If( json?.PropertyT("jobState"), out var __jsonJobState) ? (string)__jsonJobState : (string)JobState;} - {_jobType = If( json?.PropertyT("jobType"), out var __jsonJobType) ? (string)__jsonJobType : (string)JobType;} - {_outputStartMode = If( json?.PropertyT("outputStartMode"), out var __jsonOutputStartMode) ? (string)__jsonOutputStartMode : (string)OutputStartMode;} - {_outputStartTime = If( json?.PropertyT("outputStartTime"), out var __jsonOutputStartTime) ? global::System.DateTime.TryParse((string)__jsonOutputStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOutputStartTimeValue) ? __jsonOutputStartTimeValue : OutputStartTime : OutputStartTime;} - {_lastOutputEventTime = If( json?.PropertyT("lastOutputEventTime"), out var __jsonLastOutputEventTime) ? global::System.DateTime.TryParse((string)__jsonLastOutputEventTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastOutputEventTimeValue) ? __jsonLastOutputEventTimeValue : LastOutputEventTime : LastOutputEventTime;} - {_eventsOutOfOrderPolicy = If( json?.PropertyT("eventsOutOfOrderPolicy"), out var __jsonEventsOutOfOrderPolicy) ? (string)__jsonEventsOutOfOrderPolicy : (string)EventsOutOfOrderPolicy;} - {_outputErrorPolicy = If( json?.PropertyT("outputErrorPolicy"), out var __jsonOutputErrorPolicy) ? (string)__jsonOutputErrorPolicy : (string)OutputErrorPolicy;} - {_eventsOutOfOrderMaxDelayInSecond = If( json?.PropertyT("eventsOutOfOrderMaxDelayInSeconds"), out var __jsonEventsOutOfOrderMaxDelayInSeconds) ? (int?)__jsonEventsOutOfOrderMaxDelayInSeconds : EventsOutOfOrderMaxDelayInSecond;} - {_eventsLateArrivalMaxDelayInSecond = If( json?.PropertyT("eventsLateArrivalMaxDelayInSeconds"), out var __jsonEventsLateArrivalMaxDelayInSeconds) ? (int?)__jsonEventsLateArrivalMaxDelayInSeconds : EventsLateArrivalMaxDelayInSecond;} - {_dataLocale = If( json?.PropertyT("dataLocale"), out var __jsonDataLocale) ? (string)__jsonDataLocale : (string)DataLocale;} - {_compatibilityLevel = If( json?.PropertyT("compatibilityLevel"), out var __jsonCompatibilityLevel) ? (string)__jsonCompatibilityLevel : (string)CompatibilityLevel;} - {_createdDate = If( json?.PropertyT("createdDate"), out var __jsonCreatedDate) ? global::System.DateTime.TryParse((string)__jsonCreatedDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedDateValue) ? __jsonCreatedDateValue : CreatedDate : CreatedDate;} - {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? If( __jsonInputs as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Input.FromJson(__u) )) ))() : null : Input;} - {_output = If( json?.PropertyT("outputs"), out var __jsonOutputs) ? If( __jsonOutputs as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Output.FromJson(__p) )) ))() : null : Output;} - {_function = If( json?.PropertyT("functions"), out var __jsonFunctions) ? If( __jsonFunctions as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Function.FromJson(__k) )) ))() : null : Function;} - {_contentStoragePolicy = If( json?.PropertyT("contentStoragePolicy"), out var __jsonContentStoragePolicy) ? (string)__jsonContentStoragePolicy : (string)ContentStoragePolicy;} + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobSku.FromJson(__jsonSku) : _sku;} + {_transformation = If( json?.PropertyT("transformation"), out var __jsonTransformation) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation.FromJson(__jsonTransformation) : _transformation;} + {_jobStorageAccount = If( json?.PropertyT("jobStorageAccount"), out var __jsonJobStorageAccount) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.JobStorageAccount.FromJson(__jsonJobStorageAccount) : _jobStorageAccount;} + {_external = If( json?.PropertyT("externals"), out var __jsonExternals) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.External.FromJson(__jsonExternals) : _external;} + {_cluster = If( json?.PropertyT("cluster"), out var __jsonCluster) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterInfo.FromJson(__jsonCluster) : _cluster;} + {_jobId = If( json?.PropertyT("jobId"), out var __jsonJobId) ? (string)__jsonJobId : (string)_jobId;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_jobState = If( json?.PropertyT("jobState"), out var __jsonJobState) ? (string)__jsonJobState : (string)_jobState;} + {_jobType = If( json?.PropertyT("jobType"), out var __jsonJobType) ? (string)__jsonJobType : (string)_jobType;} + {_outputStartMode = If( json?.PropertyT("outputStartMode"), out var __jsonOutputStartMode) ? (string)__jsonOutputStartMode : (string)_outputStartMode;} + {_outputStartTime = If( json?.PropertyT("outputStartTime"), out var __jsonOutputStartTime) ? global::System.DateTime.TryParse((string)__jsonOutputStartTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonOutputStartTimeValue) ? __jsonOutputStartTimeValue : _outputStartTime : _outputStartTime;} + {_lastOutputEventTime = If( json?.PropertyT("lastOutputEventTime"), out var __jsonLastOutputEventTime) ? global::System.DateTime.TryParse((string)__jsonLastOutputEventTime, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastOutputEventTimeValue) ? __jsonLastOutputEventTimeValue : _lastOutputEventTime : _lastOutputEventTime;} + {_eventsOutOfOrderPolicy = If( json?.PropertyT("eventsOutOfOrderPolicy"), out var __jsonEventsOutOfOrderPolicy) ? (string)__jsonEventsOutOfOrderPolicy : (string)_eventsOutOfOrderPolicy;} + {_outputErrorPolicy = If( json?.PropertyT("outputErrorPolicy"), out var __jsonOutputErrorPolicy) ? (string)__jsonOutputErrorPolicy : (string)_outputErrorPolicy;} + {_eventsOutOfOrderMaxDelayInSecond = If( json?.PropertyT("eventsOutOfOrderMaxDelayInSeconds"), out var __jsonEventsOutOfOrderMaxDelayInSeconds) ? (int?)__jsonEventsOutOfOrderMaxDelayInSeconds : _eventsOutOfOrderMaxDelayInSecond;} + {_eventsLateArrivalMaxDelayInSecond = If( json?.PropertyT("eventsLateArrivalMaxDelayInSeconds"), out var __jsonEventsLateArrivalMaxDelayInSeconds) ? (int?)__jsonEventsLateArrivalMaxDelayInSeconds : _eventsLateArrivalMaxDelayInSecond;} + {_dataLocale = If( json?.PropertyT("dataLocale"), out var __jsonDataLocale) ? (string)__jsonDataLocale : (string)_dataLocale;} + {_compatibilityLevel = If( json?.PropertyT("compatibilityLevel"), out var __jsonCompatibilityLevel) ? (string)__jsonCompatibilityLevel : (string)_compatibilityLevel;} + {_createdDate = If( json?.PropertyT("createdDate"), out var __jsonCreatedDate) ? global::System.DateTime.TryParse((string)__jsonCreatedDate, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedDateValue) ? __jsonCreatedDateValue : _createdDate : _createdDate;} + {_input = If( json?.PropertyT("inputs"), out var __jsonInputs) ? If( __jsonInputs as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input.FromJson(__u) )) ))() : null : _input;} + {_output = If( json?.PropertyT("outputs"), out var __jsonOutputs) ? If( __jsonOutputs as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output.FromJson(__p) )) ))() : null : _output;} + {_function = If( json?.PropertyT("functions"), out var __jsonFunctions) ? If( __jsonFunctions as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function.FromJson(__k) )) ))() : null : _function;} + {_contentStoragePolicy = If( json?.PropertyT("contentStoragePolicy"), out var __jsonContentStoragePolicy) ? (string)__jsonContentStoragePolicy : (string)_contentStoragePolicy;} AfterFromJson(json); } @@ -127,22 +127,22 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode AddIf( null != this._jobStorageAccount ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) this._jobStorageAccount.ToJson(null,serializationMode) : null, "jobStorageAccount" ,container.Add ); AddIf( null != this._external ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) this._external.ToJson(null,serializationMode) : null, "externals" ,container.Add ); AddIf( null != this._cluster ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) this._cluster.ToJson(null,serializationMode) : null, "cluster" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._jobId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._jobId.ToString()) : null, "jobId" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._jobState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._jobState.ToString()) : null, "jobState" ,container.Add ); } AddIf( null != (((object)this._jobType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._jobType.ToString()) : null, "jobType" ,container.Add ); AddIf( null != (((object)this._outputStartMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._outputStartMode.ToString()) : null, "outputStartMode" ,container.Add ); AddIf( null != this._outputStartTime ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._outputStartTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "outputStartTime" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._lastOutputEventTime ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._lastOutputEventTime?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastOutputEventTime" ,container.Add ); } @@ -152,7 +152,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode AddIf( null != this._eventsLateArrivalMaxDelayInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNumber((int)this._eventsLateArrivalMaxDelayInSecond) : null, "eventsLateArrivalMaxDelayInSeconds" ,container.Add ); AddIf( null != (((object)this._dataLocale)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._dataLocale.ToString()) : null, "dataLocale" ,container.Add ); AddIf( null != (((object)this._compatibilityLevel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._compatibilityLevel.ToString()) : null, "compatibilityLevel" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._createdDate ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._createdDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdDate" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobSku.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobSku.PowerShell.cs similarity index 77% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobSku.PowerShell.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobSku.PowerShell.cs index 22ccb4584f15..c2eab9dd7cde 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobSku.PowerShell.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobSku.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -55,29 +55,35 @@ public partial class StreamingJobSku partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// - /// Deserializes a into an instance of 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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new StreamingJobSku(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 . + /// an instance of . /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new StreamingJobSku(content); } @@ -87,10 +93,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170 /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. @@ -105,13 +111,13 @@ internal StreamingJobSku(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSkuInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSkuInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSkuInternal)this).Name, 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. @@ -126,7 +132,7 @@ internal StreamingJobSku(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSkuInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSkuInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSkuInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSkuInternal)this).Name, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -135,6 +141,18 @@ internal StreamingJobSku(global::System.Management.Automation.PSObject content) /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 properties that are associated with a SKU. [System.ComponentModel.TypeConverter(typeof(StreamingJobSkuTypeConverter))] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobSku.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobSku.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobSku.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobSku.TypeConverter.cs index 2e04a2246864..40e01483bd43 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobSku.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobSku.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobSku.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobSku.cs new file mode 100644 index 000000000000..70d45ce7c1f8 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobSku.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The properties that are associated with a SKU. + public partial class StreamingJobSku : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSkuInternal + { + + /// Backing field for property. + private string _name; + + /// The name of the SKU. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public StreamingJobSku() + { + + } + } + /// The properties that are associated with a SKU. + public partial interface IStreamingJobSku : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// The name of the SKU. Required on PUT (CreateOrReplace) requests. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the SKU. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Standard")] + string Name { get; set; } + + } + /// The properties that are associated with a SKU. + internal partial interface IStreamingJobSkuInternal + + { + /// The name of the SKU. Required on PUT (CreateOrReplace) requests. + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Standard")] + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobSku.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobSku.json.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobSku.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobSku.json.cs index b4908f5c70a0..3a552c18cdf8 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/StreamingJobSku.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/StreamingJobSku.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class StreamingJobSku partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobSku FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobSku FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new StreamingJobSku(json) : null; } @@ -77,7 +77,7 @@ internal StreamingJobSku(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runt { return; } - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} AfterFromJson(json); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubResource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubResource.PowerShell.cs new file mode 100644 index 000000000000..2f2868350710 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubResource.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The base sub-resource model definition. + [System.ComponentModel.TypeConverter(typeof(SubResourceTypeConverter))] + public partial class SubResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SubResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SubResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SubResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type, 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 SubResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 base sub-resource model definition. + [System.ComponentModel.TypeConverter(typeof(SubResourceTypeConverter))] + public partial interface ISubResource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubResource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubResource.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubResource.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubResource.TypeConverter.cs index 2f32b1fd9208..32ea862a836c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubResource.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubResource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubResource.cs similarity index 88% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubResource.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubResource.cs index 9d61388a0e5e..278cb5ddc42e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubResource.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubResource.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The base sub-resource model definition. public partial class SubResource : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal { /// Backing field for property. @@ -21,13 +21,13 @@ public partial class SubResource : public string Id { get => this._id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResourceInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; @@ -57,6 +57,9 @@ public partial interface ISubResource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource Id", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] @@ -65,6 +68,9 @@ public partial interface ISubResource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource name", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] @@ -73,6 +79,9 @@ public partial interface ISubResource : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"Resource type", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubResource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubResource.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubResource.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubResource.json.cs index a7136c32b6dc..a938a9ee71ee 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubResource.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SubResource partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new SubResource(json) : null; } @@ -77,9 +77,9 @@ internal SubResource(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime. { return; } - {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} - {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} - {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} AfterFromJson(json); } @@ -102,15 +102,15 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuota.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuota.PowerShell.cs new file mode 100644 index 000000000000..9d074e231c76 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuota.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes the current quota for the subscription. + [System.ComponentModel.TypeConverter(typeof(SubscriptionQuotaTypeConverter))] + public partial class SubscriptionQuota + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuota DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SubscriptionQuota(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuota DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SubscriptionQuota(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuota FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SubscriptionQuota(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubscriptionQuotaPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("MaxCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CurrentCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal)this).CurrentCount = (int?) content.GetValueForProperty("CurrentCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal)this).CurrentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SubscriptionQuota(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubscriptionQuotaPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("MaxCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CurrentCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal)this).CurrentCount = (int?) content.GetValueForProperty("CurrentCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal)this).CurrentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes the current quota for the subscription. + [System.ComponentModel.TypeConverter(typeof(SubscriptionQuotaTypeConverter))] + public partial interface ISubscriptionQuota + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuota.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuota.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuota.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuota.TypeConverter.cs index 5014d7a25e95..ee18a43d51c4 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuota.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuota.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuota ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuota).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuota.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuota.cs new file mode 100644 index 000000000000..87e9fc234d4e --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuota.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Describes the current quota for the subscription. + public partial class SubscriptionQuota : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuota, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubResource(); + + /// The current usage of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public int? CurrentCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal)Property).CurrentCount; } + + /// Resource Id + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Id; } + + /// The max permitted usage of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public int? MaxCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal)Property).MaxCount; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Name = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Type = value ?? null; } + + /// Internal Acessors for CurrentCount + int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal.CurrentCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal)Property).CurrentCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal)Property).CurrentCount = value ?? default(int); } + + /// Internal Acessors for MaxCount + int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal.MaxCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal)Property).MaxCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal)Property).MaxCount = value ?? default(int); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubscriptionQuotaProperties()); set { {_property = value;} } } + + /// Resource name + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaProperties _property; + + /// Describes the properties of the quota. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubscriptionQuotaProperties()); } + + /// Resource type + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Type; } + + /// Creates an new instance. + public SubscriptionQuota() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__subResource), __subResource); + await eventListener.AssertObjectIsValid(nameof(__subResource), __subResource); + } + } + /// Describes the current quota for the subscription. + public partial interface ISubscriptionQuota : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource + { + /// The current usage of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current usage of this resource.", + SerializedName = @"currentCount", + PossibleTypes = new [] { typeof(int) })] + int? CurrentCount { get; } + /// The max permitted usage of this resource. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The max permitted usage of this resource.", + SerializedName = @"maxCount", + PossibleTypes = new [] { typeof(int) })] + int? MaxCount { get; } + + } + /// Describes the current quota for the subscription. + internal partial interface ISubscriptionQuotaInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal + { + /// The current usage of this resource. + int? CurrentCount { get; set; } + /// The max permitted usage of this resource. + int? MaxCount { get; set; } + /// Describes the properties of the quota. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuota.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuota.json.cs similarity index 93% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuota.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuota.json.cs index a93f2cd53872..fb4b7df634e4 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuota.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuota.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SubscriptionQuota partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuota. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuota. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuota FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new SubscriptionQuota(json) : null; } @@ -77,8 +77,8 @@ internal SubscriptionQuota(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Ru { return; } - __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubscriptionQuotaProperties.FromJson(__jsonProperties) : Property;} + __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubscriptionQuotaProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } @@ -102,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode return container; } __subResource?.ToJson(container, serializationMode); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotaProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotaProperties.PowerShell.cs new file mode 100644 index 000000000000..297c2e22ca26 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotaProperties.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Describes the properties of the quota. + [System.ComponentModel.TypeConverter(typeof(SubscriptionQuotaPropertiesTypeConverter))] + public partial class SubscriptionQuotaProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SubscriptionQuotaProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SubscriptionQuotaProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SubscriptionQuotaProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MaxCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CurrentCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal)this).CurrentCount = (int?) content.GetValueForProperty("CurrentCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal)this).CurrentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SubscriptionQuotaProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MaxCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CurrentCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal)this).CurrentCount = (int?) content.GetValueForProperty("CurrentCount",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal)this).CurrentCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + } + } + /// Describes the properties of the quota. + [System.ComponentModel.TypeConverter(typeof(SubscriptionQuotaPropertiesTypeConverter))] + public partial interface ISubscriptionQuotaProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotaProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotaProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotaProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotaProperties.TypeConverter.cs index 7ce67c90d56a..a4539711861a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotaProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotaProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotaProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotaProperties.cs similarity index 87% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotaProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotaProperties.cs index c20ed1544de0..931502d199ae 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotaProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotaProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// Describes the properties of the quota. public partial class SubscriptionQuotaProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal { /// Backing field for property. @@ -28,10 +28,10 @@ public partial class SubscriptionQuotaProperties : public int? MaxCount { get => this._maxCount; } /// Internal Acessors for CurrentCount - int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal.CurrentCount { get => this._currentCount; set { {_currentCount = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal.CurrentCount { get => this._currentCount; set { {_currentCount = value;} } } /// Internal Acessors for MaxCount - int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaPropertiesInternal.MaxCount { get => this._maxCount; set { {_maxCount = value;} } } + int? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaPropertiesInternal.MaxCount { get => this._maxCount; set { {_maxCount = value;} } } /// Creates an new instance. public SubscriptionQuotaProperties() @@ -47,6 +47,9 @@ public partial interface ISubscriptionQuotaProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The current usage of this resource.", SerializedName = @"currentCount", PossibleTypes = new [] { typeof(int) })] @@ -55,6 +58,9 @@ public partial interface ISubscriptionQuotaProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = true, + Read = true, + Create = false, + Update = false, Description = @"The max permitted usage of this resource.", SerializedName = @"maxCount", PossibleTypes = new [] { typeof(int) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotaProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotaProperties.json.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotaProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotaProperties.json.cs index 0165aea7c686..aa079eda47e9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotaProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotaProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SubscriptionQuotaProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotaProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotaProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new SubscriptionQuotaProperties(json) : null; } @@ -77,8 +77,8 @@ internal SubscriptionQuotaProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamAn { return; } - {_maxCount = If( json?.PropertyT("maxCount"), out var __jsonMaxCount) ? (int?)__jsonMaxCount : MaxCount;} - {_currentCount = If( json?.PropertyT("currentCount"), out var __jsonCurrentCount) ? (int?)__jsonCurrentCount : CurrentCount;} + {_maxCount = If( json?.PropertyT("maxCount"), out var __jsonMaxCount) ? (int?)__jsonMaxCount : _maxCount;} + {_currentCount = If( json?.PropertyT("currentCount"), out var __jsonCurrentCount) ? (int?)__jsonCurrentCount : _currentCount;} AfterFromJson(json); } @@ -101,11 +101,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._maxCount ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNumber((int)this._maxCount) : null, "maxCount" ,container.Add ); } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { AddIf( null != this._currentCount ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNumber((int)this._currentCount) : null, "currentCount" ,container.Add ); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotasListResult.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotasListResult.PowerShell.cs new file mode 100644 index 000000000000..6d8768ea22cb --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotasListResult.PowerShell.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// Result of the GetQuotas operation. It contains a list of quotas for the subscription in a particular region. + /// + [System.ComponentModel.TypeConverter(typeof(SubscriptionQuotasListResultTypeConverter))] + public partial class SubscriptionQuotasListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SubscriptionQuotasListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SubscriptionQuotasListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SubscriptionQuotasListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubscriptionQuotaTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SubscriptionQuotasListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubscriptionQuotaTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Result of the GetQuotas operation. It contains a list of quotas for the subscription in a particular region. + [System.ComponentModel.TypeConverter(typeof(SubscriptionQuotasListResultTypeConverter))] + public partial interface ISubscriptionQuotasListResult + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotasListResult.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotasListResult.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotasListResult.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotasListResult.TypeConverter.cs index ff7bcc4e7a85..f2ff69cc01fa 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotasListResult.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotasListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotasListResult.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotasListResult.cs new file mode 100644 index 000000000000..6ef4111fb461 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotasListResult.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// Result of the GetQuotas operation. It contains a list of quotas for the subscription in a particular region. + /// + public partial class SubscriptionQuotasListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResultInternal + { + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// List of quotas for the subscription in a particular region. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public SubscriptionQuotasListResult() + { + + } + } + /// Result of the GetQuotas operation. It contains a list of quotas for the subscription in a particular region. + public partial interface ISubscriptionQuotasListResult : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable + { + /// List of quotas for the subscription in a particular region. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of quotas for the subscription in a particular region.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuota) })] + System.Collections.Generic.List Value { get; } + + } + /// Result of the GetQuotas operation. It contains a list of quotas for the subscription in a particular region. + internal partial interface ISubscriptionQuotasListResultInternal + + { + /// List of quotas for the subscription in a particular region. + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotasListResult.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotasListResult.json.cs similarity index 90% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotasListResult.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotasListResult.json.cs index b2ee36cc12b5..bee6f54ae42b 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/SubscriptionQuotasListResult.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/SubscriptionQuotasListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class SubscriptionQuotasListResult partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new SubscriptionQuotasListResult(json) : null; } @@ -79,7 +79,7 @@ internal SubscriptionQuotasListResult(Microsoft.Azure.PowerShell.Cmdlets.StreamA { return; } - {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubscriptionQuota.FromJson(__u) )) ))() : null : Value;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuota) (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubscriptionQuota.FromJson(__u) )) ))() : null : _value;} AfterFromJson(json); } @@ -102,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode { return container; } - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeReadOnly)) + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)) { if (null != this._value) { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResource.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResource.PowerShell.cs new file mode 100644 index 000000000000..1d86c6ca20c9 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResource.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The resource model definition for a ARM tracked top level resource + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial class TrackedResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type, 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 TrackedResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The resource model definition for a ARM tracked top level resource + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial interface ITrackedResource + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs new file mode 100644 index 000000000000..9c8fd4f299e6 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResource.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResource.cs new file mode 100644 index 000000000000..7c1760ffa3c9 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResource.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The resource model definition for a ARM tracked top level resource + public partial class TrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResource, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Resource(); + + /// + /// Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__resource).Id; } + + /// Backing field for property. + private string _location; + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__resource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__resource).Name = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__resource).Type = value ?? null; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResourceTags()); set => this._tag = value; } + + /// + /// The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public TrackedResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for a ARM tracked top level resource + public partial interface ITrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResource + { + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags Tag { get; set; } + + } + /// The resource model definition for a ARM tracked top level resource + internal partial interface ITrackedResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceInternal + { + /// The geo-location where the resource lives + string Location { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResource.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResource.json.cs new file mode 100644 index 000000000000..89cbe41ba210 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResource.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// The resource model definition for a ARM tracked top level resource + public partial class TrackedResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. + internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Resource(json); + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResourceTags.FromJson(__jsonTags) : _tag;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs new file mode 100644 index 000000000000..37a0c4209c08 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial class TrackedResourceTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResourceTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResourceTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResourceTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrackedResourceTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial interface ITrackedResourceTags + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs new file mode 100644 index 000000000000..44a6ee1243b1 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResourceTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResourceTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResourceTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResourceTags.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResourceTags.cs new file mode 100644 index 000000000000..016f6cb49fd6 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResourceTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTagsInternal + { + + /// Creates an new instance. + public TrackedResourceTags() + { + + } + } + /// Resource tags. + public partial interface ITrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface ITrackedResourceTagsInternal + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs new file mode 100644 index 000000000000..d3f9213e7f30 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TrackedResourceTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResourceTags.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResourceTags.json.cs new file mode 100644 index 000000000000..b3347dcd7287 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TrackedResourceTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject instance to deserialize from. + /// + internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Transformation.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Transformation.PowerShell.cs new file mode 100644 index 000000000000..4f1cde62399e --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Transformation.PowerShell.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// + /// A transformation object, containing all information associated with the named transformation. All transformations are + /// contained under a streaming job. + /// + [System.ComponentModel.TypeConverter(typeof(TransformationTypeConverter))] + public partial class Transformation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Transformation(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Transformation(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Transformation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TransformationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).ETag, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("StreamingUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Query")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).Query, 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 Transformation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TransformationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("ETag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).ETag = (string) content.GetValueForProperty("ETag",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).ETag, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("StreamingUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Query")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).Query, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// A transformation object, containing all information associated with the named transformation. All transformations are + /// contained under a streaming job. + [System.ComponentModel.TypeConverter(typeof(TransformationTypeConverter))] + public partial interface ITransformation + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Transformation.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Transformation.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Transformation.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Transformation.TypeConverter.cs index 9efde7b98a37..5930f286b5e6 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Transformation.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Transformation.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Transformation.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Transformation.cs new file mode 100644 index 000000000000..6a78f9a03808 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Transformation.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// A transformation object, containing all information associated with the named transformation. All transformations are + /// contained under a streaming job. + /// + public partial class Transformation : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubResource(); + + /// Backing field for property. + private string _eTag; + + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + public string ETag { get => this._eTag; set => this._eTag = value; } + + /// Resource Id + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Id = value ?? null; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Name = value ?? null; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Type = value ?? null; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TransformationProperties()); set { {_property = value;} } } + + /// Resource name + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties _property; + + /// + /// The properties that are associated with a transformation. Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TransformationProperties()); set => this._property = value; } + + /// + /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language + /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public string Query { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationPropertiesInternal)Property).Query; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationPropertiesInternal)Property).Query = value ?? null; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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); } + + /// Specifies the number of streaming units that the streaming job uses. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inlined)] + public int? StreamingUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationPropertiesInternal)Property).StreamingUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationPropertiesInternal)Property).StreamingUnit = value ?? default(int); } + + /// Resource type + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Origin(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal)__subResource).Type; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("ETag", out var __eTagHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationInternal)this).ETag = System.Linq.Enumerable.FirstOrDefault(__eTagHeader0) is string __headerETagHeader0 ? __headerETagHeader0 : (string)null; + } + } + + /// Creates an new instance. + public Transformation() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__subResource), __subResource); + await eventListener.AssertObjectIsValid(nameof(__subResource), __subResource); + } + } + /// A transformation object, containing all information associated with the named transformation. All transformations are + /// contained under a streaming job. + public partial interface ITransformation : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResource + { + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"", + SerializedName = @"ETag", + PossibleTypes = new [] { typeof(string) })] + string ETag { get; set; } + /// + /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language + /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests.", + SerializedName = @"query", + PossibleTypes = new [] { typeof(string) })] + string Query { get; set; } + /// Specifies the number of streaming units that the streaming job uses. + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the number of streaming units that the streaming job uses.", + SerializedName = @"streamingUnits", + PossibleTypes = new [] { typeof(int) })] + int? StreamingUnit { get; set; } + + } + /// A transformation object, containing all information associated with the named transformation. All transformations are + /// contained under a streaming job. + internal partial interface ITransformationInternal : + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubResourceInternal + { + string ETag { get; set; } + /// + /// The properties that are associated with a transformation. Required on PUT (CreateOrReplace) requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties Property { get; set; } + /// + /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language + /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. + /// + string Query { get; set; } + /// Specifies the number of streaming units that the streaming job uses. + int? StreamingUnit { get; set; } + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Transformation.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Transformation.json.cs similarity index 94% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Transformation.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Transformation.json.cs index 0228d86b6fc3..22976e44e92d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/Transformation.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Transformation.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -57,13 +57,13 @@ public partial class Transformation partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new Transformation(json) : null; } @@ -105,8 +105,8 @@ internal Transformation(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runti { return; } - __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.TransformationProperties.FromJson(__jsonProperties) : Property;} + __subResource = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.TransformationProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TransformationProperties.PowerShell.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TransformationProperties.PowerShell.cs new file mode 100644 index 000000000000..1b1cde94d3f0 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TransformationProperties.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + + /// The properties that are associated with a transformation. + [System.ComponentModel.TypeConverter(typeof(TransformationPropertiesTypeConverter))] + public partial class TransformationProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TransformationProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TransformationProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 TransformationProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StreamingUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationPropertiesInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationPropertiesInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Query")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationPropertiesInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationPropertiesInternal)this).Query, 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 TransformationProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("StreamingUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationPropertiesInternal)this).StreamingUnit = (int?) content.GetValueForProperty("StreamingUnit",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationPropertiesInternal)this).StreamingUnit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Query")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationPropertiesInternal)this).Query = (string) content.GetValueForProperty("Query",((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationPropertiesInternal)this).Query, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The properties that are associated with a transformation. + [System.ComponentModel.TypeConverter(typeof(TransformationPropertiesTypeConverter))] + public partial interface ITransformationProperties + + { + + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/TransformationProperties.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TransformationProperties.TypeConverter.cs similarity index 97% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/TransformationProperties.TypeConverter.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TransformationProperties.TypeConverter.cs index 2537c86a06b5..a5ef44b76ddc 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/TransformationProperties.TypeConverter.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TransformationProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/TransformationProperties.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TransformationProperties.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/TransformationProperties.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TransformationProperties.cs index 9cf971e92b5d..14b337d02061 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/TransformationProperties.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TransformationProperties.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; /// The properties that are associated with a transformation. public partial class TransformationProperties : - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationPropertiesInternal { /// Backing field for property. @@ -47,6 +47,9 @@ public partial interface ITransformationProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests.", SerializedName = @"query", PossibleTypes = new [] { typeof(string) })] @@ -55,6 +58,9 @@ public partial interface ITransformationProperties : [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( Required = false, ReadOnly = false, + Read = true, + Create = true, + Update = true, Description = @"Specifies the number of streaming units that the streaming job uses.", SerializedName = @"streamingUnits", PossibleTypes = new [] { typeof(int) })] diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/TransformationProperties.json.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TransformationProperties.json.cs similarity index 95% rename from generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/TransformationProperties.json.cs rename to generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TransformationProperties.json.cs index 95e7eadbaf7c..17edb4c9cfe7 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/Api20170401Preview/TransformationProperties.json.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Models/TransformationProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TransformationProperties partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonObject json ? new TransformationProperties(json) : null; } @@ -102,8 +102,8 @@ internal TransformationProperties(Microsoft.Azure.PowerShell.Cmdlets.StreamAnaly { return; } - {_streamingUnit = If( json?.PropertyT("streamingUnits"), out var __jsonStreamingUnits) ? (int?)__jsonStreamingUnits : StreamingUnit;} - {_query = If( json?.PropertyT("query"), out var __jsonQuery) ? (string)__jsonQuery : (string)Query;} + {_streamingUnit = If( json?.PropertyT("streamingUnits"), out var __jsonStreamingUnits) ? (int?)__jsonStreamingUnits : _streamingUnit;} + {_query = If( json?.PropertyT("query"), out var __jsonQuery) ? (string)__jsonQuery : (string)_query;} AfterFromJson(json); } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/StreamAnalytics.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/StreamAnalytics.cs index 37fddd950ac5..6423d880440f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/StreamAnalytics.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/StreamAnalytics.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics public partial class StreamAnalytics { - /// Creates a Stream Analytics Cluster or replaces an already existing cluster. + /// update a Stream Analytics Cluster or replaces an already existing cluster. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the cluster. @@ -27,10 +27,11 @@ public partial class StreamAnalytics /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersCreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersCreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2020-03-01-preview"; // Constant Parameters @@ -67,15 +68,15 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Creates a Stream Analytics Cluster or replaces an already existing cluster. + /// update a Stream Analytics Cluster or replaces an already existing cluster. /// /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the /// last-seen ETag value to prevent accidentally overwriting concurrent changes. @@ -87,10 +88,11 @@ public partial class StreamAnalytics /// elsewhere). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersCreateOrUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ClustersCreateOrUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2020-03-01-preview"; // Constant Parameters @@ -139,136 +141,6407 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.ClustersCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. + /// update a Stream Analytics Cluster or replaces an already existing cluster. + /// + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing record + /// set. Other values will result in a 412 Pre-condition Failed response. + /// The definition of the cluster that will be used to create a new cluster or replace the existing one. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/(?[^/]+)$", 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.StreamAnalytics/clusters/{clusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/clusters/" + + clusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update a Stream Analytics Cluster or replaces an already existing cluster. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing record + /// set. Other values will result in a 412 Pre-condition Failed response. + /// Json string supplied to the ClustersCreateOrUpdate 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string clusterName, string ifMatch, string ifNoneMatch, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ClustersCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// update a Stream Analytics Cluster or replaces an already existing cluster. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing record + /// set. Other values will result in a 412 Pre-condition Failed response. + /// Json string supplied to the ClustersCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string clusterName, string ifMatch, string ifNoneMatch, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update a Stream Analytics Cluster or replaces an already existing cluster. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing record + /// set. Other values will result in a 412 Pre-condition Failed response. + /// The definition of the cluster that will be used to create a new cluster or replace the existing one. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string clusterName, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: default + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": +case "testsucceeded": +case "deleting": + // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: default + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": +case "testsucceeded": +case "deleting": + // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing record + /// set. Other values will result in a 412 Pre-condition Failed response. + /// The definition of the cluster that will be used to create a new cluster or replace the existing one. + /// 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 ClustersCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterName, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); + await eventListener.AssertNotNull(nameof(ifNoneMatch),ifNoneMatch); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes the specified cluster. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 404 (NotFound). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersDelete(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func onNotFound, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ClustersDelete_Call (request, onOk,onNoContent,onNotFound,onDefault,eventListener,sender); + } + } + + /// Deletes the specified cluster. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 404 (NotFound). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func onNotFound, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/(?[^/]+)$", 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.StreamAnalytics/clusters/{clusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/clusters/" + + clusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ClustersDelete_Call (request, onOk,onNoContent,onNotFound,onDefault,eventListener,sender); + } + } + + /// 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 204 (NoContent). + /// a delegate that is called when the remote service returns 404 (NotFound). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func onNotFound, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: default + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": +case "testsucceeded": +case "deleting": + // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + case global::System.Net.HttpStatusCode.NotFound: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNotFound(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// 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 ClustersDelete_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + } + } + + /// Gets information about the specified cluster. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersGet(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ClustersGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets information about the specified cluster. + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/(?[^/]+)$", 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.StreamAnalytics/clusters/{clusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/clusters/" + + clusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ClustersGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets information about the specified cluster. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/(?[^/]+)$", 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.StreamAnalytics/clusters/{clusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/clusters/" + + clusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets information about the specified cluster. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersGetWithResult(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersGet_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, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// 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 ClustersGet_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + } + } + + /// Lists all of the clusters in the given resource group. + /// The ID of the target subscription. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ClustersListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the clusters in the given 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters$", 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.StreamAnalytics/clusters'"); + } + + // 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.StreamAnalytics/clusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ClustersListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the clusters in the given resource group. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters$", 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.StreamAnalytics/clusters'"); + } + + // 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.StreamAnalytics/clusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all of the clusters in the given resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListByResourceGroup_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, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 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 ClustersListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + } + } + + /// Lists all of the clusters in the given subscription. + /// The ID of the target 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.StreamAnalytics/clusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ClustersListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the clusters in the given 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/clusters'"); + } + + // 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.StreamAnalytics/clusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ClustersListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the clusters in the given subscription. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/clusters'"); + } + + // 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.StreamAnalytics/clusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all of the clusters in the given subscription. + /// The ID of the target subscription. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.StreamAnalytics/clusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListBySubscription_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, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + /// 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 ClustersListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + } + } + + /// Lists all of the streaming jobs in the given cluster. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListStreamingJobs(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "/listStreamingJobs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ClustersListStreamingJobs_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the streaming jobs in the given cluster. + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListStreamingJobsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/(?[^/]+)$", 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.StreamAnalytics/clusters/{clusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/clusters/" + + clusterName + + "/listStreamingJobs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ClustersListStreamingJobs_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Lists all of the streaming jobs in the given cluster. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListStreamingJobsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/(?[^/]+)$", 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.StreamAnalytics/clusters/{clusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/clusters/" + + clusterName + + "/listStreamingJobs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersListStreamingJobsWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all of the streaming jobs in the given cluster. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListStreamingJobsWithResult(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "/listStreamingJobs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersListStreamingJobsWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListStreamingJobsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterJobListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListStreamingJobs_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, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ClusterJobListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// 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 ClustersListStreamingJobs_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + } + } + + /// + /// update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without + /// affecting the rest of the cluster definition. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The properties specified here will overwrite the corresponding properties in the existing cluster (ie. + /// Those properties will be updated). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersUpdate(string subscriptionId, string resourceGroupName, string clusterName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ClustersUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without + /// affecting the rest of the cluster definition. + /// + /// + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The properties specified here will overwrite the corresponding properties in the existing cluster (ie. + /// Those properties will be updated). + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/(?[^/]+)$", 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.StreamAnalytics/clusters/{clusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/clusters/" + + clusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ClustersUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without + /// affecting the rest of the cluster definition. + /// + /// + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The properties specified here will overwrite the corresponding properties in the existing cluster (ie. + /// Those properties will be updated). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersUpdateViaIdentityWithResult(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/(?[^/]+)$", 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.StreamAnalytics/clusters/{clusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var clusterName = _match.Groups["clusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/clusters/" + + clusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without + /// affecting the rest of the cluster definition. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the ClustersUpdate 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersUpdateViaJsonString(string subscriptionId, string resourceGroupName, string clusterName, string ifMatch, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ClustersUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without + /// affecting the rest of the cluster definition. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the ClustersUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string clusterName, string ifMatch, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without + /// affecting the rest of the cluster definition. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The properties specified here will overwrite the corresponding properties in the existing cluster (ie. + /// Those properties will be updated). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersUpdateWithResult(string subscriptionId, string resourceGroupName, string clusterName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/" + + global::System.Uri.EscapeDataString(clusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ClustersUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: default + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": +case "testsucceeded": +case "deleting": + // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: default + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": +case "testsucceeded": +case "deleting": + // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 name of the resource group. The name is case insensitive. + /// The name of the cluster. + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The properties specified here will overwrite the corresponding properties in the existing cluster (ie. + /// Those properties will be updated). + /// 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 ClustersUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// replace a function or replaces an already existing function under an existing streaming job. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// Set to '*' to allow a new function to be created, but to prevent updating an existing function. + /// Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the function that will be used to create a new function or replace the existing one + /// under the streaming job. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsCreateOrReplace(string subscriptionId, string resourceGroupName, string jobName, string functionName, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsCreateOrReplace_Call (request, onOk,onCreated,eventListener,sender); + } + } + + /// + /// replace a function or replaces an already existing function under an existing streaming job. + /// + /// + /// Set to '*' to allow a new function to be created, but to prevent updating an existing function. + /// Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the function that will be used to create a new function or replace the existing one + /// under the streaming job. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsCreateOrReplaceViaIdentity(global::System.String viaIdentity, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var functionName = _match.Groups["functionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/functions/" + + functionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsCreateOrReplace_Call (request, onOk,onCreated,eventListener,sender); + } + } + + /// + /// replace a function or replaces an already existing function under an existing streaming job. + /// + /// + /// Set to '*' to allow a new function to be created, but to prevent updating an existing function. + /// Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the function that will be used to create a new function or replace the existing one + /// under the streaming job. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsCreateOrReplaceViaIdentityWithResult(global::System.String viaIdentity, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var functionName = _match.Groups["functionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/functions/" + + functionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsCreateOrReplaceWithResult_Call (request, eventListener,sender); + } + } + + /// + /// replace a function or replaces an already existing function under an existing streaming job. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// Set to '*' to allow a new function to be created, but to prevent updating an existing function. + /// Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the FunctionsCreateOrReplace operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsCreateOrReplaceViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string functionName, string ifNoneMatch, string ifMatch, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsCreateOrReplace_Call (request, onOk,onCreated,eventListener,sender); + } + } + + /// + /// replace a function or replaces an already existing function under an existing streaming job. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// Set to '*' to allow a new function to be created, but to prevent updating an existing function. + /// Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the FunctionsCreateOrReplace operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsCreateOrReplaceViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string functionName, string ifNoneMatch, string ifMatch, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsCreateOrReplaceWithResult_Call (request, eventListener,sender); + } + } + + /// + /// replace a function or replaces an already existing function under an existing streaming job. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// Set to '*' to allow a new function to be created, but to prevent updating an existing function. + /// Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the function that will be used to create a new function or replace the existing one + /// under the streaming job. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsCreateOrReplaceWithResult(string subscriptionId, string resourceGroupName, string jobName, string functionName, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsCreateOrReplaceWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsCreateOrReplaceWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 201 (Created). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsCreateOrReplace_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 name of the resource group. The name is case insensitive. + /// Set to '*' to allow a new function to be created, but to prevent updating an existing function. + /// Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The name of the streaming job. + /// The name of the function. + /// The definition of the function that will be used to create a new function or replace the existing one + /// under the streaming job. + /// 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 FunctionsCreateOrReplace_Validate(string subscriptionId, string resourceGroupName, string ifNoneMatch, string ifMatch, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(ifNoneMatch),ifNoneMatch); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); + await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(functionName),functionName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes a function from the streaming job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsDelete(string subscriptionId, string resourceGroupName, string jobName, string functionName, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsDelete_Call (request, onOk,onNoContent,eventListener,sender); + } + } + + /// Deletes a function from the streaming job. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var functionName = _match.Groups["functionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/functions/" + + functionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsDelete_Call (request, onOk,onNoContent,eventListener,sender); + } + } + + /// 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 204 (NoContent). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// 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 FunctionsDelete_Validate(string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(functionName),functionName); + } + } + + /// Gets details about the specified function. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsGet(string subscriptionId, string resourceGroupName, string jobName, string functionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsGet_Call (request, onOk,eventListener,sender); + } + } + + /// Gets details about the specified function. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var functionName = _match.Groups["functionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/functions/" + + functionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsGet_Call (request, onOk,eventListener,sender); + } + } + + /// Gets details about the specified function. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var functionName = _match.Groups["functionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/functions/" + + functionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets details about the specified function. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsGetWithResult(string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// 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 FunctionsGet_Validate(string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(functionName),functionName); + } + } + + /// Lists all of the functions under the specified streaming job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The $select OData query parameter. This is a comma-separated list of structural properties to include + /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently + /// only accepts '*' as a valid value. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsListByStreamingJob(string subscriptionId, string resourceGroupName, string jobName, string Select, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsListByStreamingJob_Call (request, onOk,eventListener,sender); + } + } + + /// Lists all of the functions under the specified streaming job. + /// + /// The $select OData query parameter. This is a comma-separated list of structural properties to include + /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently + /// only accepts '*' as a valid value. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsListByStreamingJobViaIdentity(global::System.String viaIdentity, string Select, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/functions$", 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.StreamAnalytics/streamingjobs/{jobName}/functions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/functions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsListByStreamingJob_Call (request, onOk,eventListener,sender); + } + } + + /// Lists all of the functions under the specified streaming job. + /// + /// The $select OData query parameter. This is a comma-separated list of structural properties to include + /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently + /// only accepts '*' as a valid value. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsListByStreamingJobViaIdentityWithResult(global::System.String viaIdentity, string Select, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/functions$", 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.StreamAnalytics/streamingjobs/{jobName}/functions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/functions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsListByStreamingJobWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all of the functions under the specified streaming job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The $select OData query parameter. This is a comma-separated list of structural properties to include + /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently + /// only accepts '*' as a valid value. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsListByStreamingJobWithResult(string subscriptionId, string resourceGroupName, string jobName, string Select, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsListByStreamingJobWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsListByStreamingJobWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsListByStreamingJob_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 name of the resource group. The name is case insensitive. + /// The $select OData query parameter. This is a comma-separated list of structural properties to include + /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently + /// only accepts '*' as a valid value. + /// The name of the streaming job. + /// 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 FunctionsListByStreamingJob_Validate(string subscriptionId, string resourceGroupName, string Select, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(Select),Select); + await eventListener.AssertNotNull(nameof(jobName),jobName); + } + } + + /// + /// Retrieves the default definition of a function based on the parameters specified. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// Parameters used to specify the type of function to retrieve the default definition for. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsRetrieveDefaultDefinition(string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "/RetrieveDefaultDefinition" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsRetrieveDefaultDefinition_Call (request, onOk,eventListener,sender); + } + } + + /// + /// Retrieves the default definition of a function based on the parameters specified. + /// + /// + /// Parameters used to specify the type of function to retrieve the default definition for. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsRetrieveDefaultDefinitionViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var functionName = _match.Groups["functionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/functions/" + + functionName + + "/RetrieveDefaultDefinition" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsRetrieveDefaultDefinition_Call (request, onOk,eventListener,sender); + } + } + + /// + /// Retrieves the default definition of a function based on the parameters specified. + /// + /// + /// Parameters used to specify the type of function to retrieve the default definition for. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsRetrieveDefaultDefinitionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var functionName = _match.Groups["functionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/functions/" + + functionName + + "/RetrieveDefaultDefinition" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsRetrieveDefaultDefinitionWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Retrieves the default definition of a function based on the parameters specified. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// Json string supplied to the FunctionsRetrieveDefaultDefinition operation + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsRetrieveDefaultDefinitionViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string functionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "/RetrieveDefaultDefinition" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsRetrieveDefaultDefinition_Call (request, onOk,eventListener,sender); + } + } + + /// + /// Retrieves the default definition of a function based on the parameters specified. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// Json string supplied to the FunctionsRetrieveDefaultDefinition operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsRetrieveDefaultDefinitionViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string functionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "/RetrieveDefaultDefinition" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsRetrieveDefaultDefinitionWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Retrieves the default definition of a function based on the parameters specified. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// Parameters used to specify the type of function to retrieve the default definition for. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsRetrieveDefaultDefinitionWithResult(string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "/RetrieveDefaultDefinition" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsRetrieveDefaultDefinitionWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsRetrieveDefaultDefinitionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsRetrieveDefaultDefinition_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// Parameters used to specify the type of function to retrieve the default definition for. + /// 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 FunctionsRetrieveDefaultDefinition_Validate(string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(functionName),functionName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// Tests if the information provided for a function is valid. This can range from testing the connection to the underlying + /// web service behind the function or making sure the function code provided is syntactically correct. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// If the function specified does not already exist, this parameter must contain the full function definition + /// intended to be tested. If the function specified already exists, this parameter can be left null to test the existing + /// function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function + /// (exactly like a PATCH operation) and the resulting function will be tested. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsTest(string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "/test" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsTest_Call (request, onOk,eventListener,sender); + } + } + + /// + /// Tests if the information provided for a function is valid. This can range from testing the connection to the underlying + /// web service behind the function or making sure the function code provided is syntactically correct. + /// + /// + /// If the function specified does not already exist, this parameter must contain the full function definition + /// intended to be tested. If the function specified already exists, this parameter can be left null to test the existing + /// function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function + /// (exactly like a PATCH operation) and the resulting function will be tested. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsTestViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var functionName = _match.Groups["functionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/functions/" + + functionName + + "/test" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsTest_Call (request, onOk,eventListener,sender); + } + } + + /// + /// Tests if the information provided for a function is valid. This can range from testing the connection to the underlying + /// web service behind the function or making sure the function code provided is syntactically correct. + /// + /// + /// If the function specified does not already exist, this parameter must contain the full function definition + /// intended to be tested. If the function specified already exists, this parameter can be left null to test the existing + /// function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function + /// (exactly like a PATCH operation) and the resulting function will be tested. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsTestViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var functionName = _match.Groups["functionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/functions/" + + functionName + + "/test" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsTestWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Tests if the information provided for a function is valid. This can range from testing the connection to the underlying + /// web service behind the function or making sure the function code provided is syntactically correct. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// Json string supplied to the FunctionsTest operation + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsTestViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string functionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "/test" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsTest_Call (request, onOk,eventListener,sender); + } + } + + /// + /// Tests if the information provided for a function is valid. This can range from testing the connection to the underlying + /// web service behind the function or making sure the function code provided is syntactically correct. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// Json string supplied to the FunctionsTest operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsTestViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string functionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "/test" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsTestWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Tests if the information provided for a function is valid. This can range from testing the connection to the underlying + /// web service behind the function or making sure the function code provided is syntactically correct. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// If the function specified does not already exist, this parameter must contain the full function definition + /// intended to be tested. If the function specified already exists, this parameter can be left null to test the existing + /// function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function + /// (exactly like a PATCH operation) and the resulting function will be tested. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsTestWithResult(string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "/test" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsTestWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsTestWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: default + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": +case "testsucceeded": +case "deleting": + // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ResourceTestStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsTest_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: default + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": +case "testsucceeded": +case "deleting": + // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ResourceTestStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// If the function specified does not already exist, this parameter must contain the full function definition + /// intended to be tested. If the function specified already exists, this parameter can be left null to test the existing + /// function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function + /// (exactly like a PATCH operation) and the resulting function will be tested. + /// 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 FunctionsTest_Validate(string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(functionName),functionName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) a function without affecting the rest the job or function definition. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// A function object. The properties specified here will overwrite the corresponding properties in the + /// existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the + /// corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsUpdate(string subscriptionId, string resourceGroupName, string jobName, string functionName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsUpdate_Call (request, onOk,eventListener,sender); + } + } + + /// + /// update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) a function without affecting the rest the job or function definition. + /// + /// + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// A function object. The properties specified here will overwrite the corresponding properties in the + /// existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the + /// corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var functionName = _match.Groups["functionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/functions/" + + functionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsUpdate_Call (request, onOk,eventListener,sender); + } + } + + /// + /// update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) a function without affecting the rest the job or function definition. + /// + /// + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// A function object. The properties specified here will overwrite the corresponding properties in the + /// existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the + /// corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsUpdateViaIdentityWithResult(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var functionName = _match.Groups["functionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/functions/" + + functionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) a function without affecting the rest the job or function definition. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the FunctionsUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string functionName, string ifMatch, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FunctionsUpdate_Call (request, onOk,eventListener,sender); + } + } + + /// + /// update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) a function without affecting the rest the job or function definition. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the FunctionsUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string functionName, string ifMatch, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) a function without affecting the rest the job or function definition. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the function. + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// A function object. The properties specified here will overwrite the corresponding properties in the + /// existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the + /// corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsUpdateWithResult(string subscriptionId, string resourceGroupName, string jobName, string functionName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/functions/" + + global::System.Uri.EscapeDataString(functionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.FunctionsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 name of the resource group. The name is case insensitive. + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the + /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The name of the streaming job. + /// The name of the function. + /// A function object. The properties specified here will overwrite the corresponding properties in the + /// existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the + /// corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. + /// 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 FunctionsUpdate_Validate(string subscriptionId, string resourceGroupName, string ifMatch, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); + await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(functionName),functionName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// replace an input or replaces an already existing input under an existing streaming job. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the input. + /// Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other + /// values will result in a 412 Pre-condition Failed response. + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the input that will be used to create a new input or replace the existing one under + /// the streaming job. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsCreateOrReplace(string subscriptionId, string resourceGroupName, string jobName, string inputName, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/inputs/" + + global::System.Uri.EscapeDataString(inputName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.InputsCreateOrReplace_Call (request, onOk,onCreated,eventListener,sender); + } + } + + /// + /// replace an input or replaces an already existing input under an existing streaming job. + /// + /// + /// Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other + /// values will result in a 412 Pre-condition Failed response. + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the input that will be used to create a new input or replace the existing one under + /// the streaming job. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsCreateOrReplaceViaIdentity(global::System.String viaIdentity, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/inputs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var inputName = _match.Groups["inputName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/inputs/" + + inputName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.InputsCreateOrReplace_Call (request, onOk,onCreated,eventListener,sender); + } + } + + /// + /// replace an input or replaces an already existing input under an existing streaming job. + /// + /// + /// Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other + /// values will result in a 412 Pre-condition Failed response. + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the input that will be used to create a new input or replace the existing one under + /// the streaming job. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsCreateOrReplaceViaIdentityWithResult(global::System.String viaIdentity, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/inputs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var inputName = _match.Groups["inputName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/inputs/" + + inputName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.InputsCreateOrReplaceWithResult_Call (request, eventListener,sender); + } + } + + /// + /// replace an input or replaces an already existing input under an existing streaming job. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the input. + /// Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other + /// values will result in a 412 Pre-condition Failed response. + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the InputsCreateOrReplace operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsCreateOrReplaceViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string inputName, string ifNoneMatch, string ifMatch, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/inputs/" + + global::System.Uri.EscapeDataString(inputName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.InputsCreateOrReplace_Call (request, onOk,onCreated,eventListener,sender); + } + } + + /// + /// replace an input or replaces an already existing input under an existing streaming job. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the input. + /// Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other + /// values will result in a 412 Pre-condition Failed response. + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the InputsCreateOrReplace operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersCreateOrUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsCreateOrReplaceViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string inputName, string ifNoneMatch, string ifMatch, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/inputs/" + + global::System.Uri.EscapeDataString(inputName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifNoneMatch) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.InputsCreateOrReplaceWithResult_Call (request, eventListener,sender); + } + } - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + /// + /// replace an input or replaces an already existing input under an existing streaming job. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the input. + /// Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other + /// values will result in a 412 Pre-condition Failed response. + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the input that will be used to create a new input or replace the existing one under + /// the streaming job. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsCreateOrReplaceWithResult(string subscriptionId, string resourceGroupName, string jobName, string inputName, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/inputs/" + + global::System.Uri.EscapeDataString(inputName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // 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(); - await waiting; + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } - // drop the old response - _response?.Dispose(); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.InputsCreateOrReplaceWithResult_Call (request, eventListener,sender); + } + } - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsCreateOrReplaceWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // 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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": -case "testsucceeded": -case "deleting": - // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + case global::System.Net.HttpStatusCode.Created: { - continue; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_originalUri)) + default: { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); } } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 201 (Created). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsCreateOrReplace_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -276,15 +6549,19 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } - default: + case global::System.Net.HttpStatusCode.Created: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } } } finally @@ -298,22 +6575,24 @@ public partial class StreamAnalytics } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the cluster. - /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the - /// last-seen ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new resource to be created, but to prevent updating an existing record - /// set. Other values will result in a 412 Pre-condition Failed response. - /// The definition of the cluster that will be used to create a new cluster or replace the existing one. + /// Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other + /// values will result in a 412 Pre-condition Failed response. + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// The name of the streaming job. + /// The name of the input. + /// The definition of the input that will be used to create a new input or replace the existing one under + /// the streaming job. /// 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 ClustersCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterName, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task InputsCreateOrReplace_Validate(string subscriptionId, string resourceGroupName, string ifNoneMatch, string ifMatch, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -322,32 +6601,31 @@ public partial class StreamAnalytics await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); - await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); await eventListener.AssertNotNull(nameof(ifNoneMatch),ifNoneMatch); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); + await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(inputName),inputName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Deletes the specified cluster. + /// Deletes an input from the streaming job. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the cluster. + /// The name of the streaming job. + /// The name of the input. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns 404 (NotFound). - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersDelete(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func onNotFound, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsDelete(string subscriptionId, string resourceGroupName, string jobName, string inputName, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { - var apiVersion = @"2020-03-01-preview"; + var apiVersion = @"2017-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -357,8 +6635,10 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StreamAnalytics/clusters/" - + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/inputs/" + + global::System.Uri.EscapeDataString(inputName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -372,48 +6652,48 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersDelete_Call(request,onOk,onNoContent,onNotFound,onDefault,eventListener,sender); + await this.InputsDelete_Call (request, onOk,onNoContent,eventListener,sender); } } - /// Deletes the specified cluster. + /// Deletes an input from the streaming job. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns 204 (NoContent). - /// a delegate that is called when the remote service returns 404 (NotFound). - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func onNotFound, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { - var apiVersion = @"2020-03-01-preview"; + var apiVersion = @"2017-04-01-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.StreamAnalytics/clusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/inputs/(?[^/]+)$", 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.StreamAnalytics/clusters/{clusterName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var clusterName = _match.Groups["clusterName"].Value; + var jobName = _match.Groups["jobName"].Value; + var inputName = _match.Groups["inputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.StreamAnalytics/clusters/" - + clusterName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/inputs/" + + inputName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -427,23 +6707,20 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersDelete_Call(request,onOk,onNoContent,onNotFound,onDefault,eventListener,sender); + await this.InputsDelete_Call (request, onOk,onNoContent,eventListener,sender); } } - /// 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 204 (NoContent). - /// a delegate that is called when the remote service returns 404 (NotFound). - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func onNotFound, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task InputsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -454,108 +6731,7 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": -case "testsucceeded": -case "deleting": - // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? - if (!string.IsNullOrWhiteSpace(_finalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -572,17 +6748,9 @@ public partial class StreamAnalytics await onNoContent(_response); break; } - case global::System.Net.HttpStatusCode.NotFound: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNotFound(_response); - break; - } default: { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); } } } @@ -597,17 +6765,18 @@ public partial class StreamAnalytics } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the cluster. + /// The name of the streaming job. + /// The name of the input. /// 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 ClustersDelete_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task InputsDelete_Validate(string subscriptionId, string resourceGroupName, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -616,26 +6785,26 @@ public partial class StreamAnalytics await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(inputName),inputName); } } - /// Gets information about the specified cluster. + /// Gets details about the specified input. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the cluster. + /// The name of the streaming job. + /// The name of the input. /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersGet(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsGet(string subscriptionId, string resourceGroupName, string jobName, string inputName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { - var apiVersion = @"2020-03-01-preview"; + var apiVersion = @"2017-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -645,8 +6814,10 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StreamAnalytics/clusters/" - + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/inputs/" + + global::System.Uri.EscapeDataString(inputName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -660,46 +6831,47 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersGet_Call(request,onOk,onDefault,eventListener,sender); + await this.InputsGet_Call (request, onOk,eventListener,sender); } } - /// Gets information about the specified cluster. + /// Gets details about the specified input. /// /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { - var apiVersion = @"2020-03-01-preview"; + var apiVersion = @"2017-04-01-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.StreamAnalytics/clusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/inputs/(?[^/]+)$", 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.StreamAnalytics/clusters/{clusterName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var clusterName = _match.Groups["clusterName"].Value; + var jobName = _match.Groups["jobName"].Value; + var inputName = _match.Groups["inputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.StreamAnalytics/clusters/" - + clusterName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/inputs/" + + inputName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -713,21 +6885,163 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersGet_Call(request,onOk,onDefault,eventListener,sender); + await this.InputsGet_Call (request, onOk,eventListener,sender); + } + } + + /// Gets details about the specified input. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/inputs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var inputName = _match.Groups["inputName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/inputs/" + + inputName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.InputsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets details about the specified input. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the input. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsGetWithResult(string subscriptionId, string resourceGroupName, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/inputs/" + + global::System.Uri.EscapeDataString(inputName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.InputsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersGet_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, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task InputsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -738,6 +7052,7 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -745,14 +7060,12 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); } } } @@ -767,17 +7080,18 @@ public partial class StreamAnalytics } /// - /// Validation method for method. Call this like the actual call, but you will get validation events + /// Validation method for method. Call this like the actual call, but you will get validation events /// back. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the cluster. + /// The name of the streaming job. + /// The name of the input. /// 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 ClustersGet_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task InputsGet_Validate(string subscriptionId, string resourceGroupName, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -786,25 +7100,28 @@ public partial class StreamAnalytics await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(inputName),inputName); } } - /// Lists all of the clusters in the given resource group. + /// Lists all of the inputs under the specified streaming job. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The $select OData query parameter. This is a comma-separated list of structural properties to include + /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently + /// only accepts '*' as a valid value. /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsListByStreamingJob(string subscriptionId, string resourceGroupName, string jobName, string Select, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { - var apiVersion = @"2020-03-01-preview"; + var apiVersion = @"2017-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -814,9 +7131,13 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StreamAnalytics/clusters" + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/inputs" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -828,46 +7149,52 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.InputsListByStreamingJob_Call (request, onOk,eventListener,sender); } } - /// Lists all of the clusters in the given resource group. + /// Lists all of the inputs under the specified streaming job. /// + /// The $select OData query parameter. This is a comma-separated list of structural properties to include + /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently + /// only accepts '*' as a valid value. /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsListByStreamingJobViaIdentity(global::System.String viaIdentity, string Select, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { - var apiVersion = @"2020-03-01-preview"; + var apiVersion = @"2017-04-01-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.StreamAnalytics/clusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/inputs$", 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.StreamAnalytics/clusters'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.StreamAnalytics/clusters" + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/inputs" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -879,21 +7206,169 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + await this.InputsListByStreamingJob_Call (request, onOk,eventListener,sender); + } + } + + /// Lists all of the inputs under the specified streaming job. + /// + /// The $select OData query parameter. This is a comma-separated list of structural properties to include + /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently + /// only accepts '*' as a valid value. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsListByStreamingJobViaIdentityWithResult(global::System.String viaIdentity, string Select, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/inputs$", 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.StreamAnalytics/streamingjobs/{jobName}/inputs'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/inputs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.InputsListByStreamingJobWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all of the inputs under the specified streaming job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The $select OData query parameter. This is a comma-separated list of structural properties to include + /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently + /// only accepts '*' as a valid value. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsListByStreamingJobWithResult(string subscriptionId, string resourceGroupName, string jobName, string Select, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/inputs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.InputsListByStreamingJobWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsListByStreamingJobWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListByResourceGroup_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, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task InputsListByStreamingJob_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -904,6 +7379,7 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -911,14 +7387,12 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.InputListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); } } } @@ -933,16 +7407,20 @@ public partial class StreamAnalytics } /// - /// 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 name of the resource group. The name is case insensitive. + /// The $select OData query parameter. This is a comma-separated list of structural properties to include + /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently + /// only accepts '*' as a valid value. + /// The name of the streaming job. /// 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 ClustersListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task InputsListByStreamingJob_Validate(string subscriptionId, string resourceGroupName, string Select, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -951,31 +7429,113 @@ public partial class StreamAnalytics await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(Select),Select); + await eventListener.AssertNotNull(nameof(jobName),jobName); } } - /// Lists all of the clusters in the given subscription. + /// + /// Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. + /// /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the input. + /// If the input specified does not already exist, this parameter must contain the full input definition + /// intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input + /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly + /// like a PATCH operation) and the resulting input will be tested. /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsTest(string subscriptionId, string resourceGroupName, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2020-03-01-preview"; + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/inputs/" + + global::System.Uri.EscapeDataString(inputName) + + "/test" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.InputsTest_Call (request, onOk,eventListener,sender); + } + } + + /// + /// Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. + /// + /// + /// If the input specified does not already exist, this parameter must contain the full input definition + /// intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input + /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly + /// like a PATCH operation) and the resulting input will be tested. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsTestViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/inputs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var inputName = _match.Groups["inputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.StreamAnalytics/clusters" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/inputs/" + + inputName + + "/test" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -984,145 +7544,210 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + await this.InputsTest_Call (request, onOk,eventListener,sender); } } - /// Lists all of the clusters in the given subscription. + /// + /// Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. + /// /// - /// 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). + /// If the input specified does not already exist, this parameter must contain the full input definition + /// intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input + /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly + /// like a PATCH operation) and the resulting input will be tested. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsTestViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2020-03-01-preview"; + var apiVersion = @"2017-04-01-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.StreamAnalytics/clusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/inputs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/clusters'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var inputName = _match.Groups["inputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.StreamAnalytics/clusters" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/inputs/" + + inputName + + "/test" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ClustersListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + return await this.InputsTestWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. + /// + /// Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the input. + /// Json string supplied to the InputsTest 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListBySubscription_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, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsTestViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string inputName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/inputs/" + + global::System.Uri.EscapeDataString(inputName) + + "/test" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.InputsTest_Call (request, onOk,eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. /// /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the input. + /// Json string supplied to the InputsTest operation /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task InputsTestViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string inputName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/inputs/" + + global::System.Uri.EscapeDataString(inputName) + + "/test" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.InputsTestWithResult_Call (request, eventListener,sender); } } - /// Lists all of the streaming jobs in the given cluster. + /// + /// Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the cluster. - /// 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). + /// The name of the streaming job. + /// The name of the input. + /// If the input specified does not already exist, this parameter must contain the full input definition + /// intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input + /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly + /// like a PATCH operation) and the resulting input will be tested. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListStreamingJobs(string subscriptionId, string resourceGroupName, string clusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsTestWithResult(string subscriptionId, string resourceGroupName, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2020-03-01-preview"; + var apiVersion = @"2017-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1132,101 +7757,294 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StreamAnalytics/clusters/" - + global::System.Uri.EscapeDataString(clusterName) - + "/listStreamingJobs" + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/inputs/" + + global::System.Uri.EscapeDataString(inputName) + + "/test" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.ClustersListStreamingJobs_Call(request,onOk,onDefault,eventListener,sender); + return await this.InputsTestWithResult_Call (request, eventListener,sender); } } - /// Lists all of the streaming jobs in the given cluster. - /// - /// 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). + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListStreamingJobsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task InputsTestWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { - var apiVersion = @"2020-03-01-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.StreamAnalytics/clusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + global::System.Net.Http.HttpResponseMessage _response = null; + try { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}/listStreamingJobs'"); - } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: default + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var clusterName = _match.Groups["clusterName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StreamAnalytics/clusters/" - + clusterName - + "/listStreamingJobs" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + // 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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": +case "testsucceeded": +case "deleting": + // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // drop the old response + _response?.Dispose(); - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ClustersListStreamingJobs_Call(request,onOk,onDefault,eventListener,sender); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ResourceTestStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersListStreamingJobs_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, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task InputsTest_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: default + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": +case "testsucceeded": +case "deleting": + // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1234,14 +8052,12 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ClusterJobListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ResourceTestStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); } } } @@ -1256,17 +8072,22 @@ public partial class StreamAnalytics } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the cluster. + /// The name of the streaming job. + /// The name of the input. + /// If the input specified does not already exist, this parameter must contain the full input definition + /// intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input + /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly + /// like a PATCH operation) and the resulting input will be tested. /// 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 ClustersListStreamingJobs_Validate(string subscriptionId, string resourceGroupName, string clusterName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task InputsTest_Validate(string subscriptionId, string resourceGroupName, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1275,33 +8096,37 @@ public partial class StreamAnalytics await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(inputName),inputName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } /// - /// Updates an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without - /// affecting the rest of the cluster definition. + /// update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an input without affecting the rest the job or input definition. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the cluster. - /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the - /// last-seen ETag value to prevent accidentally overwriting concurrent changes. - /// The properties specified here will overwrite the corresponding properties in the existing cluster (ie. - /// Those properties will be updated). + /// The name of the streaming job. + /// The name of the input. + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// An Input object. The properties specified here will overwrite the corresponding properties in the existing + /// input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding + /// property in the existing input will remain the same and not change as a result of this PATCH 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersUpdate(string subscriptionId, string resourceGroupName, string clusterName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsUpdate(string subscriptionId, string resourceGroupName, string jobName, string inputName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2020-03-01-preview"; + var apiVersion = @"2017-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1311,8 +8136,10 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StreamAnalytics/clusters/" - + global::System.Uri.EscapeDataString(clusterName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/inputs/" + + global::System.Uri.EscapeDataString(inputName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1332,57 +8159,60 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.InputsUpdate_Call (request, onOk,eventListener,sender); } } /// - /// Updates an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without - /// affecting the rest of the cluster definition. + /// update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an input without affecting the rest the job or input definition. /// /// - /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the - /// last-seen ETag value to prevent accidentally overwriting concurrent changes. - /// The properties specified here will overwrite the corresponding properties in the existing cluster (ie. - /// Those properties will be updated). + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// An Input object. The properties specified here will overwrite the corresponding properties in the existing + /// input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding + /// property in the existing input will remain the same and not change as a result of this PATCH 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2020-03-01-preview"; + var apiVersion = @"2017-04-01-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.StreamAnalytics/clusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/inputs/(?[^/]+)$", 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.StreamAnalytics/clusters/{clusterName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var clusterName = _match.Groups["clusterName"].Value; + var jobName = _match.Groups["jobName"].Value; + var inputName = _match.Groups["inputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.StreamAnalytics/clusters/" - + clusterName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/inputs/" + + inputName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1402,217 +8232,165 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ClustersUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.InputsUpdate_Call (request, onOk,eventListener,sender); } } - /// 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). + /// + /// update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an input without affecting the rest the job or input definition. + /// + /// + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// An Input object. The properties specified here will overwrite the corresponding properties in the existing + /// input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding + /// property in the existing input will remain the same and not change as a result of this PATCH operation. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. /// - internal async global::System.Threading.Tasks.Task ClustersUpdate_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, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsUpdateViaIdentityWithResult(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // verify that Identity format is an exact match for uri - // 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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": -case "testsucceeded": -case "deleting": - // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/inputs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'"); + } - // 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? - if (!string.IsNullOrWhiteSpace(_originalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var inputName = _match.Groups["inputName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/inputs/" + + inputName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // drop the old response - _response?.Dispose(); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.Cluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.Error.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally + // add headers parameters + if (null != ifMatch) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + request.Headers.Add("If-Match",ifMatch); } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.InputsUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an input without affecting the rest the job or input definition. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the cluster. - /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the - /// last-seen ETag value to prevent accidentally overwriting concurrent changes. - /// The properties specified here will overwrite the corresponding properties in the existing cluster (ie. - /// Those properties will be updated). + /// The name of the streaming job. + /// The name of the input. + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the InputsUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ClustersUpdate_Validate(string subscriptionId, string resourceGroupName, string clusterName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task InputsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string inputName, string ifMatch, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(clusterName),clusterName); - await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/inputs/" + + global::System.Uri.EscapeDataString(inputName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.InputsUpdate_Call (request, onOk,eventListener,sender); } } /// - /// Creates a function or replaces an already existing function under an existing streaming job. + /// update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an input without affecting the rest the job or input definition. /// - /// The ETag of the function. Omit this value to always overwrite the current function. Specify the - /// last-seen ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new function to be created, but to prevent updating an existing function. - /// Other values will result in a 412 Pre-condition Failed response. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the function. - /// The definition of the function that will be used to create a new function or replace the existing one - /// under the streaming job. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). + /// The name of the input. + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the InputsUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsCreateOrReplace(string ifMatch, string ifNoneMatch, string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string inputName, string ifMatch, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -1626,126 +8404,153 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) - + "/functions/" - + global::System.Uri.EscapeDataString(functionName) + + "/inputs/" + + global::System.Uri.EscapeDataString(inputName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // add headers parameters if (null != ifMatch) { request.Headers.Add("If-Match",ifMatch); } - if (null != ifNoneMatch) - { - request.Headers.Add("If-None-Match",ifNoneMatch); - } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.FunctionsCreateOrReplace_Call(request,onOk,onCreated,eventListener,sender); + return await this.InputsUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Creates a function or replaces an already existing function under an existing streaming job. + /// update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an input without affecting the rest the job or input definition. /// - /// - /// The ETag of the function. Omit this value to always overwrite the current function. Specify the - /// last-seen ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new function to be created, but to prevent updating an existing function. - /// Other values will result in a 412 Pre-condition Failed response. - /// The definition of the function that will be used to create a new function or replace the existing one - /// under the streaming job. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the input. + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// An Input object. The properties specified here will overwrite the corresponding properties in the existing + /// input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding + /// property in the existing input will remain the same and not change as a result of this PATCH operation. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsCreateOrReplaceViaIdentity(global::System.String viaIdentity, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task InputsUpdateWithResult(string subscriptionId, string resourceGroupName, string jobName, string inputName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var jobName = _match.Groups["jobName"].Value; - var functionName = _match.Groups["functionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + jobName - + "/functions/" - + functionName + + global::System.Uri.EscapeDataString(jobName) + + "/inputs/" + + global::System.Uri.EscapeDataString(inputName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // add headers parameters if (null != ifMatch) { request.Headers.Add("If-Match",ifMatch); } - if (null != ifNoneMatch) - { - request.Headers.Add("If-None-Match",ifNoneMatch); - } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.FunctionsCreateOrReplace_Call(request,onOk,onCreated,eventListener,sender); + return await this.InputsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 201 (Created). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsCreateOrReplace_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task InputsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1756,6 +8561,7 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1763,13 +8569,7 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Function.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); - break; - } - case global::System.Net.HttpStatusCode.Created: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Function.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -1789,55 +8589,48 @@ public partial class StreamAnalytics } /// - /// 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 ETag of the function. Omit this value to always overwrite the current function. Specify the - /// last-seen ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new function to be created, but to prevent updating an existing function. - /// Other values will result in a 412 Pre-condition Failed response. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. /// The name of the streaming job. - /// The name of the function. - /// The definition of the function that will be used to create a new function or replace the existing one - /// under the streaming job. + /// The name of the input. + /// An Input object. The properties specified here will overwrite the corresponding properties in the existing + /// input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding + /// property in the existing input will remain the same and not change as a result of this PATCH operation. /// 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 FunctionsCreateOrReplace_Validate(string ifMatch, string ifNoneMatch, string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task InputsUpdate_Validate(string subscriptionId, string resourceGroupName, string ifMatch, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); - await eventListener.AssertNotNull(nameof(ifNoneMatch),ifNoneMatch); await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(functionName),functionName); + await eventListener.AssertNotNull(nameof(inputName),inputName); await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// Deletes a function from the streaming job. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the streaming job. - /// The name of the function. + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Lists all of the available Stream Analytics related operations. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsDelete(string subscriptionId, string resourceGroupName, string jobName, string functionName, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -1845,14 +8638,7 @@ public partial class StreamAnalytics { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + global::System.Uri.EscapeDataString(jobName) - + "/functions/" - + global::System.Uri.EscapeDataString(functionName) + "/providers/Microsoft.StreamAnalytics/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1861,25 +8647,24 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FunctionsDelete_Call(request,onOk,onNoContent,eventListener,sender); + await this.OperationsList_Call (request, onOk,eventListener,sender); } } - /// Deletes a function from the streaming job. + /// Lists all of the available Stream Analytics related operations. /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -1887,27 +8672,16 @@ public partial class StreamAnalytics { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.StreamAnalytics/operations$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'"); + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.StreamAnalytics/operations'"); } // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var jobName = _match.Groups["jobName"].Value; - var functionName = _match.Groups["functionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + jobName - + "/functions/" - + functionName + "/providers/Microsoft.StreamAnalytics/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1916,25 +8690,146 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FunctionsDelete_Call(request,onOk,onNoContent,eventListener,sender); + await this.OperationsList_Call (request, onOk,eventListener,sender); + } + } + + /// Lists all of the available Stream Analytics related operations. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.StreamAnalytics/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.StreamAnalytics/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.StreamAnalytics/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all of the available Stream Analytics related operations. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Microsoft.StreamAnalytics/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1945,6 +8840,7 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1952,13 +8848,7 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1978,44 +8868,43 @@ public partial class StreamAnalytics } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the streaming job. - /// The name of the function. /// 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 FunctionsDelete_Validate(string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(functionName),functionName); + } } - /// Gets details about the specified function. + /// + /// replace an output or replaces an already existing output under an existing streaming job. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the function. + /// The name of the output. + /// Set to '*' to allow a new output to be created, but to prevent updating an existing output. + /// Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the output that will be used to create a new output or replace the existing one under + /// the streaming job. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsGet(string subscriptionId, string resourceGroupName, string jobName, string functionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsCreateOrReplace(string subscriptionId, string resourceGroupName, string jobName, string outputName, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -2029,8 +8918,8 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) - + "/functions/" - + global::System.Uri.EscapeDataString(functionName) + + "/outputs/" + + global::System.Uri.EscapeDataString(outputName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2039,24 +8928,125 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OutputsCreateOrReplace_Call (request, onOk,onCreated,eventListener,sender); + } + } + + /// + /// replace an output or replaces an already existing output under an existing streaming job. + /// + /// + /// Set to '*' to allow a new output to be created, but to prevent updating an existing output. + /// Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the output that will be used to create a new output or replace the existing one under + /// the streaming job. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsCreateOrReplaceViaIdentity(global::System.String viaIdentity, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/outputs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var outputName = _match.Groups["outputName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/outputs/" + + outputName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FunctionsGet_Call(request,onOk,eventListener,sender); + await this.OutputsCreateOrReplace_Call (request, onOk,onCreated,eventListener,sender); } } - /// Gets details about the specified function. + /// + /// replace an output or replaces an already existing output under an existing streaming job. + /// /// - /// a delegate that is called when the remote service returns 200 (OK). + /// Set to '*' to allow a new output to be created, but to prevent updating an existing output. + /// Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the output that will be used to create a new output or replace the existing one under + /// the streaming job. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsCreateOrReplaceViaIdentityWithResult(global::System.String viaIdentity, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -2064,17 +9054,17 @@ public partial class StreamAnalytics { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/outputs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var jobName = _match.Groups["jobName"].Value; - var functionName = _match.Groups["functionName"].Value; + var outputName = _match.Groups["outputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -2083,111 +9073,59 @@ public partial class StreamAnalytics + resourceGroupName + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + jobName - + "/functions/" - + functionName + + "/outputs/" + + outputName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.FunctionsGet_Call(request,onOk,eventListener,sender); - } - } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // add headers parameters + if (null != ifNoneMatch) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Function.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); - break; - } - default: - { - throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } + request.Headers.Add("If-None-Match",ifNoneMatch); } - finally + if (null != ifMatch) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + request.Headers.Add("If-Match",ifMatch); } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OutputsCreateOrReplaceWithResult_Call (request, eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// replace an output or replaces an already existing output under an existing streaming job. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the function. - /// 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 FunctionsGet_Validate(string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(functionName),functionName); - } - } - - /// Lists all of the functions under the specified streaming job. - /// The $select OData query parameter. This is a comma-separated list of structural properties to include - /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently - /// only accepts '*' as a valid value. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the streaming job. + /// The name of the output. + /// Set to '*' to allow a new output to be created, but to prevent updating an existing output. + /// Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the OutputsCreateOrReplace operation /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsListByStreamingJob(string Select, string subscriptionId, string resourceGroupName, string jobName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsCreateOrReplaceViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string outputName, string ifNoneMatch, string ifMatch, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -2201,10 +9139,9 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) - + "/functions" + + "/outputs/" + + global::System.Uri.EscapeDataString(outputName) + "?" - + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2212,161 +9149,115 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FunctionsListByStreamingJob_Call(request,onOk,eventListener,sender); + await this.OutputsCreateOrReplace_Call (request, onOk,onCreated,eventListener,sender); } } - /// Lists all of the functions under the specified streaming job. - /// - /// The $select OData query parameter. This is a comma-separated list of structural properties to include - /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently - /// only accepts '*' as a valid value. - /// a delegate that is called when the remote service returns 200 (OK). + /// + /// replace an output or replaces an already existing output under an existing streaming job. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the output. + /// Set to '*' to allow a new output to be created, but to prevent updating an existing output. + /// Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the OutputsCreateOrReplace operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsListByStreamingJobViaIdentity(global::System.String viaIdentity, string Select, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsCreateOrReplaceViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string outputName, string ifNoneMatch, string ifMatch, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/functions$", 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.StreamAnalytics/streamingjobs/{jobName}/functions'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var jobName = _match.Groups["jobName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + jobName - + "/functions" + + global::System.Uri.EscapeDataString(jobName) + + "/outputs/" + + global::System.Uri.EscapeDataString(outputName) + "?" - + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.FunctionsListByStreamingJob_Call(request,onOk,eventListener,sender); - } - } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsListByStreamingJob_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // add headers parameters + if (null != ifNoneMatch) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } + request.Headers.Add("If-None-Match",ifNoneMatch); } - finally + if (null != ifMatch) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + request.Headers.Add("If-Match",ifMatch); } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OutputsCreateOrReplaceWithResult_Call (request, eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. - /// - /// The $select OData query parameter. This is a comma-separated list of structural properties to include - /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently - /// only accepts '*' as a valid value. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the streaming job. - /// 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 FunctionsListByStreamingJob_Validate(string Select, string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(Select),Select); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(jobName),jobName); - } - } - - /// - /// Retrieves the default definition of a function based on the parameters specified. + /// replace an output or replaces an already existing output under an existing streaming job. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the function. - /// Parameters used to specify the type of function to retrieve the default definition for. - /// a delegate that is called when the remote service returns 200 (OK). + /// The name of the output. + /// Set to '*' to allow a new output to be created, but to prevent updating an existing output. + /// Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the output that will be used to create a new output or replace the existing one under + /// the streaming job. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsRetrieveDefaultDefinition(string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsCreateOrReplaceWithResult(string subscriptionId, string resourceGroupName, string jobName, string outputName, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -2380,101 +9271,101 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) - + "/functions/" - + global::System.Uri.EscapeDataString(functionName) - + "/RetrieveDefaultDefinition" + + "/outputs/" + + global::System.Uri.EscapeDataString(outputName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.FunctionsRetrieveDefaultDefinition_Call(request,onOk,eventListener,sender); + return await this.OutputsCreateOrReplaceWithResult_Call (request, eventListener,sender); } } - /// - /// Retrieves the default definition of a function based on the parameters specified. - /// - /// - /// Parameters used to specify the type of function to retrieve the default definition for. - /// a delegate that is called when the remote service returns 200 (OK). + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsRetrieveDefaultDefinitionViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OutputsCreateOrReplaceWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { - var apiVersion = @"2017-04-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition'"); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var jobName = _match.Groups["jobName"].Value; - var functionName = _match.Groups["functionName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + jobName - + "/functions/" - + functionName - + "/RetrieveDefaultDefinition" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.FunctionsRetrieveDefaultDefinition_Call(request,onOk,eventListener,sender); } } - /// 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 201 (Created). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsRetrieveDefaultDefinition_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OutputsCreateOrReplace_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2485,6 +9376,7 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2492,7 +9384,13 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Function.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -2512,19 +9410,24 @@ public partial class StreamAnalytics } /// - /// 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 name of the resource group. The name is case insensitive. + /// Set to '*' to allow a new output to be created, but to prevent updating an existing output. + /// Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. /// The name of the streaming job. - /// The name of the function. - /// Parameters used to specify the type of function to retrieve the default definition for. + /// The name of the output. + /// The definition of the output that will be used to create a new output or replace the existing one under + /// the streaming job. /// 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 FunctionsRetrieveDefaultDefinition_Validate(string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task OutputsCreateOrReplace_Validate(string subscriptionId, string resourceGroupName, string ifNoneMatch, string ifMatch, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2533,33 +9436,29 @@ public partial class StreamAnalytics await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(ifNoneMatch),ifNoneMatch); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(functionName),functionName); + await eventListener.AssertNotNull(nameof(outputName),outputName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Tests if the information provided for a function is valid. This can range from testing the connection to the underlying - /// web service behind the function or making sure the function code provided is syntactically correct. - /// + /// Deletes an output from the streaming job. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the function. - /// If the function specified does not already exist, this parameter must contain the full function definition - /// intended to be tested. If the function specified already exists, this parameter can be left null to test the existing - /// function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function - /// (exactly like a PATCH operation) and the resulting function will be tested. + /// The name of the output. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsTest(string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsDelete(string subscriptionId, string resourceGroupName, string jobName, string outputName, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -2573,9 +9472,8 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) - + "/functions/" - + global::System.Uri.EscapeDataString(functionName) - + "/test" + + "/outputs/" + + global::System.Uri.EscapeDataString(outputName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2584,35 +9482,25 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FunctionsTest_Call(request,onOk,eventListener,sender); + await this.OutputsDelete_Call (request, onOk,onNoContent,eventListener,sender); } } - /// - /// Tests if the information provided for a function is valid. This can range from testing the connection to the underlying - /// web service behind the function or making sure the function code provided is syntactically correct. - /// + /// Deletes an output from the streaming job. /// - /// If the function specified does not already exist, this parameter must contain the full function definition - /// intended to be tested. If the function specified already exists, this parameter can be left null to test the existing - /// function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function - /// (exactly like a PATCH operation) and the resulting function will be tested. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsTestViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -2620,17 +9508,17 @@ public partial class StreamAnalytics { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/outputs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var jobName = _match.Groups["jobName"].Value; - var functionName = _match.Groups["functionName"].Value; + var outputName = _match.Groups["outputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -2639,151 +9527,46 @@ public partial class StreamAnalytics + resourceGroupName + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + jobName - + "/functions/" - + functionName - + "/test" + + "/outputs/" + + outputName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.FunctionsTest_Call(request,onOk,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsTest_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": -case "testsucceeded": -case "deleting": - // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? - if (!string.IsNullOrWhiteSpace(_finalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OutputsDelete_Call (request, onOk,onNoContent,eventListener,sender); + } + } + + /// 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 204 (NoContent). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2791,7 +9574,13 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ResourceTestStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: @@ -2811,22 +9600,18 @@ public partial class StreamAnalytics } /// - /// 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 name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the function. - /// If the function specified does not already exist, this parameter must contain the full function definition - /// intended to be tested. If the function specified already exists, this parameter can be left null to test the existing - /// function as is or if specified, the properties specified will overwrite the corresponding properties in the existing function - /// (exactly like a PATCH operation) and the resulting function will be tested. + /// The name of the output. /// 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 FunctionsTest_Validate(string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task OutputsDelete_Validate(string subscriptionId, string resourceGroupName, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2835,34 +9620,24 @@ public partial class StreamAnalytics await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(functionName),functionName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(outputName),outputName); } } - /// - /// Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or - /// two properties) a function without affecting the rest the job or function definition. - /// - /// The ETag of the function. Omit this value to always overwrite the current function. Specify the - /// last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Gets details about the specified output. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the function. - /// A function object. The properties specified here will overwrite the corresponding properties in the - /// existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the - /// corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. + /// The name of the output. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsUpdate(string ifMatch, string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsGet(string subscriptionId, string resourceGroupName, string jobName, string outputName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -2876,8 +9651,8 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) - + "/functions/" - + global::System.Uri.EscapeDataString(functionName) + + "/outputs/" + + global::System.Uri.EscapeDataString(outputName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2886,42 +9661,24 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // add headers parameters - if (null != ifMatch) - { - request.Headers.Add("If-Match",ifMatch); - } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.FunctionsUpdate_Call(request,onOk,eventListener,sender); + await this.OutputsGet_Call (request, onOk,eventListener,sender); } } - /// - /// Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or - /// two properties) a function without affecting the rest the job or function definition. - /// + /// Gets details about the specified output. /// - /// The ETag of the function. Omit this value to always overwrite the current function. Specify the - /// last-seen ETag value to prevent accidentally overwriting concurrent changes. - /// A function object. The properties specified here will overwrite the corresponding properties in the - /// existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the - /// corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 FunctionsUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -2929,17 +9686,17 @@ public partial class StreamAnalytics { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/functions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/outputs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var jobName = _match.Groups["jobName"].Value; - var functionName = _match.Groups["functionName"].Value; + var outputName = _match.Groups["outputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -2948,8 +9705,8 @@ public partial class StreamAnalytics + resourceGroupName + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + jobName - + "/functions/" - + functionName + + "/outputs/" + + outputName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2958,26 +9715,160 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // add headers parameters - if (null != ifMatch) + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OutputsGet_Call (request, onOk,eventListener,sender); + } + } + + /// Gets details about the specified output. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/outputs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - request.Headers.Add("If-Match",ifMatch); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}'"); } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var outputName = _match.Groups["outputName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/outputs/" + + outputName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OutputsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets details about the specified output. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the output. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsGetWithResult(string subscriptionId, string resourceGroupName, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/outputs/" + + global::System.Uri.EscapeDataString(outputName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.FunctionsUpdate_Call(request,onOk,eventListener,sender); + return await this.OutputsGetWithResult_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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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). /// an instance that will receive events. @@ -2985,7 +9876,7 @@ public partial class StreamAnalytics /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task FunctionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OutputsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2996,6 +9887,7 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3003,7 +9895,7 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Function.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -3023,61 +9915,46 @@ public partial class StreamAnalytics } /// - /// 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 ETag of the function. Omit this value to always overwrite the current function. Specify the - /// last-seen ETag value to prevent accidentally overwriting concurrent changes. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the function. - /// A function object. The properties specified here will overwrite the corresponding properties in the - /// existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that the - /// corresponding property in the existing function will remain the same and not change as a result of this PATCH operation. + /// The name of the output. /// 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 FunctionsUpdate_Validate(string ifMatch, string subscriptionId, string resourceGroupName, string jobName, string functionName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task OutputsGet_Validate(string subscriptionId, string resourceGroupName, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(functionName),functionName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(outputName),outputName); } } - /// - /// Creates an input or replaces an already existing input under an existing streaming job. - /// - /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen - /// ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other - /// values will result in a 412 Pre-condition Failed response. + /// Lists all of the outputs under the specified streaming job. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the input. - /// The definition of the input that will be used to create a new input or replace the existing one under - /// the streaming job. + /// The $select OData query parameter. This is a comma-separated list of structural properties to include + /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently + /// only accepts '*' as a valid value. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsCreateOrReplace(string ifMatch, string ifNoneMatch, string subscriptionId, string resourceGroupName, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsListByStreamingJob(string subscriptionId, string resourceGroupName, string jobName, string Select, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -3091,57 +9968,38 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) - + "/inputs/" - + global::System.Uri.EscapeDataString(inputName) + + "/outputs" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // add headers parameters - if (null != ifMatch) - { - request.Headers.Add("If-Match",ifMatch); - } - if (null != ifNoneMatch) - { - request.Headers.Add("If-None-Match",ifNoneMatch); - } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.InputsCreateOrReplace_Call(request,onOk,onCreated,eventListener,sender); + await this.OutputsListByStreamingJob_Call (request, onOk,eventListener,sender); } } - /// - /// Creates an input or replaces an already existing input under an existing streaming job. - /// + /// Lists all of the outputs under the specified streaming job. /// - /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen - /// ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other - /// values will result in a 412 Pre-condition Failed response. - /// The definition of the input that will be used to create a new input or replace the existing one under - /// the streaming job. + /// The $select OData query parameter. This is a comma-separated list of structural properties to include + /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently + /// only accepts '*' as a valid value. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsCreateOrReplaceViaIdentity(global::System.String viaIdentity, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsListByStreamingJobViaIdentity(global::System.String viaIdentity, string Select, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -3149,17 +10007,16 @@ public partial class StreamAnalytics { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/inputs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/outputs$", 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.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var jobName = _match.Groups["jobName"].Value; - var inputName = _match.Groups["inputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3168,49 +10025,187 @@ public partial class StreamAnalytics + resourceGroupName + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + jobName - + "/inputs/" - + inputName + + "/outputs" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // add headers parameters - if (null != ifMatch) - { - request.Headers.Add("If-Match",ifMatch); - } - if (null != ifNoneMatch) + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OutputsListByStreamingJob_Call (request, onOk,eventListener,sender); + } + } + + /// Lists all of the outputs under the specified streaming job. + /// + /// The $select OData query parameter. This is a comma-separated list of structural properties to include + /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently + /// only accepts '*' as a valid value. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsListByStreamingJobViaIdentityWithResult(global::System.String viaIdentity, string Select, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/outputs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - request.Headers.Add("If-None-Match",ifNoneMatch); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs'"); } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/outputs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OutputsListByStreamingJobWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all of the outputs under the specified streaming job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The $select OData query parameter. This is a comma-separated list of structural properties to include + /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently + /// only accepts '*' as a valid value. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsListByStreamingJobWithResult(string subscriptionId, string resourceGroupName, string jobName, string Select, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/outputs" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.InputsCreateOrReplace_Call(request,onOk,onCreated,eventListener,sender); + return await this.OutputsListByStreamingJobWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsListByStreamingJobWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 201 (Created). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsCreateOrReplace_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OutputsListByStreamingJob_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3221,6 +10216,7 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3228,13 +10224,7 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Input.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); - break; - } - case global::System.Net.HttpStatusCode.Created: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Input.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.OutputListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -3254,70 +10244,135 @@ public partial class StreamAnalytics } /// - /// 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 ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen - /// ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other - /// values will result in a 412 Pre-condition Failed response. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. + /// The $select OData query parameter. This is a comma-separated list of structural properties to include + /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently + /// only accepts '*' as a valid value. /// The name of the streaming job. - /// The name of the input. - /// The definition of the input that will be used to create a new input or replace the existing one under - /// the streaming job. /// 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 InputsCreateOrReplace_Validate(string ifMatch, string ifNoneMatch, string subscriptionId, string resourceGroupName, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task OutputsListByStreamingJob_Validate(string subscriptionId, string resourceGroupName, string Select, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); - await eventListener.AssertNotNull(nameof(ifNoneMatch),ifNoneMatch); await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(Select),Select); await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(inputName),inputName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Deletes an input from the streaming job. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the streaming job. - /// The name of the input. + /// + /// Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the output. + /// If the output specified does not already exist, this parameter must contain the full output definition + /// intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output + /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly + /// like a PATCH operation) and the resulting output will be tested. + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsTest(string subscriptionId, string resourceGroupName, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/outputs/" + + global::System.Uri.EscapeDataString(outputName) + + "/test" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OutputsTest_Call (request, onOk,eventListener,sender); + } + } + + /// + /// Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. + /// + /// + /// If the output specified does not already exist, this parameter must contain the full output definition + /// intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output + /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly + /// like a PATCH operation) and the resulting output will be tested. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsDelete(string subscriptionId, string resourceGroupName, string jobName, string inputName, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsTestViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/outputs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var outputName = _match.Groups["outputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) + + resourceGroupName + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + global::System.Uri.EscapeDataString(jobName) - + "/inputs/" - + global::System.Uri.EscapeDataString(inputName) + + jobName + + "/outputs/" + + outputName + + "/test" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3326,25 +10381,35 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.InputsDelete_Call(request,onOk,onNoContent,eventListener,sender); + await this.OutputsTest_Call (request, onOk,eventListener,sender); } } - /// Deletes an input from the streaming job. + /// + /// Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. + /// /// - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). + /// If the output specified does not already exist, this parameter must contain the full output definition + /// intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output + /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly + /// like a PATCH operation) and the resulting output will be tested. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsTestViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -3352,17 +10417,17 @@ public partial class StreamAnalytics { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/inputs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/outputs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var jobName = _match.Groups["jobName"].Value; - var inputName = _match.Groups["inputName"].Value; + var outputName = _match.Groups["outputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3371,116 +10436,153 @@ public partial class StreamAnalytics + resourceGroupName + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + jobName - + "/inputs/" - + inputName + + "/outputs/" + + outputName + + "/test" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.InputsDelete_Call(request,onOk,onNoContent,eventListener,sender); + return await this.OutputsTestWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. + /// + /// Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the output. + /// Json string supplied to the OutputsTest operation /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsTestViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string outputName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/outputs/" + + global::System.Uri.EscapeDataString(outputName) + + "/test" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } - default: - { - throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OutputsTest_Call (request, onOk,eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the input. + /// The name of the output. + /// Json string supplied to the OutputsTest operation /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsDelete_Validate(string subscriptionId, string resourceGroupName, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task OutputsTestViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string outputName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(inputName),inputName); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/outputs/" + + global::System.Uri.EscapeDataString(outputName) + + "/test" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OutputsTestWithResult_Call (request, eventListener,sender); } } - /// Gets details about the specified input. + /// + /// Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the input. - /// a delegate that is called when the remote service returns 200 (OK). + /// The name of the output. + /// If the output specified does not already exist, this parameter must contain the full output definition + /// intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output + /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly + /// like a PATCH operation) and the resulting output will be tested. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsGet(string subscriptionId, string resourceGroupName, string jobName, string inputName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsTestWithResult(string subscriptionId, string resourceGroupName, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -3494,80 +10596,175 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) - + "/inputs/" - + global::System.Uri.EscapeDataString(inputName) + + "/outputs/" + + global::System.Uri.EscapeDataString(outputName) + + "/test" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.InputsGet_Call(request,onOk,eventListener,sender); + return await this.OutputsTestWithResult_Call (request, eventListener,sender); } } - /// Gets details about the specified input. - /// - /// a delegate that is called when the remote service returns 200 (OK). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) - { - var apiVersion = @"2017-04-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsTestWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: default + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": +case "testsucceeded": +case "deleting": + // we're done polling. + break; - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/inputs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'"); - } + 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var jobName = _match.Groups["jobName"].Value; - var inputName = _match.Groups["inputName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + jobName - + "/inputs/" - + inputName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + // 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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // drop the old response + _response?.Dispose(); - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.InputsGet_Call(request,onOk,eventListener,sender); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ResourceTestStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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). /// an instance that will receive events. @@ -3575,17 +10772,116 @@ public partial class StreamAnalytics /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task InputsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OutputsTest_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: default + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": +case "testsucceeded": +case "deleting": + // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3593,7 +10889,7 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Input.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ResourceTestStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -3613,18 +10909,22 @@ public partial class StreamAnalytics } /// - /// Validation method for method. Call this like the actual call, but you will get validation events + /// Validation method for method. Call this like the actual call, but you will get validation events /// back. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the input. + /// The name of the output. + /// If the output specified does not already exist, this parameter must contain the full output definition + /// intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output + /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly + /// like a PATCH operation) and the resulting output will be tested. /// 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 InputsGet_Validate(string subscriptionId, string resourceGroupName, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task OutputsTest_Validate(string subscriptionId, string resourceGroupName, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3633,26 +10933,35 @@ public partial class StreamAnalytics await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(inputName),inputName); + await eventListener.AssertNotNull(nameof(outputName),outputName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Lists all of the inputs under the specified streaming job. - /// The $select OData query parameter. This is a comma-separated list of structural properties to include - /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently - /// only accepts '*' as a valid value. + /// + /// update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an output without affecting the rest the job or output definition. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. + /// The name of the output. + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// An Output object. The properties specified here will overwrite the corresponding properties in the + /// existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding + /// property in the existing output will remain the same and not change as a result of this PATCH operation. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsListByStreamingJob(string Select, string subscriptionId, string resourceGroupName, string jobName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsUpdate(string subscriptionId, string resourceGroupName, string jobName, string outputName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -3666,10 +10975,9 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) - + "/inputs" + + "/outputs/" + + global::System.Uri.EscapeDataString(outputName) + "?" - + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3677,27 +10985,43 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.InputsListByStreamingJob_Call(request,onOk,eventListener,sender); + await this.OutputsUpdate_Call (request, onOk,eventListener,sender); } } - /// Lists all of the inputs under the specified streaming job. + /// + /// update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an output without affecting the rest the job or output definition. + /// /// - /// The $select OData query parameter. This is a comma-separated list of structural properties to include - /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently - /// only accepts '*' as a valid value. + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// An Output object. The properties specified here will overwrite the corresponding properties in the + /// existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding + /// property in the existing output will remain the same and not change as a result of this PATCH operation. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsListByStreamingJobViaIdentity(global::System.String viaIdentity, string Select, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -3705,16 +11029,17 @@ public partial class StreamAnalytics { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/inputs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/outputs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/inputs'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var jobName = _match.Groups["jobName"].Value; + var outputName = _match.Groups["outputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -3723,10 +11048,9 @@ public partial class StreamAnalytics + resourceGroupName + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + jobName - + "/inputs" + + "/outputs/" + + outputName + "?" - + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3734,107 +11058,176 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.InputsListByStreamingJob_Call(request,onOk,eventListener,sender); + await this.OutputsUpdate_Call (request, onOk,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). + /// + /// update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an output without affecting the rest the job or output definition. + /// + /// + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// An Output object. The properties specified here will overwrite the corresponding properties in the + /// existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding + /// property in the existing output will remain the same and not change as a result of this PATCH operation. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. /// - internal async global::System.Threading.Tasks.Task InputsListByStreamingJob_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsUpdateViaIdentityWithResult(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/outputs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var outputName = _match.Groups["outputName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/outputs/" + + outputName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.InputListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } - } - finally + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifMatch) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + request.Headers.Add("If-Match",ifMatch); } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OutputsUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an output without affecting the rest the job or output definition. /// - /// The $select OData query parameter. This is a comma-separated list of structural properties to include - /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently - /// only accepts '*' as a valid value. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. + /// The name of the output. + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the OutputsUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsListByStreamingJob_Validate(string Select, string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task OutputsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string outputName, string ifMatch, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(Select),Select); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(jobName),jobName); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/outputs/" + + global::System.Uri.EscapeDataString(outputName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OutputsUpdate_Call (request, onOk,eventListener,sender); } } /// - /// Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. + /// update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an output without affecting the rest the job or output definition. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the input. - /// If the input specified does not already exist, this parameter must contain the full input definition - /// intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input - /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly - /// like a PATCH operation) and the resulting input will be tested. - /// a delegate that is called when the remote service returns 200 (OK). + /// The name of the output. + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the OutputsUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsTest(string subscriptionId, string resourceGroupName, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string outputName, string ifMatch, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -3848,104 +11241,107 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) - + "/inputs/" - + global::System.Uri.EscapeDataString(inputName) - + "/test" + + "/outputs/" + + global::System.Uri.EscapeDataString(outputName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.InputsTest_Call(request,onOk,eventListener,sender); + return await this.OutputsUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. + /// update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an output without affecting the rest the job or output definition. /// - /// - /// If the input specified does not already exist, this parameter must contain the full input definition - /// intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input - /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly - /// like a PATCH operation) and the resulting input will be tested. - /// a delegate that is called when the remote service returns 200 (OK). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the output. + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// An Output object. The properties specified here will overwrite the corresponding properties in the + /// existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding + /// property in the existing output will remain the same and not change as a result of this PATCH operation. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsTestViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task OutputsUpdateWithResult(string subscriptionId, string resourceGroupName, string jobName, string outputName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/inputs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var jobName = _match.Groups["jobName"].Value; - var inputName = _match.Groups["inputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + jobName - + "/inputs/" - + inputName - + "/test" + + global::System.Uri.EscapeDataString(jobName) + + "/outputs/" + + global::System.Uri.EscapeDataString(outputName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.InputsTest_Call(request,onOk,eventListener,sender); + return await this.OutputsUpdateWithResult_Call (request, eventListener,sender); } } - /// 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). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsTest_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task OutputsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3953,111 +11349,56 @@ public partial class StreamAnalytics try { var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": -case "testsucceeded": -case "deleting": - // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: { - continue; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_finalUri)) + default: { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); } } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4065,7 +11406,7 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ResourceTestStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -4085,22 +11426,23 @@ public partial class StreamAnalytics } /// - /// 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 name of the resource group. The name is case insensitive. + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. /// The name of the streaming job. - /// The name of the input. - /// If the input specified does not already exist, this parameter must contain the full input definition - /// intended to be tested. If the input specified already exists, this parameter can be left null to test the existing input - /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing input (exactly - /// like a PATCH operation) and the resulting input will be tested. + /// The name of the output. + /// An Output object. The properties specified here will overwrite the corresponding properties in the + /// existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding + /// property in the existing output will remain the same and not change as a result of this PATCH operation. /// 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 InputsTest_Validate(string subscriptionId, string resourceGroupName, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task OutputsUpdate_Validate(string subscriptionId, string resourceGroupName, string ifMatch, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -4109,34 +11451,33 @@ public partial class StreamAnalytics await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(inputName),inputName); + await eventListener.AssertNotNull(nameof(outputName),outputName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two - /// properties) an input without affecting the rest the job or input definition. - /// - /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen - /// ETag value to prevent accidentally overwriting concurrent changes. + /// replace a streaming job or replaces an already existing streaming job. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the input. - /// An Input object. The properties specified here will overwrite the corresponding properties in the existing - /// input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding - /// property in the existing input will remain the same and not change as a result of this PATCH operation. + /// Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record + /// set. Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify + /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the streaming job that will be used to create a new streaming job or replace the + /// existing one. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsUpdate(string ifMatch, string subscriptionId, string resourceGroupName, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsCreateOrReplace(string subscriptionId, string resourceGroupName, string jobName, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -4150,8 +11491,6 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) - + "/inputs/" - + global::System.Uri.EscapeDataString(inputName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4160,10 +11499,14 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } if (null != ifMatch) { request.Headers.Add("If-Match",ifMatch); @@ -4171,31 +11514,30 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.InputsUpdate_Call(request,onOk,eventListener,sender); + await this.StreamingJobsCreateOrReplace_Call (request, onOk,eventListener,sender); } } - /// - /// Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two - /// properties) an input without affecting the rest the job or input definition. - /// + /// replace a streaming job or replaces an already existing streaming job. /// - /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen - /// ETag value to prevent accidentally overwriting concurrent changes. - /// An Input object. The properties specified here will overwrite the corresponding properties in the existing - /// input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding - /// property in the existing input will remain the same and not change as a result of this PATCH operation. + /// Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record + /// set. Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify + /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the streaming job that will be used to create a new streaming job or replace the + /// existing one. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsCreateOrReplaceViaIdentity(global::System.String viaIdentity, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -4203,17 +11545,16 @@ public partial class StreamAnalytics { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/inputs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var jobName = _match.Groups["jobName"].Value; - var inputName = _match.Groups["inputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4222,8 +11563,6 @@ public partial class StreamAnalytics + resourceGroupName + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + jobName - + "/inputs/" - + inputName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4232,10 +11571,14 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } if (null != ifMatch) { request.Headers.Add("If-Match",ifMatch); @@ -4243,102 +11586,224 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.InputsUpdate_Call(request,onOk,eventListener,sender); + await this.StreamingJobsCreateOrReplace_Call (request, onOk,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). + /// replace a streaming job or replaces an already existing streaming job. + /// + /// Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record + /// set. Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify + /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the streaming job that will be used to create a new streaming job or replace the + /// existing one. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. /// - internal async global::System.Threading.Tasks.Task InputsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsCreateOrReplaceViaIdentityWithResult(global::System.String viaIdentity, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}'"); + } - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Input.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); - break; - } - default: - { - throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); } - finally + if (null != ifMatch) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + request.Headers.Add("If-Match",ifMatch); } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StreamingJobsCreateOrReplaceWithResult_Call (request, eventListener,sender); } } - /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. - /// - /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen - /// ETag value to prevent accidentally overwriting concurrent changes. + /// replace a streaming job or replaces an already existing streaming job. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the input. - /// An Input object. The properties specified here will overwrite the corresponding properties in the existing - /// input (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding - /// property in the existing input will remain the same and not change as a result of this PATCH operation. + /// Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record + /// set. Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify + /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the StreamingJobsCreateOrReplace operation + /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 InputsUpdate_Validate(string ifMatch, string subscriptionId, string resourceGroupName, string jobName, string inputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task StreamingJobsCreateOrReplaceViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string ifNoneMatch, string ifMatch, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(inputName),inputName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingJobsCreateOrReplace_Call (request, onOk,eventListener,sender); + } + } + + /// replace a streaming job or replaces an already existing streaming job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record + /// set. Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify + /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the StreamingJobsCreateOrReplace operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsCreateOrReplaceViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string ifNoneMatch, string ifMatch, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StreamingJobsCreateOrReplaceWithResult_Call (request, eventListener,sender); } } - /// Lists all of the available Stream Analytics related operations. - /// a delegate that is called when the remote service returns 200 (OK). + /// replace a streaming job or replaces an already existing streaming job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record + /// set. Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify + /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the streaming job that will be used to create a new streaming job or replace the + /// existing one. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsCreateOrReplaceWithResult(string subscriptionId, string resourceGroupName, string jobName, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -4346,68 +11811,189 @@ public partial class StreamAnalytics { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.StreamAnalytics/operations" + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.OperationsList_Call(request,onOk,eventListener,sender); + return await this.StreamingJobsCreateOrReplaceWithResult_Call (request, eventListener,sender); } } - /// Lists all of the available Stream Analytics related operations. - /// - /// a delegate that is called when the remote service returns 200 (OK). + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StreamingJobsCreateOrReplaceWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { - var apiVersion = @"2017-04-01-preview"; - // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri - - var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.StreamAnalytics/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + global::System.Net.Http.HttpResponseMessage _response = null; + try { - throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.StreamAnalytics/operations'"); - } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: default + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - // replace URI parameters with values from identity - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/providers/Microsoft.StreamAnalytics/operations" - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + // 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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // 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(); - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // drop the old response + _response?.Dispose(); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.OperationsList_Call(request,onOk,eventListener,sender); + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": +case "testsucceeded": +case "deleting": + // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJob.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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). /// an instance that will receive events. @@ -4415,17 +12001,115 @@ public partial class StreamAnalytics /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StreamingJobsCreateOrReplace_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: default + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": +case "testsucceeded": +case "deleting": + // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? + if (!string.IsNullOrWhiteSpace(_originalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4433,7 +12117,7 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJob.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -4453,42 +12137,52 @@ public partial class StreamAnalytics } /// - /// 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 name of the resource group. The name is case insensitive. + /// Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record + /// set. Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify + /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The name of the streaming job. + /// The definition of the streaming job that will be used to create a new streaming job or replace the + /// existing one. /// 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 OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StreamingJobsCreateOrReplace_Validate(string subscriptionId, string resourceGroupName, string ifNoneMatch, string ifMatch, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(ifNoneMatch),ifNoneMatch); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); + await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Creates an output or replaces an already existing output under an existing streaming job. - /// - /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen - /// ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new output to be created, but to prevent updating an existing output. - /// Other values will result in a 412 Pre-condition Failed response. + /// Deletes a streaming job. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the output. - /// The definition of the output that will be used to create a new output or replace the existing one under - /// the streaming job. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsCreateOrReplace(string ifMatch, string ifNoneMatch, string subscriptionId, string resourceGroupName, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsDelete(string subscriptionId, string resourceGroupName, string jobName, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -4502,8 +12196,6 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) - + "/outputs/" - + global::System.Uri.EscapeDataString(outputName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4512,47 +12204,25 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // add headers parameters - if (null != ifMatch) - { - request.Headers.Add("If-Match",ifMatch); - } - if (null != ifNoneMatch) - { - request.Headers.Add("If-None-Match",ifNoneMatch); - } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OutputsCreateOrReplace_Call(request,onOk,onCreated,eventListener,sender); + await this.StreamingJobsDelete_Call (request, onOk,onNoContent,eventListener,sender); } - } - - /// - /// Creates an output or replaces an already existing output under an existing streaming job. - /// - /// - /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen - /// ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new output to be created, but to prevent updating an existing output. - /// Other values will result in a 412 Pre-condition Failed response. - /// The definition of the output that will be used to create a new output or replace the existing one under - /// the streaming job. + } + + /// Deletes a streaming job. + /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). + /// a delegate that is called when the remote service returns 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsCreateOrReplaceViaIdentity(global::System.String viaIdentity, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -4560,17 +12230,16 @@ public partial class StreamAnalytics { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/outputs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var jobName = _match.Groups["jobName"].Value; - var outputName = _match.Groups["outputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4579,8 +12248,6 @@ public partial class StreamAnalytics + resourceGroupName + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + jobName - + "/outputs/" - + outputName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4589,49 +12256,134 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // add headers parameters - if (null != ifMatch) - { - request.Headers.Add("If-Match",ifMatch); - } - if (null != ifNoneMatch) - { - request.Headers.Add("If-None-Match",ifNoneMatch); - } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OutputsCreateOrReplace_Call(request,onOk,onCreated,eventListener,sender); + await this.StreamingJobsDelete_Call (request, onOk,onNoContent,eventListener,sender); } } - /// 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 201 (Created). + /// a delegate that is called when the remote service returns 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsCreateOrReplace_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StreamingJobsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: default + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": +case "testsucceeded": +case "deleting": + // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? + if (!string.IsNullOrWhiteSpace(_finalUri)) + { + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4639,13 +12391,13 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Output.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response); break; } - case global::System.Net.HttpStatusCode.Created: + case global::System.Net.HttpStatusCode.NoContent: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Output.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onNoContent(_response); break; } default: @@ -4665,55 +12417,44 @@ public partial class StreamAnalytics } /// - /// 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 ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen - /// ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new output to be created, but to prevent updating an existing output. - /// Other values will result in a 412 Pre-condition Failed response. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the output. - /// The definition of the output that will be used to create a new output or replace the existing one under - /// the streaming job. /// 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 OutputsCreateOrReplace_Validate(string ifMatch, string ifNoneMatch, string subscriptionId, string resourceGroupName, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StreamingJobsDelete_Validate(string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); - await eventListener.AssertNotNull(nameof(ifNoneMatch),ifNoneMatch); await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(outputName),outputName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Deletes an output from the streaming job. + /// Gets details about the specified streaming job. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The name of the output. + /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties + /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming + /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsDelete(string subscriptionId, string resourceGroupName, string jobName, string outputName, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsGet(string subscriptionId, string resourceGroupName, string jobName, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -4727,35 +12468,37 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) - + "/outputs/" - + global::System.Uri.EscapeDataString(outputName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OutputsDelete_Call(request,onOk,onNoContent,eventListener,sender); + await this.StreamingJobsGet_Call (request, onOk,eventListener,sender); } } - /// Deletes an output from the streaming job. + /// Gets details about the specified streaming job. /// + /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties + /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming + /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsGetViaIdentity(global::System.String viaIdentity, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -4763,17 +12506,16 @@ public partial class StreamAnalytics { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/outputs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var jobName = _match.Groups["jobName"].Value; - var outputName = _match.Groups["outputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -4782,35 +12524,182 @@ public partial class StreamAnalytics + resourceGroupName + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + jobName - + "/outputs/" - + outputName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OutputsDelete_Call(request,onOk,onNoContent,eventListener,sender); + await this.StreamingJobsGet_Call (request, onOk,eventListener,sender); + } + } + + /// Gets details about the specified streaming job. + /// + /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties + /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming + /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsGetViaIdentityWithResult(global::System.String viaIdentity, string Expand, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StreamingJobsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets details about the specified streaming job. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties + /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming + /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsGetWithResult(string subscriptionId, string resourceGroupName, string jobName, string Expand, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StreamingJobsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJob.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StreamingJobsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -4821,6 +12710,7 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -4828,13 +12718,7 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJob.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -4854,18 +12738,20 @@ public partial class StreamAnalytics } /// - /// 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 name of the resource group. The name is case insensitive. + /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties + /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming + /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. /// The name of the streaming job. - /// The name of the output. /// 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 OutputsDelete_Validate(string subscriptionId, string resourceGroupName, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StreamingJobsGet_Validate(string subscriptionId, string resourceGroupName, string Expand, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -4874,24 +12760,24 @@ public partial class StreamAnalytics await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(Expand),Expand); await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(outputName),outputName); } } - /// Gets details about the specified output. + /// Lists all of the streaming jobs in the given subscription. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the streaming job. - /// The name of the output. + /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties + /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming + /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsGet(string subscriptionId, string resourceGroupName, string jobName, string outputName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsList(string subscriptionId, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -4901,13 +12787,10 @@ public partial class StreamAnalytics var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + global::System.Uri.EscapeDataString(jobName) - + "/outputs/" - + global::System.Uri.EscapeDataString(outputName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs" + "?" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) + + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4920,49 +12803,39 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OutputsGet_Call(request,onOk,eventListener,sender); + await this.StreamingJobsList_Call (request, onOk,eventListener,sender); } } - /// Gets details about the specified output. - /// + /// Lists all of the streaming jobs in the specified resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties + /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming + /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsListByResourceGroup(string subscriptionId, string resourceGroupName, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/outputs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var jobName = _match.Groups["jobName"].Value; - var outputName = _match.Groups["outputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + jobName - + "/outputs/" - + outputName + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -4974,114 +12847,49 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OutputsGet_Call(request,onOk,eventListener,sender); + await this.StreamingJobsListByResourceGroup_Call (request, onOk,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. + /// Lists all of the streaming jobs in the specified resource group. + /// + /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties + /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming + /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsListByResourceGroupViaIdentity(global::System.String viaIdentity, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Output.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); - break; - } - default: - { - throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs'"); } - } - } - - /// - /// Validation method for method. Call this like the actual call, but you will get validation events - /// back. - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the streaming job. - /// The name of the output. - /// 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 OutputsGet_Validate(string subscriptionId, string resourceGroupName, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(outputName),outputName); - } - } - /// Lists all of the outputs under the specified streaming job. - /// The $select OData query parameter. This is a comma-separated list of structural properties to include - /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently - /// only accepts '*' as a valid value. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the streaming job. - /// a delegate that is called when the remote service returns 200 (OK). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsListByStreamingJob(string Select, string subscriptionId, string resourceGroupName, string jobName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) - { - var apiVersion = @"2017-04-01-preview"; - // Constant Parameters - using( NoSynchronizationContext ) - { + // 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/" - + global::System.Uri.EscapeDataString(subscriptionId) + + subscriptionId + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + global::System.Uri.EscapeDataString(jobName) - + "/outputs" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs" + "?" - + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -5093,22 +12901,22 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OutputsListByStreamingJob_Call(request,onOk,eventListener,sender); + await this.StreamingJobsListByResourceGroup_Call (request, onOk,eventListener,sender); } } - /// Lists all of the outputs under the specified streaming job. + /// Lists all of the streaming jobs in the specified resource group. /// - /// The $select OData query parameter. This is a comma-separated list of structural properties to include - /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently - /// only accepts '*' as a valid value. - /// a delegate that is called when the remote service returns 200 (OK). + /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties + /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming + /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsListByStreamingJobViaIdentity(global::System.String viaIdentity, string Select, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, string Expand, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -5116,45 +12924,134 @@ public partial class StreamAnalytics { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/outputs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs$", 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.StreamAnalytics/streamingjobs/{jobName}/outputs'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var jobName = _match.Groups["jobName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + jobName - + "/outputs" + + "/providers/Microsoft.StreamAnalytics/streamingjobs" + "?" - + (string.IsNullOrEmpty(Select) ? global::System.String.Empty : "$select=" + global::System.Uri.EscapeDataString(Select)) + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + "&" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StreamingJobsListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all of the streaming jobs in the specified resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties + /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming + /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, string Expand, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs" + + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.OutputsListByStreamingJob_Call(request,onOk,eventListener,sender); + return await this.StreamingJobsListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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). /// an instance that will receive events. @@ -5162,7 +13059,7 @@ public partial class StreamAnalytics /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OutputsListByStreamingJob_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StreamingJobsListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5173,6 +13070,7 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5180,7 +13078,7 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.OutputListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -5200,69 +13098,67 @@ public partial class StreamAnalytics } /// - /// 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 $select OData query parameter. This is a comma-separated list of structural properties to include - /// in the response, or "*" to include all properties. By default, all properties are returned except diagnostics. Currently - /// only accepts '*' as a valid value. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the streaming job. + /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties + /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming + /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. /// 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 OutputsListByStreamingJob_Validate(string Select, string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StreamingJobsListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, string Expand, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(Select),Select); await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(Expand),Expand); } } - /// - /// Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the streaming job. - /// The name of the output. - /// If the output specified does not already exist, this parameter must contain the full output definition - /// intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output - /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly - /// like a PATCH operation) and the resulting output will be tested. + /// Lists all of the streaming jobs in the given subscription. + /// + /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties + /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming + /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsTest(string subscriptionId, string resourceGroupName, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsListViaIdentity(global::System.String viaIdentity, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/streamingjobs'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + global::System.Uri.EscapeDataString(jobName) - + "/outputs/" - + global::System.Uri.EscapeDataString(outputName) - + "/test" + + subscriptionId + + "/providers/Microsoft.StreamAnalytics/streamingjobs" + "?" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) + + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5270,34 +13166,27 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.OutputsTest_Call(request,onOk,eventListener,sender); + await this.StreamingJobsList_Call (request, onOk,eventListener,sender); } } - /// - /// Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. - /// + /// Lists all of the streaming jobs in the given subscription. /// - /// If the output specified does not already exist, this parameter must contain the full output definition - /// intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output - /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly - /// like a PATCH operation) and the resulting output will be tested. - /// a delegate that is called when the remote service returns 200 (OK). + /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties + /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming + /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsTestViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsListViaIdentityWithResult(global::System.String viaIdentity, string Expand, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -5305,249 +13194,50 @@ public partial class StreamAnalytics { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/outputs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs$", 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.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/streamingjobs'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var jobName = _match.Groups["jobName"].Value; - var outputName = _match.Groups["outputName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + jobName - + "/outputs/" - + outputName - + "/test" + + "/providers/Microsoft.StreamAnalytics/streamingjobs" + "?" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) + + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.OutputsTest_Call(request,onOk,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsTest_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": -case "testsucceeded": -case "deleting": - // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? - if (!string.IsNullOrWhiteSpace(_finalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ResourceTestStatus.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 name of the resource group. The name is case insensitive. - /// The name of the streaming job. - /// The name of the output. - /// If the output specified does not already exist, this parameter must contain the full output definition - /// intended to be tested. If the output specified already exists, this parameter can be left null to test the existing output - /// as is or if specified, the properties specified will overwrite the corresponding properties in the existing output (exactly - /// like a PATCH operation) and the resulting output will be tested. - /// 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 OutputsTest_Validate(string subscriptionId, string resourceGroupName, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(outputName),outputName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); - } - } - - /// - /// Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two - /// properties) an output without affecting the rest the job or output definition. - /// - /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen - /// ETag value to prevent accidentally overwriting concurrent changes. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the streaming job. - /// The name of the output. - /// An Output object. The properties specified here will overwrite the corresponding properties in the - /// existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding - /// property in the existing output will remain the same and not change as a result of this PATCH operation. - /// a delegate that is called when the remote service returns 200 (OK). + return await this.StreamingJobsListWithResult_Call (request, eventListener,sender); + } + } + + /// Lists all of the streaming jobs in the given subscription. + /// The ID of the target subscription. + /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties + /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming + /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsUpdate(string ifMatch, string subscriptionId, string resourceGroupName, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsListWithResult(string subscriptionId, string Expand, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -5557,112 +13247,73 @@ public partial class StreamAnalytics var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + global::System.Uri.EscapeDataString(jobName) - + "/outputs/" - + global::System.Uri.EscapeDataString(outputName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs" + "?" + + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) + + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // add headers parameters - if (null != ifMatch) - { - request.Headers.Add("If-Match",ifMatch); - } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.OutputsUpdate_Call(request,onOk,eventListener,sender); + return await this.StreamingJobsListWithResult_Call (request, eventListener,sender); } } - /// - /// Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two - /// properties) an output without affecting the rest the job or output definition. - /// - /// - /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen - /// ETag value to prevent accidentally overwriting concurrent changes. - /// An Output object. The properties specified here will overwrite the corresponding properties in the - /// existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding - /// property in the existing output will remain the same and not change as a result of this PATCH operation. - /// a delegate that is called when the remote service returns 200 (OK). + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 OutputsUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StreamingJobsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { - var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/outputs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + global::System.Net.Http.HttpResponseMessage _response = null; + try { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var jobName = _match.Groups["jobName"].Value; - var outputName = _match.Groups["outputName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + jobName - + "/outputs/" - + outputName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // add headers parameters - if (null != ifMatch) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally { - request.Headers.Add("If-Match",ifMatch); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.OutputsUpdate_Call(request,onOk,eventListener,sender); } } - /// 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). /// an instance that will receive events. @@ -5670,7 +13321,7 @@ public partial class StreamAnalytics /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task OutputsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StreamingJobsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -5681,6 +13332,7 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5688,7 +13340,7 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Output.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJobListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -5708,57 +13360,42 @@ public partial class StreamAnalytics } /// - /// 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 ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen - /// ETag value to prevent accidentally overwriting concurrent changes. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the streaming job. - /// The name of the output. - /// An Output object. The properties specified here will overwrite the corresponding properties in the - /// existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the corresponding - /// property in the existing output will remain the same and not change as a result of this PATCH operation. + /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties + /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming + /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. /// 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 OutputsUpdate_Validate(string ifMatch, string subscriptionId, string resourceGroupName, string jobName, string outputName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StreamingJobsList_Validate(string subscriptionId, string Expand, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(outputName),outputName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(Expand),Expand); } } - /// Creates a streaming job or replaces an already existing streaming job. - /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify - /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record - /// set. Other values will result in a 412 Pre-condition Failed response. + /// + /// Starts a streaming job. Once a job is started it will start processing input events and produce output. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The definition of the streaming job that will be used to create a new streaming job or replace the - /// existing one. + /// Parameters applicable to a start streaming job operation. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsCreateOrReplace(string ifMatch, string ifNoneMatch, string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsStart(string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParameters body, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -5772,6 +13409,7 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) + + "/start" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5780,44 +13418,32 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // add headers parameters - if (null != ifMatch) - { - request.Headers.Add("If-Match",ifMatch); - } - if (null != ifNoneMatch) - { - request.Headers.Add("If-None-Match",ifNoneMatch); - } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StreamingJobsCreateOrReplace_Call(request,onOk,eventListener,sender); + await this.StreamingJobsStart_Call (request, onOk,eventListener,sender); } } - /// Creates a streaming job or replaces an already existing streaming job. + /// + /// Starts a streaming job. Once a job is started it will start processing input events and produce output. + /// /// - /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify - /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record - /// set. Other values will result in a 412 Pre-condition Failed response. - /// The definition of the streaming job that will be used to create a new streaming job or replace the - /// existing one. + /// Parameters applicable to a start streaming job operation. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsCreateOrReplaceViaIdentity(global::System.String viaIdentity, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsStartViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParameters body, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -5843,6 +13469,7 @@ public partial class StreamAnalytics + resourceGroupName + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + jobName + + "/start" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5851,30 +13478,69 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // add headers parameters - if (null != ifMatch) - { - request.Headers.Add("If-Match",ifMatch); - } - if (null != ifNoneMatch) - { - request.Headers.Add("If-None-Match",ifNoneMatch); - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.StreamingJobsStart_Call (request, onOk,eventListener,sender); + } + } + + /// + /// Starts a streaming job. Once a job is started it will start processing input events and produce output. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// Json string supplied to the StreamingJobsStart operation + /// a delegate that is called when the remote service returns 200 (OK). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsStartViaJsonString(string subscriptionId, string resourceGroupName, string jobName, global::System.String jsonString, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/start" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StreamingJobsCreateOrReplace_Call(request,onOk,eventListener,sender); + await this.StreamingJobsStart_Call (request, onOk,eventListener,sender); } } - /// 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). /// an instance that will receive events. @@ -5882,31 +13548,29 @@ public partial class StreamAnalytics /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task StreamingJobsCreateOrReplace_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StreamingJobsStart_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: default + 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 ) { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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"))) { @@ -5915,15 +13579,14 @@ public partial class StreamAnalytics if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + 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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); @@ -5932,47 +13595,47 @@ public partial class StreamAnalytics _response = await sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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; + // 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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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; - case "succeeded": - case "canceled": + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": case "testsucceeded": case "deleting": - // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } + // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } // check for terminal status code if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) @@ -5980,10 +13643,10 @@ public partial class StreamAnalytics continue; } // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_originalUri)) + if (!string.IsNullOrWhiteSpace(_finalUri)) { // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); // drop the old response _response?.Dispose(); @@ -5994,6 +13657,7 @@ public partial class StreamAnalytics break; } } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -6001,7 +13665,7 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJob.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response); break; } default: @@ -6021,52 +13685,46 @@ public partial class StreamAnalytics } /// - /// 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 ETag of the streaming job. Omit this value to always overwrite the current record set. Specify - /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record - /// set. Other values will result in a 412 Pre-condition Failed response. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// The definition of the streaming job that will be used to create a new streaming job or replace the - /// existing one. + /// Parameters applicable to a start streaming job operation. /// 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 StreamingJobsCreateOrReplace_Validate(string ifMatch, string ifNoneMatch, string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StreamingJobsStart_Validate(string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParameters body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); - await eventListener.AssertNotNull(nameof(ifNoneMatch),ifNoneMatch); await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); await eventListener.AssertNotNull(nameof(jobName),jobName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Deletes a streaming job. + /// + /// Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsDelete(string subscriptionId, string resourceGroupName, string jobName, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsStop(string subscriptionId, string resourceGroupName, string jobName, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -6080,6 +13738,7 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) + + "/stop" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6088,25 +13747,26 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StreamingJobsDelete_Call(request,onOk,onNoContent,eventListener,sender); + await this.StreamingJobsStop_Call (request, onOk,eventListener,sender); } } - /// Deletes a streaming job. + /// + /// Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output. + /// /// /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsStopViaIdentity(global::System.String viaIdentity, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -6132,6 +13792,7 @@ public partial class StreamAnalytics + resourceGroupName + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + jobName + + "/stop" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6140,50 +13801,46 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StreamingJobsDelete_Call(request,onOk,onNoContent,eventListener,sender); + await this.StreamingJobsStop_Call (request, onOk,eventListener,sender); } } - /// 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 204 (NoContent). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StreamingJobsStop_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: default 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 ) { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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"))) { @@ -6192,15 +13849,14 @@ public partial class StreamAnalytics if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { location = _response.GetFirstHeader(@"Location"); } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + 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), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } // drop the old response _response?.Dispose(); @@ -6209,47 +13865,47 @@ public partial class StreamAnalytics _response = await sender.SendAsync(request, eventListener); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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; + // 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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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; - case "succeeded": - case "canceled": + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": case "testsucceeded": case "deleting": - // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } + // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } // check for terminal status code if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) @@ -6271,6 +13927,7 @@ public partial class StreamAnalytics break; } } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -6281,12 +13938,6 @@ public partial class StreamAnalytics await onOk(_response); break; } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); - break; - } default: { throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); @@ -6304,7 +13955,7 @@ public partial class StreamAnalytics } /// - /// 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. @@ -6314,7 +13965,7 @@ public partial class StreamAnalytics /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task StreamingJobsDelete_Validate(string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StreamingJobsStop_Validate(string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -6323,25 +13974,31 @@ public partial class StreamAnalytics await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); await eventListener.AssertNotNull(nameof(jobName),jobName); } } - /// Gets details about the specified streaming job. - /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties - /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming - /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. + /// + /// update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming + /// job without affecting the rest the job definition. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify + /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// A streaming job object. The properties specified here will overwrite the corresponding properties in + /// the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean + /// that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsGet(string Expand, string subscriptionId, string resourceGroupName, string jobName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsUpdate(string subscriptionId, string resourceGroupName, string jobName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -6356,8 +14013,6 @@ public partial class StreamAnalytics + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) + "?" - + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6365,27 +14020,43 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StreamingJobsGet_Call(request,onOk,eventListener,sender); + await this.StreamingJobsUpdate_Call (request, onOk,eventListener,sender); } } - /// Gets details about the specified streaming job. + /// + /// update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming + /// job without affecting the rest the job definition. + /// /// - /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties - /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming - /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify + /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// A streaming job object. The properties specified here will overwrite the corresponding properties in + /// the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean + /// that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsGetViaIdentity(global::System.String viaIdentity, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -6412,8 +14083,6 @@ public partial class StreamAnalytics + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + jobName + "?" - + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6421,101 +14090,112 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StreamingJobsGet_Call(request,onOk,eventListener,sender); + await this.StreamingJobsUpdate_Call (request, onOk,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). + /// + /// update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming + /// job without affecting the rest the job definition. + /// + /// + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify + /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// A streaming job object. The properties specified here will overwrite the corresponding properties in + /// the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean + /// that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. /// - internal async global::System.Threading.Tasks.Task StreamingJobsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsUpdateViaIdentityWithResult(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJob.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); - break; - } - default: - { - throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}'"); } - finally + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifMatch) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + request.Headers.Add("If-Match",ifMatch); } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.StreamingJobsUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming + /// job without affecting the rest the job definition. /// - /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties - /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming - /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// 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 StreamingJobsGet_Validate(string Expand, string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(Expand),Expand); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(jobName),jobName); - } - } - - /// Lists all of the streaming jobs in the given subscription. - /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties - /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming - /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - /// The ID of the target subscription. + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify + /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the StreamingJobsUpdate operation /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsList(string Expand, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string ifMatch, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -6525,10 +14205,11 @@ public partial class StreamAnalytics var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.StreamAnalytics/streamingjobs" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + "?" - + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6536,28 +14217,42 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StreamingJobsList_Call(request,onOk,eventListener,sender); + await this.StreamingJobsUpdate_Call (request, onOk,eventListener,sender); } } - /// Lists all of the streaming jobs in the specified resource group. - /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties - /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming - /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. + /// + /// update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming + /// job without affecting the rest the job definition. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// a delegate that is called when the remote service returns 200 (OK). + /// The name of the streaming job. + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify + /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the StreamingJobsUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsListByResourceGroup(string Expand, string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string ifMatch, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -6569,89 +14264,104 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StreamAnalytics/streamingjobs" + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + "?" - + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.StreamingJobsListByResourceGroup_Call(request,onOk,eventListener,sender); + return await this.StreamingJobsUpdateWithResult_Call (request, eventListener,sender); } } - /// Lists all of the streaming jobs in the specified resource group. - /// - /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties - /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming - /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - /// a delegate that is called when the remote service returns 200 (OK). + /// + /// update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming + /// job without affecting the rest the job definition. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify + /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// A streaming job object. The properties specified here will overwrite the corresponding properties in + /// the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean + /// that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsListByResourceGroupViaIdentity(global::System.String viaIdentity, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task StreamingJobsUpdateWithResult(string subscriptionId, string resourceGroupName, string jobName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs$", 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.StreamAnalytics/streamingjobs'"); - } - - // 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 + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StreamAnalytics/streamingjobs" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + "?" - + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) - + "&" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.StreamingJobsListByResourceGroup_Call(request,onOk,eventListener,sender); + return await this.StreamingJobsUpdateWithResult_Call (request, eventListener,sender); } } - /// 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). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StreamingJobsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6659,18 +14369,19 @@ public partial class StreamAnalytics try { var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJob.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; } default: { @@ -6688,85 +14399,7 @@ public partial class StreamAnalytics } } - /// - /// Validation method for method. Call this like the actual call, but you - /// will get validation events back. - /// - /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties - /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming - /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - /// The ID of the target subscription. - /// 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 StreamingJobsListByResourceGroup_Validate(string Expand, string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(Expand),Expand); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - } - } - - /// Lists all of the streaming jobs in the given subscription. - /// - /// The $expand OData query parameter. This is a comma-separated list of additional streaming job properties - /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming - /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. - /// a delegate that is called when the remote service returns 200 (OK). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsListViaIdentity(global::System.String viaIdentity, string Expand, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) - { - var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) - { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/streamingjobs'"); - } - - // 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.StreamAnalytics/streamingjobs" - + "?" - + (string.IsNullOrEmpty(Expand) ? global::System.String.Empty : "$expand=" + global::System.Uri.EscapeDataString(Expand)) - + "&" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.StreamingJobsList_Call(request,onOk,eventListener,sender); - } - } - - /// 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). /// an instance that will receive events. @@ -6774,7 +14407,7 @@ public partial class StreamAnalytics /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task StreamingJobsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task StreamingJobsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6785,6 +14418,7 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -6792,7 +14426,7 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJobListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJob.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -6812,41 +14446,49 @@ public partial class StreamAnalytics } /// - /// 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 $expand OData query parameter. This is a comma-separated list of additional streaming job properties - /// to include in the response, beyond the default set returned when this parameter is absent. The default set is all streaming - /// job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify + /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The name of the streaming job. + /// A streaming job object. The properties specified here will overwrite the corresponding properties in + /// the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean + /// that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. /// 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 StreamingJobsList_Validate(string Expand, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task StreamingJobsUpdate_Validate(string subscriptionId, string resourceGroupName, string ifMatch, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(Expand),Expand); await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); + await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Starts a streaming job. Once a job is started it will start processing input events and produce output. - /// + /// Retrieves the subscription's current quota information in a particular region. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the streaming job. - /// Parameters applicable to a start streaming job operation. + /// The region in which to retrieve the subscription's quota information. You can find out which regions + /// Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsStart(string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParameters body, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsListQuotas(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -6856,11 +14498,9 @@ public partial class StreamAnalytics var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + global::System.Uri.EscapeDataString(jobName) - + "/start" + + "/providers/Microsoft.StreamAnalytics/locations/" + + global::System.Uri.EscapeDataString(location) + + "/quotas" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6869,31 +14509,24 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StreamingJobsStart_Call(request,onOk,eventListener,sender); + await this.SubscriptionsListQuotas_Call (request, onOk,eventListener,sender); } } - /// - /// Starts a streaming job. Once a job is started it will start processing input events and produce output. - /// + /// Retrieves the subscription's current quota information in a particular region. /// - /// Parameters applicable to a start streaming job operation. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsStartViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParameters body, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SubscriptionsListQuotasViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -6901,25 +14534,22 @@ public partial class StreamAnalytics { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.StreamAnalytics/locations/(?[^/]+)/quotas$", 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.StreamAnalytics/streamingjobs/{jobName}/start'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/locations/{location}/quotas'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var jobName = _match.Groups["jobName"].Value; + var location = _match.Groups["location"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + jobName - + "/start" + + "/providers/Microsoft.StreamAnalytics/locations/" + + location + + "/quotas" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6928,28 +14558,113 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SubscriptionsListQuotas_Call (request, onOk,eventListener,sender); + } + } + + /// Retrieves the subscription's current quota information in a particular region. + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 SubscriptionsListQuotasViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-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.StreamAnalytics/locations/(?[^/]+)/quotas$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/locations/{location}/quotas'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.StreamAnalytics/locations/" + + location + + "/quotas" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SubscriptionsListQuotasWithResult_Call (request, eventListener,sender); + } + } + + /// Retrieves the subscription's current quota information in a particular region. + /// The ID of the target subscription. + /// The region in which to retrieve the subscription's quota information. You can find out which regions + /// Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 SubscriptionsListQuotasWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.StreamAnalytics/locations/" + + global::System.Uri.EscapeDataString(location) + + "/quotas" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.StreamingJobsStart_Call(request,onOk,eventListener,sender); + return await this.SubscriptionsListQuotasWithResult_Call (request, eventListener,sender); } } - /// 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). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsStart_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SubscriptionsListQuotasWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -6957,111 +14672,56 @@ public partial class StreamAnalytics try { var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": -case "testsucceeded": -case "deleting": - // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: { - continue; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubscriptionQuotasListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; } - // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_finalUri)) + default: { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); } } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 SubscriptionsListQuotas_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -7069,7 +14729,7 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.SubscriptionQuotasListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -7089,46 +14749,48 @@ public partial class StreamAnalytics } /// - /// 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 name of the resource group. The name is case insensitive. - /// The name of the streaming job. - /// Parameters applicable to a start streaming job operation. + /// The region in which to retrieve the subscription's quota information. You can find out which regions + /// Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ /// 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 StreamingJobsStart_Validate(string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParameters body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task SubscriptionsListQuotas_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(location),location); } } /// - /// Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output. + /// replace a transformation or replaces an already existing transformation under an existing streaming job. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. + /// The name of the transformation. + /// Set to '*' to allow a new transformation to be created, but to prevent updating an existing + /// transformation. Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. + /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the transformation that will be used to create a new transformation or replace the + /// existing one under the streaming job. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsStop(string subscriptionId, string resourceGroupName, string jobName, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TransformationsCreateOrReplace(string subscriptionId, string resourceGroupName, string jobName, string transformationName, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -7142,7 +14804,8 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) - + "/stop" + + "/transformations/" + + global::System.Uri.EscapeDataString(transformationName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7151,26 +14814,48 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StreamingJobsStop_Call(request,onOk,eventListener,sender); + await this.TransformationsCreateOrReplace_Call (request, onOk,onCreated,eventListener,sender); } } /// - /// Stops a running streaming job. This will cause a running streaming job to stop processing input events and producing output. + /// replace a transformation or replaces an already existing transformation under an existing streaming job. /// /// + /// Set to '*' to allow a new transformation to be created, but to prevent updating an existing + /// transformation. Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. + /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the transformation that will be used to create a new transformation or replace the + /// existing one under the streaming job. /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsStopViaIdentity(global::System.String viaIdentity, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TransformationsCreateOrReplaceViaIdentity(global::System.String viaIdentity, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -7178,16 +14863,17 @@ public partial class StreamAnalytics { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/transformations/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/stop'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; var jobName = _match.Groups["jobName"].Value; + var transformationName = _match.Groups["transformationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -7196,7 +14882,8 @@ public partial class StreamAnalytics + resourceGroupName + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + jobName - + "/stop" + + "/transformations/" + + transformationName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7205,206 +14892,126 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.StreamingJobsStop_Call(request,onOk,eventListener,sender); - } - } - - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). - /// an instance that will receive events. - /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsStop_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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( Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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": -case "testsucceeded": -case "deleting": - // 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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? - if (!string.IsNullOrWhiteSpace(_finalUri)) - { - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - default: - { - throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); } - finally + if (null != ifMatch) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + request.Headers.Add("If-Match",ifMatch); } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TransformationsCreateOrReplace_Call (request, onOk,onCreated,eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// replace a transformation or replaces an already existing transformation under an existing streaming job. /// - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the streaming job. + /// + /// Set to '*' to allow a new transformation to be created, but to prevent updating an existing + /// transformation. Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. + /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the transformation that will be used to create a new transformation or replace the + /// existing one under the streaming job. /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. /// - internal async global::System.Threading.Tasks.Task StreamingJobsStop_Validate(string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task TransformationsCreateOrReplaceViaIdentityWithResult(global::System.String viaIdentity, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(jobName),jobName); + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/transformations/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var transformationName = _match.Groups["transformationName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/transformations/" + + transformationName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TransformationsCreateOrReplaceWithResult_Call (request, eventListener,sender); } } /// - /// Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming - /// job without affecting the rest the job definition. + /// replace a transformation or replaces an already existing transformation under an existing streaming job. /// - /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify - /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. - /// A streaming job object. The properties specified here will overwrite the corresponding properties in - /// the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean - /// that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. + /// The name of the transformation. + /// Set to '*' to allow a new transformation to be created, but to prevent updating an existing + /// transformation. Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. + /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the TransformationsCreateOrReplace operation /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns 201 (Created). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsUpdate(string ifMatch, string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TransformationsCreateOrReplaceViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string transformationName, string ifNoneMatch, string ifMatch, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -7418,6 +15025,8 @@ public partial class StreamAnalytics + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + global::System.Uri.EscapeDataString(jobName) + + "/transformations/" + + global::System.Uri.EscapeDataString(transformationName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7426,10 +15035,14 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } if (null != ifMatch) { request.Headers.Add("If-Match",ifMatch); @@ -7437,92 +15050,210 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.StreamingJobsUpdate_Call(request,onOk,eventListener,sender); + await this.TransformationsCreateOrReplace_Call (request, onOk,onCreated,eventListener,sender); } } /// - /// Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming - /// job without affecting the rest the job definition. + /// replace a transformation or replaces an already existing transformation under an existing streaming job. /// - /// - /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify - /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. - /// A streaming job object. The properties specified here will overwrite the corresponding properties in - /// the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean - /// that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. - /// a delegate that is called when the remote service returns 200 (OK). + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the transformation. + /// Set to '*' to allow a new transformation to be created, but to prevent updating an existing + /// transformation. Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. + /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the TransformationsCreateOrReplace operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TransformationsCreateOrReplaceViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string transformationName, string ifNoneMatch, string ifMatch, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters using( NoSynchronizationContext ) { - // verify that Identity format is an exact match for uri + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/transformations/" + + global::System.Uri.EscapeDataString(transformationName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifNoneMatch) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}'"); + request.Headers.Add("If-None-Match",ifNoneMatch); + } + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); } - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var jobName = _match.Groups["jobName"].Value; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TransformationsCreateOrReplaceWithResult_Call (request, eventListener,sender); + } + } + + /// + /// replace a transformation or replaces an already existing transformation under an existing streaming job. + /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the transformation. + /// Set to '*' to allow a new transformation to be created, but to prevent updating an existing + /// transformation. Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. + /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// The definition of the transformation that will be used to create a new transformation or replace the + /// existing one under the streaming job. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 TransformationsCreateOrReplaceWithResult(string subscriptionId, string resourceGroupName, string jobName, string transformationName, string ifNoneMatch, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + jobName + + global::System.Uri.EscapeDataString(jobName) + + "/transformations/" + + global::System.Uri.EscapeDataString(transformationName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // add headers parameters + if (null != ifNoneMatch) + { + request.Headers.Add("If-None-Match",ifNoneMatch); + } if (null != ifMatch) { request.Headers.Add("If-Match",ifMatch); } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.StreamingJobsUpdate_Call(request,onOk,eventListener,sender); + return await this.TransformationsCreateOrReplaceWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 TransformationsCreateOrReplaceWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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 201 (Created). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 StreamingJobsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TransformationsCreateOrReplace_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7533,6 +15264,7 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -7540,7 +15272,13 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJob.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + case global::System.Net.HttpStatusCode.Created: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -7560,49 +15298,54 @@ public partial class StreamAnalytics } /// - /// 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 ETag of the streaming job. Omit this value to always overwrite the current record set. Specify - /// the last-seen ETag value to prevent accidentally overwriting concurrent changes. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. + /// Set to '*' to allow a new transformation to be created, but to prevent updating an existing + /// transformation. Other values will result in a 412 Pre-condition Failed response. + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. + /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. /// The name of the streaming job. - /// A streaming job object. The properties specified here will overwrite the corresponding properties in - /// the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will mean - /// that the corresponding property in the existing input will remain the same and not change as a result of this PATCH operation. + /// The name of the transformation. + /// The definition of the transformation that will be used to create a new transformation or replace the + /// existing one under the streaming job. /// 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 StreamingJobsUpdate_Validate(string ifMatch, string subscriptionId, string resourceGroupName, string jobName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TransformationsCreateOrReplace_Validate(string subscriptionId, string resourceGroupName, string ifNoneMatch, string ifMatch, string jobName, string transformationName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(ifNoneMatch),ifNoneMatch); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); await eventListener.AssertNotNull(nameof(jobName),jobName); + await eventListener.AssertNotNull(nameof(transformationName),transformationName); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Retrieves the subscription's current quota information in a particular region. - /// The region in which to retrieve the subscription's quota information. You can find out which regions - /// Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + /// Gets details about the specified transformation. /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the transformation. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 SubscriptionsListQuotas(string location, string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TransformationsGet(string subscriptionId, string resourceGroupName, string jobName, string transformationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -7612,9 +15355,12 @@ public partial class StreamAnalytics var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.StreamAnalytics/locations/" - + global::System.Uri.EscapeDataString(location) - + "/quotas" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/transformations/" + + global::System.Uri.EscapeDataString(transformationName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7628,11 +15374,11 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SubscriptionsListQuotas_Call(request,onOk,eventListener,sender); + await this.TransformationsGet_Call (request, onOk,eventListener,sender); } } - /// Retrieves the subscription's current quota information in a particular region. + /// Gets details about the specified transformation. /// /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. @@ -7640,7 +15386,7 @@ public partial class StreamAnalytics /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SubscriptionsListQuotasViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TransformationsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -7648,22 +15394,27 @@ public partial class StreamAnalytics { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.StreamAnalytics/locations/(?[^/]+)/quotas$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/transformations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/locations/{location}/quotas'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}'"); } // replace URI parameters with values from identity - var location = _match.Groups["location"].Value; var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var transformationName = _match.Groups["transformationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.StreamAnalytics/locations/" - + location - + "/quotas" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/transformations/" + + transformationName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -7677,97 +15428,76 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.SubscriptionsListQuotas_Call(request,onOk,eventListener,sender); + await this.TransformationsGet_Call (request, onOk,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). + /// Gets details about the specified transformation. + /// /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 SubscriptionsListQuotas_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TransformationsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.SubscriptionQuotasListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } - } - finally + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/transformations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}'"); } - } - } - /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. - /// - /// The region in which to retrieve the subscription's quota information. You can find out which regions - /// Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ - /// The ID of the target subscription. - /// 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 SubscriptionsListQuotas_Validate(string location, string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) - { - using( NoSynchronizationContext ) - { - await eventListener.AssertNotNull(nameof(location),location); - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var transformationName = _match.Groups["transformationName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/transformations/" + + transformationName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TransformationsGetWithResult_Call (request, eventListener,sender); } } - /// - /// Creates a transformation or replaces an already existing transformation under an existing streaming job. - /// - /// The ETag of the transformation. Omit this value to always overwrite the current transformation. - /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new transformation to be created, but to prevent updating an existing - /// transformation. Other values will result in a 412 Pre-condition Failed response. + /// Gets details about the specified transformation. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. /// The name of the transformation. - /// The definition of the transformation that will be used to create a new transformation or replace the - /// existing one under the streaming job. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 TransformationsCreateOrReplace(string ifMatch, string ifNoneMatch, string subscriptionId, string resourceGroupName, string jobName, string transformationName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TransformationsGetWithResult(string subscriptionId, string resourceGroupName, string jobName, string transformationName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -7787,120 +15517,74 @@ public partial class StreamAnalytics + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - - // add headers parameters - if (null != ifMatch) - { - request.Headers.Add("If-Match",ifMatch); - } - if (null != ifNoneMatch) - { - request.Headers.Add("If-None-Match",ifNoneMatch); - } + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.TransformationsCreateOrReplace_Call(request,onOk,onCreated,eventListener,sender); + return await this.TransformationsGetWithResult_Call (request, eventListener,sender); } } - /// - /// Creates a transformation or replaces an already existing transformation under an existing streaming job. - /// - /// - /// The ETag of the transformation. Omit this value to always overwrite the current transformation. - /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new transformation to be created, but to prevent updating an existing - /// transformation. Other values will result in a 412 Pre-condition Failed response. - /// The definition of the transformation that will be used to create a new transformation or replace the - /// existing one under the streaming job. - /// a delegate that is called when the remote service returns 200 (OK). - /// a delegate that is called when the remote service returns 201 (Created). + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 TransformationsCreateOrReplaceViaIdentity(global::System.String viaIdentity, string ifMatch, string ifNoneMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TransformationsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { - var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/transformations/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); - if (!_match.Success) + global::System.Net.Http.HttpResponseMessage _response = null; + try { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var jobName = _match.Groups["jobName"].Value; - var transformationName = _match.Groups["transformationName"].Value; - // construct URL - var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + jobName - + "/transformations/" - + transformationName - + "?" - + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) - ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Put, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // add headers parameters - if (null != ifMatch) - { - request.Headers.Add("If-Match",ifMatch); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } } - if (null != ifNoneMatch) + finally { - request.Headers.Add("If-None-Match",ifNoneMatch); + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); } - - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // set body content - request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); - request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.TransformationsCreateOrReplace_Call(request,onOk,onCreated,eventListener,sender); } } - /// 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 201 (Created). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 TransformationsCreateOrReplace_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TransformationsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -7911,6 +15595,7 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -7918,13 +15603,7 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Transformation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); - break; - } - case global::System.Net.HttpStatusCode.Created: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Transformation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -7944,54 +15623,54 @@ public partial class StreamAnalytics } /// - /// 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 ETag of the transformation. Omit this value to always overwrite the current transformation. - /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. - /// Set to '*' to allow a new transformation to be created, but to prevent updating an existing - /// transformation. Other values will result in a 412 Pre-condition Failed response. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. /// The name of the transformation. - /// The definition of the transformation that will be used to create a new transformation or replace the - /// existing one under the streaming job. /// 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 TransformationsCreateOrReplace_Validate(string ifMatch, string ifNoneMatch, string subscriptionId, string resourceGroupName, string jobName, string transformationName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TransformationsGet_Validate(string subscriptionId, string resourceGroupName, string jobName, string transformationName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); - await eventListener.AssertNotNull(nameof(ifNoneMatch),ifNoneMatch); await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); await eventListener.AssertNotNull(nameof(jobName),jobName); await eventListener.AssertNotNull(nameof(transformationName),transformationName); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Gets details about the specified transformation. + /// + /// update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one + /// or two properties) a transformation without affecting the rest the job or transformation definition. + /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. /// The name of the transformation. + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. + /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// A Transformation object. The properties specified here will overwrite the corresponding properties + /// in the existing transformation (ie. Those properties will be updated). Any properties that are set to null here will mean + /// that the corresponding property in the existing transformation will remain the same and not change as a result of this + /// PATCH operation. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 TransformationsGet(string subscriptionId, string resourceGroupName, string jobName, string transformationName, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TransformationsUpdate(string subscriptionId, string resourceGroupName, string jobName, string transformationName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -8015,24 +15694,44 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TransformationsGet_Call(request,onOk,eventListener,sender); + await this.TransformationsUpdate_Call (request, onOk,eventListener,sender); } } - /// Gets details about the specified transformation. + /// + /// update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one + /// or two properties) a transformation without affecting the rest the job or transformation definition. + /// /// + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. + /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// A Transformation object. The properties specified here will overwrite the corresponding properties + /// in the existing transformation (ie. Those properties will be updated). Any properties that are set to null here will mean + /// that the corresponding property in the existing transformation will remain the same and not change as a result of this + /// PATCH operation. /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 TransformationsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TransformationsUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -8069,108 +15768,177 @@ public partial class StreamAnalytics // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.TransformationsGet_Call(request,onOk,eventListener,sender); + await this.TransformationsUpdate_Call (request, onOk,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 200 (OK). + /// + /// update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one + /// or two properties) a transformation without affecting the rest the job or transformation definition. + /// + /// + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. + /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// A Transformation object. The properties specified here will overwrite the corresponding properties + /// in the existing transformation (ie. Those properties will be updated). Any properties that are set to null here will mean + /// that the corresponding property in the existing transformation will remain the same and not change as a result of this + /// PATCH operation. /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. /// - internal async global::System.Threading.Tasks.Task TransformationsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TransformationsUpdateViaIdentityWithResult(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; + // verify that Identity format is an exact match for uri - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Transformation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); - break; - } - default: - { - throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); - } - } + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.StreamAnalytics/streamingjobs/(?[^/]+)/transformations/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}'"); } - finally + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var jobName = _match.Groups["jobName"].Value; + var transformationName = _match.Groups["transformationName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + jobName + + "/transformations/" + + transformationName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // add headers parameters + if (null != ifMatch) { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); + request.Headers.Add("If-Match",ifMatch); } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.TransformationsUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one + /// or two properties) a transformation without affecting the rest the job or transformation definition. /// /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. /// The name of the transformation. + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. + /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the TransformationsUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 TransformationsGet_Validate(string subscriptionId, string resourceGroupName, string jobName, string transformationName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + public async global::System.Threading.Tasks.Task TransformationsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string jobName, string transformationName, string ifMatch, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { + var apiVersion = @"2017-04-01-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); - await eventListener.AssertNotNull(nameof(jobName),jobName); - await eventListener.AssertNotNull(nameof(transformationName),transformationName); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.StreamAnalytics/streamingjobs/" + + global::System.Uri.EscapeDataString(jobName) + + "/transformations/" + + global::System.Uri.EscapeDataString(transformationName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // add headers parameters + if (null != ifMatch) + { + request.Headers.Add("If-Match",ifMatch); + } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.TransformationsUpdate_Call (request, onOk,eventListener,sender); } } /// - /// Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one + /// update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one /// or two properties) a transformation without affecting the rest the job or transformation definition. /// - /// The ETag of the transformation. Omit this value to always overwrite the current transformation. - /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The name of the streaming job. /// The name of the transformation. - /// A Transformation object. The properties specified here will overwrite the corresponding properties - /// in the existing transformation (ie. Those properties will be updated). Any properties that are set to null here will mean - /// that the corresponding property in the existing transformation will remain the same and not change as a result of this - /// PATCH operation. - /// a delegate that is called when the remote service returns 200 (OK). + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. + /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. + /// Json string supplied to the TransformationsUpdate operation /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 TransformationsUpdate(string ifMatch, string subscriptionId, string resourceGroupName, string jobName, string transformationName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TransformationsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string jobName, string transformationName, string ifMatch, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { var apiVersion = @"2017-04-01-preview"; // Constant Parameters @@ -8190,12 +15958,12 @@ public partial class StreamAnalytics + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // add headers parameters if (null != ifMatch) @@ -8203,72 +15971,63 @@ public partial class StreamAnalytics request.Headers.Add("If-Match",ifMatch); } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.TransformationsUpdate_Call(request,onOk,eventListener,sender); + return await this.TransformationsUpdateWithResult_Call (request, eventListener,sender); } } /// - /// Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one + /// update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one /// or two properties) a transformation without affecting the rest the job or transformation definition. /// - /// + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the streaming job. + /// The name of the transformation. /// The ETag of the transformation. Omit this value to always overwrite the current transformation. /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. /// A Transformation object. The properties specified here will overwrite the corresponding properties /// in the existing transformation (ie. Those properties will be updated). Any properties that are set to null here will mean /// that the corresponding property in the existing transformation will remain the same and not change as a result of this /// PATCH operation. - /// a delegate that is called when the remote service returns 200 (OK). /// an instance that will receive events. /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 TransformationsUpdateViaIdentity(global::System.String viaIdentity, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation body, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task TransformationsUpdateWithResult(string subscriptionId, string resourceGroupName, string jobName, string transformationName, string ifMatch, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate) { var apiVersion = @"2017-04-01-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.StreamAnalytics/streamingjobs/(?[^/]+)/transformations/(?[^/]+)$", 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.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}'"); - } - - // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var jobName = _match.Groups["jobName"].Value; - var transformationName = _match.Groups["transformationName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" - + subscriptionId + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName + + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.StreamAnalytics/streamingjobs/" - + jobName + + global::System.Uri.EscapeDataString(jobName) + "/transformations/" - + transformationName + + global::System.Uri.EscapeDataString(transformationName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Method.Patch, _url); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } // add headers parameters if (null != ifMatch) @@ -8276,17 +16035,63 @@ public partial class StreamAnalytics request.Headers.Add("If-Match",ifMatch); } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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).ToString() : @"{}", global::System.Text.Encoding.UTF8); + 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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - await this.TransformationsUpdate_Call(request,onOk,eventListener,sender); + return await this.TransformationsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 TransformationsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers)); + return await _result; + } + default: + { + throw new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException(_response); + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } } } - /// 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). /// an instance that will receive events. @@ -8294,7 +16099,7 @@ public partial class StreamAnalytics /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TransformationsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task TransformationsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -8305,6 +16110,7 @@ public partial class StreamAnalytics await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -8312,7 +16118,7 @@ public partial class StreamAnalytics case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Transformation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation.FromJson(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); break; } default: @@ -8335,10 +16141,10 @@ public partial class StreamAnalytics /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// The ETag of the transformation. Omit this value to always overwrite the current transformation. - /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. + /// Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. /// The name of the streaming job. /// The name of the transformation. /// A Transformation object. The properties specified here will overwrite the corresponding properties @@ -8349,17 +16155,17 @@ public partial class StreamAnalytics /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task TransformationsUpdate_Validate(string ifMatch, string subscriptionId, string resourceGroupName, string jobName, string transformationName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task TransformationsUpdate_Validate(string subscriptionId, string resourceGroupName, string ifMatch, string jobName, string transformationName, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation body, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertRegEx(nameof(resourceGroupName),resourceGroupName,@"^[-\w\._\(\)]+$"); + await eventListener.AssertRegEx(nameof(resourceGroupName), resourceGroupName, @"^[-\w\._\(\)]+$"); + await eventListener.AssertNotNull(nameof(ifMatch),ifMatch); await eventListener.AssertNotNull(nameof(jobName),jobName); await eventListener.AssertNotNull(nameof(transformationName),transformationName); await eventListener.AssertNotNull(nameof(body), body); diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/AuthenticationMode.Completer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/AuthenticationMode.Completer.cs deleted file mode 100644 index 4bfcb41195d3..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/AuthenticationMode.Completer.cs +++ /dev/null @@ -1,43 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// Authentication Mode. Valid modes are `ConnectionString`, `Msi` and 'UserToken'. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationModeTypeConverter))] - public partial struct AuthenticationMode : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Msi".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Msi'", "Msi", global::System.Management.Automation.CompletionResultType.ParameterValue, "Msi"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "UserToken".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'UserToken'", "UserToken", global::System.Management.Automation.CompletionResultType.ParameterValue, "UserToken"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "ConnectionString".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'ConnectionString'", "ConnectionString", global::System.Management.Automation.CompletionResultType.ParameterValue, "ConnectionString"); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/AuthenticationMode.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/AuthenticationMode.TypeConverter.cs deleted file mode 100644 index 4546cc5f5fe3..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/AuthenticationMode.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// Authentication Mode. Valid modes are `ConnectionString`, `Msi` and 'UserToken'. - public partial class AuthenticationModeTypeConverter : - 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) => true; - - /// - /// 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 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) => AuthenticationMode.CreateFrom(sourceValue); - - /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/AuthenticationMode.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/AuthenticationMode.cs deleted file mode 100644 index 2f28a6c63d1a..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/AuthenticationMode.cs +++ /dev/null @@ -1,100 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// Authentication Mode. Valid modes are `ConnectionString`, `Msi` and 'UserToken'. - public partial struct AuthenticationMode : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode ConnectionString = @"ConnectionString"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode Msi = @"Msi"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode UserToken = @"UserToken"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private AuthenticationMode(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to AuthenticationMode - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new AuthenticationMode(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type AuthenticationMode - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type AuthenticationMode (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is AuthenticationMode && Equals((AuthenticationMode)obj); - } - - /// Returns hashCode for enum AuthenticationMode - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for AuthenticationMode - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to AuthenticationMode - /// the value to convert to an instance of . - - public static implicit operator AuthenticationMode(string value) - { - return new AuthenticationMode(value); - } - - /// Implicit operator to convert AuthenticationMode to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode e) - { - return e._value; - } - - /// Overriding != operator for enum AuthenticationMode - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum AuthenticationMode - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterProvisioningState.Completer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterProvisioningState.Completer.cs deleted file mode 100644 index 92fa260d18fd..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterProvisioningState.Completer.cs +++ /dev/null @@ -1,49 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// The status of the cluster provisioning. The three terminal states are: Succeeded, Failed and Canceled - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningStateTypeConverter))] - public partial struct ClusterProvisioningState : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "InProgress".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'InProgress'", "InProgress", global::System.Management.Automation.CompletionResultType.ParameterValue, "InProgress"); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterProvisioningState.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterProvisioningState.TypeConverter.cs deleted file mode 100644 index b0d326a6fc24..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterProvisioningState.TypeConverter.cs +++ /dev/null @@ -1,61 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// The status of the cluster provisioning. The three terminal states are: Succeeded, Failed and Canceled - /// - public partial class ClusterProvisioningStateTypeConverter : - 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) => true; - - /// - /// 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 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) => ClusterProvisioningState.CreateFrom(sourceValue); - - /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterProvisioningState.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterProvisioningState.cs deleted file mode 100644 index f7f011fedc3b..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterProvisioningState.cs +++ /dev/null @@ -1,108 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// The status of the cluster provisioning. The three terminal states are: Succeeded, Failed and Canceled - /// - public partial struct ClusterProvisioningState : - System.IEquatable - { - /// The cluster provisioning was canceled. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState Canceled = @"Canceled"; - - /// The cluster provisioning failed. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState Failed = @"Failed"; - - /// The cluster provisioning was inprogress. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState InProgress = @"InProgress"; - - /// The cluster provisioning succeeded. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState Succeeded = @"Succeeded"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ClusterProvisioningState(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to ClusterProvisioningState - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ClusterProvisioningState(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ClusterProvisioningState - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ClusterProvisioningState (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ClusterProvisioningState && Equals((ClusterProvisioningState)obj); - } - - /// Returns hashCode for enum ClusterProvisioningState - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for ClusterProvisioningState - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ClusterProvisioningState - /// the value to convert to an instance of . - - public static implicit operator ClusterProvisioningState(string value) - { - return new ClusterProvisioningState(value); - } - - /// Implicit operator to convert ClusterProvisioningState to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState e) - { - return e._value; - } - - /// Overriding != operator for enum ClusterProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ClusterProvisioningState - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterProvisioningState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterSkuName.Completer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterSkuName.Completer.cs deleted file mode 100644 index bfe62de19ccf..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterSkuName.Completer.cs +++ /dev/null @@ -1,37 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuNameTypeConverter))] - public partial struct ClusterSkuName : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Default".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Default'", "Default", global::System.Management.Automation.CompletionResultType.ParameterValue, "Default"); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterSkuName.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterSkuName.TypeConverter.cs deleted file mode 100644 index b437fed9107c..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterSkuName.TypeConverter.cs +++ /dev/null @@ -1,61 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests. - /// - public partial class ClusterSkuNameTypeConverter : - 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) => true; - - /// - /// 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 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) => ClusterSkuName.CreateFrom(sourceValue); - - /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterSkuName.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterSkuName.cs deleted file mode 100644 index 4c14202051f4..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ClusterSkuName.cs +++ /dev/null @@ -1,99 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests. - /// - public partial struct ClusterSkuName : - System.IEquatable - { - /// The default SKU. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName Default = @"Default"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ClusterSkuName(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to ClusterSkuName - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ClusterSkuName(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ClusterSkuName - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ClusterSkuName (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ClusterSkuName && Equals((ClusterSkuName)obj); - } - - /// Returns hashCode for enum ClusterSkuName - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for ClusterSkuName - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ClusterSkuName - /// the value to convert to an instance of . - - public static implicit operator ClusterSkuName(string value) - { - return new ClusterSkuName(value); - } - - /// Implicit operator to convert ClusterSkuName to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName e) - { - return e._value; - } - - /// Overriding != operator for enum ClusterSkuName - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ClusterSkuName - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/CompatibilityLevel.Completer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/CompatibilityLevel.Completer.cs deleted file mode 100644 index 6cd07421c46c..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/CompatibilityLevel.Completer.cs +++ /dev/null @@ -1,35 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// Controls certain runtime behaviors of the streaming job. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevelTypeConverter))] - public partial struct CompatibilityLevel : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "1.0".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'1.0'", "1.0", global::System.Management.Automation.CompletionResultType.ParameterValue, "1.0"); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/CompatibilityLevel.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/CompatibilityLevel.TypeConverter.cs deleted file mode 100644 index 76139b821f60..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/CompatibilityLevel.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// Controls certain runtime behaviors of the streaming job. - public partial class CompatibilityLevelTypeConverter : - 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) => true; - - /// - /// 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 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) => CompatibilityLevel.CreateFrom(sourceValue); - - /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/CompatibilityLevel.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/CompatibilityLevel.cs deleted file mode 100644 index bc7be5ae1bda..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/CompatibilityLevel.cs +++ /dev/null @@ -1,96 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// Controls certain runtime behaviors of the streaming job. - public partial struct CompatibilityLevel : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel One0 = @"1.0"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private CompatibilityLevel(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to CompatibilityLevel - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new CompatibilityLevel(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type CompatibilityLevel - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type CompatibilityLevel (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is CompatibilityLevel && Equals((CompatibilityLevel)obj); - } - - /// Returns hashCode for enum CompatibilityLevel - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for CompatibilityLevel - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to CompatibilityLevel - /// the value to convert to an instance of . - - public static implicit operator CompatibilityLevel(string value) - { - return new CompatibilityLevel(value); - } - - /// Implicit operator to convert CompatibilityLevel to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel e) - { - return e._value; - } - - /// Overriding != operator for enum CompatibilityLevel - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum CompatibilityLevel - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ContentStoragePolicy.Completer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ContentStoragePolicy.Completer.cs deleted file mode 100644 index a3c02250e5b0..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ContentStoragePolicy.Completer.cs +++ /dev/null @@ -1,42 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify - /// jobStorageAccount property. . - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicyTypeConverter))] - public partial struct ContentStoragePolicy : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "SystemAccount".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'SystemAccount'", "SystemAccount", global::System.Management.Automation.CompletionResultType.ParameterValue, "SystemAccount"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "JobStorageAccount".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'JobStorageAccount'", "JobStorageAccount", global::System.Management.Automation.CompletionResultType.ParameterValue, "JobStorageAccount"); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ContentStoragePolicy.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ContentStoragePolicy.TypeConverter.cs deleted file mode 100644 index 9be698658cc4..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ContentStoragePolicy.TypeConverter.cs +++ /dev/null @@ -1,62 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify - /// jobStorageAccount property. . - /// - public partial class ContentStoragePolicyTypeConverter : - 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) => true; - - /// - /// 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 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) => ContentStoragePolicy.CreateFrom(sourceValue); - - /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ContentStoragePolicy.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ContentStoragePolicy.cs deleted file mode 100644 index 8aeac62bfde9..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/ContentStoragePolicy.cs +++ /dev/null @@ -1,101 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify - /// jobStorageAccount property. . - /// - public partial struct ContentStoragePolicy : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy JobStorageAccount = @"JobStorageAccount"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy SystemAccount = @"SystemAccount"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private ContentStoragePolicy(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to ContentStoragePolicy - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ContentStoragePolicy(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ContentStoragePolicy - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ContentStoragePolicy (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ContentStoragePolicy && Equals((ContentStoragePolicy)obj); - } - - /// Returns hashCode for enum ContentStoragePolicy - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for ContentStoragePolicy - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ContentStoragePolicy - /// the value to convert to an instance of . - - public static implicit operator ContentStoragePolicy(string value) - { - return new ContentStoragePolicy(value); - } - - /// Implicit operator to convert ContentStoragePolicy to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy e) - { - return e._value; - } - - /// Overriding != operator for enum ContentStoragePolicy - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ContentStoragePolicy - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/Encoding.Completer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/Encoding.Completer.cs deleted file mode 100644 index 536ff272d5c6..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/Encoding.Completer.cs +++ /dev/null @@ -1,37 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EncodingTypeConverter))] - public partial struct Encoding : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "UTF8".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'UTF8'", "UTF8", global::System.Management.Automation.CompletionResultType.ParameterValue, "UTF8"); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/Encoding.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/Encoding.TypeConverter.cs deleted file mode 100644 index 5934eecc64e7..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/Encoding.TypeConverter.cs +++ /dev/null @@ -1,61 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. - /// - public partial class EncodingTypeConverter : - 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) => true; - - /// - /// 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 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) => Encoding.CreateFrom(sourceValue); - - /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/Encoding.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/Encoding.cs deleted file mode 100644 index 9977802eff30..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/Encoding.cs +++ /dev/null @@ -1,98 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Specifies the encoding of the incoming data in the case of input and the encoding of outgoing data in the case of output. - /// - public partial struct Encoding : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding Utf8 = @"UTF8"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to Encoding - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new Encoding(global::System.Convert.ToString(value)); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private Encoding(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Compares values of enum type Encoding - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type Encoding (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is Encoding && Equals((Encoding)obj); - } - - /// Returns hashCode for enum Encoding - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for Encoding - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to Encoding - /// the value to convert to an instance of . - - public static implicit operator Encoding(string value) - { - return new Encoding(value); - } - - /// Implicit operator to convert Encoding to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding e) - { - return e._value; - } - - /// Overriding != operator for enum Encoding - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum Encoding - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.Encoding e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventSerializationType.Completer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventSerializationType.Completer.cs deleted file mode 100644 index 55fb995faa72..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventSerializationType.Completer.cs +++ /dev/null @@ -1,53 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationTypeTypeConverter))] - public partial struct EventSerializationType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Csv".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Csv'", "Csv", global::System.Management.Automation.CompletionResultType.ParameterValue, "Csv"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Avro".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Avro'", "Avro", global::System.Management.Automation.CompletionResultType.ParameterValue, "Avro"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Json".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Json'", "Json", global::System.Management.Automation.CompletionResultType.ParameterValue, "Json"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "CustomClr".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'CustomClr'", "CustomClr", global::System.Management.Automation.CompletionResultType.ParameterValue, "CustomClr"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Parquet".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Parquet'", "Parquet", global::System.Management.Automation.CompletionResultType.ParameterValue, "Parquet"); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventSerializationType.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventSerializationType.TypeConverter.cs deleted file mode 100644 index 630de9063cbc..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventSerializationType.TypeConverter.cs +++ /dev/null @@ -1,61 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - /// - public partial class EventSerializationTypeTypeConverter : - 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) => true; - - /// - /// 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 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) => EventSerializationType.CreateFrom(sourceValue); - - /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventSerializationType.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventSerializationType.cs deleted file mode 100644 index be01e40913c3..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventSerializationType.cs +++ /dev/null @@ -1,106 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - /// - public partial struct EventSerializationType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType Avro = @"Avro"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType Csv = @"Csv"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType CustomClr = @"CustomClr"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType Json = @"Json"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType Parquet = @"Parquet"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to EventSerializationType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new EventSerializationType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type EventSerializationType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type EventSerializationType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is EventSerializationType && Equals((EventSerializationType)obj); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private EventSerializationType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns hashCode for enum EventSerializationType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for EventSerializationType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to EventSerializationType - /// the value to convert to an instance of . - - public static implicit operator EventSerializationType(string value) - { - return new EventSerializationType(value); - } - - /// Implicit operator to convert EventSerializationType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType e) - { - return e._value; - } - - /// Overriding != operator for enum EventSerializationType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum EventSerializationType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventsOutOfOrderPolicy.Completer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventsOutOfOrderPolicy.Completer.cs deleted file mode 100644 index 6b36fd2d1fb2..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventsOutOfOrderPolicy.Completer.cs +++ /dev/null @@ -1,41 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Indicates the policy to apply to events that arrive out of order in the input event stream. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicyTypeConverter))] - public partial struct EventsOutOfOrderPolicy : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Adjust".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Adjust'", "Adjust", global::System.Management.Automation.CompletionResultType.ParameterValue, "Adjust"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Drop".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Drop'", "Drop", global::System.Management.Automation.CompletionResultType.ParameterValue, "Drop"); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventsOutOfOrderPolicy.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventsOutOfOrderPolicy.TypeConverter.cs deleted file mode 100644 index 9ecab3a4473d..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventsOutOfOrderPolicy.TypeConverter.cs +++ /dev/null @@ -1,61 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Indicates the policy to apply to events that arrive out of order in the input event stream. - /// - public partial class EventsOutOfOrderPolicyTypeConverter : - 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) => true; - - /// - /// 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 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) => EventsOutOfOrderPolicy.CreateFrom(sourceValue); - - /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventsOutOfOrderPolicy.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventsOutOfOrderPolicy.cs deleted file mode 100644 index 6dcf532662e3..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/EventsOutOfOrderPolicy.cs +++ /dev/null @@ -1,100 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Indicates the policy to apply to events that arrive out of order in the input event stream. - /// - public partial struct EventsOutOfOrderPolicy : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy Adjust = @"Adjust"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy Drop = @"Drop"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to EventsOutOfOrderPolicy - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new EventsOutOfOrderPolicy(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type EventsOutOfOrderPolicy - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type EventsOutOfOrderPolicy (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is EventsOutOfOrderPolicy && Equals((EventsOutOfOrderPolicy)obj); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private EventsOutOfOrderPolicy(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns hashCode for enum EventsOutOfOrderPolicy - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for EventsOutOfOrderPolicy - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to EventsOutOfOrderPolicy - /// the value to convert to an instance of . - - public static implicit operator EventsOutOfOrderPolicy(string value) - { - return new EventsOutOfOrderPolicy(value); - } - - /// Implicit operator to convert EventsOutOfOrderPolicy to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy e) - { - return e._value; - } - - /// Overriding != operator for enum EventsOutOfOrderPolicy - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum EventsOutOfOrderPolicy - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobState.Completer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobState.Completer.cs deleted file mode 100644 index d469309b1b98..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobState.Completer.cs +++ /dev/null @@ -1,71 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// The current execution state of the streaming job. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobStateTypeConverter))] - public partial struct JobState : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Created".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Created'", "Created", global::System.Management.Automation.CompletionResultType.ParameterValue, "Created"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Starting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Starting'", "Starting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Starting"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Running".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Running'", "Running", global::System.Management.Automation.CompletionResultType.ParameterValue, "Running"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Stopping".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Stopping'", "Stopping", global::System.Management.Automation.CompletionResultType.ParameterValue, "Stopping"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Stopped".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Stopped'", "Stopped", global::System.Management.Automation.CompletionResultType.ParameterValue, "Stopped"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Degraded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Degraded'", "Degraded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Degraded"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Restarting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Restarting'", "Restarting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Restarting"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Scaling".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Scaling'", "Scaling", global::System.Management.Automation.CompletionResultType.ParameterValue, "Scaling"); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobState.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobState.TypeConverter.cs deleted file mode 100644 index 32e16d2306e5..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobState.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// The current execution state of the streaming job. - public partial class JobStateTypeConverter : - 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) => true; - - /// - /// 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 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) => JobState.CreateFrom(sourceValue); - - /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobState.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobState.cs deleted file mode 100644 index a55de6ccc182..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobState.cs +++ /dev/null @@ -1,124 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// The current execution state of the streaming job. - public partial struct JobState : - System.IEquatable - { - /// The job is currently in the Created state. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState Created = @"Created"; - - /// The job is currently in the Degraded state. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState Degraded = @"Degraded"; - - /// The job is currently in the Deleting state. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState Deleting = @"Deleting"; - - /// The job is currently in the Failed state. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState Failed = @"Failed"; - - /// The job is currently in the Restarting state. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState Restarting = @"Restarting"; - - /// The job is currently in the Running state. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState Running = @"Running"; - - /// The job is currently in the Scaling state. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState Scaling = @"Scaling"; - - /// The job is currently in the Starting state. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState Starting = @"Starting"; - - /// The job is currently in the Stopped state. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState Stopped = @"Stopped"; - - /// The job is currently in the Stopping state. - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState Stopping = @"Stopping"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to JobState - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new JobState(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type JobState - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type JobState (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is JobState && Equals((JobState)obj); - } - - /// Returns hashCode for enum JobState - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private JobState(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for JobState - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to JobState - /// the value to convert to an instance of . - - public static implicit operator JobState(string value) - { - return new JobState(value); - } - - /// Implicit operator to convert JobState to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState e) - { - return e._value; - } - - /// Overriding != operator for enum JobState - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum JobState - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobState e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobType.Completer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobType.Completer.cs deleted file mode 100644 index a2c9548c533c..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobType.Completer.cs +++ /dev/null @@ -1,39 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobTypeTypeConverter))] - public partial struct JobType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Cloud".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Cloud'", "Cloud", global::System.Management.Automation.CompletionResultType.ParameterValue, "Cloud"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Edge".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Edge'", "Edge", global::System.Management.Automation.CompletionResultType.ParameterValue, "Edge"); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobType.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobType.TypeConverter.cs deleted file mode 100644 index 5f6ba5a556ba..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobType.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. - public partial class JobTypeTypeConverter : - 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) => true; - - /// - /// 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 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) => JobType.CreateFrom(sourceValue); - - /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobType.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobType.cs deleted file mode 100644 index 7785aece947b..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JobType.cs +++ /dev/null @@ -1,98 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. - public partial struct JobType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType Cloud = @"Cloud"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType Edge = @"Edge"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to JobType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new JobType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type JobType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type JobType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is JobType && Equals((JobType)obj); - } - - /// Returns hashCode for enum JobType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private JobType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for JobType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to JobType - /// the value to convert to an instance of . - - public static implicit operator JobType(string value) - { - return new JobType(value); - } - - /// Implicit operator to convert JobType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType e) - { - return e._value; - } - - /// Overriding != operator for enum JobType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum JobType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JsonOutputSerializationFormat.Completer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JsonOutputSerializationFormat.Completer.cs deleted file mode 100644 index 5d557d82ad90..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JsonOutputSerializationFormat.Completer.cs +++ /dev/null @@ -1,43 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Specifies the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating - /// the output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will - /// be formatted as an array of JSON objects. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormatTypeConverter))] - public partial struct JsonOutputSerializationFormat : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "LineSeparated".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'LineSeparated'", "LineSeparated", global::System.Management.Automation.CompletionResultType.ParameterValue, "LineSeparated"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Array".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Array'", "Array", global::System.Management.Automation.CompletionResultType.ParameterValue, "Array"); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JsonOutputSerializationFormat.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JsonOutputSerializationFormat.TypeConverter.cs deleted file mode 100644 index 0592c17c718a..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JsonOutputSerializationFormat.TypeConverter.cs +++ /dev/null @@ -1,63 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Specifies the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating - /// the output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will - /// be formatted as an array of JSON objects. - /// - public partial class JsonOutputSerializationFormatTypeConverter : - 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) => true; - - /// - /// 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 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) => JsonOutputSerializationFormat.CreateFrom(sourceValue); - - /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JsonOutputSerializationFormat.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JsonOutputSerializationFormat.cs deleted file mode 100644 index 3839d7a9f6db..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/JsonOutputSerializationFormat.cs +++ /dev/null @@ -1,108 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Specifies the format of the JSON the output will be written in. The currently supported values are 'lineSeparated' indicating - /// the output will be formatted by having each JSON object separated by a new line and 'array' indicating the output will - /// be formatted as an array of JSON objects. - /// - public partial struct JsonOutputSerializationFormat : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat Array = @"Array"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat LineSeparated = @"LineSeparated"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// Conversion from arbitrary object to JsonOutputSerializationFormat - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new JsonOutputSerializationFormat(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type JsonOutputSerializationFormat - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat e) - { - return _value.Equals(e._value); - } - - /// - /// Compares values of enum type JsonOutputSerializationFormat (override for Object) - /// - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is JsonOutputSerializationFormat && Equals((JsonOutputSerializationFormat)obj); - } - - /// Returns hashCode for enum JsonOutputSerializationFormat - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// - /// Creates an instance of the Enum class. - /// - /// the value to create an instance for. - private JsonOutputSerializationFormat(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for JsonOutputSerializationFormat - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to JsonOutputSerializationFormat - /// the value to convert to an instance of . - - public static implicit operator JsonOutputSerializationFormat(string value) - { - return new JsonOutputSerializationFormat(value); - } - - /// Implicit operator to convert JsonOutputSerializationFormat to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat e) - { - return e._value; - } - - /// Overriding != operator for enum JsonOutputSerializationFormat - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum JsonOutputSerializationFormat - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JsonOutputSerializationFormat e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputErrorPolicy.Completer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputErrorPolicy.Completer.cs deleted file mode 100644 index 5ebd376323c6..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputErrorPolicy.Completer.cs +++ /dev/null @@ -1,42 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to - /// being malformed (missing column values, column values of wrong type or size). - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicyTypeConverter))] - public partial struct OutputErrorPolicy : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Stop".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Stop'", "Stop", global::System.Management.Automation.CompletionResultType.ParameterValue, "Stop"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Drop".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Drop'", "Drop", global::System.Management.Automation.CompletionResultType.ParameterValue, "Drop"); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputErrorPolicy.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputErrorPolicy.TypeConverter.cs deleted file mode 100644 index a392c5a46190..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputErrorPolicy.TypeConverter.cs +++ /dev/null @@ -1,62 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to - /// being malformed (missing column values, column values of wrong type or size). - /// - public partial class OutputErrorPolicyTypeConverter : - 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) => true; - - /// - /// 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 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) => OutputErrorPolicy.CreateFrom(sourceValue); - - /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputErrorPolicy.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputErrorPolicy.cs deleted file mode 100644 index 6faef7812658..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputErrorPolicy.cs +++ /dev/null @@ -1,101 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to - /// being malformed (missing column values, column values of wrong type or size). - /// - public partial struct OutputErrorPolicy : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy Drop = @"Drop"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy Stop = @"Stop"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to OutputErrorPolicy - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new OutputErrorPolicy(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type OutputErrorPolicy - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type OutputErrorPolicy (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is OutputErrorPolicy && Equals((OutputErrorPolicy)obj); - } - - /// Returns hashCode for enum OutputErrorPolicy - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private OutputErrorPolicy(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for OutputErrorPolicy - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to OutputErrorPolicy - /// the value to convert to an instance of . - - public static implicit operator OutputErrorPolicy(string value) - { - return new OutputErrorPolicy(value); - } - - /// Implicit operator to convert OutputErrorPolicy to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy e) - { - return e._value; - } - - /// Overriding != operator for enum OutputErrorPolicy - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum OutputErrorPolicy - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputStartMode.Completer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputStartMode.Completer.cs deleted file mode 100644 index 40436e57084d..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputStartMode.Completer.cs +++ /dev/null @@ -1,47 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event - /// stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, - /// or start from the last event output time. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartModeTypeConverter))] - public partial struct OutputStartMode : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "JobStartTime".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'JobStartTime'", "JobStartTime", global::System.Management.Automation.CompletionResultType.ParameterValue, "JobStartTime"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "CustomTime".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'CustomTime'", "CustomTime", global::System.Management.Automation.CompletionResultType.ParameterValue, "CustomTime"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "LastOutputEventTime".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'LastOutputEventTime'", "LastOutputEventTime", global::System.Management.Automation.CompletionResultType.ParameterValue, "LastOutputEventTime"); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputStartMode.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputStartMode.TypeConverter.cs deleted file mode 100644 index 13b04df65679..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputStartMode.TypeConverter.cs +++ /dev/null @@ -1,63 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event - /// stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, - /// or start from the last event output time. - /// - public partial class OutputStartModeTypeConverter : - 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) => true; - - /// - /// 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 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) => OutputStartMode.CreateFrom(sourceValue); - - /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputStartMode.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputStartMode.cs deleted file mode 100644 index 16424eabaf66..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/OutputStartMode.cs +++ /dev/null @@ -1,104 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// - /// Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event - /// stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, - /// or start from the last event output time. - /// - public partial struct OutputStartMode : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode CustomTime = @"CustomTime"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode JobStartTime = @"JobStartTime"; - - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode LastOutputEventTime = @"LastOutputEventTime"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to OutputStartMode - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new OutputStartMode(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type OutputStartMode - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type OutputStartMode (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is OutputStartMode && Equals((OutputStartMode)obj); - } - - /// Returns hashCode for enum OutputStartMode - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private OutputStartMode(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for OutputStartMode - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to OutputStartMode - /// the value to convert to an instance of . - - public static implicit operator OutputStartMode(string value) - { - return new OutputStartMode(value); - } - - /// Implicit operator to convert OutputStartMode to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode e) - { - return e._value; - } - - /// Overriding != operator for enum OutputStartMode - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum OutputStartMode - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/StreamingJobSkuName.Completer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/StreamingJobSkuName.Completer.cs deleted file mode 100644 index 1b94823a7109..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/StreamingJobSkuName.Completer.cs +++ /dev/null @@ -1,35 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// The name of the SKU. Required on PUT (CreateOrReplace) requests. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuNameTypeConverter))] - public partial struct StreamingJobSkuName : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard'", "Standard", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard"); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/StreamingJobSkuName.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/StreamingJobSkuName.TypeConverter.cs deleted file mode 100644 index 2577a38823c8..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/StreamingJobSkuName.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// The name of the SKU. Required on PUT (CreateOrReplace) requests. - public partial class StreamingJobSkuNameTypeConverter : - 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) => true; - - /// - /// 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 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) => StreamingJobSkuName.CreateFrom(sourceValue); - - /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/StreamingJobSkuName.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/StreamingJobSkuName.cs deleted file mode 100644 index a19cb0bd3a10..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/StreamingJobSkuName.cs +++ /dev/null @@ -1,96 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// The name of the SKU. Required on PUT (CreateOrReplace) requests. - public partial struct StreamingJobSkuName : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName Standard = @"Standard"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to StreamingJobSkuName - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new StreamingJobSkuName(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type StreamingJobSkuName - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type StreamingJobSkuName (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is StreamingJobSkuName && Equals((StreamingJobSkuName)obj); - } - - /// Returns hashCode for enum StreamingJobSkuName - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private StreamingJobSkuName(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Returns string representation for StreamingJobSkuName - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to StreamingJobSkuName - /// the value to convert to an instance of . - - public static implicit operator StreamingJobSkuName(string value) - { - return new StreamingJobSkuName(value); - } - - /// Implicit operator to convert StreamingJobSkuName to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName e) - { - return e._value; - } - - /// Overriding != operator for enum StreamingJobSkuName - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum StreamingJobSkuName - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/UdfType.Completer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/UdfType.Completer.cs deleted file mode 100644 index 94a74eccc1a6..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/UdfType.Completer.cs +++ /dev/null @@ -1,35 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// The function type. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfTypeTypeConverter))] - public partial struct UdfType : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Scalar".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Scalar'", "Scalar", global::System.Management.Automation.CompletionResultType.ParameterValue, "Scalar"); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/UdfType.TypeConverter.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/UdfType.TypeConverter.cs deleted file mode 100644 index 979988e31ae1..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/UdfType.TypeConverter.cs +++ /dev/null @@ -1,59 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// The function type. - public partial class UdfTypeTypeConverter : - 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) => true; - - /// - /// 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 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) => UdfType.CreateFrom(sourceValue); - - /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/UdfType.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/UdfType.cs deleted file mode 100644 index 5d2fe7c5f96d..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/api/Support/UdfType.cs +++ /dev/null @@ -1,96 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support -{ - - /// The function type. - public partial struct UdfType : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType Scalar = @"Scalar"; - - /// the value for an instance of the Enum. - private string _value { get; set; } - - /// Conversion from arbitrary object to UdfType - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new UdfType(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type UdfType - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type UdfType (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is UdfType && Equals((UdfType)obj); - } - - /// Returns hashCode for enum UdfType - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for UdfType - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Creates an instance of the Enum class. - /// the value to create an instance for. - private UdfType(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Implicit operator to convert string to UdfType - /// the value to convert to an instance of . - - public static implicit operator UdfType(string value) - { - return new UdfType(value); - } - - /// Implicit operator to convert UdfType to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType e) - { - return e._value; - } - - /// Overriding != operator for enum UdfType - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum UdfType - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType e1, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.UdfType e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsClusterStreamingJob_List.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsClusterStreamingJob_List.cs index 80d49b98ba9c..11de8cc37af7 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsClusterStreamingJob_List.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsClusterStreamingJob_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Lists all of the streaming jobs in the given cluster. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] ListStreamingJobs=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}/listStreamingJobs" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsClusterStreamingJob_List", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJob))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJob))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Lists all of the streaming jobs in the given cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}/listStreamingJobs", ApiVersion = "2020-03-01-preview")] public partial class GetAzStreamAnalyticsClusterStreamingJob_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzStreamAnalyticsClusterStreamingJob_List : global::Syst /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -72,6 +90,9 @@ public partial class GetAzStreamAnalyticsClusterStreamingJob_List : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -98,7 +119,7 @@ public partial class GetAzStreamAnalyticsClusterStreamingJob_List : global::Syst /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -144,7 +165,8 @@ public partial class GetAzStreamAnalyticsClusterStreamingJob_List : global::Syst [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -153,24 +175,24 @@ public partial class GetAzStreamAnalyticsClusterStreamingJob_List : global::Syst /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResult /// 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); + 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) @@ -193,6 +215,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -214,7 +241,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsClusterStreamingJob_List() { @@ -265,8 +292,33 @@ public GetAzStreamAnalyticsClusterStreamingJob_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -322,7 +374,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -343,7 +395,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,ClusterName=ClusterName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ClusterName=ClusterName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -381,12 +433,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -403,15 +455,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName }) + 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 } }); @@ -421,12 +473,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterJobListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,15 +490,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterJobListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_Get.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_Get.cs index db8bbe258187..970305dd7d24 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_Get.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Gets information about the specified cluster. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsCluster_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets information about the specified cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}", ApiVersion = "2020-03-01-preview")] public partial class GetAzStreamAnalyticsCluster_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStreamAnalyticsCluster_Get : global::System.Management /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStreamAnalyticsCluster_Get : global::System.Management [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -93,7 +114,7 @@ public partial class GetAzStreamAnalyticsCluster_Get : global::System.Management /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -139,7 +160,8 @@ public partial class GetAzStreamAnalyticsCluster_Get : global::System.Management [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -148,24 +170,24 @@ public partial class GetAzStreamAnalyticsCluster_Get : global::System.Management /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster /// 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); + 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) @@ -188,6 +210,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -209,7 +236,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsCluster_Get() { @@ -260,8 +287,33 @@ public GetAzStreamAnalyticsCluster_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -314,7 +366,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -335,7 +387,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -373,12 +425,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -395,15 +447,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + 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 } }); @@ -413,12 +465,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -430,8 +482,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_GetViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_GetViaIdentity.cs index d12908dba6af..30a017db243f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_GetViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Gets information about the specified cluster. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsCluster_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets information about the specified cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}", ApiVersion = "2020-03-01-preview")] public partial class GetAzStreamAnalyticsCluster_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStreamAnalyticsCluster_GetViaIdentity : global::System /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStreamAnalyticsCluster_GetViaIdentity : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -86,7 +107,7 @@ public partial class GetAzStreamAnalyticsCluster_GetViaIdentity : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -109,24 +130,24 @@ public partial class GetAzStreamAnalyticsCluster_GetViaIdentity : global::System /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster /// 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); + 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) @@ -149,6 +170,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -170,7 +196,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsCluster_GetViaIdentity() { @@ -221,8 +247,33 @@ public GetAzStreamAnalyticsCluster_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -275,7 +326,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -313,7 +364,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -351,12 +402,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -373,7 +424,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 } @@ -391,12 +442,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -408,8 +459,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_List.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_List.cs index ec3c7a145160..cd56bfbcf1bd 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_List.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Lists all of the clusters in the given subscription. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/clusters" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsCluster_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Lists all of the clusters in the given subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/clusters", ApiVersion = "2020-03-01-preview")] public partial class GetAzStreamAnalyticsCluster_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzStreamAnalyticsCluster_List : global::System.Managemen /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzStreamAnalyticsCluster_List : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -84,7 +105,7 @@ public partial class GetAzStreamAnalyticsCluster_List : global::System.Managemen /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -116,7 +137,8 @@ public partial class GetAzStreamAnalyticsCluster_List : global::System.Managemen [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -125,24 +147,24 @@ public partial class GetAzStreamAnalyticsCluster_List : global::System.Managemen /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResult /// 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); + 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) @@ -165,6 +187,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -186,7 +213,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsCluster_List() { @@ -237,8 +264,33 @@ public GetAzStreamAnalyticsCluster_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -291,7 +343,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -312,7 +364,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -350,12 +402,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -372,15 +424,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 { SubscriptionId=SubscriptionId }) + 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 } }); @@ -390,12 +442,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -407,15 +459,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_List1.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_List1.cs index 73fc655f5033..535705f81e45 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_List1.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsCluster_List1.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Lists all of the clusters in the given resource group. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsCluster_List1")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Lists all of the clusters in the given resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters", ApiVersion = "2020-03-01-preview")] public partial class GetAzStreamAnalyticsCluster_List1 : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzStreamAnalyticsCluster_List1 : global::System.Manageme /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzStreamAnalyticsCluster_List1 : global::System.Manageme [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -84,7 +105,7 @@ public partial class GetAzStreamAnalyticsCluster_List1 : global::System.Manageme /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -130,7 +151,8 @@ public partial class GetAzStreamAnalyticsCluster_List1 : global::System.Manageme [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -139,24 +161,24 @@ public partial class GetAzStreamAnalyticsCluster_List1 : global::System.Manageme /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResult /// 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); + 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) @@ -179,6 +201,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -200,7 +227,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsCluster_List1() { @@ -251,8 +278,33 @@ public GetAzStreamAnalyticsCluster_List1() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -305,7 +357,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -326,7 +378,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -364,12 +416,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -386,15 +438,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + 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 } }); @@ -404,12 +456,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.IClusterListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -421,15 +473,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IClusterListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_Retrieve.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_Retrieve.cs index df30cd221019..e96ae372ce26 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_Retrieve.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_Retrieve.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -16,13 +18,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsDefaultFunctionDefinition_Retrieve", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"Input"}, NewOutputProperties=new string[] {"Input"}, ChangeDescription="The type of property Input will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Input"}, NewOutputProperties = new string[] {"Input" } , ChangeDescription = "The type of property Input will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Retrieves the default definition of a function based on the parameters specified.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_Retrieve : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,11 +41,26 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_Retrieve : gl /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -56,10 +74,13 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_Retrieve : gl [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// /// Backing field for property. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters _functionRetrieveDefaultDefinitionParameter; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters _functionRetrieveDefaultDefinitionParameter; /// /// Parameters used to specify the type of function to retrieve the default definition for. @@ -70,8 +91,9 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_Retrieve : gl ReadOnly = false, Description = @"Parameters used to specify the type of function to retrieve the default definition for.", SerializedName = @"functionRetrieveDefaultDefinitionParameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters FunctionRetrieveDefaultDefinitionParameter { get => this._functionRetrieveDefaultDefinitionParameter; set => this._functionRetrieveDefaultDefinitionParameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters FunctionRetrieveDefaultDefinitionParameter { get => this._functionRetrieveDefaultDefinitionParameter; set => this._functionRetrieveDefaultDefinitionParameter = value; } /// 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")] @@ -127,7 +149,7 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_Retrieve : gl /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -173,7 +195,8 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_Retrieve : gl [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -182,12 +205,12 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_Retrieve : gl /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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); + 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) @@ -210,6 +233,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -231,7 +259,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsDefaultFunctionDefinition_Retrieve() { @@ -282,8 +310,33 @@ public GetAzStreamAnalyticsDefaultFunctionDefinition_Retrieve() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -339,7 +392,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -360,7 +413,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name,body=FunctionRetrieveDefaultDefinitionParameter}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -396,12 +449,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,8 +466,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpanded.cs index 2d917b5d9c64..213ec0773f37 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -16,13 +18,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"Input"}, NewOutputProperties=new string[] {"Input"}, ChangeDescription="The type of property Input will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Input"}, NewOutputProperties = new string[] {"Input" } , ChangeDescription = "The type of property Input will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Retrieves the default definition of a function based on the parameters specified.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,16 +41,28 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpan /// 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; + /// /// Parameters used to specify the type of function to retrieve the default definition for. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters _functionRetrieveDefaultDefinitionParametersBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionRetrieveDefaultDefinitionParameters(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters _functionRetrieveDefaultDefinitionParametersBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionRetrieveDefaultDefinitionParameters(); + + /// + /// 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; /// Indicates the function binding type. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Indicates the function binding type.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the function binding type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = true, + Required = false, ReadOnly = false, Description = @"Indicates the function binding type.", SerializedName = @"bindingType", @@ -59,6 +74,9 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpan [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -72,6 +90,9 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpan [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -126,7 +147,7 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpan /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -172,7 +193,8 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpan [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -181,12 +203,12 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpan /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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); + 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) @@ -209,6 +231,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -230,7 +257,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet + /// Initializes a new instance of the cmdlet /// class. /// public GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpanded() @@ -282,8 +309,33 @@ public GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpanded() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -339,7 +391,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -360,7 +412,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name,body=_functionRetrieveDefaultDefinitionParametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -396,12 +448,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,8 +465,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentity.cs index f02eb70a696d..db5fcc62ee4e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -16,13 +18,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"Input"}, NewOutputProperties=new string[] {"Input"}, ChangeDescription="The type of property Input will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Input"}, NewOutputProperties = new string[] {"Input" } , ChangeDescription = "The type of property Input will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Retrieves the default definition of a function based on the parameters specified.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,11 +41,26 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaId /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -56,10 +74,13 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaId [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// /// Backing field for property. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters _functionRetrieveDefaultDefinitionParameter; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters _functionRetrieveDefaultDefinitionParameter; /// /// Parameters used to specify the type of function to retrieve the default definition for. @@ -70,8 +91,9 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaId ReadOnly = false, Description = @"Parameters used to specify the type of function to retrieve the default definition for.", SerializedName = @"functionRetrieveDefaultDefinitionParameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters FunctionRetrieveDefaultDefinitionParameter { get => this._functionRetrieveDefaultDefinitionParameter; set => this._functionRetrieveDefaultDefinitionParameter = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters FunctionRetrieveDefaultDefinitionParameter { get => this._functionRetrieveDefaultDefinitionParameter; set => this._functionRetrieveDefaultDefinitionParameter = value; } /// 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")] @@ -107,7 +129,7 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaId /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -130,12 +152,12 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaId /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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); + 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) @@ -158,6 +180,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -179,7 +206,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet + /// Initializes a new instance of the cmdlet /// class. /// public GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentity() @@ -231,8 +258,33 @@ public GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -288,7 +340,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -330,7 +382,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=FunctionRetrieveDefaultDefinitionParameter}) + 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 } }); @@ -366,12 +418,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -383,8 +435,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityExpanded.cs index 4580d25220fe..eb93d6d6a182 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -16,13 +18,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"Input"}, NewOutputProperties=new string[] {"Input"}, ChangeDescription="The type of property Input will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Input"}, NewOutputProperties = new string[] {"Input" } , ChangeDescription = "The type of property Input will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Retrieves the default definition of a function based on the parameters specified.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,16 +41,28 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaId /// 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; + /// /// Parameters used to specify the type of function to retrieve the default definition for. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters _functionRetrieveDefaultDefinitionParametersBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.FunctionRetrieveDefaultDefinitionParameters(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters _functionRetrieveDefaultDefinitionParametersBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionRetrieveDefaultDefinitionParameters(); + + /// + /// 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; /// Indicates the function binding type. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Indicates the function binding type.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the function binding type.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = true, + Required = false, ReadOnly = false, Description = @"Indicates the function binding type.", SerializedName = @"bindingType", @@ -59,6 +74,9 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaId [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -72,6 +90,9 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaId [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -106,7 +127,7 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaId /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -129,12 +150,12 @@ public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaId /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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); + 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) @@ -157,6 +178,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -178,7 +204,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityExpanded() @@ -230,8 +256,33 @@ public GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityExpanded WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -287,7 +338,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -329,7 +380,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_functionRetrieveDefaultDefinitionParametersBody}) + 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 } }); @@ -365,12 +416,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -382,8 +433,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..07b4238c0114 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjob.cs @@ -0,0 +1,472 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Retrieves the default definition of a function based on the parameters specified. + /// + /// + /// [OpenAPI] RetrieveDefaultDefinition=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjob", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Input"}, NewOutputProperties = new string[] {"Input" } , ChangeDescription = "The type of property Input will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Retrieves the default definition of a function based on the parameters specified.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition", ApiVersion = "2017-04-01-preview")] + public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// + /// Backing field for property. + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters _functionRetrieveDefaultDefinitionParameter; + + /// + /// Parameters used to specify the type of function to retrieve the default definition for. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Parameters used to specify the type of function to retrieve the default definition for.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Parameters used to specify the type of function to retrieve the default definition for.", + SerializedName = @"functionRetrieveDefaultDefinitionParameters", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters FunctionRetrieveDefaultDefinitionParameter { get => this._functionRetrieveDefaultDefinitionParameter; set => this._functionRetrieveDefaultDefinitionParameter = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjob() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsRetrieveDefaultDefinition' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/functions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.FunctionsRetrieveDefaultDefinitionViaIdentity(StreamingjobInputObject.Id, FunctionRetrieveDefaultDefinitionParameter, onOk, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.FunctionsRetrieveDefaultDefinition(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, FunctionRetrieveDefaultDefinitionParameter, onOk, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjobExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjobExpanded.cs new file mode 100644 index 000000000000..f5e355ce2709 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjobExpanded.cs @@ -0,0 +1,470 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Retrieves the default definition of a function based on the parameters specified. + /// + /// + /// [OpenAPI] RetrieveDefaultDefinition=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjobExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Input"}, NewOutputProperties = new string[] {"Input" } , ChangeDescription = "The type of property Input will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Retrieves the default definition of a function based on the parameters specified.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition", ApiVersion = "2017-04-01-preview")] + public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjobExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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; + + /// + /// Parameters used to specify the type of function to retrieve the default definition for. + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters _functionRetrieveDefaultDefinitionParametersBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.FunctionRetrieveDefaultDefinitionParameters(); + + /// + /// 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; + + /// Indicates the function binding type. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the function binding type.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the function binding type.", + SerializedName = @"bindingType", + PossibleTypes = new [] { typeof(string) })] + public string BindingType { get => _functionRetrieveDefaultDefinitionParametersBody.BindingType ?? null; set => _functionRetrieveDefaultDefinitionParametersBody.BindingType = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjobExpanded() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsRetrieveDefaultDefinition' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/functions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.FunctionsRetrieveDefaultDefinitionViaIdentity(StreamingjobInputObject.Id, _functionRetrieveDefaultDefinitionParametersBody, onOk, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.FunctionsRetrieveDefaultDefinition(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, _functionRetrieveDefaultDefinitionParametersBody, onOk, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonFilePath.cs new file mode 100644 index 000000000000..1214b6f2ae7b --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonFilePath.cs @@ -0,0 +1,491 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Retrieves the default definition of a function based on the parameters specified. + /// + /// + /// [OpenAPI] RetrieveDefaultDefinition=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Input"}, NewOutputProperties = new string[] {"Input" } , ChangeDescription = "The type of property Input will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Retrieves the default definition of a function based on the parameters specified.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = value; } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Retrieve operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Retrieve operation")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Retrieve 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonFilePath() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsRetrieveDefaultDefinition' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FunctionsRetrieveDefaultDefinitionViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonString.cs new file mode 100644 index 000000000000..8e176b702811 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonString.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Retrieves the default definition of a function based on the parameters specified. + /// + /// + /// [OpenAPI] RetrieveDefaultDefinition=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Input"}, NewOutputProperties = new string[] {"Input" } , ChangeDescription = "The type of property Input will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Retrieves the default definition of a function based on the parameters specified.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/RetrieveDefaultDefinition", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = value; } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Retrieve operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Retrieve operation")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Retrieve 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 GetAzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonString() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsRetrieveDefaultDefinition' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FunctionsRetrieveDefaultDefinitionViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsFunction_Get.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsFunction_Get.cs index 788e42b2ffd1..c6405ff22fa1 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsFunction_Get.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsFunction_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Gets details about the specified function. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsFunction_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets details about the specified function.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsFunction_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStreamAnalyticsFunction_Get : global::System.Managemen /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStreamAnalyticsFunction_Get : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -107,7 +128,7 @@ public partial class GetAzStreamAnalyticsFunction_Get : global::System.Managemen /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -153,7 +174,8 @@ public partial class GetAzStreamAnalyticsFunction_Get : global::System.Managemen [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -162,12 +184,12 @@ public partial class GetAzStreamAnalyticsFunction_Get : global::System.Managemen /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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); + 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) @@ -190,6 +212,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -211,7 +238,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsFunction_Get() { @@ -262,8 +289,33 @@ public GetAzStreamAnalyticsFunction_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -316,7 +368,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -337,7 +389,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -373,12 +425,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -390,8 +442,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsFunction_GetViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsFunction_GetViaIdentity.cs index 8ad68f7998b2..a7872f0e998c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsFunction_GetViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsFunction_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Gets details about the specified function. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsFunction_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets details about the specified function.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsFunction_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStreamAnalyticsFunction_GetViaIdentity : global::Syste /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStreamAnalyticsFunction_GetViaIdentity : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -86,7 +107,7 @@ public partial class GetAzStreamAnalyticsFunction_GetViaIdentity : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -109,12 +130,12 @@ public partial class GetAzStreamAnalyticsFunction_GetViaIdentity : global::Syste /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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); + 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) @@ -137,6 +158,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -158,7 +184,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsFunction_GetViaIdentity() { @@ -209,8 +235,33 @@ public GetAzStreamAnalyticsFunction_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -263,7 +314,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -305,7 +356,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -341,12 +392,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -358,8 +409,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsFunction_GetViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsFunction_GetViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..6c82ac516da6 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsFunction_GetViaIdentityStreamingjob.cs @@ -0,0 +1,447 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// Gets details about the specified function. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsFunction_GetViaIdentityStreamingjob")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets details about the specified function.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] + public partial class GetAzStreamAnalyticsFunction_GetViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FunctionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 GetAzStreamAnalyticsFunction_GetViaIdentityStreamingjob() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/functions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.FunctionsGetViaIdentity(StreamingjobInputObject.Id, onOk, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.FunctionsGet(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, onOk, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsFunction_List.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsFunction_List.cs index fe97f14e9cd5..5b55dfb222d3 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsFunction_List.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsFunction_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Lists all of the functions under the specified streaming job. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] ListByStreamingJob=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsFunction_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Lists all of the functions under the specified streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsFunction_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,17 +37,32 @@ public partial class GetAzStreamAnalyticsFunction_List : global::System.Manageme /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -58,6 +76,9 @@ public partial class GetAzStreamAnalyticsFunction_List : global::System.Manageme [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -98,7 +119,7 @@ public partial class GetAzStreamAnalyticsFunction_List : global::System.Manageme /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -162,7 +183,8 @@ public partial class GetAzStreamAnalyticsFunction_List : global::System.Manageme [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -171,12 +193,12 @@ public partial class GetAzStreamAnalyticsFunction_List : global::System.Manageme /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResult /// 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); + 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) @@ -199,6 +221,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -220,7 +247,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsFunction_List() { @@ -271,8 +298,33 @@ public GetAzStreamAnalyticsFunction_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -325,7 +377,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -340,13 +392,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.FunctionsListByStreamingJob(this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null, SubscriptionId, ResourceGroupName, JobName, onOk, this, Pipeline); + await this.Client.FunctionsListByStreamingJob(SubscriptionId, ResourceGroupName, JobName, this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null, onOk, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Select=this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Select=this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null,JobName=JobName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -382,12 +434,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -399,15 +451,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsInput_Get.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsInput_Get.cs index 08b144b9929a..6d83f8409157 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsInput_Get.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsInput_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Gets details about the specified input. @@ -13,13 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsInput_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"Condition"}, NewOutputProperties=new string[] {"Condition"}, ChangeDescription="The type of property Condition will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Condition"}, NewOutputProperties = new string[] {"Condition" } , ChangeDescription = "The type of property Condition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets details about the specified input.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsInput_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzStreamAnalyticsInput_Get : global::System.Management.A /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class GetAzStreamAnalyticsInput_Get : global::System.Management.A [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -108,7 +129,7 @@ public partial class GetAzStreamAnalyticsInput_Get : global::System.Management.A /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -154,7 +175,8 @@ public partial class GetAzStreamAnalyticsInput_Get : global::System.Management.A [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -163,12 +185,12 @@ public partial class GetAzStreamAnalyticsInput_Get : global::System.Management.A /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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); + 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) @@ -191,6 +213,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -212,7 +239,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsInput_Get() { @@ -263,8 +290,33 @@ public GetAzStreamAnalyticsInput_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -317,7 +369,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -338,7 +390,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -374,12 +426,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -391,8 +443,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsInput_GetViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsInput_GetViaIdentity.cs index 833c0432bcd3..d33148a8d452 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsInput_GetViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsInput_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Gets details about the specified input. @@ -13,13 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsInput_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"Condition"}, NewOutputProperties=new string[] {"Condition"}, ChangeDescription="The type of property Condition will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Condition"}, NewOutputProperties = new string[] {"Condition" } , ChangeDescription = "The type of property Condition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets details about the specified input.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsInput_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzStreamAnalyticsInput_GetViaIdentity : global::System.M /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class GetAzStreamAnalyticsInput_GetViaIdentity : global::System.M [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -87,7 +108,7 @@ public partial class GetAzStreamAnalyticsInput_GetViaIdentity : global::System.M /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -110,12 +131,12 @@ public partial class GetAzStreamAnalyticsInput_GetViaIdentity : global::System.M /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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); + 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) @@ -138,6 +159,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -159,7 +185,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsInput_GetViaIdentity() { @@ -210,8 +236,33 @@ public GetAzStreamAnalyticsInput_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -264,7 +315,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -306,7 +357,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -342,12 +393,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -359,8 +410,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsInput_GetViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsInput_GetViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..d905369eff14 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsInput_GetViaIdentityStreamingjob.cs @@ -0,0 +1,448 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// Gets details about the specified input. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsInput_GetViaIdentityStreamingjob")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Condition"}, NewOutputProperties = new string[] {"Condition" } , ChangeDescription = "The type of property Condition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets details about the specified input.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] + public partial class GetAzStreamAnalyticsInput_GetViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the input.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the input.", + SerializedName = @"inputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("InputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 GetAzStreamAnalyticsInput_GetViaIdentityStreamingjob() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/inputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.InputsGetViaIdentity(StreamingjobInputObject.Id, onOk, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.InputsGet(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, onOk, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsInput_List.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsInput_List.cs index 847e548707fb..c6892c52b57f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsInput_List.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsInput_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Lists all of the inputs under the specified streaming job. @@ -13,13 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] ListByStreamingJob=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsInput_List")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"Condition"}, NewOutputProperties=new string[] {"Condition"}, ChangeDescription="The type of property Condition will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Condition"}, NewOutputProperties = new string[] {"Condition" } , ChangeDescription = "The type of property Condition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Lists all of the inputs under the specified streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsInput_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +38,32 @@ public partial class GetAzStreamAnalyticsInput_List : global::System.Management. /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -59,6 +77,9 @@ public partial class GetAzStreamAnalyticsInput_List : global::System.Management. [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -99,7 +120,7 @@ public partial class GetAzStreamAnalyticsInput_List : global::System.Management. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -163,7 +184,8 @@ public partial class GetAzStreamAnalyticsInput_List : global::System.Management. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -172,12 +194,12 @@ public partial class GetAzStreamAnalyticsInput_List : global::System.Management. /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResult /// 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); + 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) @@ -200,6 +222,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -221,7 +248,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsInput_List() { @@ -272,8 +299,33 @@ public GetAzStreamAnalyticsInput_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -326,7 +378,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -341,13 +393,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.InputsListByStreamingJob(this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null, SubscriptionId, ResourceGroupName, JobName, onOk, this, Pipeline); + await this.Client.InputsListByStreamingJob(SubscriptionId, ResourceGroupName, JobName, this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null, onOk, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Select=this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Select=this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null,JobName=JobName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -383,12 +435,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -400,15 +452,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_Get.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_Get.cs index f19413adbcfc..00fd2f3e65f8 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_Get.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Gets details about the specified streaming job. @@ -13,13 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsJob_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"Input","Output"}, NewOutputProperties=new string[] {"Input","Output"}, ChangeDescription="The types of the properties Input and Output will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Input","Output"}, NewOutputProperties = new string[] {"Input","Output" } , ChangeDescription = "The types of the properties Input and Output will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets details about the specified streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsJob_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzStreamAnalyticsJob_Get : global::System.Management.Aut /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -71,6 +89,9 @@ public partial class GetAzStreamAnalyticsJob_Get : global::System.Management.Aut [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Query)] public string Expand { get => this._expand; set => this._expand = 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] @@ -111,7 +132,7 @@ public partial class GetAzStreamAnalyticsJob_Get : global::System.Management.Aut /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -157,7 +178,8 @@ public partial class GetAzStreamAnalyticsJob_Get : global::System.Management.Aut [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -166,12 +188,12 @@ public partial class GetAzStreamAnalyticsJob_Get : global::System.Management.Aut /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob /// 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); + 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) @@ -194,6 +216,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -215,7 +242,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsJob_Get() { @@ -266,8 +293,33 @@ public GetAzStreamAnalyticsJob_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -320,7 +372,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -335,13 +387,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StreamingJobsGet(this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null, SubscriptionId, ResourceGroupName, Name, onOk, this, Pipeline); + await this.Client.StreamingJobsGet(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null, onOk, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -377,12 +429,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -394,8 +446,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_GetViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_GetViaIdentity.cs index ef855eee6bb8..17f52ea19e64 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_GetViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Gets details about the specified streaming job. @@ -13,13 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsJob_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"Input","Output"}, NewOutputProperties=new string[] {"Input","Output"}, ChangeDescription="The types of the properties Input and Output will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Input","Output"}, NewOutputProperties = new string[] {"Input","Output" } , ChangeDescription = "The types of the properties Input and Output will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets details about the specified streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsJob_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzStreamAnalyticsJob_GetViaIdentity : global::System.Man /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -71,6 +89,9 @@ public partial class GetAzStreamAnalyticsJob_GetViaIdentity : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Query)] public string Expand { get => this._expand; set => this._expand = 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] @@ -105,7 +126,7 @@ public partial class GetAzStreamAnalyticsJob_GetViaIdentity : global::System.Man /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -128,12 +149,12 @@ public partial class GetAzStreamAnalyticsJob_GetViaIdentity : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob /// 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); + 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) @@ -156,6 +177,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -177,7 +203,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsJob_GetViaIdentity() { @@ -228,8 +254,33 @@ public GetAzStreamAnalyticsJob_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -282,7 +333,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -314,13 +365,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.StreamingJobsGet(this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, onOk, this, Pipeline); + await this.Client.StreamingJobsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null, onOk, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -356,12 +407,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -373,8 +424,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_List.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_List.cs index b1bb6f2e1953..e51aa2df81f5 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_List.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Lists all of the streaming jobs in the specified resource group. @@ -13,13 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsJob_List")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"Input","Output"}, NewOutputProperties=new string[] {"Input","Output"}, ChangeDescription="The types of the properties Input and Output will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Input","Output"}, NewOutputProperties = new string[] {"Input","Output" } , ChangeDescription = "The types of the properties Input and Output will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Lists all of the streaming jobs in the specified resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsJob_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +38,32 @@ public partial class GetAzStreamAnalyticsJob_List : global::System.Management.Au /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -77,6 +95,9 @@ public partial class GetAzStreamAnalyticsJob_List : global::System.Management.Au [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Query)] public string Expand { get => this._expand; set => this._expand = 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] @@ -103,7 +124,7 @@ public partial class GetAzStreamAnalyticsJob_List : global::System.Management.Au /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -149,7 +170,8 @@ public partial class GetAzStreamAnalyticsJob_List : global::System.Management.Au [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -158,12 +180,12 @@ public partial class GetAzStreamAnalyticsJob_List : global::System.Management.Au /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResult /// 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); + 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) @@ -186,6 +208,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -207,7 +234,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsJob_List() { @@ -258,8 +285,33 @@ public GetAzStreamAnalyticsJob_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -312,7 +364,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -327,13 +379,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StreamingJobsListByResourceGroup(this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null, SubscriptionId, ResourceGroupName, onOk, this, Pipeline); + await this.Client.StreamingJobsListByResourceGroup(SubscriptionId, ResourceGroupName, this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null, onOk, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -369,12 +421,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -386,15 +438,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_List1.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_List1.cs index 170c536e5fdf..44feb4aaa76e 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_List1.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsJob_List1.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Lists all of the streaming jobs in the given subscription. @@ -13,13 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/streamingjobs" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsJob_List1")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"Input","Output"}, NewOutputProperties=new string[] {"Input","Output"}, ChangeDescription="The types of the properties Input and Output will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"Input","Output"}, NewOutputProperties = new string[] {"Input","Output" } , ChangeDescription = "The types of the properties Input and Output will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Lists all of the streaming jobs in the given subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/streamingjobs", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsJob_List1 : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +38,32 @@ public partial class GetAzStreamAnalyticsJob_List1 : global::System.Management.A /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -77,6 +95,9 @@ public partial class GetAzStreamAnalyticsJob_List1 : global::System.Management.A [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Query)] public string Expand { get => this._expand; set => this._expand = 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] @@ -103,7 +124,7 @@ public partial class GetAzStreamAnalyticsJob_List1 : global::System.Management.A /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -135,7 +156,8 @@ public partial class GetAzStreamAnalyticsJob_List1 : global::System.Management.A [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -144,12 +166,12 @@ public partial class GetAzStreamAnalyticsJob_List1 : global::System.Management.A /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResult /// 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); + 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) @@ -172,6 +194,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -193,7 +220,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsJob_List1() { @@ -244,8 +271,33 @@ public GetAzStreamAnalyticsJob_List1() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -298,7 +350,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -313,13 +365,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StreamingJobsList(this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null, SubscriptionId, onOk, this, Pipeline); + await this.Client.StreamingJobsList(SubscriptionId, this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null, onOk, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -355,12 +407,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJobListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -372,15 +424,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJobListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOperation_List.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOperation_List.cs index 2df3d9c1f40f..2ce298eadf6b 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOperation_List.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOperation_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Lists all of the available Stream Analytics related operations. @@ -14,12 +16,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsOperation_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Lists all of the available Stream Analytics related operations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/providers/Microsoft.StreamAnalytics/operations", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsOperation_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +38,32 @@ public partial class GetAzStreamAnalyticsOperation_List : global::System.Managem /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -59,6 +77,9 @@ public partial class GetAzStreamAnalyticsOperation_List : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -85,7 +106,7 @@ public partial class GetAzStreamAnalyticsOperation_List : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -108,12 +129,12 @@ public partial class GetAzStreamAnalyticsOperation_List : global::System.Managem /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResult /// 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); + 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) @@ -136,6 +157,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -157,7 +183,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsOperation_List() { @@ -208,8 +234,33 @@ public GetAzStreamAnalyticsOperation_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -262,7 +313,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -280,7 +331,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -316,12 +367,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperationListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -333,15 +384,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperationListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOutput_Get.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOutput_Get.cs index 9b576f89ad7f..0ed6fd532b1a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOutput_Get.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOutput_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Gets details about the specified output. @@ -13,13 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsOutput_Get")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"DiagnosticCondition"}, NewOutputProperties=new string[] {"DiagnosticCondition"}, ChangeDescription="The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets details about the specified output.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsOutput_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzStreamAnalyticsOutput_Get : global::System.Management. /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class GetAzStreamAnalyticsOutput_Get : global::System.Management. [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -108,7 +129,7 @@ public partial class GetAzStreamAnalyticsOutput_Get : global::System.Management. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -154,7 +175,8 @@ public partial class GetAzStreamAnalyticsOutput_Get : global::System.Management. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -163,12 +185,12 @@ public partial class GetAzStreamAnalyticsOutput_Get : global::System.Management. /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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); + 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) @@ -191,6 +213,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -212,7 +239,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsOutput_Get() { @@ -263,8 +290,33 @@ public GetAzStreamAnalyticsOutput_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -317,7 +369,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -338,7 +390,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -374,12 +426,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -391,8 +443,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOutput_GetViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOutput_GetViaIdentity.cs index ca071a57314e..f19dd976f788 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOutput_GetViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOutput_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Gets details about the specified output. @@ -13,13 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsOutput_GetViaIdentity")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"DiagnosticCondition"}, NewOutputProperties=new string[] {"DiagnosticCondition"}, ChangeDescription="The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets details about the specified output.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsOutput_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzStreamAnalyticsOutput_GetViaIdentity : global::System. /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class GetAzStreamAnalyticsOutput_GetViaIdentity : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -87,7 +108,7 @@ public partial class GetAzStreamAnalyticsOutput_GetViaIdentity : global::System. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -110,12 +131,12 @@ public partial class GetAzStreamAnalyticsOutput_GetViaIdentity : global::System. /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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); + 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) @@ -138,6 +159,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -159,7 +185,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsOutput_GetViaIdentity() { @@ -210,8 +236,33 @@ public GetAzStreamAnalyticsOutput_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -264,7 +315,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -306,7 +357,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -342,12 +393,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -359,8 +410,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOutput_GetViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOutput_GetViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..1d635eea761c --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOutput_GetViaIdentityStreamingjob.cs @@ -0,0 +1,448 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// Gets details about the specified output. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsOutput_GetViaIdentityStreamingjob")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets details about the specified output.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] + public partial class GetAzStreamAnalyticsOutput_GetViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the output. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the output.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the output.", + SerializedName = @"outputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OutputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 GetAzStreamAnalyticsOutput_GetViaIdentityStreamingjob() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/outputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.OutputsGetViaIdentity(StreamingjobInputObject.Id, onOk, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.OutputsGet(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, onOk, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOutput_List.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOutput_List.cs index 0a8bfe58603a..e44e6d3ec050 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOutput_List.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsOutput_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Lists all of the outputs under the specified streaming job. @@ -13,13 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] ListByStreamingJob=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsOutput_List")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"DiagnosticCondition"}, NewOutputProperties=new string[] {"DiagnosticCondition"}, ChangeDescription="The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Lists all of the outputs under the specified streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsOutput_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,17 +38,32 @@ public partial class GetAzStreamAnalyticsOutput_List : global::System.Management /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -59,6 +77,9 @@ public partial class GetAzStreamAnalyticsOutput_List : global::System.Management [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -99,7 +120,7 @@ public partial class GetAzStreamAnalyticsOutput_List : global::System.Management /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -163,7 +184,8 @@ public partial class GetAzStreamAnalyticsOutput_List : global::System.Management [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -172,12 +194,12 @@ public partial class GetAzStreamAnalyticsOutput_List : global::System.Management /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResult /// 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); + 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) @@ -200,6 +222,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -221,7 +248,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsOutput_List() { @@ -272,8 +299,33 @@ public GetAzStreamAnalyticsOutput_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -326,7 +378,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -341,13 +393,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.OutputsListByStreamingJob(this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null, SubscriptionId, ResourceGroupName, JobName, onOk, this, Pipeline); + await this.Client.OutputsListByStreamingJob(SubscriptionId, ResourceGroupName, JobName, this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null, onOk, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Select=this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Select=this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null,JobName=JobName}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -383,12 +435,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -400,15 +452,38 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // pageable / value / nextLink - var result = await response; - WriteObject(result.Value,true); + 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 (_nextLink != null) + while (!String.IsNullOrEmpty(_nextLink)) { if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsQuota_List.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsQuota_List.cs index 160fb89c89a2..ba31c785a30d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsQuota_List.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsQuota_List.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Retrieves the subscription's current quota information in a particular region. @@ -13,13 +15,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] ListQuotas=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/locations/{location}/quotas" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsQuota_List")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"ISubscriptionQuota"}, NewOutputProperties=new string[] {"ISubscriptionQuotasListResult"}, ChangeDescription="The type of property Quota will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuota))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"ISubscriptionQuota"}, NewOutputProperties = new string[] {"ISubscriptionQuotasListResult" } , ChangeDescription = "The type of property Quota will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Retrieves the subscription's current quota information in a particular region.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.StreamAnalytics/locations/{location}/quotas", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsQuota_List : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,11 +38,26 @@ public partial class GetAzStreamAnalyticsQuota_List : global::System.Management. /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -53,6 +71,9 @@ public partial class GetAzStreamAnalyticsQuota_List : global::System.Management. [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -96,7 +117,7 @@ public partial class GetAzStreamAnalyticsQuota_List : global::System.Management. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -128,7 +149,8 @@ public partial class GetAzStreamAnalyticsQuota_List : global::System.Management. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -137,12 +159,12 @@ public partial class GetAzStreamAnalyticsQuota_List : global::System.Management. /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult /// 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); + 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) @@ -165,6 +187,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -186,7 +213,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsQuota_List() { @@ -237,8 +264,33 @@ public GetAzStreamAnalyticsQuota_List() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -291,7 +343,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -306,13 +358,13 @@ protected override void ProcessRecord() foreach( var SubscriptionId in this.SubscriptionId ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.SubscriptionsListQuotas(Location, SubscriptionId, onOk, this, Pipeline); + await this.Client.SubscriptionsListQuotas(SubscriptionId, Location, onOk, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Location=Location,SubscriptionId=SubscriptionId}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -348,12 +400,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ISubscriptionQuotasListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -365,9 +417,33 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ISubscriptionQuotasListResult + var result = (await response); // response should be returning an array of some kind. +Pageable // nested-array / value / - WriteObject((await response).Value, true); + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsTransformation_Get.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsTransformation_Get.cs index 7b0fcfb1d03f..9e04b1d35768 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsTransformation_Get.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsTransformation_Get.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Gets details about the specified transformation. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsTransformation_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets details about the specified transformation.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsTransformation_Get : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStreamAnalyticsTransformation_Get : global::System.Man /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStreamAnalyticsTransformation_Get : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -107,7 +128,7 @@ public partial class GetAzStreamAnalyticsTransformation_Get : global::System.Man /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -153,7 +174,8 @@ public partial class GetAzStreamAnalyticsTransformation_Get : global::System.Man [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -162,12 +184,12 @@ public partial class GetAzStreamAnalyticsTransformation_Get : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation /// 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); + 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) @@ -190,6 +212,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -211,7 +238,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsTransformation_Get() { @@ -262,8 +289,33 @@ public GetAzStreamAnalyticsTransformation_Get() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -316,7 +368,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -337,7 +389,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -373,12 +425,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -390,8 +442,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsTransformation_GetViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsTransformation_GetViaIdentity.cs index 2a039069568d..eccaa639fe96 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsTransformation_GetViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsTransformation_GetViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Gets details about the specified transformation. @@ -13,12 +15,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsTransformation_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets details about the specified transformation.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}", ApiVersion = "2017-04-01-preview")] public partial class GetAzStreamAnalyticsTransformation_GetViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class GetAzStreamAnalyticsTransformation_GetViaIdentity : global: /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class GetAzStreamAnalyticsTransformation_GetViaIdentity : global: [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -86,7 +107,7 @@ public partial class GetAzStreamAnalyticsTransformation_GetViaIdentity : global: /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -109,12 +130,12 @@ public partial class GetAzStreamAnalyticsTransformation_GetViaIdentity : global: /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation /// 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); + 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) @@ -137,6 +158,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -158,7 +184,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public GetAzStreamAnalyticsTransformation_GetViaIdentity() { @@ -209,8 +235,33 @@ public GetAzStreamAnalyticsTransformation_GetViaIdentity() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -263,7 +314,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -305,7 +356,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -341,12 +392,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -358,8 +409,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsTransformation_GetViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsTransformation_GetViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..3c699072d840 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/GetAzStreamAnalyticsTransformation_GetViaIdentityStreamingjob.cs @@ -0,0 +1,448 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// Gets details about the specified transformation. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzStreamAnalyticsTransformation_GetViaIdentityStreamingjob")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Gets details about the specified transformation.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}", ApiVersion = "2017-04-01-preview")] + public partial class GetAzStreamAnalyticsTransformation_GetViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the transformation. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the transformation.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the transformation.", + SerializedName = @"transformationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TransformationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 GetAzStreamAnalyticsTransformation_GetViaIdentityStreamingjob() + { + + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/transformations/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TransformationsGetViaIdentity(StreamingjobInputObject.Id, onOk, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.TransformationsGet(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, onOk, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsCluster_CreateExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsCluster_CreateExpanded.cs index 8f38bd6042e9..c078d164734f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsCluster_CreateExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsCluster_CreateExpanded.cs @@ -6,19 +6,22 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; - /// Creates a Stream Analytics Cluster or replaces an already existing cluster. + /// create a Stream Analytics Cluster or replaces an already existing cluster. /// /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsCluster_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates a Stream Analytics Cluster or replaces an already existing cluster.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a Stream Analytics Cluster or replaces an already existing cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}", ApiVersion = "2020-03-01-preview")] public partial class NewAzStreamAnalyticsCluster_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,7 +38,10 @@ public partial class NewAzStreamAnalyticsCluster_CreateExpanded : global::System private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// A Stream Analytics Cluster object - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster _clusterBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.Cluster(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster _clusterBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Cluster(); + + /// 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")] @@ -47,6 +53,9 @@ public partial class NewAzStreamAnalyticsCluster_CreateExpanded : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -60,6 +69,9 @@ public partial class NewAzStreamAnalyticsCluster_CreateExpanded : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -154,7 +166,7 @@ public partial class NewAzStreamAnalyticsCluster_CreateExpanded : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -210,9 +222,9 @@ public partial class NewAzStreamAnalyticsCluster_CreateExpanded : global::System ReadOnly = false, Description = @"Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests.", SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName SkuName { get => _clusterBody.SkuName ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName)""); set => _clusterBody.SkuName = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Default")] + public string SkuName { get => _clusterBody.SkuName ?? null; set => _clusterBody.SkuName = value; } /// Backing field for property. private string _subscriptionId; @@ -228,7 +240,8 @@ public partial class NewAzStreamAnalyticsCluster_CreateExpanded : global::System [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -241,32 +254,32 @@ public partial class NewAzStreamAnalyticsCluster_CreateExpanded : global::System ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags Tag { get => _clusterBody.Tag ?? null /* object */; set => _clusterBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags Tag { get => _clusterBody.Tag ?? null /* object */; set => _clusterBody.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster /// 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); + 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) @@ -379,11 +392,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -395,10 +433,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -408,7 +462,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStreamAnalyticsCluster_CreateExpanded() { @@ -474,7 +528,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -487,12 +541,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ClustersCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _clusterBody, onOk, onDefault, this, Pipeline); + await this.Client.ClustersCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _clusterBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,Name=Name,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,body=_clusterBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -530,12 +584,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -552,15 +606,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, body=_clusterBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, body=_clusterBody }) + 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 } }); @@ -570,12 +624,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -587,8 +641,9 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsCluster_CreateViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsCluster_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..11920302c7a6 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsCluster_CreateViaJsonFilePath.cs @@ -0,0 +1,612 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// create a Stream Analytics Cluster or replaces an already existing cluster. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsCluster_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a Stream Analytics Cluster or replaces an already existing cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}", ApiVersion = "2020-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class NewAzStreamAnalyticsCluster_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value + /// to prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing record set. Other values will result + /// in a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new resource to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new resource to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } + + /// 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ClusterName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzStreamAnalyticsCluster_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.NewAzStreamAnalyticsCluster_CreateViaJsonFilePath Clone() + { + var clone = new NewAzStreamAnalyticsCluster_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.Name = this.Name; + clone.IfMatch = this.IfMatch; + clone.IfNoneMatch = this.IfNoneMatch; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsCluster_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ClustersCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ClustersCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,Name=Name,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsCluster_CreateViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsCluster_CreateViaJsonString.cs new file mode 100644 index 000000000000..c8c3a46ad75f --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsCluster_CreateViaJsonString.cs @@ -0,0 +1,610 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// create a Stream Analytics Cluster or replaces an already existing cluster. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsCluster_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a Stream Analytics Cluster or replaces an already existing cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}", ApiVersion = "2020-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class NewAzStreamAnalyticsCluster_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value + /// to prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing record set. Other values will result + /// in a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new resource to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new resource to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } + + /// 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ClusterName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzStreamAnalyticsCluster_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.NewAzStreamAnalyticsCluster_CreateViaJsonString Clone() + { + var clone = new NewAzStreamAnalyticsCluster_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.Name = this.Name; + clone.IfMatch = this.IfMatch; + clone.IfNoneMatch = this.IfNoneMatch; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsCluster_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ClustersCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ClustersCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,Name=Name,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_Create.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_Create.cs index 8a761435d91b..70b8e67d1d8a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_Create.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_Create.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Creates a function or replaces an already existing function under an existing streaming job. + /// create a function or replaces an already existing function under an existing streaming job. /// /// /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsFunction_Create", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates a function or replaces an already existing function under an existing streaming job.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a function or replaces an already existing function under an existing streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] public partial class NewAzStreamAnalyticsFunction_Create : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class NewAzStreamAnalyticsFunction_Create : global::System.Manage /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -55,8 +73,11 @@ public partial class NewAzStreamAnalyticsFunction_Create : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction _function; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _function; /// /// A function object, containing all information associated with the named function. All functions are contained under a @@ -68,8 +89,9 @@ public partial class NewAzStreamAnalyticsFunction_Create : global::System.Manage ReadOnly = false, Description = @"A function object, containing all information associated with the named function. All functions are contained under a streaming job.", SerializedName = @"function", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction Function { get => this._function; set => this._function = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction Function { get => this._function; set => this._function = value; } /// 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")] @@ -160,7 +182,7 @@ public partial class NewAzStreamAnalyticsFunction_Create : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -206,7 +228,8 @@ public partial class NewAzStreamAnalyticsFunction_Create : global::System.Manage [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -215,24 +238,24 @@ public partial class NewAzStreamAnalyticsFunction_Create : global::System.Manage /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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); + 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) @@ -255,6 +278,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -319,8 +347,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -330,7 +383,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStreamAnalyticsFunction_Create() { @@ -384,7 +437,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -397,12 +450,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.FunctionsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, SubscriptionId, ResourceGroupName, JobName, Name, Function, onOk, onCreated, this, Pipeline); + await this.Client.FunctionsCreateOrReplace(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Function, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name,body=Function}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -438,12 +491,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -455,19 +508,37 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -479,8 +550,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateExpanded.cs index 4a0459c257f1..4d09f0904e35 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateExpanded.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Creates a function or replaces an already existing function under an existing streaming job. + /// create a function or replaces an already existing function under an existing streaming job. /// /// /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsFunction_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates a function or replaces an already existing function under an existing streaming job.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a function or replaces an already existing function under an existing streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] public partial class NewAzStreamAnalyticsFunction_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,17 +40,32 @@ public partial class NewAzStreamAnalyticsFunction_CreateExpanded : global::Syste /// 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 function object, containing all information associated with the named function. All functions are contained under a /// streaming job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction _functionBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Function(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _functionBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -61,6 +79,9 @@ public partial class NewAzStreamAnalyticsFunction_CreateExpanded : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] @@ -69,8 +90,8 @@ public partial class NewAzStreamAnalyticsFunction_CreateExpanded : global::Syste ReadOnly = false, Description = @".", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration FunctionConfigurationProperty { get => _functionBody.ConfigurationProperty ?? null /* object */; set => _functionBody.ConfigurationProperty = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration FunctionConfigurationProperty { get => _functionBody.ConfigurationProperty ?? null /* object */; set => _functionBody.ConfigurationProperty = value; } /// 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")] @@ -161,7 +182,7 @@ public partial class NewAzStreamAnalyticsFunction_CreateExpanded : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } /// Indicates the type of function. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the type of function.")] @@ -218,7 +239,8 @@ public partial class NewAzStreamAnalyticsFunction_CreateExpanded : global::Syste [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -227,24 +249,24 @@ public partial class NewAzStreamAnalyticsFunction_CreateExpanded : global::Syste /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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); + 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) @@ -267,6 +289,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -331,8 +358,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -342,7 +394,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStreamAnalyticsFunction_CreateExpanded() { @@ -396,7 +448,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -409,12 +461,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.FunctionsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, SubscriptionId, ResourceGroupName, JobName, Name, _functionBody, onOk, onCreated, this, Pipeline); + await this.Client.FunctionsCreateOrReplace(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _functionBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name,body=_functionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -450,12 +502,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -467,19 +519,37 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -491,8 +561,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaIdentity.cs index f8f29b0ff782..e50c2be985c4 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaIdentity.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Creates a function or replaces an already existing function under an existing streaming job. + /// create a function or replaces an already existing function under an existing streaming job. /// /// /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsFunction_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates a function or replaces an already existing function under an existing streaming job.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a function or replaces an already existing function under an existing streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] public partial class NewAzStreamAnalyticsFunction_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class NewAzStreamAnalyticsFunction_CreateViaIdentity : global::Sy /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -55,8 +73,11 @@ public partial class NewAzStreamAnalyticsFunction_CreateViaIdentity : global::Sy [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction _function; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _function; /// /// A function object, containing all information associated with the named function. All functions are contained under a @@ -68,8 +89,9 @@ public partial class NewAzStreamAnalyticsFunction_CreateViaIdentity : global::Sy ReadOnly = false, Description = @"A function object, containing all information associated with the named function. All functions are contained under a streaming job.", SerializedName = @"function", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction Function { get => this._function; set => this._function = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction Function { get => this._function; set => this._function = value; } /// 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")] @@ -139,7 +161,7 @@ public partial class NewAzStreamAnalyticsFunction_CreateViaIdentity : global::Sy /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -162,24 +184,24 @@ public partial class NewAzStreamAnalyticsFunction_CreateViaIdentity : global::Sy /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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); + 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) @@ -202,6 +224,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -266,8 +293,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -277,7 +329,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStreamAnalyticsFunction_CreateViaIdentity() { @@ -331,7 +383,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -346,7 +398,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.FunctionsCreateOrReplaceViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, Function, onOk, onCreated, this, Pipeline); + await this.Client.FunctionsCreateOrReplaceViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Function, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); } else { @@ -367,13 +419,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FunctionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.FunctionsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.FunctionName ?? null, Function, onOk, onCreated, this, Pipeline); + await this.Client.FunctionsCreateOrReplace(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.FunctionName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Function, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,body=Function}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -409,12 +461,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,19 +478,37 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -450,8 +520,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaIdentityExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaIdentityExpanded.cs index a5114a1f26cd..9b1e722cf733 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaIdentityExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaIdentityExpanded.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Creates a function or replaces an already existing function under an existing streaming job. + /// create a function or replaces an already existing function under an existing streaming job. /// /// /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsFunction_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates a function or replaces an already existing function under an existing streaming job.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a function or replaces an already existing function under an existing streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] public partial class NewAzStreamAnalyticsFunction_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,17 +40,32 @@ public partial class NewAzStreamAnalyticsFunction_CreateViaIdentityExpanded : gl /// 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 function object, containing all information associated with the named function. All functions are contained under a /// streaming job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction _functionBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Function(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _functionBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -61,6 +79,9 @@ public partial class NewAzStreamAnalyticsFunction_CreateViaIdentityExpanded : gl [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] @@ -69,8 +90,8 @@ public partial class NewAzStreamAnalyticsFunction_CreateViaIdentityExpanded : gl ReadOnly = false, Description = @".", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration FunctionConfigurationProperty { get => _functionBody.ConfigurationProperty ?? null /* object */; set => _functionBody.ConfigurationProperty = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration FunctionConfigurationProperty { get => _functionBody.ConfigurationProperty ?? null /* object */; set => _functionBody.ConfigurationProperty = value; } /// 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")] @@ -140,7 +161,7 @@ public partial class NewAzStreamAnalyticsFunction_CreateViaIdentityExpanded : gl /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } /// Indicates the type of function. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the type of function.")] @@ -174,24 +195,24 @@ public partial class NewAzStreamAnalyticsFunction_CreateViaIdentityExpanded : gl /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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); + 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) @@ -214,6 +235,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -278,8 +304,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -289,7 +340,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStreamAnalyticsFunction_CreateViaIdentityExpanded() { @@ -343,7 +394,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -358,7 +409,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.FunctionsCreateOrReplaceViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _functionBody, onOk, onCreated, this, Pipeline); + await this.Client.FunctionsCreateOrReplaceViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _functionBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); } else { @@ -379,13 +430,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FunctionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.FunctionsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.FunctionName ?? null, _functionBody, onOk, onCreated, this, Pipeline); + await this.Client.FunctionsCreateOrReplace(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.FunctionName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _functionBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,body=_functionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -421,12 +472,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,19 +489,37 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -462,8 +531,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..da9916ccc4fc --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaIdentityStreamingjob.cs @@ -0,0 +1,558 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// create a function or replaces an already existing function under an existing streaming job. + /// + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsFunction_CreateViaIdentityStreamingjob", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a function or replaces an already existing function under an existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] + public partial class NewAzStreamAnalyticsFunction_CreateViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _function; + + /// + /// A function object, containing all information associated with the named function. All functions are contained under a + /// streaming job. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "A function object, containing all information associated with the named function. All functions are contained under a streaming job.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A function object, containing all information associated with the named function. All functions are contained under a streaming job.", + SerializedName = @"function", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction Function { get => this._function; set => this._function = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to + /// prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result + /// in a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FunctionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsFunction_CreateViaIdentityStreamingjob() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsCreateOrReplace' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/functions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.FunctionsCreateOrReplaceViaIdentity(StreamingjobInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Function, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.FunctionsCreateOrReplace(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Function, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } + } + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaIdentityStreamingjobExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaIdentityStreamingjobExpanded.cs new file mode 100644 index 000000000000..62687bda33a2 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaIdentityStreamingjobExpanded.cs @@ -0,0 +1,570 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// create a function or replaces an already existing function under an existing streaming job. + /// + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsFunction_CreateViaIdentityStreamingjobExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a function or replaces an already existing function under an existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] + public partial class NewAzStreamAnalyticsFunction_CreateViaIdentityStreamingjobExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 function object, containing all information associated with the named function. All functions are contained under a + /// streaming job. + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _functionBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// . + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @".", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration FunctionConfigurationProperty { get => _functionBody.ConfigurationProperty ?? null /* object */; set => _functionBody.ConfigurationProperty = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to + /// prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result + /// in a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FunctionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + + /// Indicates the type of function. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the type of function.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the type of function.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + public string PropertiesType { get => _functionBody.PropertiesType ?? null; set => _functionBody.PropertiesType = 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsFunction_CreateViaIdentityStreamingjobExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsCreateOrReplace' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/functions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.FunctionsCreateOrReplaceViaIdentity(StreamingjobInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _functionBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.FunctionsCreateOrReplace(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _functionBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } + } + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..fcf14b328893 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaJsonFilePath.cs @@ -0,0 +1,575 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// create a function or replaces an already existing function under an existing streaming job. + /// + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsFunction_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a function or replaces an already existing function under an existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class NewAzStreamAnalyticsFunction_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to + /// prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result + /// in a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FunctionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsFunction_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsCreateOrReplace' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FunctionsCreateOrReplaceViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, onCreated, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } + } + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaJsonString.cs new file mode 100644 index 000000000000..c55e94554350 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsFunction_CreateViaJsonString.cs @@ -0,0 +1,573 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// create a function or replaces an already existing function under an existing streaming job. + /// + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsFunction_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a function or replaces an already existing function under an existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class NewAzStreamAnalyticsFunction_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to + /// prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result + /// in a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new function to be created, but to prevent updating an existing function. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FunctionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsFunction_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsCreateOrReplace' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FunctionsCreateOrReplaceViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, onCreated, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } + } + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_Create.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_Create.cs index 93e6dd2c1630..fae87e481d2f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_Create.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_Create.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Creates an input or replaces an already existing input under an existing streaming job. + /// create an input or replaces an already existing input under an existing streaming job. /// /// /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsInput_Create", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates an input or replaces an already existing input under an existing streaming job.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an input or replaces an already existing input under an existing streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] public partial class NewAzStreamAnalyticsInput_Create : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class NewAzStreamAnalyticsInput_Create : global::System.Managemen /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class NewAzStreamAnalyticsInput_Create : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -102,7 +123,7 @@ public partial class NewAzStreamAnalyticsInput_Create : global::System.Managemen public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput _input; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _input; /// /// An input object, containing all information associated with the named input. All inputs are contained under a streaming @@ -114,8 +135,9 @@ public partial class NewAzStreamAnalyticsInput_Create : global::System.Managemen ReadOnly = false, Description = @"An input object, containing all information associated with the named input. All inputs are contained under a streaming job.", SerializedName = @"input", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput Input { get => this._input; set => this._input = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput Input { get => this._input; set => this._input = value; } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -160,7 +182,7 @@ public partial class NewAzStreamAnalyticsInput_Create : global::System.Managemen /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -206,7 +228,8 @@ public partial class NewAzStreamAnalyticsInput_Create : global::System.Managemen [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -215,24 +238,24 @@ public partial class NewAzStreamAnalyticsInput_Create : global::System.Managemen /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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); + 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) @@ -255,6 +278,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -319,8 +347,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -330,7 +383,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStreamAnalyticsInput_Create() { @@ -384,7 +437,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -397,12 +450,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.InputsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, SubscriptionId, ResourceGroupName, JobName, Name, Input, onOk, onCreated, this, Pipeline); + await this.Client.InputsCreateOrReplace(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Input, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name,body=Input}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -438,12 +491,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -455,19 +508,37 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } } } /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -479,8 +550,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateExpanded.cs index b7718f97788d..0e91e5fefa85 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateExpanded.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Creates an input or replaces an already existing input under an existing streaming job. + /// create an input or replaces an already existing input under an existing streaming job. /// /// /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsInput_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates an input or replaces an already existing input under an existing streaming job.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an input or replaces an already existing input under an existing streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] public partial class NewAzStreamAnalyticsInput_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,17 +40,32 @@ public partial class NewAzStreamAnalyticsInput_CreateExpanded : global::System.M /// 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; + /// /// An input object, containing all information associated with the named input. All inputs are contained under a streaming /// job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput _inputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Input(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _inputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -61,6 +79,9 @@ public partial class NewAzStreamAnalyticsInput_CreateExpanded : global::System.M [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -150,7 +171,7 @@ public partial class NewAzStreamAnalyticsInput_CreateExpanded : global::System.M /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } /// /// The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. @@ -162,8 +183,8 @@ public partial class NewAzStreamAnalyticsInput_CreateExpanded : global::System.M ReadOnly = false, Description = @"The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties Property { get => _inputBody.Property ?? null /* object */; set => _inputBody.Property = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties Property { get => _inputBody.Property ?? null /* object */; set => _inputBody.Property = 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")] @@ -209,7 +230,8 @@ public partial class NewAzStreamAnalyticsInput_CreateExpanded : global::System.M [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -218,24 +240,24 @@ public partial class NewAzStreamAnalyticsInput_CreateExpanded : global::System.M /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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); + 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) @@ -258,6 +280,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -322,8 +349,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -333,7 +385,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStreamAnalyticsInput_CreateExpanded() { @@ -387,7 +439,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -400,12 +452,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.InputsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, SubscriptionId, ResourceGroupName, JobName, Name, _inputBody, onOk, onCreated, this, Pipeline); + await this.Client.InputsCreateOrReplace(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _inputBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name,body=_inputBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -441,12 +493,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -458,19 +510,37 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } } } /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -482,8 +552,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaIdentity.cs index c6992c259e5f..2f14f5bb11b6 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaIdentity.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Creates an input or replaces an already existing input under an existing streaming job. + /// create an input or replaces an already existing input under an existing streaming job. /// /// /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsInput_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates an input or replaces an already existing input under an existing streaming job.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an input or replaces an already existing input under an existing streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] public partial class NewAzStreamAnalyticsInput_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,26 @@ public partial class NewAzStreamAnalyticsInput_CreateViaIdentity : global::Syste /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -55,6 +73,9 @@ public partial class NewAzStreamAnalyticsInput_CreateViaIdentity : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -102,7 +123,7 @@ public partial class NewAzStreamAnalyticsInput_CreateViaIdentity : global::Syste public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput _input; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _input; /// /// An input object, containing all information associated with the named input. All inputs are contained under a streaming @@ -114,8 +135,9 @@ public partial class NewAzStreamAnalyticsInput_CreateViaIdentity : global::Syste ReadOnly = false, Description = @"An input object, containing all information associated with the named input. All inputs are contained under a streaming job.", SerializedName = @"input", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput Input { get => this._input; set => this._input = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput Input { get => this._input; set => this._input = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _inputObject; @@ -139,7 +161,7 @@ public partial class NewAzStreamAnalyticsInput_CreateViaIdentity : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -162,24 +184,24 @@ public partial class NewAzStreamAnalyticsInput_CreateViaIdentity : global::Syste /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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); + 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) @@ -202,6 +224,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -266,8 +293,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -277,7 +329,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStreamAnalyticsInput_CreateViaIdentity() { @@ -331,7 +383,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -346,7 +398,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.InputsCreateOrReplaceViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, Input, onOk, onCreated, this, Pipeline); + await this.Client.InputsCreateOrReplaceViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Input, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); } else { @@ -367,13 +419,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.InputName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.InputsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.InputName ?? null, Input, onOk, onCreated, this, Pipeline); + await this.Client.InputsCreateOrReplace(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.InputName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Input, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,body=Input}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -409,12 +461,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -426,19 +478,37 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } } } /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -450,8 +520,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaIdentityExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaIdentityExpanded.cs index 5bf565a4fc5d..d6dad6e8d0d8 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaIdentityExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaIdentityExpanded.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Creates an input or replaces an already existing input under an existing streaming job. + /// create an input or replaces an already existing input under an existing streaming job. /// /// /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsInput_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates an input or replaces an already existing input under an existing streaming job.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an input or replaces an already existing input under an existing streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] public partial class NewAzStreamAnalyticsInput_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,17 +40,32 @@ public partial class NewAzStreamAnalyticsInput_CreateViaIdentityExpanded : globa /// 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; + /// /// An input object, containing all information associated with the named input. All inputs are contained under a streaming /// job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput _inputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Input(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _inputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -61,6 +79,9 @@ public partial class NewAzStreamAnalyticsInput_CreateViaIdentityExpanded : globa [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -129,7 +150,7 @@ public partial class NewAzStreamAnalyticsInput_CreateViaIdentityExpanded : globa /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } /// /// The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. @@ -141,8 +162,8 @@ public partial class NewAzStreamAnalyticsInput_CreateViaIdentityExpanded : globa ReadOnly = false, Description = @"The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties Property { get => _inputBody.Property ?? null /* object */; set => _inputBody.Property = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties Property { get => _inputBody.Property ?? null /* object */; set => _inputBody.Property = 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")] @@ -165,24 +186,24 @@ public partial class NewAzStreamAnalyticsInput_CreateViaIdentityExpanded : globa /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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); + 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) @@ -205,6 +226,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -269,8 +295,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -280,7 +331,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStreamAnalyticsInput_CreateViaIdentityExpanded() { @@ -334,7 +385,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -349,7 +400,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.InputsCreateOrReplaceViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _inputBody, onOk, onCreated, this, Pipeline); + await this.Client.InputsCreateOrReplaceViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _inputBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); } else { @@ -370,13 +421,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.InputName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.InputsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.InputName ?? null, _inputBody, onOk, onCreated, this, Pipeline); + await this.Client.InputsCreateOrReplace(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.InputName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _inputBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,body=_inputBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -412,12 +463,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -429,19 +480,37 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } } } /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -453,8 +522,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..b6fb6958d20b --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaIdentityStreamingjob.cs @@ -0,0 +1,558 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// create an input or replaces an already existing input under an existing streaming job. + /// + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsInput_CreateViaIdentityStreamingjob", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an input or replaces an already existing input under an existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] + public partial class NewAzStreamAnalyticsInput_CreateViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in + /// a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _input; + + /// + /// An input object, containing all information associated with the named input. All inputs are contained under a streaming + /// job. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "An input object, containing all information associated with the named input. All inputs are contained under a streaming job.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"An input object, containing all information associated with the named input. All inputs are contained under a streaming job.", + SerializedName = @"input", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput Input { get => this._input; set => this._input = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the input.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the input.", + SerializedName = @"inputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("InputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsInput_CreateViaIdentityStreamingjob() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'InputsCreateOrReplace' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/inputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.InputsCreateOrReplaceViaIdentity(StreamingjobInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Input, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.InputsCreateOrReplace(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Input, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } + } + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaIdentityStreamingjobExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaIdentityStreamingjobExpanded.cs new file mode 100644 index 000000000000..3e089c0df095 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaIdentityStreamingjobExpanded.cs @@ -0,0 +1,561 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// create an input or replaces an already existing input under an existing streaming job. + /// + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsInput_CreateViaIdentityStreamingjobExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an input or replaces an already existing input under an existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] + public partial class NewAzStreamAnalyticsInput_CreateViaIdentityStreamingjobExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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; + + /// + /// An input object, containing all information associated with the named input. All inputs are contained under a streaming + /// job. + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _inputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in + /// a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the input.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the input.", + SerializedName = @"inputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("InputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + + /// + /// The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties Property { get => _inputBody.Property ?? null /* object */; set => _inputBody.Property = 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsInput_CreateViaIdentityStreamingjobExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'InputsCreateOrReplace' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/inputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.InputsCreateOrReplaceViaIdentity(StreamingjobInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _inputBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.InputsCreateOrReplace(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _inputBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } + } + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..7e591f9f8615 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaJsonFilePath.cs @@ -0,0 +1,575 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// create an input or replaces an already existing input under an existing streaming job. + /// + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsInput_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an input or replaces an already existing input under an existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class NewAzStreamAnalyticsInput_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in + /// a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the input.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the input.", + SerializedName = @"inputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("InputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsInput_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'InputsCreateOrReplace' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.InputsCreateOrReplaceViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, onCreated, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } + } + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaJsonString.cs new file mode 100644 index 000000000000..3fff94d952a7 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsInput_CreateViaJsonString.cs @@ -0,0 +1,573 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// create an input or replaces an already existing input under an existing streaming job. + /// + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsInput_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an input or replaces an already existing input under an existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class NewAzStreamAnalyticsInput_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in + /// a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new input to be created, but to prevent updating an existing input. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the input.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the input.", + SerializedName = @"inputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("InputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsInput_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'InputsCreateOrReplace' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.InputsCreateOrReplaceViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, onCreated, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } + } + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_Create.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_Create.cs deleted file mode 100644 index d9c642c285e8..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_Create.cs +++ /dev/null @@ -1,502 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - using System; - - /// Creates a streaming job or replaces an already existing streaming job. - /// - /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}" - /// - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsJob_Create", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates a streaming job or replaces an already existing streaming job.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] - public partial class NewAzStreamAnalyticsJob_Create : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener - { - /// 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(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private string _ifMatch; - - /// - /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag - /// value to prevent accidentally overwriting concurrent changes. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", - SerializedName = @"If-Match", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] - public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } - - /// Backing field for property. - private string _ifNoneMatch; - - /// - /// Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will - /// result in a 412 Pre-condition Failed response. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response.")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response.", - SerializedName = @"If-None-Match", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] - public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the streaming job. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the streaming job.", - SerializedName = @"jobName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob _streamingJob; - - /// - /// A streaming job object, containing all information associated with the named streaming job. - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "A streaming job object, containing all information associated with the named streaming job.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"A streaming job object, containing all information associated with the named streaming job.", - SerializedName = @"streamingJob", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob StreamingJob { get => this._streamingJob; set => this._streamingJob = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of NewAzStreamAnalyticsJob_Create - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.NewAzStreamAnalyticsJob_Create Clone() - { - var clone = new NewAzStreamAnalyticsJob_Create(); - 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.IfMatch = this.IfMatch; - clone.IfNoneMatch = this.IfNoneMatch; - clone.SubscriptionId = this.SubscriptionId; - clone.ResourceGroupName = this.ResourceGroupName; - clone.Name = this.Name; - clone.StreamingJob = this.StreamingJob; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public NewAzStreamAnalyticsJob_Create() - { - - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'StreamingJobsCreateOrReplace' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StreamingJobsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, SubscriptionId, ResourceGroupName, Name, StreamingJob, onOk, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=StreamingJob}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateExpanded.cs index 49e107f36203..454cd4c3bec0 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateExpanded.cs @@ -6,20 +6,23 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; - /// Creates a streaming job or replaces an already existing streaming job. + /// create a streaming job or replaces an already existing streaming job. /// /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsJob_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates a streaming job or replaces an already existing streaming job.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a streaming job or replaces an already existing streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -35,10 +38,13 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man /// 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 streaming job object, containing all information associated with the named streaming job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob _streamingJobBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJob(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob _streamingJobBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJob(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -50,6 +56,9 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -72,9 +81,9 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man ReadOnly = false, Description = @"Controls certain runtime behaviors of the streaming job.", SerializedName = @"compatibilityLevel", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel CompatibilityLevel { get => _streamingJobBody.CompatibilityLevel ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel)""); set => _streamingJobBody.CompatibilityLevel = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("1.0")] + public string CompatibilityLevel { get => _streamingJobBody.CompatibilityLevel ?? null; set => _streamingJobBody.CompatibilityLevel = value; } /// /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify @@ -87,9 +96,9 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man ReadOnly = false, Description = @"Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. .", SerializedName = @"contentStoragePolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy ContentStoragePolicy { get => _streamingJobBody.ContentStoragePolicy ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy)""); set => _streamingJobBody.ContentStoragePolicy = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("SystemAccount", "JobStorageAccount")] + public string ContentStoragePolicy { get => _streamingJobBody.ContentStoragePolicy ?? null; set => _streamingJobBody.ContentStoragePolicy = value; } /// /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. @@ -115,6 +124,10 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Determines whether to enable a system-assigned identity for the resource. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Determines whether to enable a system-assigned identity for the resource.")] + public global::System.Management.Automation.SwitchParameter EnableSystemAssignedIdentity { set => _streamingJobBody.IdentityType = value.IsPresent ? "SystemAssigned": null ; } + /// /// The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 /// (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a @@ -153,9 +166,12 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man ReadOnly = false, Description = @"Indicates the policy to apply to events that arrive out of order in the input event stream.", SerializedName = @"eventsOutOfOrderPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy EventsOutOfOrderPolicy { get => _streamingJobBody.EventsOutOfOrderPolicy ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy)""); set => _streamingJobBody.EventsOutOfOrderPolicy = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Adjust", "Drop")] + public string EventsOutOfOrderPolicy { get => _streamingJobBody.EventsOutOfOrderPolicy ?? null; set => _streamingJobBody.EventsOutOfOrderPolicy = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] @@ -192,8 +208,8 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man ReadOnly = false, Description = @"A list of one or more functions for the streaming job. The name property for each function is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual transformation.", SerializedName = @"functions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] Function { get => _streamingJobBody.Function ?? null /* arrayOf */; set => _streamingJobBody.Function = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction[] Function { get => _streamingJobBody.Function?.ToArray() ?? null /* fixedArrayOf */; set => _streamingJobBody.Function = (value != null ? new System.Collections.Generic.List(value) : null); } /// 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")] @@ -229,17 +245,6 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man PossibleTypes = new [] { typeof(string) })] public string IdentityTenantId { get => _streamingJobBody.IdentityTenantId ?? null; set => _streamingJobBody.IdentityTenantId = value; } - /// . - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @".", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - public string IdentityType { get => _streamingJobBody.IdentityType ?? null; set => _streamingJobBody.IdentityType = value; } - /// Backing field for property. private string _ifMatch; @@ -287,8 +292,8 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man ReadOnly = false, Description = @"A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual input.", SerializedName = @"inputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] Input { get => _streamingJobBody.Input ?? null /* arrayOf */; set => _streamingJobBody.Input = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput[] Input { get => _streamingJobBody.Input?.ToArray() ?? null /* fixedArrayOf */; set => _streamingJobBody.Input = (value != null ? new System.Collections.Generic.List(value) : null); } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -301,9 +306,9 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man ReadOnly = false, Description = @"Authentication Mode.", SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode JobStorageAccountAuthenticationMode { get => _streamingJobBody.JobStorageAccountAuthenticationMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); set => _streamingJobBody.JobStorageAccountAuthenticationMode = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + public string JobStorageAccountAuthenticationMode { get => _streamingJobBody.JobStorageAccountAuthenticationMode ?? null; set => _streamingJobBody.JobStorageAccountAuthenticationMode = value; } /// /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. @@ -339,9 +344,9 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man ReadOnly = false, Description = @"Describes the type of the job. Valid modes are `Cloud` and 'Edge'.", SerializedName = @"jobType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType JobType { get => _streamingJobBody.JobType ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType)""); set => _streamingJobBody.JobType = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Cloud", "Edge")] + public string JobType { get => _streamingJobBody.JobType ?? null; set => _streamingJobBody.JobType = value; } /// The geo-location where the resource lives [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The geo-location where the resource lives")] @@ -397,8 +402,8 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man ReadOnly = false, Description = @"A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output.", SerializedName = @"outputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] Output { get => _streamingJobBody.Output ?? null /* arrayOf */; set => _streamingJobBody.Output = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput[] Output { get => _streamingJobBody.Output?.ToArray() ?? null /* fixedArrayOf */; set => _streamingJobBody.Output = (value != null ? new System.Collections.Generic.List(value) : null); } /// /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to @@ -411,9 +416,9 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man ReadOnly = false, Description = @"Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size).", SerializedName = @"outputErrorPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy OutputErrorPolicy { get => _streamingJobBody.OutputErrorPolicy ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy)""); set => _streamingJobBody.OutputErrorPolicy = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Stop", "Drop")] + public string OutputErrorPolicy { get => _streamingJobBody.OutputErrorPolicy ?? null; set => _streamingJobBody.OutputErrorPolicy = value; } /// /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may @@ -428,9 +433,9 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man ReadOnly = false, Description = @"This property should only be utilized when it is desired that the job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time.", SerializedName = @"outputStartMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode OutputStartMode { get => _streamingJobBody.OutputStartMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode)""); set => _streamingJobBody.OutputStartMode = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] + public string OutputStartMode { get => _streamingJobBody.OutputStartMode ?? null; set => _streamingJobBody.OutputStartMode = value; } /// /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null @@ -450,7 +455,7 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -504,9 +509,9 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man ReadOnly = false, Description = @"The name of the SKU. Required on PUT (CreateOrReplace) requests.", SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName SkuName { get => _streamingJobBody.SkuName ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName)""); set => _streamingJobBody.SkuName = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Standard")] + public string SkuName { get => _streamingJobBody.SkuName ?? null; set => _streamingJobBody.SkuName = value; } /// /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. @@ -559,7 +564,8 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -572,20 +578,20 @@ public partial class NewAzStreamAnalyticsJob_CreateExpanded : global::System.Man ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags Tag { get => _streamingJobBody.Tag ?? null /* object */; set => _streamingJobBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags Tag { get => _streamingJobBody.Tag ?? null /* object */; set => _streamingJobBody.Tag = value; } /// /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob /// 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); + 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) @@ -623,10 +629,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.NewAzStreamAna clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; clone._streamingJobBody = this._streamingJobBody; - clone.IfMatch = this.IfMatch; - clone.IfNoneMatch = this.IfNoneMatch; clone.SubscriptionId = this.SubscriptionId; clone.ResourceGroupName = this.ResourceGroupName; + clone.IfNoneMatch = this.IfNoneMatch; + clone.IfMatch = this.IfMatch; clone.Name = this.Name; return clone; } @@ -698,11 +704,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -714,10 +745,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -727,7 +774,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStreamAnalyticsJob_CreateExpanded() { @@ -793,7 +840,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -806,12 +853,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StreamingJobsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, SubscriptionId, ResourceGroupName, Name, _streamingJobBody, onOk, this, Pipeline); + await this.Client.StreamingJobsCreateOrReplace(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _streamingJobBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=_streamingJobBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -847,12 +894,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -864,8 +911,9 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateViaIdentity.cs deleted file mode 100644 index 9e2864805750..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateViaIdentity.cs +++ /dev/null @@ -1,481 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - using System; - - /// Creates a streaming job or replaces an already existing streaming job. - /// - /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}" - /// - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsJob_CreateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates a streaming job or replaces an already existing streaming job.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] - public partial class NewAzStreamAnalyticsJob_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener - { - /// 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(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private string _ifMatch; - - /// - /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag - /// value to prevent accidentally overwriting concurrent changes. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", - SerializedName = @"If-Match", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] - public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } - - /// Backing field for property. - private string _ifNoneMatch; - - /// - /// Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will - /// result in a 412 Pre-condition Failed response. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response.")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response.", - SerializedName = @"If-None-Match", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] - public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob _streamingJob; - - /// - /// A streaming job object, containing all information associated with the named streaming job. - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "A streaming job object, containing all information associated with the named streaming job.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"A streaming job object, containing all information associated with the named streaming job.", - SerializedName = @"streamingJob", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob StreamingJob { get => this._streamingJob; set => this._streamingJob = value; } - - /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of NewAzStreamAnalyticsJob_CreateViaIdentity - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.NewAzStreamAnalyticsJob_CreateViaIdentity Clone() - { - var clone = new NewAzStreamAnalyticsJob_CreateViaIdentity(); - 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.IfMatch = this.IfMatch; - clone.IfNoneMatch = this.IfNoneMatch; - clone.StreamingJob = this.StreamingJob; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public NewAzStreamAnalyticsJob_CreateViaIdentity() - { - - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'StreamingJobsCreateOrReplace' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.StreamingJobsCreateOrReplaceViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, StreamingJob, onOk, 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.JobName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.StreamingJobsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, StreamingJob, onOk, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,body=StreamingJob}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateViaIdentityExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateViaIdentityExpanded.cs deleted file mode 100644 index 8384012dcafb..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateViaIdentityExpanded.cs +++ /dev/null @@ -1,851 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - using System; - - /// Creates a streaming job or replaces an already existing streaming job. - /// - /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}" - /// - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsJob_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates a streaming job or replaces an already existing streaming job.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] - public partial class NewAzStreamAnalyticsJob_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener - { - /// 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 streaming job object, containing all information associated with the named streaming job. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob _streamingJobBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJob(); - - /// when specified, runs this cmdlet as a PowerShell job - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; - - /// The resource id of cluster. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The resource id of cluster.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The resource id of cluster.", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - public string ClusterId { get => _streamingJobBody.ClusterId ?? null; set => _streamingJobBody.ClusterId = value; } - - /// Controls certain runtime behaviors of the streaming job. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Controls certain runtime behaviors of the streaming job.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Controls certain runtime behaviors of the streaming job.", - SerializedName = @"compatibilityLevel", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel CompatibilityLevel { get => _streamingJobBody.CompatibilityLevel ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel)""); set => _streamingJobBody.CompatibilityLevel = value; } - - /// - /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify - /// jobStorageAccount property. . - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. .")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. .", - SerializedName = @"contentStoragePolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy ContentStoragePolicy { get => _streamingJobBody.ContentStoragePolicy ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy)""); set => _streamingJobBody.ContentStoragePolicy = value; } - - /// - /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. - /// Defaults to 'en-US' if none specified. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to 'en-US' if none specified.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to 'en-US' if none specified.", - SerializedName = @"dataLocale", - PossibleTypes = new [] { typeof(string) })] - public string DataLocale { get => _streamingJobBody.DataLocale ?? null; set => _streamingJobBody.DataLocale = 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// - /// The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 - /// (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a - /// value of -1. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a value of -1.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a value of -1.", - SerializedName = @"eventsLateArrivalMaxDelayInSeconds", - PossibleTypes = new [] { typeof(int) })] - public int EventsLateArrivalMaxDelayInSecond { get => _streamingJobBody.EventsLateArrivalMaxDelayInSecond ?? default(int); set => _streamingJobBody.EventsLateArrivalMaxDelayInSecond = value; } - - /// - /// The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order.", - SerializedName = @"eventsOutOfOrderMaxDelayInSeconds", - PossibleTypes = new [] { typeof(int) })] - public int EventsOutOfOrderMaxDelayInSecond { get => _streamingJobBody.EventsOutOfOrderMaxDelayInSecond ?? default(int); set => _streamingJobBody.EventsOutOfOrderMaxDelayInSecond = value; } - - /// - /// Indicates the policy to apply to events that arrive out of order in the input event stream. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the policy to apply to events that arrive out of order in the input event stream.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates the policy to apply to events that arrive out of order in the input event stream.", - SerializedName = @"eventsOutOfOrderPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy EventsOutOfOrderPolicy { get => _streamingJobBody.EventsOutOfOrderPolicy ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy)""); set => _streamingJobBody.EventsOutOfOrderPolicy = value; } - - /// . - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @".", - SerializedName = @"container", - PossibleTypes = new [] { typeof(string) })] - public string ExternalContainer { get => _streamingJobBody.ExternalContainer ?? null; set => _streamingJobBody.ExternalContainer = value; } - - /// . - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @".", - SerializedName = @"path", - PossibleTypes = new [] { typeof(string) })] - public string ExternalPath { get => _streamingJobBody.ExternalPath ?? null; set => _streamingJobBody.ExternalPath = value; } - - /// - /// A list of one or more functions for the streaming job. The name property for each function is required when specifying - /// this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available - /// for the individual transformation. - /// - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of one or more functions for the streaming job. The name property for each function is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual transformation.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of one or more functions for the streaming job. The name property for each function is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual transformation.", - SerializedName = @"functions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] Function { get => _streamingJobBody.Function ?? null /* arrayOf */; set => _streamingJobBody.Function = value; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// . - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @".", - SerializedName = @"principalId", - PossibleTypes = new [] { typeof(string) })] - public string IdentityPrincipalId { get => _streamingJobBody.IdentityPrincipalId ?? null; set => _streamingJobBody.IdentityPrincipalId = value; } - - /// . - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @".", - SerializedName = @"tenantId", - PossibleTypes = new [] { typeof(string) })] - public string IdentityTenantId { get => _streamingJobBody.IdentityTenantId ?? null; set => _streamingJobBody.IdentityTenantId = value; } - - /// . - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @".", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - public string IdentityType { get => _streamingJobBody.IdentityType ?? null; set => _streamingJobBody.IdentityType = value; } - - /// Backing field for property. - private string _ifMatch; - - /// - /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag - /// value to prevent accidentally overwriting concurrent changes. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", - SerializedName = @"If-Match", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] - public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } - - /// Backing field for property. - private string _ifNoneMatch; - - /// - /// Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will - /// result in a 412 Pre-condition Failed response. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response.")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response.", - SerializedName = @"If-None-Match", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] - public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } - - /// - /// A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property - /// in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual - /// input. - /// - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual input.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual input.", - SerializedName = @"inputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] Input { get => _streamingJobBody.Input ?? null /* arrayOf */; set => _streamingJobBody.Input = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity 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; } } - - /// Authentication Mode. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Authentication Mode.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authentication Mode.", - SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode JobStorageAccountAuthenticationMode { get => _streamingJobBody.JobStorageAccountAuthenticationMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); set => _streamingJobBody.JobStorageAccountAuthenticationMode = value; } - - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"accountKey", - PossibleTypes = new [] { typeof(string) })] - public string JobStorageAccountKey { get => _streamingJobBody.JobStorageAccountKey ?? null; set => _streamingJobBody.JobStorageAccountKey = value; } - - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"accountName", - PossibleTypes = new [] { typeof(string) })] - public string JobStorageAccountName { get => _streamingJobBody.JobStorageAccountName ?? null; set => _streamingJobBody.JobStorageAccountName = value; } - - /// Describes the type of the job. Valid modes are `Cloud` and 'Edge'. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Describes the type of the job. Valid modes are `Cloud` and 'Edge'.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Describes the type of the job. Valid modes are `Cloud` and 'Edge'.", - SerializedName = @"jobType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType JobType { get => _streamingJobBody.JobType ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType)""); set => _streamingJobBody.JobType = value; } - - /// The geo-location where the resource lives - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The geo-location where the resource lives")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - public string Location { get => _streamingJobBody.Location ?? null; set => _streamingJobBody.Location = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - - /// - /// A list of one or more outputs for the streaming job. The name property for each output is required when specifying this - /// property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available - /// for the individual output. - /// - [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output.", - SerializedName = @"outputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] Output { get => _streamingJobBody.Output ?? null /* arrayOf */; set => _streamingJobBody.Output = value; } - - /// - /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to - /// being malformed (missing column values, column values of wrong type or size). - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size).")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size).", - SerializedName = @"outputErrorPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy OutputErrorPolicy { get => _streamingJobBody.OutputErrorPolicy ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy)""); set => _streamingJobBody.OutputErrorPolicy = value; } - - /// - /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may - /// be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream - /// should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, - /// or start from the last event output time. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This property should only be utilized when it is desired that the job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"This property should only be utilized when it is desired that the job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time.", - SerializedName = @"outputStartMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode OutputStartMode { get => _streamingJobBody.OutputStartMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode)""); set => _streamingJobBody.OutputStartMode = value; } - - /// - /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null - /// to indicate that the output event stream will start whenever the streaming job is started. This property must have a value - /// if outputStartMode is set to CustomTime. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. This property must have a value if outputStartMode is set to CustomTime.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. This property must have a value if outputStartMode is set to CustomTime.", - SerializedName = @"outputStartTime", - PossibleTypes = new [] { typeof(global::System.DateTime) })] - public global::System.DateTime OutputStartTime { get => _streamingJobBody.OutputStartTime ?? default(global::System.DateTime); set => _streamingJobBody.OutputStartTime = value; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// - /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language - /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests.", - SerializedName = @"query", - PossibleTypes = new [] { typeof(string) })] - public string Query { get => _streamingJobBody.Query ?? null; set => _streamingJobBody.Query = value; } - - /// The name of the SKU. Required on PUT (CreateOrReplace) requests. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the SKU. Required on PUT (CreateOrReplace) requests.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the SKU. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName SkuName { get => _streamingJobBody.SkuName ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName)""); set => _streamingJobBody.SkuName = value; } - - /// - /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"accountKey", - PossibleTypes = new [] { typeof(string) })] - public string StorageAccountKey { get => _streamingJobBody.StorageAccountKey ?? null; set => _streamingJobBody.StorageAccountKey = value; } - - /// - /// The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests.", - SerializedName = @"accountName", - PossibleTypes = new [] { typeof(string) })] - public string StorageAccountName { get => _streamingJobBody.StorageAccountName ?? null; set => _streamingJobBody.StorageAccountName = value; } - - /// Specifies the number of streaming units that the streaming job uses. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the number of streaming units that the streaming job uses.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the number of streaming units that the streaming job uses.", - SerializedName = @"streamingUnits", - PossibleTypes = new [] { typeof(int) })] - public int StreamingUnit { get => _streamingJobBody.StreamingUnit ?? default(int); set => _streamingJobBody.StreamingUnit = value; } - - /// Resource tags. - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags Tag { get => _streamingJobBody.Tag ?? null /* object */; set => _streamingJobBody.Tag = value; } - - /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Creates a duplicate instance of this cmdlet (via JSON serialization). - /// a duplicate instance of NewAzStreamAnalyticsJob_CreateViaIdentityExpanded - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.NewAzStreamAnalyticsJob_CreateViaIdentityExpanded Clone() - { - var clone = new NewAzStreamAnalyticsJob_CreateViaIdentityExpanded(); - 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._streamingJobBody = this._streamingJobBody; - clone.IfMatch = this.IfMatch; - clone.IfNoneMatch = this.IfNoneMatch; - return clone; - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: - { - // When an operation supports asjob, Information messages must go thru verbose. - WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) - { - var data = messageData(); - 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); - // do nothing more. - data.Cancel(); - return; - } - } - break; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public NewAzStreamAnalyticsJob_CreateViaIdentityExpanded() - { - - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'StreamingJobsCreateOrReplace' operation")) - { - if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) - { - var instance = this.Clone(); - var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.StreamingJobsCreateOrReplaceViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _streamingJobBody, onOk, 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.JobName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.StreamingJobsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, _streamingJobBody, onOk, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,body=_streamingJobBody}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..3e55221d1e32 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateViaJsonFilePath.cs @@ -0,0 +1,558 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// create a streaming job or replaces an already existing streaming job. + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsJob_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a streaming job or replaces an already existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class NewAzStreamAnalyticsJob_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag + /// value to prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will + /// result in a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } + + /// 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzStreamAnalyticsJob_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.NewAzStreamAnalyticsJob_CreateViaJsonFilePath Clone() + { + var clone = new NewAzStreamAnalyticsJob_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.IfNoneMatch = this.IfNoneMatch; + clone.IfMatch = this.IfMatch; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsJob_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StreamingJobsCreateOrReplace' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StreamingJobsCreateOrReplaceViaJsonString(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateViaJsonString.cs new file mode 100644 index 000000000000..dfe85ed27d1f --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsJob_CreateViaJsonString.cs @@ -0,0 +1,556 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// create a streaming job or replaces an already existing streaming job. + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsJob_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a streaming job or replaces an already existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class NewAzStreamAnalyticsJob_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag + /// value to prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will + /// result in a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new streaming job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } + + /// 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzStreamAnalyticsJob_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.NewAzStreamAnalyticsJob_CreateViaJsonString Clone() + { + var clone = new NewAzStreamAnalyticsJob_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.IfNoneMatch = this.IfNoneMatch; + clone.IfMatch = this.IfMatch; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsJob_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StreamingJobsCreateOrReplace' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StreamingJobsCreateOrReplaceViaJsonString(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_Create.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_Create.cs index fdb444f88e2a..c23c2cf0b5df 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_Create.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_Create.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Creates an output or replaces an already existing output under an existing streaming job. + /// create an output or replaces an already existing output under an existing streaming job. /// /// /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsOutput_Create", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"DiagnosticCondition"}, NewOutputProperties=new string[] {"DiagnosticCondition"}, ChangeDescription="The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates an output or replaces an already existing output under an existing streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an output or replaces an already existing output under an existing streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] public partial class NewAzStreamAnalyticsOutput_Create : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,11 +41,26 @@ public partial class NewAzStreamAnalyticsOutput_Create : global::System.Manageme /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class NewAzStreamAnalyticsOutput_Create : global::System.Manageme [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -143,7 +164,7 @@ public partial class NewAzStreamAnalyticsOutput_Create : global::System.Manageme public string Name { get => this._name; set => this._name = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput _output; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _output; /// /// An output object, containing all information associated with the named output. All outputs are contained under a streaming @@ -155,13 +176,14 @@ public partial class NewAzStreamAnalyticsOutput_Create : global::System.Manageme ReadOnly = false, Description = @"An output object, containing all information associated with the named output. All outputs are contained under a streaming job.", SerializedName = @"output", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput Output { get => this._output; set => this._output = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput Output { get => this._output; set => this._output = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -207,7 +229,8 @@ public partial class NewAzStreamAnalyticsOutput_Create : global::System.Manageme [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -216,24 +239,24 @@ public partial class NewAzStreamAnalyticsOutput_Create : global::System.Manageme /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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); + 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) @@ -256,6 +279,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -320,8 +348,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -331,7 +384,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStreamAnalyticsOutput_Create() { @@ -385,7 +438,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -398,12 +451,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.OutputsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, SubscriptionId, ResourceGroupName, JobName, Name, Output, onOk, onCreated, this, Pipeline); + await this.Client.OutputsCreateOrReplace(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Output, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name,body=Output}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -439,12 +492,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -456,19 +509,37 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } } } /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -480,8 +551,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateExpanded.cs index 35fb8043e57a..ff42d6893fc7 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateExpanded.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Creates an output or replaces an already existing output under an existing streaming job. + /// create an output or replaces an already existing output under an existing streaming job. /// /// /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsOutput_CreateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"DiagnosticCondition"}, NewOutputProperties=new string[] {"DiagnosticCondition"}, ChangeDescription="The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates an output or replaces an already existing output under an existing streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an output or replaces an already existing output under an existing streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] public partial class NewAzStreamAnalyticsOutput_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,17 +41,32 @@ public partial class NewAzStreamAnalyticsOutput_CreateExpanded : global::System. /// 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; + /// /// An output object, containing all information associated with the named output. All outputs are contained under a streaming /// job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput _outputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Output(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _outputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -62,8 +80,8 @@ public partial class NewAzStreamAnalyticsOutput_CreateExpanded : global::System. ReadOnly = false, Description = @"Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", SerializedName = @"datasource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource Datasource { get => _outputBody.Datasource ?? null /* object */; set => _outputBody.Datasource = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource Datasource { get => _outputBody.Datasource ?? null /* object */; set => _outputBody.Datasource = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -75,6 +93,9 @@ public partial class NewAzStreamAnalyticsOutput_CreateExpanded : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -164,7 +185,7 @@ public partial class NewAzStreamAnalyticsOutput_CreateExpanded : global::System. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -206,9 +227,9 @@ public partial class NewAzStreamAnalyticsOutput_CreateExpanded : global::System. ReadOnly = false, Description = @"Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType SerializationType { get => _outputBody.SerializationType ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType)""); set => _outputBody.SerializationType = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] + public string SerializationType { get => _outputBody.SerializationType ?? null; set => _outputBody.SerializationType = value; } /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] @@ -235,7 +256,8 @@ public partial class NewAzStreamAnalyticsOutput_CreateExpanded : global::System. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -255,24 +277,24 @@ public partial class NewAzStreamAnalyticsOutput_CreateExpanded : global::System. /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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); + 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) @@ -295,6 +317,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -359,8 +386,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -370,7 +422,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStreamAnalyticsOutput_CreateExpanded() { @@ -424,7 +476,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -437,12 +489,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.OutputsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, SubscriptionId, ResourceGroupName, JobName, Name, _outputBody, onOk, onCreated, this, Pipeline); + await this.Client.OutputsCreateOrReplace(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _outputBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name,body=_outputBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -478,12 +530,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -495,19 +547,37 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } } } /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -519,8 +589,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaIdentity.cs index 54391908f3c0..c04fdf645787 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaIdentity.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Creates an output or replaces an already existing output under an existing streaming job. + /// create an output or replaces an already existing output under an existing streaming job. /// /// /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsOutput_CreateViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"DiagnosticCondition"}, NewOutputProperties=new string[] {"DiagnosticCondition"}, ChangeDescription="The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates an output or replaces an already existing output under an existing streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an output or replaces an already existing output under an existing streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] public partial class NewAzStreamAnalyticsOutput_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,11 +41,26 @@ public partial class NewAzStreamAnalyticsOutput_CreateViaIdentity : global::Syst /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class NewAzStreamAnalyticsOutput_CreateViaIdentity : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -122,7 +143,7 @@ public partial class NewAzStreamAnalyticsOutput_CreateViaIdentity : global::Syst global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput _output; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _output; /// /// An output object, containing all information associated with the named output. All outputs are contained under a streaming @@ -134,13 +155,14 @@ public partial class NewAzStreamAnalyticsOutput_CreateViaIdentity : global::Syst ReadOnly = false, Description = @"An output object, containing all information associated with the named output. All outputs are contained under a streaming job.", SerializedName = @"output", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput Output { get => this._output; set => this._output = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput Output { get => this._output; set => this._output = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -163,24 +185,24 @@ public partial class NewAzStreamAnalyticsOutput_CreateViaIdentity : global::Syst /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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); + 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) @@ -203,6 +225,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -267,8 +294,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -278,7 +330,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStreamAnalyticsOutput_CreateViaIdentity() { @@ -332,7 +384,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -347,7 +399,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.OutputsCreateOrReplaceViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, Output, onOk, onCreated, this, Pipeline); + await this.Client.OutputsCreateOrReplaceViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Output, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); } else { @@ -368,13 +420,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OutputName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.OutputsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.OutputName ?? null, Output, onOk, onCreated, this, Pipeline); + await this.Client.OutputsCreateOrReplace(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.OutputName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Output, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,body=Output}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -410,12 +462,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,19 +479,37 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } } } /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -451,8 +521,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaIdentityExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaIdentityExpanded.cs index d6aaaba5286b..605debec192b 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaIdentityExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaIdentityExpanded.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Creates an output or replaces an already existing output under an existing streaming job. + /// create an output or replaces an already existing output under an existing streaming job. /// /// /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsOutput_CreateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"DiagnosticCondition"}, NewOutputProperties=new string[] {"DiagnosticCondition"}, ChangeDescription="The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates an output or replaces an already existing output under an existing streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an output or replaces an already existing output under an existing streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] public partial class NewAzStreamAnalyticsOutput_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,17 +41,32 @@ public partial class NewAzStreamAnalyticsOutput_CreateViaIdentityExpanded : glob /// 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; + /// /// An output object, containing all information associated with the named output. All outputs are contained under a streaming /// job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput _outputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Output(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _outputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -62,8 +80,8 @@ public partial class NewAzStreamAnalyticsOutput_CreateViaIdentityExpanded : glob ReadOnly = false, Description = @"Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", SerializedName = @"datasource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource Datasource { get => _outputBody.Datasource ?? null /* object */; set => _outputBody.Datasource = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource Datasource { get => _outputBody.Datasource ?? null /* object */; set => _outputBody.Datasource = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -75,6 +93,9 @@ public partial class NewAzStreamAnalyticsOutput_CreateViaIdentityExpanded : glob [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -143,7 +164,7 @@ public partial class NewAzStreamAnalyticsOutput_CreateViaIdentityExpanded : glob /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -171,9 +192,9 @@ public partial class NewAzStreamAnalyticsOutput_CreateViaIdentityExpanded : glob ReadOnly = false, Description = @"Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType SerializationType { get => _outputBody.SerializationType ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType)""); set => _outputBody.SerializationType = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] + public string SerializationType { get => _outputBody.SerializationType ?? null; set => _outputBody.SerializationType = value; } /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] @@ -202,24 +223,24 @@ public partial class NewAzStreamAnalyticsOutput_CreateViaIdentityExpanded : glob /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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); + 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) @@ -242,6 +263,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -306,8 +332,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -317,7 +368,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStreamAnalyticsOutput_CreateViaIdentityExpanded() { @@ -371,7 +422,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -386,7 +437,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.OutputsCreateOrReplaceViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, _outputBody, onOk, onCreated, this, Pipeline); + await this.Client.OutputsCreateOrReplaceViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _outputBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); } else { @@ -407,13 +458,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OutputName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.OutputsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.OutputName ?? null, _outputBody, onOk, onCreated, this, Pipeline); + await this.Client.OutputsCreateOrReplace(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.OutputName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _outputBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,body=_outputBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -449,12 +500,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -466,19 +517,37 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } } } /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -490,8 +559,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..26c87cf16bd9 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaIdentityStreamingjob.cs @@ -0,0 +1,559 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// create an output or replaces an already existing output under an existing streaming job. + /// + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsOutput_CreateViaIdentityStreamingjob", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an output or replaces an already existing output under an existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] + public partial class NewAzStreamAnalyticsOutput_CreateViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in + /// a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the output. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the output.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the output.", + SerializedName = @"outputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OutputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _output; + + /// + /// An output object, containing all information associated with the named output. All outputs are contained under a streaming + /// job. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "An output object, containing all information associated with the named output. All outputs are contained under a streaming job.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"An output object, containing all information associated with the named output. All outputs are contained under a streaming job.", + SerializedName = @"output", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput Output { get => this._output; set => this._output = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsOutput_CreateViaIdentityStreamingjob() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OutputsCreateOrReplace' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/outputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.OutputsCreateOrReplaceViaIdentity(StreamingjobInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Output, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.OutputsCreateOrReplace(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Output, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } + } + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaIdentityStreamingjobExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaIdentityStreamingjobExpanded.cs new file mode 100644 index 000000000000..f166602a5454 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaIdentityStreamingjobExpanded.cs @@ -0,0 +1,598 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// create an output or replaces an already existing output under an existing streaming job. + /// + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsOutput_CreateViaIdentityStreamingjobExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an output or replaces an already existing output under an existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] + public partial class NewAzStreamAnalyticsOutput_CreateViaIdentityStreamingjobExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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; + + /// + /// An output object, containing all information associated with the named output. All outputs are contained under a streaming + /// job. + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _outputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; + + /// + /// Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"datasource", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource Datasource { get => _outputBody.Datasource ?? null /* object */; set => _outputBody.Datasource = 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in + /// a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the output. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the output.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the output.", + SerializedName = @"outputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OutputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] + public string SerializationType { get => _outputBody.SerializationType ?? null; set => _outputBody.SerializationType = value; } + + /// . + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @".", + SerializedName = @"sizeWindow", + PossibleTypes = new [] { typeof(float) })] + public float SizeWindow { get => _outputBody.SizeWindow ?? default(float); set => _outputBody.SizeWindow = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// . + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @".", + SerializedName = @"timeWindow", + PossibleTypes = new [] { typeof(string) })] + public string TimeWindow { get => _outputBody.TimeWindow ?? null; set => _outputBody.TimeWindow = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsOutput_CreateViaIdentityStreamingjobExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OutputsCreateOrReplace' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/outputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.OutputsCreateOrReplaceViaIdentity(StreamingjobInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _outputBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.OutputsCreateOrReplace(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _outputBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } + } + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..9361a83774a7 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaJsonFilePath.cs @@ -0,0 +1,576 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// create an output or replaces an already existing output under an existing streaming job. + /// + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsOutput_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an output or replaces an already existing output under an existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class NewAzStreamAnalyticsOutput_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in + /// a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the output. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the output.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the output.", + SerializedName = @"outputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OutputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsOutput_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OutputsCreateOrReplace' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OutputsCreateOrReplaceViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, onCreated, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } + } + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaJsonString.cs new file mode 100644 index 000000000000..095c6bdf5f6b --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsOutput_CreateViaJsonString.cs @@ -0,0 +1,574 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// create an output or replaces an already existing output under an existing streaming job. + /// + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsOutput_CreateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create an output or replaces an already existing output under an existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class NewAzStreamAnalyticsOutput_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in + /// a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the output. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the output.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the output.", + SerializedName = @"outputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OutputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsOutput_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OutputsCreateOrReplace' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OutputsCreateOrReplaceViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, onCreated, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } + } + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsTransformation_CreateExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsTransformation_CreateExpanded.cs index f4fedecf4f3a..bb750ac11cec 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsTransformation_CreateExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsTransformation_CreateExpanded.cs @@ -6,21 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Creates a transformation or replaces an already existing transformation under an existing streaming job. + /// create a transformation or replaces an already existing transformation under an existing streaming job. /// /// /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsTransformation_CreateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Creates a transformation or replaces an already existing transformation under an existing streaming job.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a transformation or replaces an already existing transformation under an existing streaming job.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}", ApiVersion = "2017-04-01-preview")] public partial class NewAzStreamAnalyticsTransformation_CreateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,17 +39,32 @@ public partial class NewAzStreamAnalyticsTransformation_CreateExpanded : global: /// 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; + /// /// A transformation object, containing all information associated with the named transformation. All transformations are /// contained under a streaming job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation _transformationBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Transformation(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation _transformationBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -60,6 +78,9 @@ public partial class NewAzStreamAnalyticsTransformation_CreateExpanded : global: [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -149,7 +170,7 @@ public partial class NewAzStreamAnalyticsTransformation_CreateExpanded : global: /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -220,7 +241,8 @@ public partial class NewAzStreamAnalyticsTransformation_CreateExpanded : global: [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -229,24 +251,24 @@ public partial class NewAzStreamAnalyticsTransformation_CreateExpanded : global: /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation /// from the remote call /// /// Determines if the rest of the onCreated method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation /// 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); + 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) @@ -269,6 +291,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -333,8 +360,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -344,7 +396,7 @@ protected override void EndProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public NewAzStreamAnalyticsTransformation_CreateExpanded() { @@ -398,7 +450,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -411,12 +463,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.TransformationsCreateOrReplace(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, SubscriptionId, ResourceGroupName, JobName, Name, _transformationBody, onOk, onCreated, this, Pipeline); + await this.Client.TransformationsCreateOrReplace(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _transformationBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name,body=_transformationBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -452,12 +504,12 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation /// from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -469,19 +521,37 @@ protected override void StopProcessing() return ; } // onCreated - response for 201 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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; + } + } } } /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -493,8 +563,26 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsTransformation_CreateViaIdentityStreamingjobExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsTransformation_CreateViaIdentityStreamingjobExpanded.cs new file mode 100644 index 000000000000..90169ad59add --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsTransformation_CreateViaIdentityStreamingjobExpanded.cs @@ -0,0 +1,572 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// create a transformation or replaces an already existing transformation under an existing streaming job. + /// + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsTransformation_CreateViaIdentityStreamingjobExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a transformation or replaces an already existing transformation under an existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}", ApiVersion = "2017-04-01-preview")] + public partial class NewAzStreamAnalyticsTransformation_CreateViaIdentityStreamingjobExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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; + + /// + /// A transformation object, containing all information associated with the named transformation. All transformations are + /// contained under a streaming job. + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation _transformationBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values + /// will result in a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the transformation. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the transformation.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the transformation.", + SerializedName = @"transformationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TransformationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language + /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests.", + SerializedName = @"query", + PossibleTypes = new [] { typeof(string) })] + public string Query { get => _transformationBody.Query ?? null; set => _transformationBody.Query = value; } + + /// Specifies the number of streaming units that the streaming job uses. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the number of streaming units that the streaming job uses.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the number of streaming units that the streaming job uses.", + SerializedName = @"streamingUnits", + PossibleTypes = new [] { typeof(int) })] + public int StreamingUnit { get => _transformationBody.StreamingUnit ?? default(int); set => _transformationBody.StreamingUnit = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsTransformation_CreateViaIdentityStreamingjobExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TransformationsCreateOrReplace' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/transformations/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TransformationsCreateOrReplaceViaIdentity(StreamingjobInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _transformationBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.TransformationsCreateOrReplace(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _transformationBody, onOk, onCreated, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeCreate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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; + } + } + } + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsTransformation_CreateViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsTransformation_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..570e8e8ff67d --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsTransformation_CreateViaJsonFilePath.cs @@ -0,0 +1,574 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// create a transformation or replaces an already existing transformation under an existing streaming job. + /// + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsTransformation_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a transformation or replaces an already existing transformation under an existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class NewAzStreamAnalyticsTransformation_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values + /// will result in a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the transformation. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the transformation.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the transformation.", + SerializedName = @"transformationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TransformationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsTransformation_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TransformationsCreateOrReplace' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TransformationsCreateOrReplaceViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, onCreated, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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; + } + } + } + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsTransformation_CreateViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsTransformation_CreateViaJsonString.cs new file mode 100644 index 000000000000..aa1eaaf45d79 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/NewAzStreamAnalyticsTransformation_CreateViaJsonString.cs @@ -0,0 +1,572 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// create a transformation or replaces an already existing transformation under an existing streaming job. + /// + /// + /// [OpenAPI] CreateOrReplace=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzStreamAnalyticsTransformation_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"create a transformation or replaces an already existing transformation under an existing streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class NewAzStreamAnalyticsTransformation_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private string _ifNoneMatch; + + /// + /// Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values + /// will result in a 412 Pre-condition Failed response. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values will result in a 412 Pre-condition Failed response.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Set to '*' to allow a new transformation to be created, but to prevent updating an existing transformation. Other values will result in a 412 Pre-condition Failed response.", + SerializedName = @"If-None-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfNoneMatch { get => this._ifNoneMatch; set => this._ifNoneMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the transformation. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the transformation.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the transformation.", + SerializedName = @"transformationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TransformationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnCreated will be called before the regular onCreated 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// from the remote call + /// /// Determines if the rest of the onCreated method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnCreated(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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 NewAzStreamAnalyticsTransformation_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TransformationsCreateOrReplace' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TransformationsCreateOrReplaceViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, onCreated, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfNoneMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfNoneMatch") ? IfNoneMatch : null,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// a delegate that is called when the remote service returns 201 (Created). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onCreated(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnCreated(responseMessage, response, ref _returnNow); + // if overrideOnCreated has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onCreated - response for 201 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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; + } + } + } + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsCluster_Delete.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsCluster_Delete.cs index 195d906cec6e..f88ecb2e3a5b 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsCluster_Delete.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsCluster_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Deletes the specified cluster. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}", ApiVersion = "2020-03-01-preview")] public partial class RemoveAzStreamAnalyticsCluster_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +37,9 @@ public partial class RemoveAzStreamAnalyticsCluster_Delete : global::System.Mana /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] @@ -44,6 +50,9 @@ public partial class RemoveAzStreamAnalyticsCluster_Delete : global::System.Mana [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -57,6 +66,9 @@ public partial class RemoveAzStreamAnalyticsCluster_Delete : global::System.Mana [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -113,7 +125,7 @@ public partial class RemoveAzStreamAnalyticsCluster_Delete : global::System.Mana /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -159,7 +171,8 @@ public partial class RemoveAzStreamAnalyticsCluster_Delete : global::System.Mana [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -168,12 +181,12 @@ public partial class RemoveAzStreamAnalyticsCluster_Delete : global::System.Mana /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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); + 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 @@ -313,11 +326,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -329,10 +367,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -400,7 +454,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -418,7 +472,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -431,7 +485,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStreamAnalyticsCluster_Delete() { @@ -464,12 +518,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -486,15 +540,15 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + 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 } }); @@ -519,7 +573,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -543,7 +597,7 @@ protected override void StopProcessing() return ; } // onNotFound - response for 404 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -567,7 +621,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsCluster_DeleteViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsCluster_DeleteViaIdentity.cs index 6de3843545d1..4f946c1c09bc 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsCluster_DeleteViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsCluster_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Deletes the specified cluster. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}", ApiVersion = "2020-03-01-preview")] public partial class RemoveAzStreamAnalyticsCluster_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +37,9 @@ public partial class RemoveAzStreamAnalyticsCluster_DeleteViaIdentity : global:: /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] @@ -44,6 +50,9 @@ public partial class RemoveAzStreamAnalyticsCluster_DeleteViaIdentity : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -57,6 +66,9 @@ public partial class RemoveAzStreamAnalyticsCluster_DeleteViaIdentity : global:: [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -106,7 +118,7 @@ public partial class RemoveAzStreamAnalyticsCluster_DeleteViaIdentity : global:: /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -129,12 +141,12 @@ public partial class RemoveAzStreamAnalyticsCluster_DeleteViaIdentity : global:: /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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); + 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 @@ -271,11 +283,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -287,10 +324,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -358,7 +411,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -396,7 +449,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -409,7 +462,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStreamAnalyticsCluster_DeleteViaIdentity() { @@ -442,12 +495,12 @@ protected override void StopProcessing() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -464,7 +517,7 @@ protected override void StopProcessing() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(responseMessage, await response); + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 } @@ -497,7 +550,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -521,7 +574,7 @@ protected override void StopProcessing() return ; } // onNotFound - response for 404 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -545,7 +598,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsFunction_Delete.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsFunction_Delete.cs index 627dd5c09209..5c5f59a0cdde 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsFunction_Delete.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsFunction_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Deletes a function from the streaming job. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] public partial class RemoveAzStreamAnalyticsFunction_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzStreamAnalyticsFunction_Delete : global::System.Man /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzStreamAnalyticsFunction_Delete : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -114,7 +135,7 @@ public partial class RemoveAzStreamAnalyticsFunction_Delete : global::System.Man /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -160,7 +181,8 @@ public partial class RemoveAzStreamAnalyticsFunction_Delete : global::System.Man [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -205,6 +227,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -269,8 +296,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -326,7 +378,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -344,7 +396,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -357,7 +409,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStreamAnalyticsFunction_Delete() { @@ -403,7 +455,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -427,7 +479,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsFunction_DeleteViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsFunction_DeleteViaIdentity.cs index 0b8840218ef2..39a51af92111 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsFunction_DeleteViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsFunction_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Deletes a function from the streaming job. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] public partial class RemoveAzStreamAnalyticsFunction_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzStreamAnalyticsFunction_DeleteViaIdentity : global: /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzStreamAnalyticsFunction_DeleteViaIdentity : global: [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -93,7 +114,7 @@ public partial class RemoveAzStreamAnalyticsFunction_DeleteViaIdentity : global: /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -152,6 +173,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -216,8 +242,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -273,7 +324,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -315,7 +366,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -328,7 +379,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStreamAnalyticsFunction_DeleteViaIdentity() { @@ -374,7 +425,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -398,7 +449,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsFunction_DeleteViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsFunction_DeleteViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..ccbcd240416c --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsFunction_DeleteViaIdentityStreamingjob.cs @@ -0,0 +1,472 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// Deletes a function from the streaming job. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzStreamAnalyticsFunction_DeleteViaIdentityStreamingjob", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Deletes a function from the streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] + public partial class RemoveAzStreamAnalyticsFunction_DeleteViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FunctionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/functions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.FunctionsDeleteViaIdentity(StreamingjobInputObject.Id, onOk, onNoContent, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.FunctionsDelete(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, onOk, onNoContent, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public RemoveAzStreamAnalyticsFunction_DeleteViaIdentityStreamingjob() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsInput_Delete.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsInput_Delete.cs index 471c3f1e5570..ab1094ca27a9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsInput_Delete.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsInput_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Deletes an input from the streaming job. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] public partial class RemoveAzStreamAnalyticsInput_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzStreamAnalyticsInput_Delete : global::System.Manage /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzStreamAnalyticsInput_Delete : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -114,7 +135,7 @@ public partial class RemoveAzStreamAnalyticsInput_Delete : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -160,7 +181,8 @@ public partial class RemoveAzStreamAnalyticsInput_Delete : global::System.Manage [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -205,6 +227,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -269,8 +296,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -326,7 +378,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -344,7 +396,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -357,7 +409,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStreamAnalyticsInput_Delete() { @@ -403,7 +455,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -427,7 +479,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsInput_DeleteViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsInput_DeleteViaIdentity.cs index bd4722228f25..275e4a980a8d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsInput_DeleteViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsInput_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Deletes an input from the streaming job. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] public partial class RemoveAzStreamAnalyticsInput_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzStreamAnalyticsInput_DeleteViaIdentity : global::Sy /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzStreamAnalyticsInput_DeleteViaIdentity : global::Sy [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -93,7 +114,7 @@ public partial class RemoveAzStreamAnalyticsInput_DeleteViaIdentity : global::Sy /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -152,6 +173,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -216,8 +242,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -273,7 +324,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -315,7 +366,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -328,7 +379,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStreamAnalyticsInput_DeleteViaIdentity() { @@ -374,7 +425,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -398,7 +449,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsInput_DeleteViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsInput_DeleteViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..9a17c952eaed --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsInput_DeleteViaIdentityStreamingjob.cs @@ -0,0 +1,471 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// Deletes an input from the streaming job. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzStreamAnalyticsInput_DeleteViaIdentityStreamingjob", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Deletes an input from the streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] + public partial class RemoveAzStreamAnalyticsInput_DeleteViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the input.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the input.", + SerializedName = @"inputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("InputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'InputsDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/inputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.InputsDeleteViaIdentity(StreamingjobInputObject.Id, onOk, onNoContent, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.InputsDelete(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, onOk, onNoContent, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzStreamAnalyticsInput_DeleteViaIdentityStreamingjob() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsJob_Delete.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsJob_Delete.cs index c4c91df8c99a..4d1998d1888c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsJob_Delete.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsJob_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Deletes a streaming job. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] public partial class RemoveAzStreamAnalyticsJob_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +37,9 @@ public partial class RemoveAzStreamAnalyticsJob_Delete : global::System.Manageme /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] @@ -44,6 +50,9 @@ public partial class RemoveAzStreamAnalyticsJob_Delete : global::System.Manageme [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -57,6 +66,9 @@ public partial class RemoveAzStreamAnalyticsJob_Delete : global::System.Manageme [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -112,7 +124,7 @@ public partial class RemoveAzStreamAnalyticsJob_Delete : global::System.Manageme /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -158,7 +170,8 @@ public partial class RemoveAzStreamAnalyticsJob_Delete : global::System.Manageme [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -290,11 +303,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -306,10 +344,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -377,7 +431,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -395,7 +449,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -408,7 +462,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStreamAnalyticsJob_Delete() { @@ -454,7 +508,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -478,7 +532,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsJob_DeleteViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsJob_DeleteViaIdentity.cs index 1fc4e559cbfb..e92879816c54 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsJob_DeleteViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsJob_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Deletes a streaming job. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] public partial class RemoveAzStreamAnalyticsJob_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,6 +37,9 @@ public partial class RemoveAzStreamAnalyticsJob_DeleteViaIdentity : global::Syst /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] @@ -44,6 +50,9 @@ public partial class RemoveAzStreamAnalyticsJob_DeleteViaIdentity : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -57,6 +66,9 @@ public partial class RemoveAzStreamAnalyticsJob_DeleteViaIdentity : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -106,7 +118,7 @@ public partial class RemoveAzStreamAnalyticsJob_DeleteViaIdentity : global::Syst /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -249,11 +261,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -265,10 +302,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -336,7 +389,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -374,7 +427,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -387,7 +440,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStreamAnalyticsJob_DeleteViaIdentity() { @@ -433,7 +486,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -457,7 +510,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsOutput_Delete.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsOutput_Delete.cs index 542d7cc72ee6..5542b41a150b 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsOutput_Delete.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsOutput_Delete.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Deletes an output from the streaming job. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] public partial class RemoveAzStreamAnalyticsOutput_Delete : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzStreamAnalyticsOutput_Delete : global::System.Manag /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzStreamAnalyticsOutput_Delete : global::System.Manag [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -114,7 +135,7 @@ public partial class RemoveAzStreamAnalyticsOutput_Delete : global::System.Manag /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -160,7 +181,8 @@ public partial class RemoveAzStreamAnalyticsOutput_Delete : global::System.Manag [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -205,6 +227,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -269,8 +296,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -326,7 +378,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -344,7 +396,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -357,7 +409,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStreamAnalyticsOutput_Delete() { @@ -403,7 +455,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -427,7 +479,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsOutput_DeleteViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsOutput_DeleteViaIdentity.cs index a8814da3d09d..a98acc878e2b 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsOutput_DeleteViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsOutput_DeleteViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// Deletes an output from the streaming job. @@ -18,7 +20,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] public partial class RemoveAzStreamAnalyticsOutput_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -34,11 +37,26 @@ public partial class RemoveAzStreamAnalyticsOutput_DeleteViaIdentity : global::S /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -52,6 +70,9 @@ public partial class RemoveAzStreamAnalyticsOutput_DeleteViaIdentity : global::S [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -93,7 +114,7 @@ public partial class RemoveAzStreamAnalyticsOutput_DeleteViaIdentity : global::S /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -152,6 +173,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -216,8 +242,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -273,7 +324,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -315,7 +366,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -328,7 +379,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public RemoveAzStreamAnalyticsOutput_DeleteViaIdentity() { @@ -374,7 +425,7 @@ protected override void StopProcessing() return ; } // onNoContent - response for 204 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } @@ -398,7 +449,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsOutput_DeleteViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsOutput_DeleteViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..331100a6c390 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/RemoveAzStreamAnalyticsOutput_DeleteViaIdentityStreamingjob.cs @@ -0,0 +1,471 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// Deletes an output from the streaming job. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzStreamAnalyticsOutput_DeleteViaIdentityStreamingjob", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Deletes an output from the streaming job.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] + public partial class RemoveAzStreamAnalyticsOutput_DeleteViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the output. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the output.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the output.", + SerializedName = @"outputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OutputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OutputsDelete' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/outputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.OutputsDeleteViaIdentity(StreamingjobInputObject.Id, onOk, onNoContent, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.OutputsDelete(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, onOk, onNoContent, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzStreamAnalyticsOutput_DeleteViaIdentityStreamingjob() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StartAzStreamAnalyticsJob_StartExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StartAzStreamAnalyticsJob_StartExpanded.cs index 19e793ab862c..d770be168c28 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StartAzStreamAnalyticsJob_StartExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StartAzStreamAnalyticsJob_StartExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -20,7 +22,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/start", ApiVersion = "2017-04-01-preview")] public partial class StartAzStreamAnalyticsJob_StartExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,8 +39,11 @@ public partial class StartAzStreamAnalyticsJob_StartExpanded : global::System.Ma /// 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(); + /// Parameters supplied to the Start Streaming Job operation. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParameters _startJobParametersBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StartStreamingJobParameters(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParameters _startJobParametersBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StartStreamingJobParameters(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -49,6 +55,9 @@ public partial class StartAzStreamAnalyticsJob_StartExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -62,6 +71,9 @@ public partial class StartAzStreamAnalyticsJob_StartExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -119,9 +131,9 @@ public partial class StartAzStreamAnalyticsJob_StartExpanded : global::System.Ma ReadOnly = false, Description = @"Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time.", SerializedName = @"outputStartMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode OutputStartMode { get => _startJobParametersBody.OutputStartMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode)""); set => _startJobParametersBody.OutputStartMode = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] + public string OutputStartMode { get => _startJobParametersBody.OutputStartMode ?? null; set => _startJobParametersBody.OutputStartMode = value; } /// /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null @@ -148,7 +160,7 @@ public partial class StartAzStreamAnalyticsJob_StartExpanded : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -194,7 +206,8 @@ public partial class StartAzStreamAnalyticsJob_StartExpanded : global::System.Ma [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -317,11 +330,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -333,10 +371,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -404,7 +458,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -422,7 +476,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,Name=Name,body=_startJobParametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -435,7 +489,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public StartAzStreamAnalyticsJob_StartExpanded() { @@ -481,7 +535,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StartAzStreamAnalyticsJob_StartViaIdentityExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StartAzStreamAnalyticsJob_StartViaIdentityExpanded.cs index f198e643ea6f..0621c80ea7f2 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StartAzStreamAnalyticsJob_StartViaIdentityExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StartAzStreamAnalyticsJob_StartViaIdentityExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -20,7 +22,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/start", ApiVersion = "2017-04-01-preview")] public partial class StartAzStreamAnalyticsJob_StartViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,8 +39,11 @@ public partial class StartAzStreamAnalyticsJob_StartViaIdentityExpanded : global /// 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(); + /// Parameters supplied to the Start Streaming Job operation. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStartStreamingJobParameters _startJobParametersBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StartStreamingJobParameters(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStartStreamingJobParameters _startJobParametersBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StartStreamingJobParameters(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -49,6 +55,9 @@ public partial class StartAzStreamAnalyticsJob_StartViaIdentityExpanded : global [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -62,6 +71,9 @@ public partial class StartAzStreamAnalyticsJob_StartViaIdentityExpanded : global [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -113,9 +125,9 @@ public partial class StartAzStreamAnalyticsJob_StartViaIdentityExpanded : global ReadOnly = false, Description = @"Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time.", SerializedName = @"outputStartMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode OutputStartMode { get => _startJobParametersBody.OutputStartMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode)""); set => _startJobParametersBody.OutputStartMode = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] + public string OutputStartMode { get => _startJobParametersBody.OutputStartMode ?? null; set => _startJobParametersBody.OutputStartMode = value; } /// /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null @@ -142,7 +154,7 @@ public partial class StartAzStreamAnalyticsJob_StartViaIdentityExpanded : global /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -276,11 +288,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -292,10 +329,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -363,7 +416,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -401,7 +454,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_startJobParametersBody}) + 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 } }); @@ -414,7 +467,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public StartAzStreamAnalyticsJob_StartViaIdentityExpanded() { @@ -460,7 +513,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StartAzStreamAnalyticsJob_StartViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StartAzStreamAnalyticsJob_StartViaJsonFilePath.cs new file mode 100644 index 000000000000..081b4af333f1 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StartAzStreamAnalyticsJob_StartViaJsonFilePath.cs @@ -0,0 +1,527 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Starts a streaming job. Once a job is started it will start processing input events and produce output. + /// + /// + /// [OpenAPI] Start=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/start" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzStreamAnalyticsJob_StartViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Starts a streaming job. Once a job is started it will start processing input events and produce output.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/start", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class StartAzStreamAnalyticsJob_StartViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Start operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Start operation")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Start 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of StartAzStreamAnalyticsJob_StartViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.StartAzStreamAnalyticsJob_StartViaJsonFilePath Clone() + { + var clone = new StartAzStreamAnalyticsJob_StartViaJsonFilePath(); + 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.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StreamingJobsStart' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StreamingJobsStartViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public StartAzStreamAnalyticsJob_StartViaJsonFilePath() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StartAzStreamAnalyticsJob_StartViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StartAzStreamAnalyticsJob_StartViaJsonString.cs new file mode 100644 index 000000000000..375c1886c2b5 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StartAzStreamAnalyticsJob_StartViaJsonString.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Starts a streaming job. Once a job is started it will start processing input events and produce output. + /// + /// + /// [OpenAPI] Start=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/start" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzStreamAnalyticsJob_StartViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Starts a streaming job. Once a job is started it will start processing input events and produce output.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/start", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class StartAzStreamAnalyticsJob_StartViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Start operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Start operation")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Start 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of StartAzStreamAnalyticsJob_StartViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.StartAzStreamAnalyticsJob_StartViaJsonString Clone() + { + var clone = new StartAzStreamAnalyticsJob_StartViaJsonString(); + 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.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StreamingJobsStart' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StreamingJobsStartViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public StartAzStreamAnalyticsJob_StartViaJsonString() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StopAzStreamAnalyticsJob_Stop.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StopAzStreamAnalyticsJob_Stop.cs index d28911070744..a13e2a2726d4 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StopAzStreamAnalyticsJob_Stop.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StopAzStreamAnalyticsJob_Stop.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -20,7 +22,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/stop", ApiVersion = "2017-04-01-preview")] public partial class StopAzStreamAnalyticsJob_Stop : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,6 +39,9 @@ public partial class StopAzStreamAnalyticsJob_Stop : global::System.Management.A /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] @@ -46,6 +52,9 @@ public partial class StopAzStreamAnalyticsJob_Stop : global::System.Management.A [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -59,6 +68,9 @@ public partial class StopAzStreamAnalyticsJob_Stop : global::System.Management.A [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -114,7 +126,7 @@ public partial class StopAzStreamAnalyticsJob_Stop : global::System.Management.A /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -160,7 +172,8 @@ public partial class StopAzStreamAnalyticsJob_Stop : global::System.Management.A [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -282,11 +295,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -298,10 +336,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -369,7 +423,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -387,7 +441,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,Name=Name}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -400,7 +454,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public StopAzStreamAnalyticsJob_Stop() { @@ -446,7 +500,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StopAzStreamAnalyticsJob_StopViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StopAzStreamAnalyticsJob_StopViaIdentity.cs index 99f80311184f..7168610f0868 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StopAzStreamAnalyticsJob_StopViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/StopAzStreamAnalyticsJob_StopViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -20,7 +22,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/stop", ApiVersion = "2017-04-01-preview")] public partial class StopAzStreamAnalyticsJob_StopViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -36,6 +39,9 @@ public partial class StopAzStreamAnalyticsJob_StopViaIdentity : global::System.M /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] @@ -46,6 +52,9 @@ public partial class StopAzStreamAnalyticsJob_StopViaIdentity : global::System.M [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -59,6 +68,9 @@ public partial class StopAzStreamAnalyticsJob_StopViaIdentity : global::System.M [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -108,7 +120,7 @@ public partial class StopAzStreamAnalyticsJob_StopViaIdentity : global::System.M /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -241,11 +253,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -257,10 +294,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -328,7 +381,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -366,7 +419,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + 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 } }); @@ -379,7 +432,7 @@ protected override void ProcessRecord() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public StopAzStreamAnalyticsJob_StopViaIdentity() { @@ -425,7 +478,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / - if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) { WriteObject(true); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_Test.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_Test.cs index ed515a4bb1da..bd9fbdd91779 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_Test.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_Test.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -17,12 +19,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsFunction_Test", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test", ApiVersion = "2017-04-01-preview")] public partial class TestAzStreamAnalyticsFunction_Test : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,6 +41,9 @@ public partial class TestAzStreamAnalyticsFunction_Test : global::System.Managem /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] @@ -48,6 +54,9 @@ public partial class TestAzStreamAnalyticsFunction_Test : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -61,8 +70,11 @@ public partial class TestAzStreamAnalyticsFunction_Test : global::System.Managem [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction _function; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _function; /// /// A function object, containing all information associated with the named function. All functions are contained under a @@ -74,8 +86,9 @@ public partial class TestAzStreamAnalyticsFunction_Test : global::System.Managem ReadOnly = false, Description = @"A function object, containing all information associated with the named function. All functions are contained under a streaming job.", SerializedName = @"function", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction Function { get => this._function; set => this._function = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction Function { get => this._function; set => this._function = value; } /// 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")] @@ -140,7 +153,7 @@ public partial class TestAzStreamAnalyticsFunction_Test : global::System.Managem /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -186,7 +199,8 @@ public partial class TestAzStreamAnalyticsFunction_Test : global::System.Managem [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -195,12 +209,12 @@ public partial class TestAzStreamAnalyticsFunction_Test : global::System.Managem /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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); + 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) @@ -312,11 +326,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -328,10 +367,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -399,7 +454,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -417,7 +472,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name,body=Function}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -437,7 +492,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzStreamAnalyticsFunction_Test() { @@ -461,12 +516,12 @@ public TestAzStreamAnalyticsFunction_Test() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -478,8 +533,9 @@ public TestAzStreamAnalyticsFunction_Test() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestExpanded.cs index 8566197879a9..45a3016e72af 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -17,12 +19,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsFunction_TestExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test", ApiVersion = "2017-04-01-preview")] public partial class TestAzStreamAnalyticsFunction_TestExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,11 +41,14 @@ public partial class TestAzStreamAnalyticsFunction_TestExpanded : global::System /// 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 function object, containing all information associated with the named function. All functions are contained under a /// streaming job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction _functionBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Function(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _functionBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -54,6 +60,9 @@ public partial class TestAzStreamAnalyticsFunction_TestExpanded : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -67,6 +76,9 @@ public partial class TestAzStreamAnalyticsFunction_TestExpanded : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] @@ -75,8 +87,8 @@ public partial class TestAzStreamAnalyticsFunction_TestExpanded : global::System ReadOnly = false, Description = @".", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration FunctionConfigurationProperty { get => _functionBody.ConfigurationProperty ?? null /* object */; set => _functionBody.ConfigurationProperty = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration FunctionConfigurationProperty { get => _functionBody.ConfigurationProperty ?? null /* object */; set => _functionBody.ConfigurationProperty = value; } /// 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")] @@ -141,7 +153,7 @@ public partial class TestAzStreamAnalyticsFunction_TestExpanded : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } /// Indicates the type of function. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the type of function.")] @@ -198,7 +210,8 @@ public partial class TestAzStreamAnalyticsFunction_TestExpanded : global::System [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -207,12 +220,12 @@ public partial class TestAzStreamAnalyticsFunction_TestExpanded : global::System /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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); + 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) @@ -324,11 +337,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -340,10 +378,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -411,7 +465,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -429,7 +483,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name,body=_functionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -449,7 +503,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzStreamAnalyticsFunction_TestExpanded() { @@ -473,12 +527,12 @@ public TestAzStreamAnalyticsFunction_TestExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -490,8 +544,9 @@ public TestAzStreamAnalyticsFunction_TestExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaIdentity.cs index 80518b6c1e21..0d684f83167f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -17,12 +19,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsFunction_TestViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test", ApiVersion = "2017-04-01-preview")] public partial class TestAzStreamAnalyticsFunction_TestViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,6 +41,9 @@ public partial class TestAzStreamAnalyticsFunction_TestViaIdentity : global::Sys /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] @@ -48,6 +54,9 @@ public partial class TestAzStreamAnalyticsFunction_TestViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -61,8 +70,11 @@ public partial class TestAzStreamAnalyticsFunction_TestViaIdentity : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction _function; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _function; /// /// A function object, containing all information associated with the named function. All functions are contained under a @@ -74,8 +86,9 @@ public partial class TestAzStreamAnalyticsFunction_TestViaIdentity : global::Sys ReadOnly = false, Description = @"A function object, containing all information associated with the named function. All functions are contained under a streaming job.", SerializedName = @"function", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction Function { get => this._function; set => this._function = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction Function { get => this._function; set => this._function = value; } /// 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")] @@ -119,7 +132,7 @@ public partial class TestAzStreamAnalyticsFunction_TestViaIdentity : global::Sys /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -142,12 +155,12 @@ public partial class TestAzStreamAnalyticsFunction_TestViaIdentity : global::Sys /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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); + 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) @@ -255,11 +268,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -271,10 +309,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -342,7 +396,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -384,7 +438,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Function}) + 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 } }); @@ -404,7 +458,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzStreamAnalyticsFunction_TestViaIdentity() { @@ -428,12 +482,12 @@ public TestAzStreamAnalyticsFunction_TestViaIdentity() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -445,8 +499,9 @@ public TestAzStreamAnalyticsFunction_TestViaIdentity() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaIdentityExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaIdentityExpanded.cs index 8f853b16cd79..978e76b8d526 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaIdentityExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaIdentityExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -17,12 +19,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsFunction_TestViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test", ApiVersion = "2017-04-01-preview")] public partial class TestAzStreamAnalyticsFunction_TestViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,11 +41,14 @@ public partial class TestAzStreamAnalyticsFunction_TestViaIdentityExpanded : glo /// 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 function object, containing all information associated with the named function. All functions are contained under a /// streaming job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction _functionBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Function(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _functionBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -54,6 +60,9 @@ public partial class TestAzStreamAnalyticsFunction_TestViaIdentityExpanded : glo [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -67,6 +76,9 @@ public partial class TestAzStreamAnalyticsFunction_TestViaIdentityExpanded : glo [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] @@ -75,8 +87,8 @@ public partial class TestAzStreamAnalyticsFunction_TestViaIdentityExpanded : glo ReadOnly = false, Description = @".", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration FunctionConfigurationProperty { get => _functionBody.ConfigurationProperty ?? null /* object */; set => _functionBody.ConfigurationProperty = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration FunctionConfigurationProperty { get => _functionBody.ConfigurationProperty ?? null /* object */; set => _functionBody.ConfigurationProperty = value; } /// 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")] @@ -120,7 +132,7 @@ public partial class TestAzStreamAnalyticsFunction_TestViaIdentityExpanded : glo /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } /// Indicates the type of function. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the type of function.")] @@ -154,12 +166,12 @@ public partial class TestAzStreamAnalyticsFunction_TestViaIdentityExpanded : glo /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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); + 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) @@ -267,11 +279,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -283,10 +320,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -354,7 +407,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -396,7 +449,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_functionBody}) + 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 } }); @@ -416,7 +469,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzStreamAnalyticsFunction_TestViaIdentityExpanded() { @@ -440,12 +493,12 @@ public TestAzStreamAnalyticsFunction_TestViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -457,8 +510,9 @@ public TestAzStreamAnalyticsFunction_TestViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..15d6b58ee10a --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjob.cs @@ -0,0 +1,523 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Tests if the information provided for a function is valid. This can range from testing the connection to the underlying + /// web service behind the function or making sure the function code provided is syntactically correct. + /// + /// + /// [OpenAPI] Test=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsFunction_TestViaIdentityStreamingjob", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test", ApiVersion = "2017-04-01-preview")] + public partial class TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _function; + + /// + /// A function object, containing all information associated with the named function. All functions are contained under a + /// streaming job. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "A function object, containing all information associated with the named function. All functions are contained under a streaming job.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A function object, containing all information associated with the named function. All functions are contained under a streaming job.", + SerializedName = @"function", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction Function { get => this._function; set => this._function = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FunctionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjob + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjob Clone() + { + var clone = new TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjob(); + 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; + clone.Function = this.Function; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsTest' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/functions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.FunctionsTestViaIdentity(StreamingjobInputObject.Id, Function, onOk, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.FunctionsTest(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, Function, onOk, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjob() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjobExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjobExpanded.cs new file mode 100644 index 000000000000..c5f9e5ca6fbb --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjobExpanded.cs @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Tests if the information provided for a function is valid. This can range from testing the connection to the underlying + /// web service behind the function or making sure the function code provided is syntactically correct. + /// + /// + /// [OpenAPI] Test=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsFunction_TestViaIdentityStreamingjobExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test", ApiVersion = "2017-04-01-preview")] + public partial class TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjobExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 function object, containing all information associated with the named function. All functions are contained under a + /// streaming job. + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _functionBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// . + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @".", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration FunctionConfigurationProperty { get => _functionBody.ConfigurationProperty ?? null /* object */; set => _functionBody.ConfigurationProperty = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FunctionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + + /// Indicates the type of function. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the type of function.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the type of function.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + public string PropertiesType { get => _functionBody.PropertiesType ?? null; set => _functionBody.PropertiesType = 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjobExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjobExpanded Clone() + { + var clone = new TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjobExpanded(); + 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._functionBody = this._functionBody; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsTest' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/functions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.FunctionsTestViaIdentity(StreamingjobInputObject.Id, _functionBody, onOk, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.FunctionsTest(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, _functionBody, onOk, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public TestAzStreamAnalyticsFunction_TestViaIdentityStreamingjobExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaJsonFilePath.cs new file mode 100644 index 000000000000..33082fd999ef --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaJsonFilePath.cs @@ -0,0 +1,541 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Tests if the information provided for a function is valid. This can range from testing the connection to the underlying + /// web service behind the function or making sure the function code provided is syntactically correct. + /// + /// + /// [OpenAPI] Test=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsFunction_TestViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class TestAzStreamAnalyticsFunction_TestViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = value; } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Test operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Test operation")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Test 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FunctionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of TestAzStreamAnalyticsFunction_TestViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.TestAzStreamAnalyticsFunction_TestViaJsonFilePath Clone() + { + var clone = new TestAzStreamAnalyticsFunction_TestViaJsonFilePath(); + 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.JobName = this.JobName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsTest' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FunctionsTestViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public TestAzStreamAnalyticsFunction_TestViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaJsonString.cs new file mode 100644 index 000000000000..e6c2936b1114 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsFunction_TestViaJsonString.cs @@ -0,0 +1,539 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Tests if the information provided for a function is valid. This can range from testing the connection to the underlying + /// web service behind the function or making sure the function code provided is syntactically correct. + /// + /// + /// [OpenAPI] Test=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsFunction_TestViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests if the information provided for a function is valid. This can range from testing the connection to the underlying web service behind the function or making sure the function code provided is syntactically correct.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}/test", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class TestAzStreamAnalyticsFunction_TestViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = value; } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Test operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Test operation")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Test 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FunctionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of TestAzStreamAnalyticsFunction_TestViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.TestAzStreamAnalyticsFunction_TestViaJsonString Clone() + { + var clone = new TestAzStreamAnalyticsFunction_TestViaJsonString(); + 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.JobName = this.JobName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsTest' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FunctionsTestViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public TestAzStreamAnalyticsFunction_TestViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_Test.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_Test.cs index 504c5dd9ba8d..369007ee18c6 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_Test.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_Test.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsInput_Test", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test", ApiVersion = "2017-04-01-preview")] public partial class TestAzStreamAnalyticsInput_Test : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,6 +40,9 @@ public partial class TestAzStreamAnalyticsInput_Test : global::System.Management /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] @@ -47,6 +53,9 @@ public partial class TestAzStreamAnalyticsInput_Test : global::System.Management [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -60,6 +69,9 @@ public partial class TestAzStreamAnalyticsInput_Test : global::System.Management [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -73,7 +85,7 @@ public partial class TestAzStreamAnalyticsInput_Test : global::System.Management public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput _input; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _input; /// /// An input object, containing all information associated with the named input. All inputs are contained under a streaming @@ -85,8 +97,9 @@ public partial class TestAzStreamAnalyticsInput_Test : global::System.Management ReadOnly = false, Description = @"An input object, containing all information associated with the named input. All inputs are contained under a streaming job.", SerializedName = @"input", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput Input { get => this._input; set => this._input = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput Input { get => this._input; set => this._input = value; } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -139,7 +152,7 @@ public partial class TestAzStreamAnalyticsInput_Test : global::System.Management /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -185,7 +198,8 @@ public partial class TestAzStreamAnalyticsInput_Test : global::System.Management [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -194,12 +208,12 @@ public partial class TestAzStreamAnalyticsInput_Test : global::System.Management /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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); + 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) @@ -311,11 +325,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -327,10 +366,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -398,7 +453,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -416,7 +471,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name,body=Input}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -436,7 +491,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzStreamAnalyticsInput_Test() { @@ -460,12 +515,12 @@ public TestAzStreamAnalyticsInput_Test() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -477,8 +532,9 @@ public TestAzStreamAnalyticsInput_Test() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestExpanded.cs index a50b2679280e..940c855a6c37 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsInput_TestExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test", ApiVersion = "2017-04-01-preview")] public partial class TestAzStreamAnalyticsInput_TestExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,14 @@ public partial class TestAzStreamAnalyticsInput_TestExpanded : global::System.Ma /// 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(); + /// /// An input object, containing all information associated with the named input. All inputs are contained under a streaming /// job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput _inputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Input(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _inputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -53,6 +59,9 @@ public partial class TestAzStreamAnalyticsInput_TestExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -66,6 +75,9 @@ public partial class TestAzStreamAnalyticsInput_TestExpanded : global::System.Ma [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -129,7 +141,7 @@ public partial class TestAzStreamAnalyticsInput_TestExpanded : global::System.Ma /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } /// /// The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. @@ -141,8 +153,8 @@ public partial class TestAzStreamAnalyticsInput_TestExpanded : global::System.Ma ReadOnly = false, Description = @"The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties Property { get => _inputBody.Property ?? null /* object */; set => _inputBody.Property = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties Property { get => _inputBody.Property ?? null /* object */; set => _inputBody.Property = 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")] @@ -188,7 +200,8 @@ public partial class TestAzStreamAnalyticsInput_TestExpanded : global::System.Ma [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -197,12 +210,12 @@ public partial class TestAzStreamAnalyticsInput_TestExpanded : global::System.Ma /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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); + 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) @@ -314,11 +327,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -330,10 +368,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -401,7 +455,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -419,7 +473,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name,body=_inputBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -439,7 +493,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzStreamAnalyticsInput_TestExpanded() { @@ -463,12 +517,12 @@ public TestAzStreamAnalyticsInput_TestExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -480,8 +534,9 @@ public TestAzStreamAnalyticsInput_TestExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaIdentity.cs index c3db8f367acc..b67d89fccff6 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsInput_TestViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test", ApiVersion = "2017-04-01-preview")] public partial class TestAzStreamAnalyticsInput_TestViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,6 +40,9 @@ public partial class TestAzStreamAnalyticsInput_TestViaIdentity : global::System /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] @@ -47,6 +53,9 @@ public partial class TestAzStreamAnalyticsInput_TestViaIdentity : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -60,6 +69,9 @@ public partial class TestAzStreamAnalyticsInput_TestViaIdentity : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -73,7 +85,7 @@ public partial class TestAzStreamAnalyticsInput_TestViaIdentity : global::System public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput _input; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _input; /// /// An input object, containing all information associated with the named input. All inputs are contained under a streaming @@ -85,8 +97,9 @@ public partial class TestAzStreamAnalyticsInput_TestViaIdentity : global::System ReadOnly = false, Description = @"An input object, containing all information associated with the named input. All inputs are contained under a streaming job.", SerializedName = @"input", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput Input { get => this._input; set => this._input = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput Input { get => this._input; set => this._input = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _inputObject; @@ -118,7 +131,7 @@ public partial class TestAzStreamAnalyticsInput_TestViaIdentity : global::System /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -141,12 +154,12 @@ public partial class TestAzStreamAnalyticsInput_TestViaIdentity : global::System /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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); + 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) @@ -254,11 +267,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -270,10 +308,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -341,7 +395,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -383,7 +437,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Input}) + 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 } }); @@ -403,7 +457,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzStreamAnalyticsInput_TestViaIdentity() { @@ -427,12 +481,12 @@ public TestAzStreamAnalyticsInput_TestViaIdentity() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -444,8 +498,9 @@ public TestAzStreamAnalyticsInput_TestViaIdentity() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaIdentityExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaIdentityExpanded.cs index ea0ba9cbf315..ad5017ea4a06 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaIdentityExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaIdentityExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsInput_TestViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test", ApiVersion = "2017-04-01-preview")] public partial class TestAzStreamAnalyticsInput_TestViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,14 @@ public partial class TestAzStreamAnalyticsInput_TestViaIdentityExpanded : global /// 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(); + /// /// An input object, containing all information associated with the named input. All inputs are contained under a streaming /// job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput _inputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Input(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _inputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -53,6 +59,9 @@ public partial class TestAzStreamAnalyticsInput_TestViaIdentityExpanded : global [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -66,6 +75,9 @@ public partial class TestAzStreamAnalyticsInput_TestViaIdentityExpanded : global [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -108,7 +120,7 @@ public partial class TestAzStreamAnalyticsInput_TestViaIdentityExpanded : global /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } /// /// The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. @@ -120,8 +132,8 @@ public partial class TestAzStreamAnalyticsInput_TestViaIdentityExpanded : global ReadOnly = false, Description = @"The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties Property { get => _inputBody.Property ?? null /* object */; set => _inputBody.Property = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties Property { get => _inputBody.Property ?? null /* object */; set => _inputBody.Property = 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")] @@ -144,12 +156,12 @@ public partial class TestAzStreamAnalyticsInput_TestViaIdentityExpanded : global /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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); + 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) @@ -257,11 +269,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -273,10 +310,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -344,7 +397,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -386,7 +439,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_inputBody}) + 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 } }); @@ -406,7 +459,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzStreamAnalyticsInput_TestViaIdentityExpanded() { @@ -430,12 +483,12 @@ public TestAzStreamAnalyticsInput_TestViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -447,8 +500,9 @@ public TestAzStreamAnalyticsInput_TestViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..bf3b38235cf0 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaIdentityStreamingjob.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. + /// + /// + /// [OpenAPI] Test=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsInput_TestViaIdentityStreamingjob", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test", ApiVersion = "2017-04-01-preview")] + public partial class TestAzStreamAnalyticsInput_TestViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _input; + + /// + /// An input object, containing all information associated with the named input. All inputs are contained under a streaming + /// job. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "An input object, containing all information associated with the named input. All inputs are contained under a streaming job.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"An input object, containing all information associated with the named input. All inputs are contained under a streaming job.", + SerializedName = @"input", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput Input { get => this._input; set => this._input = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the input.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the input.", + SerializedName = @"inputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("InputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of TestAzStreamAnalyticsInput_TestViaIdentityStreamingjob + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.TestAzStreamAnalyticsInput_TestViaIdentityStreamingjob Clone() + { + var clone = new TestAzStreamAnalyticsInput_TestViaIdentityStreamingjob(); + 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; + clone.Input = this.Input; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'InputsTest' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/inputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.InputsTestViaIdentity(StreamingjobInputObject.Id, Input, onOk, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.InputsTest(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, Input, onOk, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public TestAzStreamAnalyticsInput_TestViaIdentityStreamingjob() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaIdentityStreamingjobExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaIdentityStreamingjobExpanded.cs new file mode 100644 index 000000000000..710c2449f9c1 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaIdentityStreamingjobExpanded.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. + /// + /// + /// [OpenAPI] Test=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsInput_TestViaIdentityStreamingjobExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test", ApiVersion = "2017-04-01-preview")] + public partial class TestAzStreamAnalyticsInput_TestViaIdentityStreamingjobExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + + /// + /// An input object, containing all information associated with the named input. All inputs are contained under a streaming + /// job. + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _inputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the input.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the input.", + SerializedName = @"inputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("InputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + + /// + /// The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties Property { get => _inputBody.Property ?? null /* object */; set => _inputBody.Property = 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of TestAzStreamAnalyticsInput_TestViaIdentityStreamingjobExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.TestAzStreamAnalyticsInput_TestViaIdentityStreamingjobExpanded Clone() + { + var clone = new TestAzStreamAnalyticsInput_TestViaIdentityStreamingjobExpanded(); + 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._inputBody = this._inputBody; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'InputsTest' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/inputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.InputsTestViaIdentity(StreamingjobInputObject.Id, _inputBody, onOk, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.InputsTest(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, _inputBody, onOk, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public TestAzStreamAnalyticsInput_TestViaIdentityStreamingjobExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaJsonFilePath.cs new file mode 100644 index 000000000000..01d4c0b00953 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaJsonFilePath.cs @@ -0,0 +1,540 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. + /// + /// + /// [OpenAPI] Test=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsInput_TestViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class TestAzStreamAnalyticsInput_TestViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = value; } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Test operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Test operation")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Test 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the input.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the input.", + SerializedName = @"inputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("InputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of TestAzStreamAnalyticsInput_TestViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.TestAzStreamAnalyticsInput_TestViaJsonFilePath Clone() + { + var clone = new TestAzStreamAnalyticsInput_TestViaJsonFilePath(); + 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.JobName = this.JobName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'InputsTest' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.InputsTestViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public TestAzStreamAnalyticsInput_TestViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaJsonString.cs new file mode 100644 index 000000000000..315e2222f398 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsInput_TestViaJsonString.cs @@ -0,0 +1,538 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. + /// + /// + /// [OpenAPI] Test=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsInput_TestViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}/test", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class TestAzStreamAnalyticsInput_TestViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = value; } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Test operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Test operation")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Test 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the input.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the input.", + SerializedName = @"inputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("InputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of TestAzStreamAnalyticsInput_TestViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.TestAzStreamAnalyticsInput_TestViaJsonString Clone() + { + var clone = new TestAzStreamAnalyticsInput_TestViaJsonString(); + 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.JobName = this.JobName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'InputsTest' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.InputsTestViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public TestAzStreamAnalyticsInput_TestViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_Test.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_Test.cs index 1f65952917d8..227ad9a9ab5f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_Test.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_Test.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsOutput_Test", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test", ApiVersion = "2017-04-01-preview")] public partial class TestAzStreamAnalyticsOutput_Test : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,6 +40,9 @@ public partial class TestAzStreamAnalyticsOutput_Test : global::System.Managemen /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] @@ -47,6 +53,9 @@ public partial class TestAzStreamAnalyticsOutput_Test : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -60,6 +69,9 @@ public partial class TestAzStreamAnalyticsOutput_Test : global::System.Managemen [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -121,7 +133,7 @@ public partial class TestAzStreamAnalyticsOutput_Test : global::System.Managemen public global::System.Management.Automation.SwitchParameter NoWait { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput _output; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _output; /// /// An output object, containing all information associated with the named output. All outputs are contained under a streaming @@ -133,13 +145,14 @@ public partial class TestAzStreamAnalyticsOutput_Test : global::System.Managemen ReadOnly = false, Description = @"An output object, containing all information associated with the named output. All outputs are contained under a streaming job.", SerializedName = @"output", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput Output { get => this._output; set => this._output = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput Output { get => this._output; set => this._output = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -185,7 +198,8 @@ public partial class TestAzStreamAnalyticsOutput_Test : global::System.Managemen [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -194,12 +208,12 @@ public partial class TestAzStreamAnalyticsOutput_Test : global::System.Managemen /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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); + 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) @@ -311,11 +325,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -327,10 +366,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -398,7 +453,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -416,7 +471,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name,body=Output}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -436,7 +491,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzStreamAnalyticsOutput_Test() { @@ -460,12 +515,12 @@ public TestAzStreamAnalyticsOutput_Test() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -477,8 +532,9 @@ public TestAzStreamAnalyticsOutput_Test() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestExpanded.cs index 79ed64789a12..04654d52a56a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsOutput_TestExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test", ApiVersion = "2017-04-01-preview")] public partial class TestAzStreamAnalyticsOutput_TestExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,14 @@ public partial class TestAzStreamAnalyticsOutput_TestExpanded : global::System.M /// 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(); + /// /// An output object, containing all information associated with the named output. All outputs are contained under a streaming /// job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput _outputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Output(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _outputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -53,6 +59,9 @@ public partial class TestAzStreamAnalyticsOutput_TestExpanded : global::System.M [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -66,8 +75,8 @@ public partial class TestAzStreamAnalyticsOutput_TestExpanded : global::System.M ReadOnly = false, Description = @"Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", SerializedName = @"datasource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource Datasource { get => _outputBody.Datasource ?? null /* object */; set => _outputBody.Datasource = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource Datasource { get => _outputBody.Datasource ?? null /* object */; set => _outputBody.Datasource = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -79,6 +88,9 @@ public partial class TestAzStreamAnalyticsOutput_TestExpanded : global::System.M [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -142,7 +154,7 @@ public partial class TestAzStreamAnalyticsOutput_TestExpanded : global::System.M /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -184,9 +196,9 @@ public partial class TestAzStreamAnalyticsOutput_TestExpanded : global::System.M ReadOnly = false, Description = @"Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType SerializationType { get => _outputBody.SerializationType ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType)""); set => _outputBody.SerializationType = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] + public string SerializationType { get => _outputBody.SerializationType ?? null; set => _outputBody.SerializationType = value; } /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] @@ -213,7 +225,8 @@ public partial class TestAzStreamAnalyticsOutput_TestExpanded : global::System.M [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -233,12 +246,12 @@ public partial class TestAzStreamAnalyticsOutput_TestExpanded : global::System.M /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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); + 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) @@ -350,11 +363,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -366,10 +404,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -437,7 +491,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -455,7 +509,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name,body=_outputBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -475,7 +529,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzStreamAnalyticsOutput_TestExpanded() { @@ -499,12 +553,12 @@ public TestAzStreamAnalyticsOutput_TestExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -516,8 +570,9 @@ public TestAzStreamAnalyticsOutput_TestExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaIdentity.cs index 8f8ef3fc8189..d1fa4c90da8a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaIdentity.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsOutput_TestViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test", ApiVersion = "2017-04-01-preview")] public partial class TestAzStreamAnalyticsOutput_TestViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,6 +40,9 @@ public partial class TestAzStreamAnalyticsOutput_TestViaIdentity : global::Syste /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] @@ -47,6 +53,9 @@ public partial class TestAzStreamAnalyticsOutput_TestViaIdentity : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -60,6 +69,9 @@ public partial class TestAzStreamAnalyticsOutput_TestViaIdentity : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -100,7 +112,7 @@ public partial class TestAzStreamAnalyticsOutput_TestViaIdentity : global::Syste public global::System.Management.Automation.SwitchParameter NoWait { get; set; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput _output; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _output; /// /// An output object, containing all information associated with the named output. All outputs are contained under a streaming @@ -112,13 +124,14 @@ public partial class TestAzStreamAnalyticsOutput_TestViaIdentity : global::Syste ReadOnly = false, Description = @"An output object, containing all information associated with the named output. All outputs are contained under a streaming job.", SerializedName = @"output", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput Output { get => this._output; set => this._output = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput Output { get => this._output; set => this._output = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -141,12 +154,12 @@ public partial class TestAzStreamAnalyticsOutput_TestViaIdentity : global::Syste /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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); + 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) @@ -254,11 +267,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -270,10 +308,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -341,7 +395,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -383,7 +437,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Output}) + 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 } }); @@ -403,7 +457,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzStreamAnalyticsOutput_TestViaIdentity() { @@ -427,12 +481,12 @@ public TestAzStreamAnalyticsOutput_TestViaIdentity() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -444,8 +498,9 @@ public TestAzStreamAnalyticsOutput_TestViaIdentity() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaIdentityExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaIdentityExpanded.cs index 7f4a9b317763..d1a10857cec6 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaIdentityExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaIdentityExpanded.cs @@ -6,6 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// @@ -16,12 +18,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsOutput_TestViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus))] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test", ApiVersion = "2017-04-01-preview")] public partial class TestAzStreamAnalyticsOutput_TestViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,11 +40,14 @@ public partial class TestAzStreamAnalyticsOutput_TestViaIdentityExpanded : globa /// 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(); + /// /// An output object, containing all information associated with the named output. All outputs are contained under a streaming /// job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput _outputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Output(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _outputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output(); /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] @@ -53,6 +59,9 @@ public partial class TestAzStreamAnalyticsOutput_TestViaIdentityExpanded : globa [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -66,8 +75,8 @@ public partial class TestAzStreamAnalyticsOutput_TestViaIdentityExpanded : globa ReadOnly = false, Description = @"Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", SerializedName = @"datasource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource Datasource { get => _outputBody.Datasource ?? null /* object */; set => _outputBody.Datasource = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource Datasource { get => _outputBody.Datasource ?? null /* object */; set => _outputBody.Datasource = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -79,6 +88,9 @@ public partial class TestAzStreamAnalyticsOutput_TestViaIdentityExpanded : globa [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -121,7 +133,7 @@ public partial class TestAzStreamAnalyticsOutput_TestViaIdentityExpanded : globa /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -149,9 +161,9 @@ public partial class TestAzStreamAnalyticsOutput_TestViaIdentityExpanded : globa ReadOnly = false, Description = @"Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType SerializationType { get => _outputBody.SerializationType ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType)""); set => _outputBody.SerializationType = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] + public string SerializationType { get => _outputBody.SerializationType ?? null; set => _outputBody.SerializationType = value; } /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] @@ -180,12 +192,12 @@ public partial class TestAzStreamAnalyticsOutput_TestViaIdentityExpanded : globa /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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); + 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) @@ -293,11 +305,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -309,10 +346,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -380,7 +433,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -422,7 +475,7 @@ protected override void ProcessRecord() } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_outputBody}) + 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 } }); @@ -442,7 +495,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public TestAzStreamAnalyticsOutput_TestViaIdentityExpanded() { @@ -466,12 +519,12 @@ public TestAzStreamAnalyticsOutput_TestViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -483,8 +536,9 @@ public TestAzStreamAnalyticsOutput_TestViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..6793227e9196 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjob.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. + /// + /// + /// [OpenAPI] Test=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsOutput_TestViaIdentityStreamingjob", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test", ApiVersion = "2017-04-01-preview")] + public partial class TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the output. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the output.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the output.", + SerializedName = @"outputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OutputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _output; + + /// + /// An output object, containing all information associated with the named output. All outputs are contained under a streaming + /// job. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "An output object, containing all information associated with the named output. All outputs are contained under a streaming job.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"An output object, containing all information associated with the named output. All outputs are contained under a streaming job.", + SerializedName = @"output", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput Output { get => this._output; set => this._output = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjob + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjob Clone() + { + var clone = new TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjob(); + 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; + clone.Output = this.Output; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OutputsTest' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/outputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.OutputsTestViaIdentity(StreamingjobInputObject.Id, Output, onOk, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.OutputsTest(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, Output, onOk, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjob() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjobExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjobExpanded.cs new file mode 100644 index 000000000000..6e3a73b8dbe2 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjobExpanded.cs @@ -0,0 +1,561 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. + /// + /// + /// [OpenAPI] Test=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsOutput_TestViaIdentityStreamingjobExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test", ApiVersion = "2017-04-01-preview")] + public partial class TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjobExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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(); + + /// + /// An output object, containing all information associated with the named output. All outputs are contained under a streaming + /// job. + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _outputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; + + /// + /// Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"datasource", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource Datasource { get => _outputBody.Datasource ?? null /* object */; set => _outputBody.Datasource = 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the output. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the output.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the output.", + SerializedName = @"outputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OutputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] + public string SerializationType { get => _outputBody.SerializationType ?? null; set => _outputBody.SerializationType = value; } + + /// . + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @".", + SerializedName = @"sizeWindow", + PossibleTypes = new [] { typeof(float) })] + public float SizeWindow { get => _outputBody.SizeWindow ?? default(float); set => _outputBody.SizeWindow = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// . + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @".", + SerializedName = @"timeWindow", + PossibleTypes = new [] { typeof(string) })] + public string TimeWindow { get => _outputBody.TimeWindow ?? null; set => _outputBody.TimeWindow = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjobExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjobExpanded Clone() + { + var clone = new TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjobExpanded(); + 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._outputBody = this._outputBody; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OutputsTest' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/outputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.OutputsTestViaIdentity(StreamingjobInputObject.Id, _outputBody, onOk, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.OutputsTest(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, _outputBody, onOk, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public TestAzStreamAnalyticsOutput_TestViaIdentityStreamingjobExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaJsonFilePath.cs new file mode 100644 index 000000000000..354e420501cf --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaJsonFilePath.cs @@ -0,0 +1,540 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. + /// + /// + /// [OpenAPI] Test=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsOutput_TestViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class TestAzStreamAnalyticsOutput_TestViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = value; } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Test operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Test operation")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Test 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the output. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the output.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the output.", + SerializedName = @"outputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OutputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of TestAzStreamAnalyticsOutput_TestViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.TestAzStreamAnalyticsOutput_TestViaJsonFilePath Clone() + { + var clone = new TestAzStreamAnalyticsOutput_TestViaJsonFilePath(); + 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.JobName = this.JobName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OutputsTest' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OutputsTestViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public TestAzStreamAnalyticsOutput_TestViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaJsonString.cs new file mode 100644 index 000000000000..6f5ecf8b7c74 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/TestAzStreamAnalyticsOutput_TestViaJsonString.cs @@ -0,0 +1,538 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. + /// + /// + /// [OpenAPI] Test=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsDiagnostic.Test, @"AzStreamAnalyticsOutput_TestViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}/test", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class TestAzStreamAnalyticsOutput_TestViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = value; } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Test operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Test operation")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Test 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the output. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the output.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the output.", + SerializedName = @"outputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OutputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of TestAzStreamAnalyticsOutput_TestViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.TestAzStreamAnalyticsOutput_TestViaJsonString Clone() + { + var clone = new TestAzStreamAnalyticsOutput_TestViaJsonString(); + 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.JobName = this.JobName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OutputsTest' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OutputsTestViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public TestAzStreamAnalyticsOutput_TestViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsCluster_UpdateExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsCluster_UpdateExpanded.cs index 67567967ec5a..426adfe4fc50 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsCluster_UpdateExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsCluster_UpdateExpanded.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without + /// update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without /// affecting the rest of the cluster definition. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsCluster_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without affecting the rest of the cluster definition.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without affecting the rest of the cluster definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}", ApiVersion = "2020-03-01-preview")] public partial class UpdateAzStreamAnalyticsCluster_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,7 +41,10 @@ public partial class UpdateAzStreamAnalyticsCluster_UpdateExpanded : global::Sys private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// A Stream Analytics Cluster object - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster _clusterBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.Cluster(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster _clusterBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Cluster(); + + /// 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")] @@ -50,6 +56,9 @@ public partial class UpdateAzStreamAnalyticsCluster_UpdateExpanded : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -63,6 +72,9 @@ public partial class UpdateAzStreamAnalyticsCluster_UpdateExpanded : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -95,18 +107,6 @@ public partial class UpdateAzStreamAnalyticsCluster_UpdateExpanded : global::Sys /// 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 = false, HelpMessage = "The geo-location where the resource lives")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ParameterBreakingChange("Location", "15.0.0", "3.0.0", "2025/11", ChangeDescription="The parameter Location will be removed.")] - public string Location { get => _clusterBody.Location ?? null; set => _clusterBody.Location = value; } - /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -141,7 +141,7 @@ public partial class UpdateAzStreamAnalyticsCluster_UpdateExpanded : global::Sys /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -197,9 +197,9 @@ public partial class UpdateAzStreamAnalyticsCluster_UpdateExpanded : global::Sys ReadOnly = false, Description = @"Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests.", SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName SkuName { get => _clusterBody.SkuName ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName)""); set => _clusterBody.SkuName = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Default")] + public string SkuName { get => _clusterBody.SkuName ?? null; set => _clusterBody.SkuName = value; } /// Backing field for property. private string _subscriptionId; @@ -215,7 +215,8 @@ public partial class UpdateAzStreamAnalyticsCluster_UpdateExpanded : global::Sys [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -228,32 +229,32 @@ public partial class UpdateAzStreamAnalyticsCluster_UpdateExpanded : global::Sys ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags Tag { get => _clusterBody.Tag ?? null /* object */; set => _clusterBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags Tag { get => _clusterBody.Tag ?? null /* object */; set => _clusterBody.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster /// 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); + 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) @@ -365,11 +366,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -381,10 +407,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -452,7 +494,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -465,12 +507,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.ClustersUpdate(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _clusterBody, onOk, onDefault, this, Pipeline); + await this.Client.ClustersUpdate(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _clusterBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,Name=Name,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,body=_clusterBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -490,7 +532,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsCluster_UpdateExpanded() { @@ -516,12 +558,12 @@ public UpdateAzStreamAnalyticsCluster_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -538,15 +580,15 @@ public UpdateAzStreamAnalyticsCluster_UpdateExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, body=_clusterBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, body=_clusterBody }) + 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 } }); @@ -556,12 +598,12 @@ public UpdateAzStreamAnalyticsCluster_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -573,8 +615,9 @@ public UpdateAzStreamAnalyticsCluster_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded.cs index 75c1348980d5..839aa108c045 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without + /// update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without /// affecting the rest of the cluster definition. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsCluster_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without affecting the rest of the cluster definition.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without affecting the rest of the cluster definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}", ApiVersion = "2020-03-01-preview")] public partial class UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,7 +41,10 @@ public partial class UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded : private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); /// A Stream Analytics Cluster object - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster _clusterBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.Cluster(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster _clusterBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Cluster(); + + /// 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")] @@ -50,6 +56,9 @@ public partial class UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded : [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -63,6 +72,9 @@ public partial class UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded : [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -103,18 +115,6 @@ public partial class UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded : /// 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 = false, HelpMessage = "The geo-location where the resource lives")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.ParameterBreakingChange("Location", "15.0.0", "3.0.0", "2025/11", ChangeDescription="The parameter Location will be removed.")] - public string Location { get => _clusterBody.Location ?? null; set => _clusterBody.Location = value; } - /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -134,7 +134,7 @@ public partial class UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded : /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -176,9 +176,9 @@ public partial class UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded : ReadOnly = false, Description = @"Specifies the SKU name of the cluster. Required on PUT (CreateOrUpdate) requests.", SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName SkuName { get => _clusterBody.SkuName ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ClusterSkuName)""); set => _clusterBody.SkuName = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Default")] + public string SkuName { get => _clusterBody.SkuName ?? null; set => _clusterBody.SkuName = value; } /// Resource tags. [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -189,32 +189,32 @@ public partial class UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded : ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags Tag { get => _clusterBody.Tag ?? null /* object */; set => _clusterBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags Tag { get => _clusterBody.Tag ?? null /* object */; set => _clusterBody.Tag = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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); + 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster /// 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); + 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) @@ -325,11 +325,36 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.DelayBeforePolling: { + var data = messageData(); if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) { - var data = messageData(); if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) { var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); @@ -341,10 +366,26 @@ protected override void EndProcessing() 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -412,7 +453,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -427,7 +468,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.ClustersUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _clusterBody, onOk, onDefault, this, Pipeline); + await this.Client.ClustersUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _clusterBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } else { @@ -444,13 +485,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.ClustersUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _clusterBody, onOk, onDefault, this, Pipeline); + await this.Client.ClustersUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ClusterName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _clusterBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,body=_clusterBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -470,7 +511,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded() { @@ -496,12 +537,12 @@ public UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.IError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError /// 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) + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -518,15 +559,15 @@ public UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded() if ((null == code || null == message)) { // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, body=_clusterBody }) + var ex = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, body=_clusterBody }) + 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 } }); @@ -536,12 +577,12 @@ public UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -553,8 +594,9 @@ public UpdateAzStreamAnalyticsCluster_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20200301Preview.ICluster - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + var result = (await response); + WriteObject(result, false); } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsCluster_UpdateViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsCluster_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..b070b3e9394c --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsCluster_UpdateViaJsonFilePath.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without + /// affecting the rest of the cluster definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsCluster_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without affecting the rest of the cluster definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}", ApiVersion = "2020-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class UpdateAzStreamAnalyticsCluster_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value + /// to prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ClusterName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzStreamAnalyticsCluster_UpdateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.UpdateAzStreamAnalyticsCluster_UpdateViaJsonFilePath Clone() + { + var clone = new UpdateAzStreamAnalyticsCluster_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.Name = this.Name; + clone.IfMatch = this.IfMatch; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ClustersUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ClustersUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,Name=Name,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStreamAnalyticsCluster_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsCluster_UpdateViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsCluster_UpdateViaJsonString.cs new file mode 100644 index 000000000000..b021d003082e --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsCluster_UpdateViaJsonString.cs @@ -0,0 +1,595 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without + /// affecting the rest of the cluster definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsCluster_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing cluster. This can be used to partially update (ie. update one or two properties) a cluster without affecting the rest of the cluster definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/clusters/{clusterName}", ApiVersion = "2020-03-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class UpdateAzStreamAnalyticsCluster_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value + /// to prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the resource. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the cluster. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the cluster.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the cluster.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ClusterName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzStreamAnalyticsCluster_UpdateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets.UpdateAzStreamAnalyticsCluster_UpdateViaJsonString Clone() + { + var clone = new UpdateAzStreamAnalyticsCluster_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.Name = this.Name; + clone.IfMatch = this.IfMatch; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ClustersUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ClustersUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,Name=Name,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStreamAnalyticsCluster_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IError + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ICluster + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_Update.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_Update.cs index 655b1a56cbdd..ca9b60f1c7a9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_Update.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_Update.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or - /// two properties) a function without affecting the rest the job or function definition. + /// update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) a function without affecting the rest the job or function definition. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsFunction_Update", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsFunction_Update : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,11 +41,26 @@ public partial class UpdateAzStreamAnalyticsFunction_Update : global::System.Man /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -56,8 +74,11 @@ public partial class UpdateAzStreamAnalyticsFunction_Update : global::System.Man [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction _function; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _function; /// /// A function object, containing all information associated with the named function. All functions are contained under a @@ -69,8 +90,9 @@ public partial class UpdateAzStreamAnalyticsFunction_Update : global::System.Man ReadOnly = false, Description = @"A function object, containing all information associated with the named function. All functions are contained under a streaming job.", SerializedName = @"function", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction Function { get => this._function; set => this._function = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction Function { get => this._function; set => this._function = value; } /// 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")] @@ -144,7 +166,7 @@ public partial class UpdateAzStreamAnalyticsFunction_Update : global::System.Man /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -190,7 +212,8 @@ public partial class UpdateAzStreamAnalyticsFunction_Update : global::System.Man [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -199,12 +222,12 @@ public partial class UpdateAzStreamAnalyticsFunction_Update : global::System.Man /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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); + 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) @@ -227,6 +250,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -291,8 +319,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -348,7 +401,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -361,12 +414,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.FunctionsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, SubscriptionId, ResourceGroupName, JobName, Name, Function, onOk, this, Pipeline); + await this.Client.FunctionsUpdate(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Function, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name,body=Function}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -386,7 +439,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsFunction_Update() { @@ -410,12 +463,12 @@ public UpdateAzStreamAnalyticsFunction_Update() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,8 +480,26 @@ public UpdateAzStreamAnalyticsFunction_Update() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateExpanded.cs index 227e65e31e49..fb905f87a305 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateExpanded.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or - /// two properties) a function without affecting the rest the job or function definition. + /// update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) a function without affecting the rest the job or function definition. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsFunction_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsFunction_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,17 +41,32 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateExpanded : global::Sy /// 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 function object, containing all information associated with the named function. All functions are contained under a /// streaming job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction _functionBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Function(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _functionBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -62,6 +80,9 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateExpanded : global::Sy [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] @@ -70,8 +91,8 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateExpanded : global::Sy ReadOnly = false, Description = @".", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration FunctionConfigurationProperty { get => _functionBody.ConfigurationProperty ?? null /* object */; set => _functionBody.ConfigurationProperty = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration FunctionConfigurationProperty { get => _functionBody.ConfigurationProperty ?? null /* object */; set => _functionBody.ConfigurationProperty = value; } /// 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")] @@ -145,7 +166,7 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateExpanded : global::Sy /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } /// Indicates the type of function. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the type of function.")] @@ -202,7 +223,8 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateExpanded : global::Sy [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -211,12 +233,12 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateExpanded : global::Sy /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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); + 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) @@ -239,6 +261,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -303,8 +330,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -360,7 +412,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -373,12 +425,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.FunctionsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, SubscriptionId, ResourceGroupName, JobName, Name, _functionBody, onOk, this, Pipeline); + await this.Client.FunctionsUpdate(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _functionBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name,body=_functionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -398,7 +450,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsFunction_UpdateExpanded() { @@ -422,12 +474,12 @@ public UpdateAzStreamAnalyticsFunction_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -439,8 +491,26 @@ public UpdateAzStreamAnalyticsFunction_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaIdentity.cs index a6f575054ef9..36e52e42d378 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaIdentity.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or - /// two properties) a function without affecting the rest the job or function definition. + /// update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) a function without affecting the rest the job or function definition. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsFunction_UpdateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsFunction_UpdateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,11 +41,26 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateViaIdentity : global: /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -56,8 +74,11 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateViaIdentity : global: [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction _function; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _function; /// /// A function object, containing all information associated with the named function. All functions are contained under a @@ -69,8 +90,9 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateViaIdentity : global: ReadOnly = false, Description = @"A function object, containing all information associated with the named function. All functions are contained under a streaming job.", SerializedName = @"function", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction Function { get => this._function; set => this._function = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction Function { get => this._function; set => this._function = value; } /// 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")] @@ -123,7 +145,7 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateViaIdentity : global: /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -146,12 +168,12 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateViaIdentity : global: /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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); + 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) @@ -174,6 +196,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -238,8 +265,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -295,7 +347,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -310,7 +362,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.FunctionsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Function, onOk, this, Pipeline); + await this.Client.FunctionsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Function, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } else { @@ -331,13 +383,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FunctionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.FunctionsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.FunctionName ?? null, Function, onOk, this, Pipeline); + await this.Client.FunctionsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.FunctionName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Function, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,body=Function}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -357,7 +409,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsFunction_UpdateViaIdentity() { @@ -381,12 +433,12 @@ public UpdateAzStreamAnalyticsFunction_UpdateViaIdentity() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -398,8 +450,26 @@ public UpdateAzStreamAnalyticsFunction_UpdateViaIdentity() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaIdentityExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaIdentityExpanded.cs index d9a498d56a45..fe5cf38ba523 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaIdentityExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaIdentityExpanded.cs @@ -6,23 +6,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or - /// two properties) a function without affecting the rest the job or function definition. + /// update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) a function without affecting the rest the job or function definition. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsFunction_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsFunction_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,17 +41,32 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateViaIdentityExpanded : /// 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 function object, containing all information associated with the named function. All functions are contained under a /// streaming job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction _functionBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Function(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _functionBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -62,6 +80,9 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateViaIdentityExpanded : [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] @@ -70,8 +91,8 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateViaIdentityExpanded : ReadOnly = false, Description = @".", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration FunctionConfigurationProperty { get => _functionBody.ConfigurationProperty ?? null /* object */; set => _functionBody.ConfigurationProperty = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration FunctionConfigurationProperty { get => _functionBody.ConfigurationProperty ?? null /* object */; set => _functionBody.ConfigurationProperty = value; } /// 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")] @@ -124,7 +145,7 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateViaIdentityExpanded : /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } /// Indicates the type of function. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the type of function.")] @@ -158,12 +179,12 @@ public partial class UpdateAzStreamAnalyticsFunction_UpdateViaIdentityExpanded : /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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); + 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) @@ -186,6 +207,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -250,8 +276,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -307,7 +358,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -322,7 +373,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.FunctionsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _functionBody, onOk, this, Pipeline); + await this.Client.FunctionsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _functionBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } else { @@ -343,13 +394,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FunctionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.FunctionsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.FunctionName ?? null, _functionBody, onOk, this, Pipeline); + await this.Client.FunctionsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.FunctionName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _functionBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,body=_functionBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -369,7 +420,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsFunction_UpdateViaIdentityExpanded() { @@ -393,12 +444,12 @@ public UpdateAzStreamAnalyticsFunction_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -410,8 +461,26 @@ public UpdateAzStreamAnalyticsFunction_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..c5c774c3ccf1 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaIdentityStreamingjob.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) a function without affecting the rest the job or function definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsFunction_UpdateViaIdentityStreamingjob", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] + public partial class UpdateAzStreamAnalyticsFunction_UpdateViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _function; + + /// + /// A function object, containing all information associated with the named function. All functions are contained under a + /// streaming job. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "A function object, containing all information associated with the named function. All functions are contained under a streaming job.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A function object, containing all information associated with the named function. All functions are contained under a streaming job.", + SerializedName = @"function", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction Function { get => this._function; set => this._function = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to + /// prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FunctionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/functions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.FunctionsUpdateViaIdentity(StreamingjobInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Function, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.FunctionsUpdate(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Function, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public UpdateAzStreamAnalyticsFunction_UpdateViaIdentityStreamingjob() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaIdentityStreamingjobExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaIdentityStreamingjobExpanded.cs new file mode 100644 index 000000000000..35bdd760c9f4 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaIdentityStreamingjobExpanded.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) a function without affecting the rest the job or function definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsFunction_UpdateViaIdentityStreamingjobExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] + public partial class UpdateAzStreamAnalyticsFunction_UpdateViaIdentityStreamingjobExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 function object, containing all information associated with the named function. All functions are contained under a + /// streaming job. + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction _functionBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Function(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// . + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @".", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration FunctionConfigurationProperty { get => _functionBody.ConfigurationProperty ?? null /* object */; set => _functionBody.ConfigurationProperty = value; } + + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to + /// prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FunctionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + + /// Indicates the type of function. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the type of function.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the type of function.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + public string PropertiesType { get => _functionBody.PropertiesType ?? null; set => _functionBody.PropertiesType = 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/functions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.FunctionsUpdateViaIdentity(StreamingjobInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _functionBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.FunctionsUpdate(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _functionBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public UpdateAzStreamAnalyticsFunction_UpdateViaIdentityStreamingjobExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..db718bb0cc23 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaJsonFilePath.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) a function without affecting the rest the job or function definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsFunction_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class UpdateAzStreamAnalyticsFunction_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to + /// prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FunctionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FunctionsUpdateViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStreamAnalyticsFunction_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaJsonString.cs new file mode 100644 index 000000000000..10f2f14f43df --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsFunction_UpdateViaJsonString.cs @@ -0,0 +1,503 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) a function without affecting the rest the job or function definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsFunction_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/functions/{functionName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class UpdateAzStreamAnalyticsFunction_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to + /// prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the function. Omit this value to always overwrite the current function. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the function. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the function.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the function.", + SerializedName = @"functionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FunctionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FunctionsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FunctionsUpdateViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStreamAnalyticsFunction_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_Update.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_Update.cs index 0266e19c653d..1c776e22c02d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_Update.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_Update.cs @@ -6,10 +6,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two + /// update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two /// properties) an input without affecting the rest the job or input definition. /// /// @@ -17,12 +19,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsInput_Update", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsInput_Update : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,11 +41,26 @@ public partial class UpdateAzStreamAnalyticsInput_Update : global::System.Manage /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class UpdateAzStreamAnalyticsInput_Update : global::System.Manage [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -86,7 +107,7 @@ public partial class UpdateAzStreamAnalyticsInput_Update : global::System.Manage public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput _input; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _input; /// /// An input object, containing all information associated with the named input. All inputs are contained under a streaming @@ -98,8 +119,9 @@ public partial class UpdateAzStreamAnalyticsInput_Update : global::System.Manage ReadOnly = false, Description = @"An input object, containing all information associated with the named input. All inputs are contained under a streaming job.", SerializedName = @"input", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput Input { get => this._input; set => this._input = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput Input { get => this._input; set => this._input = value; } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -144,7 +166,7 @@ public partial class UpdateAzStreamAnalyticsInput_Update : global::System.Manage /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -190,7 +212,8 @@ public partial class UpdateAzStreamAnalyticsInput_Update : global::System.Manage [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -199,12 +222,12 @@ public partial class UpdateAzStreamAnalyticsInput_Update : global::System.Manage /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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); + 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) @@ -227,6 +250,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -291,8 +319,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -348,7 +401,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -361,12 +414,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.InputsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, SubscriptionId, ResourceGroupName, JobName, Name, Input, onOk, this, Pipeline); + await this.Client.InputsUpdate(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Input, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name,body=Input}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -386,7 +439,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsInput_Update() { @@ -410,12 +463,12 @@ public UpdateAzStreamAnalyticsInput_Update() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -427,8 +480,26 @@ public UpdateAzStreamAnalyticsInput_Update() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateExpanded.cs index 7df76c9cfe75..6995d13d75d9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateExpanded.cs @@ -6,10 +6,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two + /// update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two /// properties) an input without affecting the rest the job or input definition. /// /// @@ -17,12 +19,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsInput_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsInput_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,17 +41,32 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateExpanded : global::Syste /// 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; + /// /// An input object, containing all information associated with the named input. All inputs are contained under a streaming /// job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput _inputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Input(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _inputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -62,6 +80,9 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateExpanded : global::Syste [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -134,7 +155,7 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateExpanded : global::Syste /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } /// /// The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. @@ -146,8 +167,8 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateExpanded : global::Syste ReadOnly = false, Description = @"The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties Property { get => _inputBody.Property ?? null /* object */; set => _inputBody.Property = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties Property { get => _inputBody.Property ?? null /* object */; set => _inputBody.Property = 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")] @@ -193,7 +214,8 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateExpanded : global::Syste [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -202,12 +224,12 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateExpanded : global::Syste /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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); + 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) @@ -230,6 +252,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -294,8 +321,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -351,7 +403,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -364,12 +416,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.InputsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, SubscriptionId, ResourceGroupName, JobName, Name, _inputBody, onOk, this, Pipeline); + await this.Client.InputsUpdate(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _inputBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name,body=_inputBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -389,7 +441,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsInput_UpdateExpanded() { @@ -413,12 +465,12 @@ public UpdateAzStreamAnalyticsInput_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -430,8 +482,26 @@ public UpdateAzStreamAnalyticsInput_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaIdentity.cs index 78b45c35e0ea..450ed966f330 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaIdentity.cs @@ -6,10 +6,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two + /// update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two /// properties) an input without affecting the rest the job or input definition. /// /// @@ -17,12 +19,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsInput_UpdateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsInput_UpdateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,11 +41,26 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateViaIdentity : global::Sy /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -56,6 +74,9 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateViaIdentity : global::Sy [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -86,7 +107,7 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateViaIdentity : global::Sy public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput _input; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _input; /// /// An input object, containing all information associated with the named input. All inputs are contained under a streaming @@ -98,8 +119,9 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateViaIdentity : global::Sy ReadOnly = false, Description = @"An input object, containing all information associated with the named input. All inputs are contained under a streaming job.", SerializedName = @"input", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput Input { get => this._input; set => this._input = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput Input { get => this._input; set => this._input = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _inputObject; @@ -123,7 +145,7 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateViaIdentity : global::Sy /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -146,12 +168,12 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateViaIdentity : global::Sy /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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); + 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) @@ -174,6 +196,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -238,8 +265,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -295,7 +347,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -310,7 +362,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.InputsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Input, onOk, this, Pipeline); + await this.Client.InputsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Input, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } else { @@ -331,13 +383,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.InputName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.InputsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.InputName ?? null, Input, onOk, this, Pipeline); + await this.Client.InputsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.InputName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Input, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,body=Input}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -357,7 +409,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsInput_UpdateViaIdentity() { @@ -381,12 +433,12 @@ public UpdateAzStreamAnalyticsInput_UpdateViaIdentity() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -398,8 +450,26 @@ public UpdateAzStreamAnalyticsInput_UpdateViaIdentity() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaIdentityExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaIdentityExpanded.cs index a4be1d010372..1a0a37e3966f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaIdentityExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaIdentityExpanded.cs @@ -6,10 +6,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two + /// update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two /// properties) an input without affecting the rest the job or input definition. /// /// @@ -17,12 +19,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsInput_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsInput_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,17 +41,32 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateViaIdentityExpanded : gl /// 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; + /// /// An input object, containing all information associated with the named input. All inputs are contained under a streaming /// job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput _inputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Input(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _inputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -62,6 +80,9 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateViaIdentityExpanded : gl [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -113,7 +134,7 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateViaIdentityExpanded : gl /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } /// /// The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. @@ -125,8 +146,8 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateViaIdentityExpanded : gl ReadOnly = false, Description = @"The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.", SerializedName = @"properties", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties Property { get => _inputBody.Property ?? null /* object */; set => _inputBody.Property = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties Property { get => _inputBody.Property ?? null /* object */; set => _inputBody.Property = 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")] @@ -149,12 +170,12 @@ public partial class UpdateAzStreamAnalyticsInput_UpdateViaIdentityExpanded : gl /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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); + 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) @@ -177,6 +198,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -241,8 +267,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -298,7 +349,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -313,7 +364,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.InputsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _inputBody, onOk, this, Pipeline); + await this.Client.InputsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _inputBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } else { @@ -334,13 +385,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.InputName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.InputsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.InputName ?? null, _inputBody, onOk, this, Pipeline); + await this.Client.InputsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.InputName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _inputBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,body=_inputBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -360,7 +411,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsInput_UpdateViaIdentityExpanded() { @@ -384,12 +435,12 @@ public UpdateAzStreamAnalyticsInput_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -401,8 +452,26 @@ public UpdateAzStreamAnalyticsInput_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..5fb1f5ce7d9d --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaIdentityStreamingjob.cs @@ -0,0 +1,488 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an input without affecting the rest the job or input definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsInput_UpdateViaIdentityStreamingjob", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] + public partial class UpdateAzStreamAnalyticsInput_UpdateViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _input; + + /// + /// An input object, containing all information associated with the named input. All inputs are contained under a streaming + /// job. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "An input object, containing all information associated with the named input. All inputs are contained under a streaming job.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"An input object, containing all information associated with the named input. All inputs are contained under a streaming job.", + SerializedName = @"input", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput Input { get => this._input; set => this._input = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the input.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the input.", + SerializedName = @"inputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("InputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'InputsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/inputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.InputsUpdateViaIdentity(StreamingjobInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Input, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.InputsUpdate(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Input, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStreamAnalyticsInput_UpdateViaIdentityStreamingjob() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaIdentityStreamingjobExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaIdentityStreamingjobExpanded.cs new file mode 100644 index 000000000000..bc355c9437da --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaIdentityStreamingjobExpanded.cs @@ -0,0 +1,491 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an input without affecting the rest the job or input definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsInput_UpdateViaIdentityStreamingjobExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] + public partial class UpdateAzStreamAnalyticsInput_UpdateViaIdentityStreamingjobExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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; + + /// + /// An input object, containing all information associated with the named input. All inputs are contained under a streaming + /// job. + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput _inputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Input(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the input.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the input.", + SerializedName = @"inputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("InputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + + /// + /// The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"properties", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties Property { get => _inputBody.Property ?? null /* object */; set => _inputBody.Property = 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'InputsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/inputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.InputsUpdateViaIdentity(StreamingjobInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _inputBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.InputsUpdate(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _inputBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public UpdateAzStreamAnalyticsInput_UpdateViaIdentityStreamingjobExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..11de2b09026c --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaJsonFilePath.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an input without affecting the rest the job or input definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsInput_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class UpdateAzStreamAnalyticsInput_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the input.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the input.", + SerializedName = @"inputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("InputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'InputsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.InputsUpdateViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStreamAnalyticsInput_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaJsonString.cs new file mode 100644 index 000000000000..eea8e37de262 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsInput_UpdateViaJsonString.cs @@ -0,0 +1,503 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an input without affecting the rest the job or input definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsInput_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class UpdateAzStreamAnalyticsInput_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the input. Omit this value to always overwrite the current input. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the input. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the input.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the input.", + SerializedName = @"inputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("InputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'InputsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.InputsUpdateViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStreamAnalyticsInput_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_Update.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_Update.cs deleted file mode 100644 index 4f656cd9b3a7..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_Update.cs +++ /dev/null @@ -1,419 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - using System; - - /// - /// Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming - /// job without affecting the rest the job definition. - /// - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}" - /// - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsJob_Update", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] - public partial class UpdateAzStreamAnalyticsJob_Update : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener - { - /// 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(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private string _ifMatch; - - /// - /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag - /// value to prevent accidentally overwriting concurrent changes. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", - SerializedName = @"If-Match", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] - public string IfMatch { get => this._ifMatch; set => this._ifMatch = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the streaming job. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the streaming job.", - SerializedName = @"jobName", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob _streamingJob; - - /// - /// A streaming job object, containing all information associated with the named streaming job. - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "A streaming job object, containing all information associated with the named streaming job.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"A streaming job object, containing all information associated with the named streaming job.", - SerializedName = @"streamingJob", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob StreamingJob { get => this._streamingJob; set => this._streamingJob = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'StreamingJobsUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StreamingJobsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, SubscriptionId, ResourceGroupName, Name, StreamingJob, onOk, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=StreamingJob}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public UpdateAzStreamAnalyticsJob_Update() - { - - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateExpanded.cs index 70dc0326f6fd..e661acf8c2f3 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateExpanded.cs @@ -6,10 +6,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming + /// update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming /// job without affecting the rest the job definition. /// /// @@ -17,12 +19,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsJob_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,16 +41,31 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System. /// 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; + /// /// A streaming job object, containing all information associated with the named streaming job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob _streamingJobBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJob(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob _streamingJobBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJob(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -70,9 +88,9 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System. ReadOnly = false, Description = @"Controls certain runtime behaviors of the streaming job.", SerializedName = @"compatibilityLevel", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel CompatibilityLevel { get => _streamingJobBody.CompatibilityLevel ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel)""); set => _streamingJobBody.CompatibilityLevel = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("1.0")] + public string CompatibilityLevel { get => _streamingJobBody.CompatibilityLevel ?? null; set => _streamingJobBody.CompatibilityLevel = value; } /// /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify @@ -85,9 +103,9 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System. ReadOnly = false, Description = @"Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. .", SerializedName = @"contentStoragePolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy ContentStoragePolicy { get => _streamingJobBody.ContentStoragePolicy ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy)""); set => _streamingJobBody.ContentStoragePolicy = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("SystemAccount", "JobStorageAccount")] + public string ContentStoragePolicy { get => _streamingJobBody.ContentStoragePolicy ?? null; set => _streamingJobBody.ContentStoragePolicy = value; } /// /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. @@ -151,9 +169,12 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System. ReadOnly = false, Description = @"Indicates the policy to apply to events that arrive out of order in the input event stream.", SerializedName = @"eventsOutOfOrderPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy EventsOutOfOrderPolicy { get => _streamingJobBody.EventsOutOfOrderPolicy ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy)""); set => _streamingJobBody.EventsOutOfOrderPolicy = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Adjust", "Drop")] + public string EventsOutOfOrderPolicy { get => _streamingJobBody.EventsOutOfOrderPolicy ?? null; set => _streamingJobBody.EventsOutOfOrderPolicy = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] @@ -190,8 +211,8 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System. ReadOnly = false, Description = @"A list of one or more functions for the streaming job. The name property for each function is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual transformation.", SerializedName = @"functions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] Function { get => _streamingJobBody.Function ?? null /* arrayOf */; set => _streamingJobBody.Function = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction[] Function { get => _streamingJobBody.Function?.ToArray() ?? null /* fixedArrayOf */; set => _streamingJobBody.Function = (value != null ? new System.Collections.Generic.List(value) : null); } /// 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")] @@ -268,8 +289,8 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System. ReadOnly = false, Description = @"A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual input.", SerializedName = @"inputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] Input { get => _streamingJobBody.Input ?? null /* arrayOf */; set => _streamingJobBody.Input = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput[] Input { get => _streamingJobBody.Input?.ToArray() ?? null /* fixedArrayOf */; set => _streamingJobBody.Input = (value != null ? new System.Collections.Generic.List(value) : null); } /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } @@ -282,9 +303,9 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System. ReadOnly = false, Description = @"Authentication Mode.", SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode JobStorageAccountAuthenticationMode { get => _streamingJobBody.JobStorageAccountAuthenticationMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); set => _streamingJobBody.JobStorageAccountAuthenticationMode = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + public string JobStorageAccountAuthenticationMode { get => _streamingJobBody.JobStorageAccountAuthenticationMode ?? null; set => _streamingJobBody.JobStorageAccountAuthenticationMode = value; } /// /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. @@ -320,20 +341,9 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System. ReadOnly = false, Description = @"Describes the type of the job. Valid modes are `Cloud` and 'Edge'.", SerializedName = @"jobType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType JobType { get => _streamingJobBody.JobType ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType)""); set => _streamingJobBody.JobType = value; } - - /// The geo-location where the resource lives - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The geo-location where the resource lives")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] - public string Location { get => _streamingJobBody.Location ?? null; set => _streamingJobBody.Location = value; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Cloud", "Edge")] + public string JobType { get => _streamingJobBody.JobType ?? null; set => _streamingJobBody.JobType = value; } /// /// cancellation delegate. Stops the cmdlet when called. @@ -370,8 +380,8 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System. ReadOnly = false, Description = @"A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output.", SerializedName = @"outputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] Output { get => _streamingJobBody.Output ?? null /* arrayOf */; set => _streamingJobBody.Output = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput[] Output { get => _streamingJobBody.Output?.ToArray() ?? null /* fixedArrayOf */; set => _streamingJobBody.Output = (value != null ? new System.Collections.Generic.List(value) : null); } /// /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to @@ -384,9 +394,9 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System. ReadOnly = false, Description = @"Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size).", SerializedName = @"outputErrorPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy OutputErrorPolicy { get => _streamingJobBody.OutputErrorPolicy ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy)""); set => _streamingJobBody.OutputErrorPolicy = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Stop", "Drop")] + public string OutputErrorPolicy { get => _streamingJobBody.OutputErrorPolicy ?? null; set => _streamingJobBody.OutputErrorPolicy = value; } /// /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may @@ -401,9 +411,9 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System. ReadOnly = false, Description = @"This property should only be utilized when it is desired that the job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time.", SerializedName = @"outputStartMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode OutputStartMode { get => _streamingJobBody.OutputStartMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode)""); set => _streamingJobBody.OutputStartMode = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] + public string OutputStartMode { get => _streamingJobBody.OutputStartMode ?? null; set => _streamingJobBody.OutputStartMode = value; } /// /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null @@ -423,7 +433,7 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System. /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -477,9 +487,9 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System. ReadOnly = false, Description = @"The name of the SKU. Required on PUT (CreateOrReplace) requests.", SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName SkuName { get => _streamingJobBody.SkuName ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName)""); set => _streamingJobBody.SkuName = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Standard")] + public string SkuName { get => _streamingJobBody.SkuName ?? null; set => _streamingJobBody.SkuName = value; } /// /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. @@ -532,7 +542,8 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System. [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -545,20 +556,20 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateExpanded : global::System. ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags Tag { get => _streamingJobBody.Tag ?? null /* object */; set => _streamingJobBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags Tag { get => _streamingJobBody.Tag ?? null /* object */; set => _streamingJobBody.Tag = value; } /// /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob /// 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); + 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) @@ -581,6 +592,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -645,8 +661,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -702,7 +743,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -715,12 +756,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.StreamingJobsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, SubscriptionId, ResourceGroupName, Name, _streamingJobBody, onOk, this, Pipeline); + await this.Client.StreamingJobsUpdate(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _streamingJobBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=_streamingJobBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -740,7 +781,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsJob_UpdateExpanded() { @@ -764,12 +805,12 @@ public UpdateAzStreamAnalyticsJob_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -781,8 +822,26 @@ public UpdateAzStreamAnalyticsJob_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateViaIdentity.cs deleted file mode 100644 index 13f9b33201d9..000000000000 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateViaIdentity.cs +++ /dev/null @@ -1,401 +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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; - using System; - - /// - /// Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming - /// job without affecting the rest the job definition. - /// - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}" - /// - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsJob_UpdateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] - public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener - { - /// 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(); - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private string _ifMatch; - - /// - /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag - /// value to prevent accidentally overwriting concurrent changes. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", - SerializedName = @"If-Match", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] - public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// The instance of the that the remote call will use. - /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob _streamingJob; - - /// - /// A streaming job object, containing all information associated with the named streaming job. - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "A streaming job object, containing all information associated with the named streaming job.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"A streaming job object, containing all information associated with the named streaming job.", - SerializedName = @"streamingJob", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob StreamingJob { get => this._streamingJob; set => this._streamingJob = value; } - - /// - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'StreamingJobsUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.StreamingJobsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, StreamingJob, onOk, 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.JobName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.StreamingJobsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, StreamingJob, onOk, this, Pipeline); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,body=StreamingJob}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Intializes a new instance of the cmdlet class. - /// - public UpdateAzStreamAnalyticsJob_UpdateViaIdentity() - { - - } - - /// - new protected void WriteObject(object sendToPipeline) - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline); - } - - /// - /// - new protected void WriteObject(object sendToPipeline, bool enumerateCollection) - { - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); - base.WriteObject(sendToPipeline, enumerateCollection); - } - - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - WriteObject((await response)); - } - } - } -} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded.cs index a514244a8802..07605753688a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded.cs @@ -6,10 +6,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming + /// update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming /// job without affecting the rest the job definition. /// /// @@ -17,12 +19,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsJob_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -38,16 +41,31 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded : glob /// 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; + /// /// A streaming job object, containing all information associated with the named streaming job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob _streamingJobBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.StreamingJob(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob _streamingJobBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.StreamingJob(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -70,9 +88,9 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded : glob ReadOnly = false, Description = @"Controls certain runtime behaviors of the streaming job.", SerializedName = @"compatibilityLevel", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel CompatibilityLevel { get => _streamingJobBody.CompatibilityLevel ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel)""); set => _streamingJobBody.CompatibilityLevel = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("1.0")] + public string CompatibilityLevel { get => _streamingJobBody.CompatibilityLevel ?? null; set => _streamingJobBody.CompatibilityLevel = value; } /// /// Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify @@ -85,9 +103,9 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded : glob ReadOnly = false, Description = @"Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. .", SerializedName = @"contentStoragePolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy ContentStoragePolicy { get => _streamingJobBody.ContentStoragePolicy ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy)""); set => _streamingJobBody.ContentStoragePolicy = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("SystemAccount", "JobStorageAccount")] + public string ContentStoragePolicy { get => _streamingJobBody.ContentStoragePolicy ?? null; set => _streamingJobBody.ContentStoragePolicy = value; } /// /// The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. @@ -151,9 +169,12 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded : glob ReadOnly = false, Description = @"Indicates the policy to apply to events that arrive out of order in the input event stream.", SerializedName = @"eventsOutOfOrderPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy EventsOutOfOrderPolicy { get => _streamingJobBody.EventsOutOfOrderPolicy ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy)""); set => _streamingJobBody.EventsOutOfOrderPolicy = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Adjust", "Drop")] + public string EventsOutOfOrderPolicy { get => _streamingJobBody.EventsOutOfOrderPolicy ?? null; set => _streamingJobBody.EventsOutOfOrderPolicy = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] @@ -190,8 +211,8 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded : glob ReadOnly = false, Description = @"A list of one or more functions for the streaming job. The name property for each function is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual transformation.", SerializedName = @"functions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[] Function { get => _streamingJobBody.Function ?? null /* arrayOf */; set => _streamingJobBody.Function = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction[] Function { get => _streamingJobBody.Function?.ToArray() ?? null /* fixedArrayOf */; set => _streamingJobBody.Function = (value != null ? new System.Collections.Generic.List(value) : null); } /// 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")] @@ -268,8 +289,8 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded : glob ReadOnly = false, Description = @"A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual input.", SerializedName = @"inputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[] Input { get => _streamingJobBody.Input ?? null /* arrayOf */; set => _streamingJobBody.Input = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput[] Input { get => _streamingJobBody.Input?.ToArray() ?? null /* fixedArrayOf */; set => _streamingJobBody.Input = (value != null ? new System.Collections.Generic.List(value) : null); } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _inputObject; @@ -290,9 +311,9 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded : glob ReadOnly = false, Description = @"Authentication Mode.", SerializedName = @"authenticationMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode JobStorageAccountAuthenticationMode { get => _streamingJobBody.JobStorageAccountAuthenticationMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode)""); set => _streamingJobBody.JobStorageAccountAuthenticationMode = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] + public string JobStorageAccountAuthenticationMode { get => _streamingJobBody.JobStorageAccountAuthenticationMode ?? null; set => _streamingJobBody.JobStorageAccountAuthenticationMode = value; } /// /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. @@ -328,20 +349,9 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded : glob ReadOnly = false, Description = @"Describes the type of the job. Valid modes are `Cloud` and 'Edge'.", SerializedName = @"jobType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType JobType { get => _streamingJobBody.JobType ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType)""); set => _streamingJobBody.JobType = value; } - - /// The geo-location where the resource lives - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The geo-location where the resource lives")] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] - public string Location { get => _streamingJobBody.Location ?? null; set => _streamingJobBody.Location = value; } + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Cloud", "Edge")] + public string JobType { get => _streamingJobBody.JobType ?? null; set => _streamingJobBody.JobType = value; } /// /// cancellation delegate. Stops the cmdlet when called. @@ -364,8 +374,8 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded : glob ReadOnly = false, Description = @"A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output.", SerializedName = @"outputs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[] Output { get => _streamingJobBody.Output ?? null /* arrayOf */; set => _streamingJobBody.Output = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput[] Output { get => _streamingJobBody.Output?.ToArray() ?? null /* fixedArrayOf */; set => _streamingJobBody.Output = (value != null ? new System.Collections.Generic.List(value) : null); } /// /// Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to @@ -378,9 +388,9 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded : glob ReadOnly = false, Description = @"Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size).", SerializedName = @"outputErrorPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy OutputErrorPolicy { get => _streamingJobBody.OutputErrorPolicy ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy)""); set => _streamingJobBody.OutputErrorPolicy = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Stop", "Drop")] + public string OutputErrorPolicy { get => _streamingJobBody.OutputErrorPolicy ?? null; set => _streamingJobBody.OutputErrorPolicy = value; } /// /// This property should only be utilized when it is desired that the job be started immediately upon creation. Value may @@ -395,9 +405,9 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded : glob ReadOnly = false, Description = @"This property should only be utilized when it is desired that the job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time.", SerializedName = @"outputStartMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode OutputStartMode { get => _streamingJobBody.OutputStartMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode)""); set => _streamingJobBody.OutputStartMode = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] + public string OutputStartMode { get => _streamingJobBody.OutputStartMode ?? null; set => _streamingJobBody.OutputStartMode = value; } /// /// Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null @@ -417,7 +427,7 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded : glob /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -457,9 +467,9 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded : glob ReadOnly = false, Description = @"The name of the SKU. Required on PUT (CreateOrReplace) requests.", SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName SkuName { get => _streamingJobBody.SkuName ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName)""); set => _streamingJobBody.SkuName = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Standard")] + public string SkuName { get => _streamingJobBody.SkuName ?? null; set => _streamingJobBody.SkuName = value; } /// /// The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. @@ -507,20 +517,20 @@ public partial class UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded : glob ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags Tag { get => _streamingJobBody.Tag ?? null /* object */; set => _streamingJobBody.Tag = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags Tag { get => _streamingJobBody.Tag ?? null /* object */; set => _streamingJobBody.Tag = value; } /// /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob /// 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); + 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) @@ -543,6 +553,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -607,8 +622,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -664,7 +704,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -679,7 +719,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.StreamingJobsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _streamingJobBody, onOk, this, Pipeline); + await this.Client.StreamingJobsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _streamingJobBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } else { @@ -696,13 +736,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.StreamingJobsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, _streamingJobBody, onOk, this, Pipeline); + await this.Client.StreamingJobsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _streamingJobBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,body=_streamingJobBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -722,7 +762,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded() { @@ -746,12 +786,12 @@ public UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -763,8 +803,26 @@ public UpdateAzStreamAnalyticsJob_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..1fe4c6b0b2ac --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateViaJsonFilePath.cs @@ -0,0 +1,490 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming + /// job without affecting the rest the job definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsJob_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class UpdateAzStreamAnalyticsJob_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag + /// value to prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StreamingJobsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StreamingJobsUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStreamAnalyticsJob_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateViaJsonString.cs new file mode 100644 index 000000000000..efb62161e898 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsJob_UpdateViaJsonString.cs @@ -0,0 +1,488 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming + /// job without affecting the rest the job definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsJob_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class UpdateAzStreamAnalyticsJob_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag + /// value to prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'StreamingJobsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.StreamingJobsUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStreamAnalyticsJob_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_Update.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_Update.cs index 14ffeea2493c..4cd41927d3a7 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_Update.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_Update.cs @@ -6,10 +6,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two + /// update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two /// properties) an output without affecting the rest the job or output definition. /// /// @@ -17,13 +19,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsOutput_Update", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"DiagnosticCondition"}, NewOutputProperties=new string[] {"DiagnosticCondition"}, ChangeDescription="The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsOutput_Update : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -39,11 +42,26 @@ public partial class UpdateAzStreamAnalyticsOutput_Update : global::System.Manag /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -57,6 +75,9 @@ public partial class UpdateAzStreamAnalyticsOutput_Update : global::System.Manag [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -127,7 +148,7 @@ public partial class UpdateAzStreamAnalyticsOutput_Update : global::System.Manag public string Name { get => this._name; set => this._name = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput _output; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _output; /// /// An output object, containing all information associated with the named output. All outputs are contained under a streaming @@ -139,13 +160,14 @@ public partial class UpdateAzStreamAnalyticsOutput_Update : global::System.Manag ReadOnly = false, Description = @"An output object, containing all information associated with the named output. All outputs are contained under a streaming job.", SerializedName = @"output", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput Output { get => this._output; set => this._output = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput Output { get => this._output; set => this._output = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -191,7 +213,8 @@ public partial class UpdateAzStreamAnalyticsOutput_Update : global::System.Manag [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -200,12 +223,12 @@ public partial class UpdateAzStreamAnalyticsOutput_Update : global::System.Manag /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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); + 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) @@ -228,6 +251,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -292,8 +320,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -349,7 +402,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -362,12 +415,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.OutputsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, SubscriptionId, ResourceGroupName, JobName, Name, Output, onOk, this, Pipeline); + await this.Client.OutputsUpdate(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Output, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name,body=Output}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -387,7 +440,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsOutput_Update() { @@ -411,12 +464,12 @@ public UpdateAzStreamAnalyticsOutput_Update() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -428,8 +481,26 @@ public UpdateAzStreamAnalyticsOutput_Update() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateExpanded.cs index 216cef5b56f6..f324c1520815 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateExpanded.cs @@ -6,10 +6,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two + /// update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two /// properties) an output without affecting the rest the job or output definition. /// /// @@ -17,13 +19,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsOutput_UpdateExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"DiagnosticCondition"}, NewOutputProperties=new string[] {"DiagnosticCondition"}, ChangeDescription="The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsOutput_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -39,17 +42,32 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateExpanded : global::Syst /// 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; + /// /// An output object, containing all information associated with the named output. All outputs are contained under a streaming /// job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput _outputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Output(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _outputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -63,8 +81,8 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateExpanded : global::Syst ReadOnly = false, Description = @"Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", SerializedName = @"datasource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource Datasource { get => _outputBody.Datasource ?? null /* object */; set => _outputBody.Datasource = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource Datasource { get => _outputBody.Datasource ?? null /* object */; set => _outputBody.Datasource = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -76,6 +94,9 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateExpanded : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -148,7 +169,7 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateExpanded : global::Syst /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -190,9 +211,9 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateExpanded : global::Syst ReadOnly = false, Description = @"Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType SerializationType { get => _outputBody.SerializationType ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType)""); set => _outputBody.SerializationType = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] + public string SerializationType { get => _outputBody.SerializationType ?? null; set => _outputBody.SerializationType = value; } /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] @@ -219,7 +240,8 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateExpanded : global::Syst [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -239,12 +261,12 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateExpanded : global::Syst /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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); + 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) @@ -267,6 +289,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -331,8 +358,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -388,7 +440,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -401,12 +453,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.OutputsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, SubscriptionId, ResourceGroupName, JobName, Name, _outputBody, onOk, this, Pipeline); + await this.Client.OutputsUpdate(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _outputBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name,body=_outputBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -426,7 +478,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsOutput_UpdateExpanded() { @@ -450,12 +502,12 @@ public UpdateAzStreamAnalyticsOutput_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -467,8 +519,26 @@ public UpdateAzStreamAnalyticsOutput_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaIdentity.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaIdentity.cs index 0ceb3b8fce2b..67c67e175b56 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaIdentity.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaIdentity.cs @@ -6,10 +6,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two + /// update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two /// properties) an output without affecting the rest the job or output definition. /// /// @@ -17,13 +19,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsOutput_UpdateViaIdentity", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"DiagnosticCondition"}, NewOutputProperties=new string[] {"DiagnosticCondition"}, ChangeDescription="The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsOutput_UpdateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -39,11 +42,26 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateViaIdentity : global::S /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -57,6 +75,9 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateViaIdentity : global::S [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -106,7 +127,7 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateViaIdentity : global::S global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput _output; + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _output; /// /// An output object, containing all information associated with the named output. All outputs are contained under a streaming @@ -118,13 +139,14 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateViaIdentity : global::S ReadOnly = false, Description = @"An output object, containing all information associated with the named output. All outputs are contained under a streaming job.", SerializedName = @"output", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput Output { get => this._output; set => this._output = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput Output { get => this._output; set => this._output = value; } /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -147,12 +169,12 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateViaIdentity : global::S /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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); + 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) @@ -175,6 +197,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -239,8 +266,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -296,7 +348,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -311,7 +363,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.OutputsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Output, onOk, this, Pipeline); + await this.Client.OutputsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Output, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } else { @@ -332,13 +384,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OutputName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.OutputsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.OutputName ?? null, Output, onOk, this, Pipeline); + await this.Client.OutputsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.OutputName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Output, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,body=Output}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -358,7 +410,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsOutput_UpdateViaIdentity() { @@ -382,12 +434,12 @@ public UpdateAzStreamAnalyticsOutput_UpdateViaIdentity() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -399,8 +451,26 @@ public UpdateAzStreamAnalyticsOutput_UpdateViaIdentity() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaIdentityExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaIdentityExpanded.cs index 1c123481eb1e..643c4b8f39a5 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaIdentityExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaIdentityExpanded.cs @@ -6,10 +6,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two + /// update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two /// properties) an output without affecting the rest the job or output definition. /// /// @@ -17,13 +19,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets /// [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsOutput_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties=new string[] {"DiagnosticCondition"}, NewOutputProperties=new string[] {"DiagnosticCondition"}, ChangeDescription="The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsOutput_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -39,17 +42,32 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateViaIdentityExpanded : g /// 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; + /// /// An output object, containing all information associated with the named output. All outputs are contained under a streaming /// job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput _outputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Output(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _outputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -63,8 +81,8 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateViaIdentityExpanded : g ReadOnly = false, Description = @"Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", SerializedName = @"datasource", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource) })] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource Datasource { get => _outputBody.Datasource ?? null /* object */; set => _outputBody.Datasource = value; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource Datasource { get => _outputBody.Datasource ?? null /* object */; set => _outputBody.Datasource = value; } /// /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet @@ -76,6 +94,9 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateViaIdentityExpanded : g [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -127,7 +148,7 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateViaIdentityExpanded : g /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -155,9 +176,9 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateViaIdentityExpanded : g ReadOnly = false, Description = @"Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.", SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType) })] - [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType))] - public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType SerializationType { get => _outputBody.SerializationType ?? ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType)""); set => _outputBody.SerializationType = value; } + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] + public string SerializationType { get => _outputBody.SerializationType ?? null; set => _outputBody.SerializationType = value; } /// . [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] @@ -186,12 +207,12 @@ public partial class UpdateAzStreamAnalyticsOutput_UpdateViaIdentityExpanded : g /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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); + 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) @@ -214,6 +235,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -278,8 +304,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -335,7 +386,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -350,7 +401,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.OutputsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _outputBody, onOk, this, Pipeline); + await this.Client.OutputsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _outputBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } else { @@ -371,13 +422,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.OutputName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.OutputsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.OutputName ?? null, _outputBody, onOk, this, Pipeline); + await this.Client.OutputsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.OutputName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _outputBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,body=_outputBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -397,7 +448,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsOutput_UpdateViaIdentityExpanded() { @@ -421,12 +472,12 @@ public UpdateAzStreamAnalyticsOutput_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -438,8 +489,26 @@ public UpdateAzStreamAnalyticsOutput_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaIdentityStreamingjob.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaIdentityStreamingjob.cs new file mode 100644 index 000000000000..e270499ebb05 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaIdentityStreamingjob.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an output without affecting the rest the job or output definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsOutput_UpdateViaIdentityStreamingjob", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] + public partial class UpdateAzStreamAnalyticsOutput_UpdateViaIdentityStreamingjob : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the output. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the output.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the output.", + SerializedName = @"outputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OutputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _output; + + /// + /// An output object, containing all information associated with the named output. All outputs are contained under a streaming + /// job. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "An output object, containing all information associated with the named output. All outputs are contained under a streaming job.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"An output object, containing all information associated with the named output. All outputs are contained under a streaming job.", + SerializedName = @"output", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput Output { get => this._output; set => this._output = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OutputsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/outputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.OutputsUpdateViaIdentity(StreamingjobInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Output, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.OutputsUpdate(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, Output, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStreamAnalyticsOutput_UpdateViaIdentityStreamingjob() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaIdentityStreamingjobExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaIdentityStreamingjobExpanded.cs new file mode 100644 index 000000000000..30ec321186ae --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaIdentityStreamingjobExpanded.cs @@ -0,0 +1,528 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an output without affecting the rest the job or output definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsOutput_UpdateViaIdentityStreamingjobExpanded", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] + public partial class UpdateAzStreamAnalyticsOutput_UpdateViaIdentityStreamingjobExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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; + + /// + /// An output object, containing all information associated with the named output. All outputs are contained under a streaming + /// job. + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput _outputBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Output(); + + /// + /// 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; + + /// + /// Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"datasource", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource) })] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource Datasource { get => _outputBody.Datasource ?? null /* object */; set => _outputBody.Datasource = 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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the output. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the output.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the output.", + SerializedName = @"outputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OutputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] + public string SerializationType { get => _outputBody.SerializationType ?? null; set => _outputBody.SerializationType = value; } + + /// . + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @".", + SerializedName = @"sizeWindow", + PossibleTypes = new [] { typeof(float) })] + public float SizeWindow { get => _outputBody.SizeWindow ?? default(float); set => _outputBody.SizeWindow = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// . + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @".", + SerializedName = @"timeWindow", + PossibleTypes = new [] { typeof(string) })] + public string TimeWindow { get => _outputBody.TimeWindow ?? null; set => _outputBody.TimeWindow = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OutputsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/outputs/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.OutputsUpdateViaIdentity(StreamingjobInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _outputBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.OutputsUpdate(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _outputBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public UpdateAzStreamAnalyticsOutput_UpdateViaIdentityStreamingjobExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..ba2e532f811c --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaJsonFilePath.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an output without affecting the rest the job or output definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsOutput_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class UpdateAzStreamAnalyticsOutput_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the output. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the output.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the output.", + SerializedName = @"outputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OutputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OutputsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OutputsUpdateViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStreamAnalyticsOutput_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaJsonString.cs new file mode 100644 index 000000000000..6c130b22c426 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsOutput_UpdateViaJsonString.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two + /// properties) an output without affecting the rest the job or output definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsOutput_UpdateViaJsonString", SupportsShouldProcess = true)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.OutputBreakingChange("Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput", "15.0.0", "3.0.0", "2025/11", DeprecatedOutputProperties = new string[] {"DiagnosticCondition"}, NewOutputProperties = new string[] {"DiagnosticCondition" } , ChangeDescription = "The type of property DiagnosticCondition will be changed from fixed array to 'List'.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/outputs/{outputName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class UpdateAzStreamAnalyticsOutput_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent + /// accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the output. Omit this value to always overwrite the current output. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the output. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the output.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the output.", + SerializedName = @"outputName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("OutputName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OutputsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OutputsUpdateViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStreamAnalyticsOutput_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateExpanded.cs index d819b6cc997c..89c45cea1dcb 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateExpanded.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one + /// update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one /// or two properties) a transformation without affecting the rest the job or transformation definition. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsTransformation_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsTransformation_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,17 +40,32 @@ public partial class UpdateAzStreamAnalyticsTransformation_UpdateExpanded : glob /// 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; + /// /// A transformation object, containing all information associated with the named transformation. All transformations are /// contained under a streaming job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation _transformationBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Transformation(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation _transformationBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -61,6 +79,9 @@ public partial class UpdateAzStreamAnalyticsTransformation_UpdateExpanded : glob [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -133,7 +154,7 @@ public partial class UpdateAzStreamAnalyticsTransformation_UpdateExpanded : glob /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -204,7 +225,8 @@ public partial class UpdateAzStreamAnalyticsTransformation_UpdateExpanded : glob [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( Name = @"", Description =@"", - Script = @"(Get-AzContext).Subscription.Id")] + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -213,12 +235,12 @@ public partial class UpdateAzStreamAnalyticsTransformation_UpdateExpanded : glob /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation /// 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); + 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) @@ -241,6 +263,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -305,8 +332,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -362,7 +414,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -375,12 +427,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.TransformationsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, SubscriptionId, ResourceGroupName, JobName, Name, _transformationBody, onOk, this, Pipeline); + await this.Client.TransformationsUpdate(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _transformationBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,JobName=JobName,Name=Name,body=_transformationBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -400,7 +452,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet class. + /// Initializes a new instance of the cmdlet class. /// public UpdateAzStreamAnalyticsTransformation_UpdateExpanded() { @@ -424,12 +476,12 @@ public UpdateAzStreamAnalyticsTransformation_UpdateExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -441,8 +493,26 @@ public UpdateAzStreamAnalyticsTransformation_UpdateExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityExpanded.cs index 08ade5d7386d..ea577d581df2 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityExpanded.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityExpanded.cs @@ -6,22 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets { using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; using System; /// - /// Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one + /// update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one /// or two properties) a transformation without affecting the rest the job or transformation definition. /// /// /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsTransformation_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation))] - [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"Updates an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition.")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}", ApiVersion = "2017-04-01-preview")] public partial class UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext { /// A unique id generatd for the this cmdlet when it is instantiated. private string __correlationId = System.Guid.NewGuid().ToString(); @@ -37,17 +40,32 @@ public partial class UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityExpa /// 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; + /// /// A transformation object, containing all information associated with the named transformation. All transformations are /// contained under a streaming job. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation _transformationBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.Transformation(); + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation _transformationBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation(); /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.ClientAPI; @@ -61,6 +79,9 @@ public partial class UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityExpa [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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] @@ -112,7 +133,7 @@ public partial class UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityExpa /// /// The instance of the that the remote call will use. /// - private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.HttpPipeline Pipeline { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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")] @@ -160,12 +181,12 @@ public partial class UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityExpa /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation /// 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); + 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) @@ -188,6 +209,11 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); if (telemetryInfo != null) { @@ -252,8 +278,33 @@ protected override void EndProcessing() WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); return ; } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + await Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); if (token.IsCancellationRequested) { return ; @@ -309,7 +360,7 @@ protected override void ProcessRecord() using( NoSynchronizationContext ) { await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); if (null != HttpPipelinePrepend) { Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); @@ -324,7 +375,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.TransformationsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _transformationBody, onOk, this, Pipeline); + await this.Client.TransformationsUpdateViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _transformationBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } else { @@ -345,13 +396,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.TransformationName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.TransformationsUpdate(this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.TransformationName ?? null, _transformationBody, onOk, this, Pipeline); + await this.Client.TransformationsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.JobName ?? null, InputObject.TransformationName ?? null, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _transformationBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,body=_transformationBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -371,7 +422,7 @@ protected override void StopProcessing() } /// - /// Intializes a new instance of the cmdlet + /// Initializes a new instance of the cmdlet /// class. /// public UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityExpanded() @@ -396,12 +447,12 @@ public UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityExpanded() /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation /// 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) + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) { using( NoSynchronizationContext ) { @@ -413,8 +464,26 @@ public UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityExpanded() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.ITransformation - WriteObject((await response)); + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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; + } + } } } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityStreamingjobExpanded.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityStreamingjobExpanded.cs new file mode 100644 index 000000000000..0201cf6a624e --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityStreamingjobExpanded.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one + /// or two properties) a transformation without affecting the rest the job or transformation definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsTransformation_UpdateViaIdentityStreamingjobExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}", ApiVersion = "2017-04-01-preview")] + public partial class UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityStreamingjobExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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; + + /// + /// A transformation object, containing all information associated with the named transformation. All transformations are + /// contained under a streaming job. + /// + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation _transformationBody = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Transformation(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the transformation. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the transformation.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the transformation.", + SerializedName = @"transformationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TransformationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language + /// (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests.", + SerializedName = @"query", + PossibleTypes = new [] { typeof(string) })] + public string Query { get => _transformationBody.Query ?? null; set => _transformationBody.Query = value; } + + /// Specifies the number of streaming units that the streaming job uses. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the number of streaming units that the streaming job uses.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the number of streaming units that the streaming job uses.", + SerializedName = @"streamingUnits", + PossibleTypes = new [] { typeof(int) })] + public int StreamingUnit { get => _transformationBody.StreamingUnit ?? default(int); set => _transformationBody.StreamingUnit = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity _streamingjobInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity StreamingjobInputObject { get => this._streamingjobInputObject; set => this._streamingjobInputObject = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TransformationsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (StreamingjobInputObject?.Id != null) + { + this.StreamingjobInputObject.Id += $"/transformations/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.TransformationsUpdateViaIdentity(StreamingjobInputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _transformationBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == StreamingjobInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + if (null == StreamingjobInputObject.JobName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("StreamingjobInputObject has null value for StreamingjobInputObject.JobName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, StreamingjobInputObject) ); + } + await this.Client.TransformationsUpdate(StreamingjobInputObject.SubscriptionId ?? null, StreamingjobInputObject.ResourceGroupName ?? null, StreamingjobInputObject.JobName ?? null, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _transformationBody, onOk, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStreamAnalyticsTransformation_UpdateViaIdentityStreamingjobExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateViaJsonFilePath.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..5d9e2609fd67 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateViaJsonFilePath.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one + /// or two properties) a transformation without affecting the rest the job or transformation definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsTransformation_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class UpdateAzStreamAnalyticsTransformation_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the transformation. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the transformation.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the transformation.", + SerializedName = @"transformationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TransformationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TransformationsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TransformationsUpdateViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStreamAnalyticsTransformation_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateViaJsonString.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateViaJsonString.cs new file mode 100644 index 000000000000..f417b22938b1 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/cmdlets/UpdateAzStreamAnalyticsTransformation_UpdateViaJsonString.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets; + using System; + + /// + /// update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one + /// or two properties) a transformation without affecting the rest the job or transformation definition. + /// + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzStreamAnalyticsTransformation_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Description(@"update an existing transformation under an existing streaming job. This can be used to partially update (ie. update one or two properties) a transformation without affecting the rest the job or transformation definition.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/transformations/{transformationName}", ApiVersion = "2017-04-01-preview")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.NotSuggestDefaultParameterSet] + public partial class UpdateAzStreamAnalyticsTransformation_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private string _ifMatch; + + /// + /// The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen + /// ETag value to prevent accidentally overwriting concurrent changes. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ETag of the transformation. Omit this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes.", + SerializedName = @"If-Match", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Header)] + public string IfMatch { get => this._ifMatch; set => this._ifMatch = value; } + + /// 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 _jobName; + + /// The name of the streaming job. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the streaming job.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the streaming job.", + SerializedName = @"jobName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string JobName { get => this._jobName; set => this._jobName = 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")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the transformation. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the transformation.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the transformation.", + SerializedName = @"transformationName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("TransformationName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category(global::Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// 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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'TransformationsUpdate' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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) + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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 ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.TransformationsUpdateViaJsonString(SubscriptionId, ResourceGroupName, JobName, Name, this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null, _jsonString, onOk, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.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,IfMatch=this.InvocationInformation.BoundParameters.ContainsKey("IfMatch") ? IfMatch : null,JobName=JobName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzStreamAnalyticsTransformation_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + /// 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 Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITransformation + 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/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs new file mode 100644 index 000000000000..1882c524c72a --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics +{ + using System; + using System.Collections.Generic; + using System.Text; + + [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)] + public class ExternalDocsAttribute : Attribute + { + + public string Description { get; } + + public string Url { get; } + + public ExternalDocsAttribute(string url) + { + Url = url; + } + + public ExternalDocsAttribute(string url, string description) + { + Url = url; + Description = description; + } + } +} diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs new file mode 100644 index 000000000000..afcc6e8f5b79 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics +{ + public class PSArgumentCompleterAttribute : ArgumentCompleterAttribute + { + internal string[] ResourceTypes; + + public PSArgumentCompleterAttribute(params string[] argumentList) : base(CreateScriptBlock(argumentList)) + { + ResourceTypes = argumentList; + } + + public static ScriptBlock CreateScriptBlock(string[] resourceTypes) + { + List outputResourceTypes = new List(); + foreach (string resourceType in resourceTypes) + { + if (resourceType.Contains(" ")) + { + outputResourceTypes.Add("\'\'" + resourceType + "\'\'"); + } + else + { + outputResourceTypes.Add(resourceType); + } + } + string scriptResourceTypeList = "'" + String.Join("' , '", outputResourceTypes) + "'"; + string script = "param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)\n" + + String.Format("$values = {0}\n", scriptResourceTypeList) + + "$values | Where-Object { $_ -Like \"$wordToComplete*\" -or $_ -Like \"'$wordToComplete*\" } | Sort-Object | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }"; + ScriptBlock scriptBlock = ScriptBlock.Create(script); + return scriptBlock; + } + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs index 83c19d68dc23..418676f8a459 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs @@ -20,11 +20,13 @@ public class ExportFormatPs1xml : PSCmdlet public string FilePath { get; set; } private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; private const string PropertiesExcludedForTableview = @"Id,Type"; private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + private static string SelectedBySuffix = @"#Multiple"; + protected override void ProcessRecord() { try @@ -76,7 +78,7 @@ private static View CreateViewModel(ViewParameters viewParameters) Name = viewParameters.Type.FullName, ViewSelectedBy = new ViewSelectedBy { - TypeName = viewParameters.Type.FullName + TypeName = string.Concat(viewParameters.Type.FullName, SelectedBySuffix) }, TableControl = new TableControl { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs index b09793558574..3ce18cde2252 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs @@ -24,7 +24,7 @@ public class ExportModelSurface : PSCmdlet public bool UseExpandedFormat { get; set; } private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models"; - private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; protected override void ProcessRecord() { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index ca372eabc4a2..477473edd8c3 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -70,9 +70,8 @@ protected override void ProcessRecord() var variantGroups = profileGroups.SelectMany(pg => pg.Variants .GroupBy(v => new { v.CmdletName, v.IsInternal }) .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), - Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) + Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) .ToArray(); - var license = new StringBuilder(); license.Append(@" # ---------------------------------------------------------------------------------- @@ -114,6 +113,7 @@ protected override void ProcessRecord() sb.Append("param("); sb.Append($"{(parameterGroups.Any() ? Environment.NewLine : String.Empty)}"); + foreach (var parameterGroup in parameterGroups) { var parameters = parameterGroup.HasAllVariants ? parameterGroup.Parameters.Take(1) : parameterGroup.Parameters; diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index f728b1a36696..2d854fad5d9a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -137,7 +137,7 @@ protected override void ProcessRecord() } else { - var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().Append("*").ToPsList(); + var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().ToPsList(); sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}"); } @@ -148,8 +148,10 @@ protected override void ProcessRecord() } else { - var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().Append("*").ToPsList(); - sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().ToPsList(); + if (!String.IsNullOrEmpty(aliasesList)) { + sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + } } // CmdletsToExport diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs index f28b9c48e954..b00c3471af45 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs @@ -12,50 +12,96 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell { - [Cmdlet(VerbsData.Export, "TestStub")] - [DoNotExport] - public class ExportTestStub : PSCmdlet - { - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ModuleName { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string ExportsFolder { get; set; } - - [Parameter(Mandatory = true)] - [ValidateNotNullOrEmpty] - public string OutputFolder { get; set; } - - [Parameter] - public SwitchParameter IncludeGenerated { get; set; } - - protected override void ProcessRecord() + [Cmdlet(VerbsData.Export, "TestStub")] + [DoNotExport] + public class ExportTestStub : PSCmdlet { - try - { - if (!Directory.Exists(ExportsFolder)) - { - throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); - } + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } - var exportDirectories = Directory.GetDirectories(ExportsFolder); - if (!exportDirectories.Any()) - { - exportDirectories = new[] { ExportsFolder }; - } - var utilFile = Path.Combine(OutputFolder, "utils.ps1"); - if (!File.Exists(utilFile)) + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeGenerated { get; set; } + + protected override void ProcessRecord() { - var sc = new StringBuilder(); - sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + /*var loadEnvFile = Path.Combine(OutputFolder, "loadEnv.ps1"); + if (!File.Exists(loadEnvFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@" +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json +}"); + File.WriteAllText(loadEnvFile, sc.ToString()); + }*/ + var utilFile = Path.Combine(OutputFolder, "utils.ps1"); + if (!File.Exists(utilFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { if ($allChars) { return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) } else { return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) } } +function Start-TestSleep { + [CmdletBinding(DefaultParameterSetName = 'SleepBySeconds')] + param( + [parameter(Mandatory = $true, Position = 0, ParameterSetName = 'SleepBySeconds')] + [ValidateRange(0.0, 2147483.0)] + [double] $Seconds, + + [parameter(Mandatory = $true, ParameterSetName = 'SleepByMilliseconds')] + [ValidateRange('NonNegative')] + [Alias('ms')] + [int] $Milliseconds + ) + + if ($TestMode -ne 'playback') { + switch ($PSCmdlet.ParameterSetName) { + 'SleepBySeconds' { + Start-Sleep -Seconds $Seconds + } + 'SleepByMilliseconds' { + Start-Sleep -Milliseconds $Milliseconds + } + } + } +} + $env = @{} if ($UsePreviousConfigForRecord) { $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json @@ -80,37 +126,40 @@ function cleanupEnv() { # Clean resources you create for testing } "); - File.WriteAllText(utilFile, sc.ToString()); - } - foreach (var exportDirectory in exportDirectories) - { - var outputFolder = OutputFolder; - if (exportDirectory != ExportsFolder) - { - outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); - Directory.CreateDirectory(outputFolder); - } - - var variantGroups = GetScriptCmdlets(exportDirectory) - .SelectMany(fi => fi.ToVariants()) - .Where(v => !v.IsDoNotExport) - .GroupBy(v => v.CmdletName) - .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) - .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); - - foreach (var variantGroup in variantGroups) - { - var sb = new StringBuilder(); - sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); - sb.AppendLine(@"{ + File.WriteAllText(utilFile, sc.ToString()); + } + + + + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var variantGroups = GetScriptCmdlets(exportDirectory) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .GroupBy(v => v.CmdletName) + .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) + .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); + + foreach (var variantGroup in variantGroups) + { + var sb = new StringBuilder(); + sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); + sb.AppendLine(@"{ $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath)" -); - sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); - sb.AppendLine(@" $currentPath = $PSScriptRoot + ); + sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); + sb.AppendLine(@" $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File $currentPath = Split-Path -Path $currentPath -Parent @@ -120,29 +169,29 @@ function cleanupEnv() { "); - sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); - var variants = variantGroup.Variants - .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) - .ToList(); + sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); + var variants = variantGroup.Variants + .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) + .ToList(); - foreach (var variant in variants) + foreach (var variant in variants) + { + sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); + sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); + var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; + sb.AppendLine($"{Indent}}}{variantSeparator}"); + } + sb.AppendLine("}"); + + File.WriteAllText(variantGroup.FilePath, sb.ToString()); + } + } + } + catch (Exception ee) { - sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); - sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); - var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; - sb.AppendLine($"{Indent}}}{variantSeparator}"); + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; } - sb.AppendLine("}"); - - File.WriteAllText(variantGroup.FilePath, sb.ToString()); - } } - } - catch (Exception ee) - { - Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); - throw ee; - } } - } } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index 1e0ebeb7e8af..fc587d75ff1b 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -94,7 +94,7 @@ public static void WriteMarkdowns(IEnumerable variantGroups, PsMod sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); foreach (var relatedLink in markdownInfo.RelatedLinks) { - sb.Append($"{relatedLink}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"[{relatedLink}]({relatedLink}){Environment.NewLine}{Environment.NewLine}"); } File.WriteAllText(Path.Combine(docsFolder, $"{markdownInfo.CmdletName}.md"), sb.ToString()); diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs index 67fca6b9bdfa..df1310e44bb7 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs @@ -36,14 +36,23 @@ internal class PsHelpInfo public object Role { get; } public string NonTerminatingErrors { get; } + public static string CapitalizeFirstLetter(string text) + { + if (string.IsNullOrEmpty(text)) + return text; + + return char.ToUpper(text[0]) + text.Substring(1); + } + public PsHelpInfo(PSObject helpObject = null) { helpObject = helpObject ?? new PSObject(); CmdletName = helpObject.GetProperty("Name").NullIfEmpty() ?? helpObject.GetNestedProperty("details", "name"); ModuleName = helpObject.GetProperty("ModuleName"); - Synopsis = helpObject.GetProperty("Synopsis"); + Synopsis = CapitalizeFirstLetter(helpObject.GetProperty("Synopsis")); Description = helpObject.GetProperty("description").EmptyIfNull().ToDescriptionText().NullIfEmpty() ?? helpObject.GetNestedProperty("details", "description").EmptyIfNull().ToDescriptionText(); + Description = CapitalizeFirstLetter(Description); AlertText = helpObject.GetNestedProperty("alertSet", "alert").EmptyIfNull().ToDescriptionText(); Category = helpObject.GetProperty("Category"); HasCommonParameters = helpObject.GetProperty("CommonParameters").ToNullableBool(); diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs index fe4873ef4c5a..c1ac482fae87 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs @@ -31,7 +31,7 @@ internal class MarkdownHelpInfo public string[] Inputs { get; } public string[] Outputs { get; } public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } - public string[] RelatedLinks { get; } + public MarkdownRelatedLinkInfo[] RelatedLinks { get; } public bool SupportsShouldProcess { get; } public bool SupportsPaging { get; } @@ -67,7 +67,11 @@ public MarkdownHelpInfo(VariantGroup variantGroup, string examplesFolder, string ComplexInterfaceInfos = variantGroup.ComplexInterfaceInfos; OnlineVersion = commentInfo.OnlineVersion; - RelatedLinks = commentInfo.RelatedLinks; + + var relatedLinkLists = new List(); + relatedLinkLists.AddRange(commentInfo.RelatedLinks?.Select(link => new MarkdownRelatedLinkInfo(link))); + relatedLinkLists.AddRange(variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Distinct()?.Select(link => new MarkdownRelatedLinkInfo(link.Url, link.Description))); + RelatedLinks = relatedLinkLists?.ToArray(); SupportsShouldProcess = variantGroup.SupportsShouldProcess; SupportsPaging = variantGroup.SupportsPaging; @@ -218,14 +222,45 @@ public MarkdownParameterHelpInfo(PsParameterHelpInfo[] parameterHelpInfos, Param } } + internal class MarkdownRelatedLinkInfo + { + public string Url { get; } + public string Description { get; } + + public MarkdownRelatedLinkInfo(string url) + { + Url = url; + } + + public MarkdownRelatedLinkInfo(string url, string description) + { + Url = url; + Description = description; + } + + public override string ToString() + { + if (string.IsNullOrEmpty(Description)) + { + return Url; + } + else + { + return $@"[{Description}]({Url})"; + + } + + } + } + internal static class MarkdownTypesExtensions { public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Output, exampleInfo.Remarks); public static MarkdownExampleHelpInfo[] DefaultExampleHelpInfos = { - new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), - new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), }; public static MarkdownParameterHelpInfo[] SupportsShouldProcessParameters = diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index d71b775bf8e5..e38861d8e42b 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -121,6 +121,21 @@ public override string ToString() => CompleterInfo != null : String.Empty; } + internal class PSArgumentCompleterOutput : ArgumentCompleterOutput + { + public PSArgumentCompleterInfo PSArgumentCompleterInfo { get; } + + public PSArgumentCompleterOutput(PSArgumentCompleterInfo completerInfo) : base(completerInfo) + { + PSArgumentCompleterInfo = completerInfo; + } + + + public override string ToString() => PSArgumentCompleterInfo != null + ? $"{Indent}[{typeof(PSArgumentCompleterAttribute)}({(PSArgumentCompleterInfo.IsTypeCompleter ? $"[{PSArgumentCompleterInfo.Type.Unwrap().ToPsType()}]" : $"{PSArgumentCompleterInfo.ResourceTypes?.Select(r => $"\"{r}\"")?.JoinIgnoreEmpty(", ")}")})]{Environment.NewLine}" + : String.Empty; + } + internal class DefaultInfoOutput { public bool HasDefaultInfo { get; } @@ -173,6 +188,7 @@ internal class BaseOutput public VariantGroup VariantGroup { get; } protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public BaseOutput(VariantGroup variantGroup) { VariantGroup = variantGroup; @@ -200,6 +216,21 @@ public string GetProcessCustomAttributesAtRuntime() {Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; } + private string GetLoginVerification() + { + if (!VariantGroup.IsInternal && IsAzure && !VariantGroup.IsModelCmdlet) + { + return $@" +{Indent}{Indent}$context = Get-AzContext +{Indent}{Indent}if (-not $context -and -not $testPlayback) {{ +{Indent}{Indent}{Indent}Write-Error ""No Azure login detected. Please run 'Connect-AzAccount' to log in."" +{Indent}{Indent}{Indent}exit +{Indent}{Indent}}} +"; + } + return ""; + } + private string GetTelemetry() { if (!VariantGroup.IsInternal && IsAzure) @@ -232,10 +263,16 @@ public override string ToString() => $@"begin {{ {Indent}{Indent}{Indent}$PSBoundParameters['OutBuffer'] = 1 {Indent}{Indent}}} {Indent}{Indent}$parameterSet = $PSCmdlet.ParameterSetName -{GetTelemetry()} +{Indent}{Indent} +{Indent}{Indent}$testPlayback = $false +{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }} +{GetLoginVerification()}{GetTelemetry()} {GetParameterSetToCmdletMapping()}{GetDefaultValuesStatements()} {GetProcessCustomAttributesAtRuntime()} {Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) +{Indent}{Indent}if ($wrappedCmd -eq $null) {{ +{Indent}{Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) +{Indent}{Indent}}} {Indent}{Indent}$scriptCmd = {{& $wrappedCmd @PSBoundParameters}} {Indent}{Indent}$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) {Indent}{Indent}$steppablePipeline.Begin($PSCmdlet) @@ -269,13 +306,16 @@ private string GetDefaultValuesStatements() var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); var parameterName = defaultInfo.ParameterGroup.ParameterName; sb.AppendLine(); + var setCondition = " "; + if (!String.IsNullOrEmpty(defaultInfo.SetCondition)) + { + setCondition = $" -and {defaultInfo.SetCondition}"; + } //Yabo: this is bad to hard code the subscription id, but autorest load input README.md reversely (entry readme -> required readme), there are no other way to //override default value set in required readme if ("SubscriptionId".Equals(parameterName)) { - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); - sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); - sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }}"); + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); sb.AppendLine($"{Indent}{Indent}{Indent}if ($testPlayback) {{"); sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')"); sb.AppendLine($"{Indent}{Indent}{Indent}}} else {{"); @@ -285,13 +325,15 @@ private string GetDefaultValuesStatements() } else { - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); sb.Append($"{Indent}{Indent}}}"); } + } return sb.ToString(); } + } internal class ProcessOutput : BaseOutput @@ -381,6 +423,8 @@ public override string ToString() var notesText = !String.IsNullOrEmpty(notes) ? $"{Environment.NewLine}.Notes{Environment.NewLine}{ComplexParameterHeader}{notes}" : String.Empty; var relatedLinks = String.Join(Environment.NewLine, CommentInfo.RelatedLinks.Select(l => $".Link{Environment.NewLine}{l}")); var relatedLinksText = !String.IsNullOrEmpty(relatedLinks) ? $"{Environment.NewLine}{relatedLinks}" : String.Empty; + var externalUrls = String.Join(Environment.NewLine, CommentInfo.ExternalUrls.Select(l => $".Link{Environment.NewLine}{l}")); + var externalUrlsText = !String.IsNullOrEmpty(externalUrls) ? $"{Environment.NewLine}{externalUrls}" : String.Empty; var examples = ""; foreach (var example in VariantGroup.HelpInfo.Examples) { @@ -393,7 +437,7 @@ public override string ToString() {CommentInfo.Description.ToDescriptionFormat(false)} {examples}{inputsText}{outputsText}{notesText} .Link -{CommentInfo.OnlineVersion}{relatedLinksText} +{CommentInfo.OnlineVersion}{relatedLinksText}{externalUrlsText} #> "; } @@ -587,7 +631,9 @@ public static string ToSyntaxTypeName(this Type type) public static AllowEmptyArrayOutput ToAllowEmptyArray(this bool hasAllowEmptyArray) => new AllowEmptyArrayOutput(hasAllowEmptyArray); - public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => new ArgumentCompleterOutput(completerInfo); + public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => (completerInfo is PSArgumentCompleterInfo psArgumentCompleterInfo) ? psArgumentCompleterInfo.ToArgumentCompleterOutput() : new ArgumentCompleterOutput(completerInfo); + + public static PSArgumentCompleterOutput ToArgumentCompleterOutput(this PSArgumentCompleterInfo completerInfo) => new PSArgumentCompleterOutput(completerInfo); public static DefaultInfoOutput ToDefaultInfoOutput(this ParameterGroup parameterGroup) => new DefaultInfoOutput(parameterGroup); diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs index 428b9d5f68b1..b0a5551ec29a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -31,7 +31,7 @@ internal class VariantGroup { public string ModuleName { get; } - public string RootModuleName {get => @"";} + public string RootModuleName { get => @""; } public string CmdletName { get; } public string CmdletVerb { get; } public string CmdletNoun { get; } @@ -49,7 +49,7 @@ internal class VariantGroup public PsHelpInfo HelpInfo { get; } public bool IsGenerated { get; } public bool IsInternal { get; } - + public bool IsModelCmdlet { get; } public string OutputFolder { get; } public string FileName { get; } public string FilePath { get; } @@ -84,7 +84,7 @@ public VariantGroup(string moduleName, string cmdletName, Variant[] variants, st HelpInfo = Variants.Select(v => v.HelpInfo).FirstOrDefault() ?? new PsHelpInfo(); IsGenerated = Variants.All(v => v.Attributes.OfType().Any()); IsInternal = isInternal; - + IsModelCmdlet = Variants.All(v => v.IsModelCmdlet); OutputFolder = outputFolder; FileName = $"{CmdletName}{(isTest ? ".Tests" : String.Empty)}.ps1"; FilePath = Path.Combine(OutputFolder, FileName); @@ -101,12 +101,23 @@ private string DetermineDefaultParameterSetName() if (String.IsNullOrEmpty(defaultParameterSet)) { var variantParamCountGroups = Variants + .Where(v => !v.IsNotSuggestDefaultParameterSet) .Select(v => ( variant: v.VariantName, paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) .GroupBy(vpc => vpc.isSimple) .ToArray(); + if (variantParamCountGroups.Length == 0) + { + variantParamCountGroups = Variants + .Select(v => ( + variant: v.VariantName, + paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), + isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) + .GroupBy(vpc => vpc.isSimple) + .ToArray(); + } var variantParameterCounts = (variantParamCountGroups.Any(g => g.Key) ? variantParamCountGroups.Where(g => g.Key) : variantParamCountGroups).SelectMany(g => g).ToArray(); var smallestParameterCount = variantParameterCounts.Min(vpc => vpc.paramCount); defaultParameterSet = variantParameterCounts.First(vpc => vpc.paramCount == smallestParameterCount).variant; @@ -134,7 +145,9 @@ internal class Variant public Parameter[] Parameters { get; } public Parameter[] CmdletOnlyParameters { get; } public bool IsInternal { get; } + public bool IsModelCmdlet { get; } public bool IsDoNotExport { get; } + public bool IsNotSuggestDefaultParameterSet { get; } public string[] Profiles { get; } public Variant(string cmdletName, string variantName, CommandInfo info, CommandMetadata metadata, bool hasParameterSets = false, PsHelpInfo helpInfo = null) @@ -155,6 +168,8 @@ public Variant(string cmdletName, string variantName, CommandInfo info, CommandM Parameters = this.ToParameters().OrderBy(p => p.OrderCategory).ThenByDescending(p => p.IsMandatory).ToArray(); IsInternal = Attributes.OfType().Any(); IsDoNotExport = Attributes.OfType().Any(); + IsModelCmdlet = Attributes.OfType().Any(); + IsNotSuggestDefaultParameterSet = Attributes.OfType().Any(); CmdletOnlyParameters = Parameters.Where(p => !p.Categories.Any(c => c == ParameterCategory.Azure || c == ParameterCategory.Runtime)).ToArray(); Profiles = Attributes.OfType().SelectMany(pa => pa.Profiles).ToArray(); } @@ -210,6 +225,7 @@ public ParameterGroup(string parameterName, Parameter[] parameters, string[] all HasValidateNotNull = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); HasAllowEmptyArray = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); CompleterInfo = Parameters.Select(p => p.CompleterInfoAttribute).FirstOrDefault()?.ToCompleterInfo() + ?? Parameters.Select(p => p.PSArgumentCompleterAttribute).FirstOrDefault()?.ToPSArgumentCompleterInfo() ?? Parameters.Select(p => p.ArgumentCompleterAttribute).FirstOrDefault()?.ToCompleterInfo(); DefaultInfo = Parameters.Select(p => p.DefaultInfoAttribute).FirstOrDefault()?.ToDefaultInfo(this) ?? Parameters.Select(p => p.DefaultValueAttribute).FirstOrDefault(dv => dv != null)?.ToDefaultInfo(this); @@ -244,7 +260,6 @@ internal class Parameter public ParameterMetadata Metadata { get; } public PsParameterHelpInfo HelpInfo { get; } public Type ParameterType { get; } - public Attribute[] Attributes { get; } public ParameterCategory[] Categories { get; } public ParameterCategory OrderCategory { get; } @@ -254,6 +269,7 @@ internal class Parameter public bool SupportsWildcards { get; } public CompleterInfoAttribute CompleterInfoAttribute { get; } public ArgumentCompleterAttribute ArgumentCompleterAttribute { get; } + public PSArgumentCompleterAttribute PSArgumentCompleterAttribute { get; } public bool ValueFromPipeline { get; } public bool ValueFromPipelineByPropertyName { get; } @@ -286,7 +302,8 @@ public Parameter(string variantName, string parameterName, ParameterMetadata met } SupportsWildcards = Attributes.OfType().Any(); CompleterInfoAttribute = Attributes.OfType().FirstOrDefault(); - ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + PSArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(attr => !attr.GetType().Equals(typeof(PSArgumentCompleterAttribute))); ValueFromPipeline = ParameterAttribute.ValueFromPipeline; ValueFromPipelineByPropertyName = ParameterAttribute.ValueFromPipelineByPropertyName; @@ -295,10 +312,10 @@ public Parameter(string variantName, string parameterName, ParameterMetadata met IsMandatory = ParameterAttribute.Mandatory; var complexParameterName = ParameterName.ToUpperInvariant(); - var complexMessage = $"{Environment.NewLine}To construct, see NOTES section for {complexParameterName} properties and create a hash table."; + var complexMessage = $"{Environment.NewLine}"; var description = ParameterAttribute.HelpMessage.NullIfEmpty() ?? HelpInfo.Description.NullIfEmpty() ?? InfoAttribute?.Description.NullIfEmpty() ?? String.Empty; // Remove the complex type message as it will be reinserted if this is a complex type - description = description.NormalizeNewLines().Replace(complexMessage, String.Empty).Replace(complexMessage.ToPsSingleLine(), String.Empty); + description = description.NormalizeNewLines(); // Make an InfoAttribute for processing only if one isn't provided InfoAttribute = Attributes.OfType().FirstOrDefault() ?? new InfoAttribute { PossibleTypes = new[] { ParameterType.Unwrap() }, Required = IsMandatory }; // Set the description if the InfoAttribute does not have one since they are exported without a description @@ -318,7 +335,7 @@ internal class ComplexInterfaceInfo public bool Required { get; } public bool ReadOnly { get; } public string Description { get; } - + public ComplexInterfaceInfo[] NestedInfos { get; } public bool IsComplexInterface { get; } @@ -335,7 +352,7 @@ public ComplexInterfaceInfo(string name, Type type, InfoAttribute infoAttribute, var unwrappedType = Type.Unwrap(); var hasBeenSeen = seenTypes?.Contains(unwrappedType) ?? false; (seenTypes ?? (seenTypes = new List())).Add(unwrappedType); - NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[]{} : + NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[] { } : unwrappedType.GetInterfaces() .Concat(InfoAttribute.PossibleTypes) .SelectMany(pt => pt.GetProperties() @@ -366,6 +383,7 @@ internal class CommentInfo public string OnlineVersion { get; } public string[] RelatedLinks { get; } + public string[] ExternalUrls { get; } private const string HelpLinkPrefix = @"https://learn.microsoft.com/powershell/module/"; @@ -374,6 +392,7 @@ public CommentInfo(VariantGroup variantGroup) var helpInfo = variantGroup.HelpInfo; Description = variantGroup.Variants.SelectMany(v => v.Attributes).OfType().FirstOrDefault()?.Description.NullIfEmpty() ?? helpInfo.Description.EmptyIfNull(); + Description = PsHelpInfo.CapitalizeFirstLetter(Description); // If there is no Synopsis, PowerShell may put in the Syntax string as the Synopsis. This seems unintended, so we remove the Synopsis in this situation. var synopsis = helpInfo.Synopsis.EmptyIfNull().Trim().StartsWith(variantGroup.CmdletName) ? String.Empty : helpInfo.Synopsis; Synopsis = synopsis.NullIfEmpty() ?? Description; @@ -391,6 +410,9 @@ public CommentInfo(VariantGroup variantGroup) var moduleName = variantGroup.RootModuleName == "" ? variantGroup.ModuleName.ToLowerInvariant() : variantGroup.RootModuleName.ToLowerInvariant(); OnlineVersion = helpInfo.OnlineVersion?.Uri.NullIfEmpty() ?? $@"{HelpLinkPrefix}{moduleName}/{variantGroup.CmdletName.ToLowerInvariant()}"; RelatedLinks = helpInfo.RelatedLinks.Select(rl => rl.Text).ToArray(); + + // Get external urls from attribute + ExternalUrls = variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Select(e => e.Url)?.Distinct()?.ToArray(); } } @@ -420,11 +442,22 @@ public CompleterInfo(ArgumentCompleterAttribute completerAttribute) } } + internal class PSArgumentCompleterInfo : CompleterInfo + { + public string[] ResourceTypes { get; } + + public PSArgumentCompleterInfo(PSArgumentCompleterAttribute completerAttribute) : base(completerAttribute) + { + ResourceTypes = completerAttribute.ResourceTypes; + } + } + internal class DefaultInfo { public string Name { get; } public string Description { get; } public string Script { get; } + public string SetCondition { get; } public ParameterGroup ParameterGroup { get; } public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) @@ -432,6 +465,7 @@ public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterG Name = infoAttribute.Name; Description = infoAttribute.Description; Script = infoAttribute.Script; + SetCondition = infoAttribute.SetCondition; ParameterGroup = parameterGroup; } @@ -479,7 +513,8 @@ public static Parameter[] ToParameters(this Variant variant) parameterHelp = parameterHelp.Where(ph => (!ph.ParameterSetNames.Any() || ph.ParameterSetNames.Any(psn => psn == variant.VariantName || psn == AllParameterSets)) && ph.Name != "IncludeTotalCount"); } var result = parameters.Select(p => new Parameter(variant.VariantName, p.Key, p.Value, parameterHelp.FirstOrDefault(ph => ph.Name == p.Key))); - if (variant.SupportsPaging) { + if (variant.SupportsPaging) + { // If supportsPaging is set, we will need to add First and Skip parameters since they are treated as common parameters which as not contained on Metadata>parameters variant.Info.Parameters["First"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Gets only the first 'n' objects."; variant.Info.Parameters["Skip"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Ignores the first 'n' objects and then gets the remaining objects."; @@ -507,7 +542,7 @@ public static ComplexInterfaceInfo ToComplexInterfaceInfo(this InfoAttribute inf public static CompleterInfo ToCompleterInfo(this CompleterInfoAttribute infoAttribute) => new CompleterInfo(infoAttribute); public static CompleterInfo ToCompleterInfo(this ArgumentCompleterAttribute completerAttribute) => new CompleterInfo(completerAttribute); - + public static PSArgumentCompleterInfo ToPSArgumentCompleterInfo(this PSArgumentCompleterAttribute completerAttribute) => new PSArgumentCompleterInfo(completerAttribute); public static DefaultInfo ToDefaultInfo(this DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) => new DefaultInfo(infoAttribute, parameterGroup); public static DefaultInfo ToDefaultInfo(this PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) => new DefaultInfo(defaultValueAttribute, parameterGroup); } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/PsAttributes.cs index 2b8569e2a100..1b2613dd4432 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/PsAttributes.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/PsAttributes.cs @@ -22,6 +22,11 @@ public class DoNotExportAttribute : Attribute { } + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] + public class ModelCmdletAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Class)] public class InternalExportAttribute : Attribute { @@ -55,6 +60,11 @@ public class HttpPathAttribute : Attribute public string ApiVersion { get; set; } } + [AttributeUsage(AttributeTargets.Class)] + public class NotSuggestDefaultParameterSetAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] public class CategoryAttribute : Attribute { @@ -109,6 +119,11 @@ public enum PropertyOrigin Inlined } + [AttributeUsage(AttributeTargets.Property)] + public class ConstantAttribute : Attribute + { + } + [AttributeUsage(AttributeTargets.Property)] public class FormatTableAttribute : Attribute { diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/PsExtensions.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/PsExtensions.cs index d778eb101c92..b10fc3f03b70 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/PsExtensions.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/PsExtensions.cs @@ -13,6 +13,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PowerShell { internal static class PsExtensions { + public static PSObject AddMultipleTypeNameIntoPSObject(this object obj, string multipleTag = "#Multiple") + { + var psObj = new PSObject(obj); + psObj.TypeNames.Insert(0, $"{psObj.TypeNames[0]}{multipleTag}"); + return psObj; + } + // https://stackoverflow.com/a/863944/294804 // https://stackoverflow.com/a/4452598/294804 // https://stackoverflow.com/a/28701974/294804 diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/PsHelpers.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/PsHelpers.cs index e2742dfa7d46..eed400cf739d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/PsHelpers.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/BuildTime/PsHelpers.cs @@ -67,7 +67,7 @@ public static IEnumerable GetScriptHelpInfo(params string[] modulePath public static IEnumerable GetModuleCmdletsAndHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) { - var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => + var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => $@"(Get-Command -Module (Import-Module '{mp}' -PassThru) | Where-Object {{ $_.CommandType -ne 'Alias' }} | ForEach-Object {{ @{{ CommandInfo = $_; HelpInfo = ( invoke-command {{ try {{ Get-Help -Name $_.Name -Full }} catch{{ '' }} }} ) }} }})" )); return (cmdlet?.RunScript(getCmdletAndHelp) ?? RunScript(getCmdletAndHelp)) @@ -88,7 +88,7 @@ public static Guid ReadGuidFromPsd1(string psd1Path) if (File.Exists(psd1Path)) { var currentGuid = File.ReadAllLines(psd1Path) - .FirstOrDefault(l => l.StartsWith(GuidStart))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) + .FirstOrDefault(l => l.TrimStart().StartsWith(GuidStart.TrimStart()))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) .LastOrDefault()?.Replace("'", String.Empty); guid = currentGuid != null ? Guid.Parse(currentGuid) : guid; } diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Context.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Context.cs new file mode 100644 index 000000000000..97eb0ec60145 --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Context.cs @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Extensions; + + /// + /// The IContext Interface defines the communication mechanism for input customization. + /// + /// + /// In the context, we will have client, pipeline, PSBoundParameters, default EventListener, Cancellation. + /// + public interface IContext + { + System.Management.Automation.InvocationInfo InvocationInformation { get; set; } + System.Threading.CancellationTokenSource CancellationTokenSource { get; set; } + System.Collections.Generic.IDictionary ExtensibleParameters { get; } + HttpPipeline Pipeline { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.StreamAnalytics Client { get; } + } +} diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Events.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Events.cs index 0ac7c3dc93a4..cda471034be8 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Events.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Events.cs @@ -22,6 +22,6 @@ public static partial class Events public const string FollowingNextLink = nameof(FollowingNextLink); public const string DelayBeforePolling = nameof(DelayBeforePolling); public const string Polling = nameof(Polling); - + public const string Progress = nameof(Progress); } -} \ No newline at end of file +} diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/ISendAsync.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/ISendAsync.cs index 7422f02709cc..e3e080cf057d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/ISendAsync.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/ISendAsync.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime using System.Threading.Tasks; using System.Collections; using System.Linq; + using System; + /// /// The interface for sending an HTTP request across the wire. @@ -70,6 +72,7 @@ public interface ISendAsyncTerminalFactory public partial class HttpPipeline : ISendAsync { + private const int DefaultMaxRetry = 3; private ISendAsync pipeline; private ISendAsyncTerminalFactory terminal; private List steps = new List(); @@ -92,6 +95,111 @@ public HttpPipeline(ISendAsyncTerminalFactory terminalStep) /// public HttpPipeline Clone() => new HttpPipeline(terminal) { steps = this.steps.ToList(), pipeline = this.pipeline }; + private bool shouldRetry429(HttpResponseMessage response) + { + if (response.StatusCode == (System.Net.HttpStatusCode)429) + { + var retryAfter = response.Headers.RetryAfter; + if (retryAfter != null && retryAfter.Delta.HasValue) + { + return true; + } + } + return false; + } + /// + /// The step to handle 429 response with retry-after header. + /// + public async Task Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = int.MaxValue; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES_FOR_429")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES_FOR_429")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetry429(response) && count++ < retryCount) + { + request = await cloneRequest.CloneWithContent(); + var retryAfter = response.Headers.RetryAfter; + await Task.Delay(retryAfter.Delta.Value, callback.Token); + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code 429 after waiting {retryAfter.Delta.Value.TotalSeconds} seconds."); + response = await next.SendAsync(request, callback); + } + return response; + } + + private bool shouldRetryError(HttpResponseMessage response) + { + if (response.StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + if (response.StatusCode != System.Net.HttpStatusCode.NotImplemented && + response.StatusCode != System.Net.HttpStatusCode.HttpVersionNotSupported) + { + return true; + } + } + else if (response.StatusCode == System.Net.HttpStatusCode.RequestTimeout) + { + return true; + } + else if (response.StatusCode == (System.Net.HttpStatusCode)429 && response.Headers.RetryAfter == null) + { + return true; + } + return false; + } + + /// + /// Returns true if status code in HttpRequestExceptionWithStatus exception is greater + /// than or equal to 500 and not NotImplemented (501) or HttpVersionNotSupported (505). + /// Or it's 429 (TOO MANY REQUESTS) without Retry-After header. + /// + public async Task RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = DefaultMaxRetry; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetryError(response) && count++ < retryCount) + { + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code {response.StatusCode}"); + request = await cloneRequest.CloneWithContent(); + response = await next.SendAsync(request, callback); + } + return response; + } + public ISendAsyncTerminalFactory TerminalFactory { get => terminal; @@ -117,6 +225,11 @@ public ISendAsync Pipeline // create the pipeline from scratch. var next = terminal.Create(); + if (Convert.ToBoolean(@"true")) + { + next = (new SendAsyncFactory(Retry429)).Create(next) ?? next; + next = (new SendAsyncFactory(RetryError)).Create(next) ?? next; + } foreach (var factory in steps) { // skip factories that return null. diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/InfoAttribute.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/InfoAttribute.cs index dda8f7c7d1b4..b18dbc1820f1 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/InfoAttribute.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/InfoAttribute.cs @@ -11,6 +11,9 @@ public class InfoAttribute : Attribute { public bool Required { get; set; } = false; public bool ReadOnly { get; set; } = false; + public bool Read { get; set; } = true; + public bool Create { get; set; } = true; + public bool Update { get; set; } = true; public Type[] PossibleTypes { get; set; } = new Type[0]; public string Description { get; set; } = ""; public string SerializedName { get; set; } = ""; @@ -30,5 +33,6 @@ public class DefaultInfoAttribute : Attribute public string Script { get; set; } = ""; public string Name { get; set; } = ""; public string Description { get; set; } = ""; + public string SetCondition { get; set; } = ""; } } \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/InputHandler.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/InputHandler.cs new file mode 100644 index 000000000000..919fcadf382a --- /dev/null +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/InputHandler.cs @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Cmdlets +{ + public abstract class InputHandler + { + protected InputHandler NextHandler = null; + + public void SetNextHandler(InputHandler nextHandler) + { + this.NextHandler = nextHandler; + } + + public abstract void Process(Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.IContext context); + } +} \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/MessageAttribute.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/MessageAttribute.cs index abde377c4b1b..40a9e13b4c12 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/MessageAttribute.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/MessageAttribute.cs @@ -16,9 +16,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime public class GenericBreakingChangeAttribute : Attribute { private string _message; - //A dexcription of what the change is about, non mandatory + //A description of what the change is about, non mandatory public string ChangeDescription { get; set; } = null; + //Name of the module that is being deprecated + public string moduleName { get; set; } = String.IsNullOrEmpty(@"") ? @"Az.StreamAnalytics" : @""; + //The version the change is effective from, non mandatory public string DeprecateByVersion { get; } public string DeprecateByAzVersion { get; } @@ -82,7 +85,7 @@ public void PrintCustomAttributeInfo(Action writeOutput) } writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion)); - writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.moduleName, this.DeprecateByVersion)); if (OldWay != null && NewWay != null) { @@ -191,11 +194,11 @@ public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this( this.IsEstimatedGaDateSet = true; } } - + public void PrintCustomAttributeInfo(Action writeOutput) { writeOutput(this._message); - + if (IsEstimatedGaDateSet) { writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString())); diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs index 575d6c68926d..33f2eab41bea 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs @@ -21,6 +21,11 @@ internal XNodeArray(params JsonNode[] values) items = new List(values); } + internal XNodeArray(System.Collections.Generic.List values) + { + items = new List(values); + } + public override JsonNode this[int index] => items[index]; internal override JsonType? ElementType => null; diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Properties/Resources.resx b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Properties/Resources.resx index a08a2e50172b..4ef90b70573d 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Properties/Resources.resx +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/Properties/Resources.resx @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can -- The change is expected to take effect from version : '{0}' +- The change is expected to take effect in '{0}' from version : '{1}' ```powershell diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/SerializationMode.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/SerializationMode.cs index aa3e65e70451..aded93d58473 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/SerializationMode.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/SerializationMode.cs @@ -9,8 +9,10 @@ public enum SerializationMode { None = 0, IncludeHeaders = 1 << 0, - IncludeReadOnly = 1 << 1, - - IncludeAll = IncludeHeaders | IncludeReadOnly + IncludeRead = 1 << 1, + IncludeCreate = 1 << 2, + IncludeUpdate = 1 << 3, + IncludeAll = IncludeHeaders | IncludeRead | IncludeCreate | IncludeUpdate, + IncludeCreateOrUpdate = IncludeCreate | IncludeUpdate } } \ No newline at end of file diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/TypeConverterExtensions.cs b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/TypeConverterExtensions.cs index 156f0c4b7be5..a485567ce45c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/TypeConverterExtensions.cs +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/generated/runtime/TypeConverterExtensions.cs @@ -62,6 +62,56 @@ internal static T[] SelectToArray(object source, System.Func return result.ToArray(); } + internal static System.Collections.Generic.List SelectToList(object source, System.Func converter) + { + // null begets null + if (source == null) + { + return null; + } + + // single values and strings are just encapsulated in the array. + if (source is string || !(source is System.Collections.IEnumerable)) + { + try + { + return new T[] { (T)converter(source) }.ToList(); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + return new T[0].ToList(); // empty result if couldn't convert. + } + + var result = new System.Collections.Generic.List(); + foreach (var each in (System.Collections.IEnumerable)source) + { + try + { + result.Add((T)converter(each)); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + } + return result; + } internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.Generic.IDictionary dictionary) { if (null != dictionary) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Get-AzStreamAnalyticsDefaultFunctionDefinition.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Get-AzStreamAnalyticsDefaultFunctionDefinition.ps1 index 4d8b7ada577d..d4e7098cbf3a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Get-AzStreamAnalyticsDefaultFunctionDefinition.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Get-AzStreamAnalyticsDefaultFunctionDefinition.ps1 @@ -23,11 +23,11 @@ Retrieves the default definition of a function based on the parameters specified Get-AzStreamAnalyticsDefaultFunctionDefinition -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name mlsfunction-01 -BindingType Microsoft.MachineLearningServices -Endpoint "http://875da830-4d5f-44f1-b221-718a5f26a21d.eastus.azurecontainer.io/score"-UdfType Scalar .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Notes COMPLEX PARAMETER PROPERTIES @@ -47,15 +47,29 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsdefaultfunctiondefinition #> function Get-AzStreamAnalyticsDefaultFunctionDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction])] [CmdletBinding(DefaultParameterSetName='RetrieveExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Retrieve', Mandatory)] [Parameter(ParameterSetName='RetrieveExpanded', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -63,6 +77,10 @@ param( [Parameter(ParameterSetName='Retrieve', Mandatory)] [Parameter(ParameterSetName='RetrieveExpanded', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the function. @@ -70,6 +88,8 @@ param( [Parameter(ParameterSetName='Retrieve', Mandatory)] [Parameter(ParameterSetName='RetrieveExpanded', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -78,6 +98,8 @@ param( [Parameter(ParameterSetName='Retrieve')] [Parameter(ParameterSetName='RetrieveExpanded')] + [Parameter(ParameterSetName='RetrieveViaJsonFilePath')] + [Parameter(ParameterSetName='RetrieveViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] @@ -89,24 +111,43 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='RetrieveViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RetrieveViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter(ParameterSetName='Retrieve', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='RetrieveViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RetrieveViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters] # Parameters used to specify the type of function to retrieve the default definition for. - # To construct, see NOTES section for FUNCTIONRETRIEVEDEFAULTDEFINITIONPARAMETER properties and create a hash table. ${FunctionRetrieveDefaultDefinitionParameter}, - [Parameter(ParameterSetName='RetrieveExpanded', Mandatory)] - [Parameter(ParameterSetName='RetrieveViaIdentityExpanded', Mandatory)] + [Parameter(ParameterSetName='RetrieveExpanded')] + [Parameter(ParameterSetName='RetrieveViaIdentityExpanded')] + [Parameter(ParameterSetName='RetrieveViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # Indicates the function binding type. ${BindingType}, + [Parameter(ParameterSetName='RetrieveViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Retrieve operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RetrieveViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Retrieve operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -163,16 +204,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Retrieve = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_Retrieve'; RetrieveExpanded = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpanded'; RetrieveViaIdentity = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentity'; RetrieveViaIdentityExpanded = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityExpanded'; + RetrieveViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjob'; + RetrieveViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjobExpanded'; + RetrieveViaJsonFilePath = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonFilePath'; + RetrieveViaJsonString = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonString'; } - if (('Retrieve', 'RetrieveExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Retrieve', 'RetrieveExpanded', 'RetrieveViaJsonFilePath', 'RetrieveViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -181,6 +227,9 @@ begin { } $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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Get-AzStreamAnalyticsOperation.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Get-AzStreamAnalyticsOperation.ps1 index e7517d733bce..da23032542c9 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Get-AzStreamAnalyticsOperation.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Get-AzStreamAnalyticsOperation.ps1 @@ -25,12 +25,12 @@ Lists all of the available Stream Analytics related operations. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsoperation #> function Get-AzStreamAnalyticsOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -89,12 +89,18 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsOperation_List'; } $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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsFunction.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsFunction.ps1 index 7d4df57e6995..eb0be1b33e7f 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsFunction.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsFunction.ps1 @@ -16,20 +16,20 @@ <# .Synopsis -Creates a function or replaces an already existing function under an existing streaming job. +Create a function or replaces an already existing function under an existing streaming job. .Description -Creates a function or replaces an already existing function under an existing streaming job. +Create a function or replaces an already existing function under an existing streaming job. .Example New-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name function-01 -File .\test\template-json\Function_JavascriptUdf.json .Example New-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name function-01 -File .\test\template-json\MachineLearningServices.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Notes COMPLEX PARAMETER PROPERTIES @@ -39,7 +39,7 @@ FUNCTION : A function object, containing all information associated w [ConfigurationProperty ]: [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -50,7 +50,7 @@ FUNCTION : A function object, containing all information associated w FUNCTIONCONFIGURATIONPROPERTY : . [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -67,15 +67,29 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsfunction #> function New-AzStreamAnalyticsFunction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -83,6 +97,10 @@ param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('FunctionName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -91,6 +109,8 @@ param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -99,6 +119,8 @@ param( [Parameter(ParameterSetName='Create')] [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -110,9 +132,15 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -130,28 +158,41 @@ param( [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction] # A function object, containing all information associated with the named function. # All functions are contained under a streaming job. - # To construct, see NOTES section for FUNCTION properties and create a hash table. ${Function}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration] # . - # To construct, see NOTES section for FUNCTIONCONFIGURATIONPROPERTY properties and create a hash table. ${FunctionConfigurationProperty}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # Indicates the type of function. ${PropertiesType}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -208,16 +249,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Create = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_Create'; CreateExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_CreateExpanded'; CreateViaIdentity = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_CreateViaIdentity'; CreateViaIdentityExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_CreateViaIdentityExpanded'; + CreateViaIdentityStreamingjob = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_CreateViaIdentityStreamingjob'; + CreateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_CreateViaIdentityStreamingjobExpanded'; + CreateViaJsonFilePath = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_CreateViaJsonString'; } - if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -226,6 +272,9 @@ begin { } $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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsInput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsInput.ps1 index fede8fe7fe0e..18dba5dd59bd 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsInput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsInput.ps1 @@ -16,20 +16,20 @@ <# .Synopsis -Creates an input or replaces an already existing input under an existing streaming job. +Create an input or replaces an already existing input under an existing streaming job. .Description -Creates an input or replaces an already existing input under an existing streaming job. +Create an input or replaces an already existing input under an existing streaming job. .Example New-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name input-01 -File .\test\template-json\EventHub.json .Example New-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name input-01 -File .\test\template-json\IotHub.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Notes COMPLEX PARAMETER PROPERTIES @@ -43,7 +43,7 @@ INPUT : An input object, containing all information associated with the Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the cluster. @@ -63,16 +63,30 @@ PROPERTY : The properties that are associated with an input. R Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsinput #> function New-AzStreamAnalyticsInput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -80,6 +94,10 @@ param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('InputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -88,6 +106,8 @@ param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -96,6 +116,8 @@ param( [Parameter(ParameterSetName='Create')] [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -107,9 +129,15 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -127,22 +155,34 @@ param( [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput] # An input object, containing all information associated with the named input. # All inputs are contained under a streaming job. - # To construct, see NOTES section for INPUT properties and create a hash table. ${Input}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties] # The properties that are associated with an input. # Required on PUT (CreateOrReplace) requests. - # To construct, see NOTES section for PROPERTY properties and create a hash table. ${Property}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -199,16 +239,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Create = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_Create'; CreateExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_CreateExpanded'; CreateViaIdentity = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_CreateViaIdentity'; CreateViaIdentityExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_CreateViaIdentityExpanded'; + CreateViaIdentityStreamingjob = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_CreateViaIdentityStreamingjob'; + CreateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_CreateViaIdentityStreamingjobExpanded'; + CreateViaJsonFilePath = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_CreateViaJsonString'; } - if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -217,6 +262,9 @@ begin { } $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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsJob.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsJob.ps1 index 687c51adf308..311e723a911a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsJob.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsJob.ps1 @@ -16,18 +16,14 @@ <# .Synopsis -Creates a streaming job or replaces an already existing streaming job. +Create a streaming job or replaces an already existing streaming job. .Description -Creates a streaming job or replaces an already existing streaming job. +Create a streaming job or replaces an already existing streaming job. .Example New-AzStreamAnalyticsJob -ResourceGroupName azure-rg-test -Name sajob-02-pwsh -Location westcentralus -SkuName Standard -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob .Notes COMPLEX PARAMETER PROPERTIES @@ -37,7 +33,7 @@ FUNCTION : A list of one or more functions for the streaming job. T [ConfigurationProperty ]: [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -53,123 +49,42 @@ INPUT : A list of one or more inputs to the streaming job. The name pr Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - -INPUTOBJECT : Identity Parameter - [ClusterName ]: The name of the cluster. - [FunctionName ]: The name of the function. - [Id ]: Resource identity path - [InputName ]: The name of the input. - [JobName ]: The name of the streaming job. - [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ - [OutputName ]: The name of the output. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. - [TransformationName ]: The name of the transformation. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. OUTPUT : A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output. [Datasource ]: Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. Type : Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. [ETag ]: - [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. [SizeWindow ]: [TimeWindow ]: - -STREAMINGJOB : A streaming job object, containing all information associated with the named streaming job. - [Location ]: The geo-location where the resource lives - [Tag ]: Resource tags. - [(Any) ]: This indicates any property can be added to this object. - [ClusterId ]: The resource id of cluster. - [CompatibilityLevel ]: Controls certain runtime behaviors of the streaming job. - [ContentStoragePolicy ]: Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. . - [DataLocale ]: The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to 'en-US' if none specified. - [ETag ]: - [EventsLateArrivalMaxDelayInSecond ]: The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a value of -1. - [EventsOutOfOrderMaxDelayInSecond ]: The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. - [EventsOutOfOrderPolicy ]: Indicates the policy to apply to events that arrive out of order in the input event stream. - [ExternalContainer ]: - [ExternalPath ]: - [Function ]: A list of one or more functions for the streaming job. The name property for each function is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual transformation. - [ConfigurationProperty ]: - [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. - Type : Indicates the function binding type. - [Input ]: - [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx - [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. - [Output ]: Describes the output of a function. - [DataType ]: The (Azure Stream Analytics supported) data type of the function output. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx - [ETag ]: - [PropertiesType ]: Indicates the type of function. - [IdentityPrincipalId ]: - [IdentityTenantId ]: - [IdentityType ]: - [Input ]: A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual input. - [ETag ]: - [Property ]: The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. - Type : Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests. - [Compression ]: Describes how input data is compressed - Type : - [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data - [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - [JobStorageAccountAuthenticationMode ]: Authentication Mode. - [JobStorageAccountKey ]: The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [JobStorageAccountName ]: The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [JobType ]: Describes the type of the job. Valid modes are `Cloud` and 'Edge'. - [Output ]: A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output. - [Datasource ]: Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. - [ETag ]: - [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - [SizeWindow ]: - [TimeWindow ]: - [OutputErrorPolicy ]: Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size). - [OutputStartMode ]: This property should only be utilized when it is desired that the job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time. - [OutputStartTime ]: Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. This property must have a value if outputStartMode is set to CustomTime. - [Query ]: Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. - [SkuName ]: The name of the SKU. Required on PUT (CreateOrReplace) requests. - [StorageAccountKey ]: The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [StorageAccountName ]: The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [StreamingUnit ]: Specifies the number of streaming units that the streaming job uses. - [TransformationETag ]: .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsjob #> function New-AzStreamAnalyticsJob { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Create', Mandatory)] - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. ${Name}, - [Parameter(ParameterSetName='Create', Mandatory)] - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Create')] - [Parameter(ParameterSetName='CreateExpanded')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -185,41 +100,29 @@ param( # Other values will result in a 412 Pre-condition Failed response. ${IfNoneMatch}, - [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob] - # A streaming job object, containing all information associated with the named streaming job. - # To construct, see NOTES section for STREAMINGJOB properties and create a hash table. - ${StreamingJob}, - [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The resource id of cluster. ${ClusterId}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("1.0")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel] + [System.String] # Controls certain runtime behaviors of the streaming job. ${CompatibilityLevel}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("SystemAccount", "JobStorageAccount")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy] + [System.String] # Valid values are JobStorageAccount and SystemAccount. # If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. # . ${ContentStoragePolicy}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The data locale of the stream analytics job. @@ -228,7 +131,12 @@ param( ${DataLocale}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Determines whether to enable a system-assigned identity for the resource. + ${EnableSystemAssignedIdentity}, + + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Int32] # The maximum tolerable delay in seconds where events arriving late could be included. @@ -237,89 +145,70 @@ param( ${EventsLateArrivalMaxDelayInSecond}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Int32] # The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. ${EventsOutOfOrderMaxDelayInSecond}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Adjust", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy] + [System.String] # Indicates the policy to apply to events that arrive out of order in the input event stream. ${EventsOutOfOrderPolicy}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # . ${ExternalContainer}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # . ${ExternalPath}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[]] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction[]] # A list of one or more functions for the streaming job. # The name property for each function is required when specifying this property in a PUT request. # This property cannot be modify via a PATCH operation. # You must use the PATCH API available for the individual transformation. - # To construct, see NOTES section for FUNCTION properties and create a hash table. ${Function}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # . ${IdentityPrincipalId}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # . ${IdentityTenantId}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [System.String] - # . - ${IdentityType}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[]] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput[]] # A list of one or more inputs to the streaming job. # The name property for each input is required when specifying this property in a PUT request. # This property cannot be modify via a PATCH operation. # You must use the PATCH API available for the individual input. - # To construct, see NOTES section for INPUT properties and create a hash table. ${Input}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode] + [System.String] # Authentication Mode. ${JobStorageAccountAuthenticationMode}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The account key for the Azure Storage account. @@ -327,7 +216,6 @@ param( ${JobStorageAccountKey}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The name of the Azure Storage account. @@ -335,52 +223,45 @@ param( ${JobStorageAccountName}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Cloud", "Edge")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType] + [System.String] # Describes the type of the job. # Valid modes are `Cloud` and 'Edge'. ${JobType}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[]] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput[]] # A list of one or more outputs for the streaming job. # The name property for each output is required when specifying this property in a PUT request. # This property cannot be modify via a PATCH operation. # You must use the PATCH API available for the individual output. - # To construct, see NOTES section for OUTPUT properties and create a hash table. ${Output}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Stop", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy] + [System.String] # Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size). ${OutputErrorPolicy}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode] + [System.String] # This property should only be utilized when it is desired that the job be started immediately upon creation. # Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time. ${OutputStartMode}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.DateTime] # Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. @@ -388,7 +269,6 @@ param( ${OutputStartTime}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # Specifies the query that will be run in the streaming job. @@ -397,16 +277,14 @@ param( ${Query}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Standard")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName] + [System.String] # The name of the SKU. # Required on PUT (CreateOrReplace) requests. ${SkuName}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The account key for the Azure Storage account. @@ -414,7 +292,6 @@ param( ${StorageAccountKey}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The name of the Azure Storage account. @@ -422,20 +299,30 @@ param( ${StorageAccountName}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Int32] # Specifies the number of streaming units that the streaming job uses. ${StreamingUnit}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -504,16 +391,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ - Create = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsJob_Create'; CreateExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsJob_CreateExpanded'; - CreateViaIdentity = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsJob_CreateViaIdentity'; - CreateViaIdentityExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsJob_CreateViaIdentityExpanded'; + CreateViaJsonFilePath = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsJob_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsJob_CreateViaJsonString'; } - if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -522,6 +409,9 @@ begin { } $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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsOutput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsOutput.ps1 index c5414b7a3bee..0643b9e3a986 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsOutput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/New-AzStreamAnalyticsOutput.ps1 @@ -16,18 +16,18 @@ <# .Synopsis -Creates an output or replaces an already existing output under an existing streaming job. +Create an output or replaces an already existing output under an existing streaming job. .Description -Creates an output or replaces an already existing output under an existing streaming job. +Create an output or replaces an already existing output under an existing streaming job. .Example -New-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name output-01 -File .\test\template-json\StroageAccount.json +New-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name output-01 -File .\test\template-json\StorageAccount.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Notes COMPLEX PARAMETER PROPERTIES @@ -52,18 +52,32 @@ OUTPUT : An output object, containing all information associated with t [Datasource ]: Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. Type : Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. [ETag ]: - [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. [SizeWindow ]: [TimeWindow ]: + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsoutput #> function New-AzStreamAnalyticsOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -71,6 +85,10 @@ param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('OutputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -79,6 +97,8 @@ param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -87,6 +107,8 @@ param( [Parameter(ParameterSetName='Create')] [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -98,9 +120,15 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -118,33 +146,35 @@ param( [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput] # An output object, containing all information associated with the named output. # All outputs are contained under a streaming job. - # To construct, see NOTES section for OUTPUT properties and create a hash table. ${Output}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource] # Describes the data source that output will be written to. # Required on PUT (CreateOrReplace) requests. - # To construct, see NOTES section for DATASOURCE properties and create a hash table. ${Datasource}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType])] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType] + [System.String] # Indicates the type of serialization that the input or output uses. # Required on PUT (CreateOrReplace) requests. ${SerializationType}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Single] # . @@ -152,11 +182,24 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # . ${TimeWindow}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -213,16 +256,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Create = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_Create'; CreateExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_CreateExpanded'; CreateViaIdentity = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_CreateViaIdentity'; CreateViaIdentityExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_CreateViaIdentityExpanded'; + CreateViaIdentityStreamingjob = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_CreateViaIdentityStreamingjob'; + CreateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_CreateViaIdentityStreamingjobExpanded'; + CreateViaJsonFilePath = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_CreateViaJsonString'; } - if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -231,6 +279,9 @@ begin { } $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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/ProxyCmdletDefinitions.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/ProxyCmdletDefinitions.ps1 index d1ddc58bebea..d554d5fa844c 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -23,11 +23,11 @@ Retrieves the default definition of a function based on the parameters specified Get-AzStreamAnalyticsDefaultFunctionDefinition -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name mlsfunction-01 -BindingType Microsoft.MachineLearningServices -Endpoint "http://875da830-4d5f-44f1-b221-718a5f26a21d.eastus.azurecontainer.io/score"-UdfType Scalar .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Notes COMPLEX PARAMETER PROPERTIES @@ -47,15 +47,29 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsdefaultfunctiondefinition #> function Get-AzStreamAnalyticsDefaultFunctionDefinition { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction])] [CmdletBinding(DefaultParameterSetName='RetrieveExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Retrieve', Mandatory)] [Parameter(ParameterSetName='RetrieveExpanded', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -63,6 +77,10 @@ param( [Parameter(ParameterSetName='Retrieve', Mandatory)] [Parameter(ParameterSetName='RetrieveExpanded', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the function. @@ -70,6 +88,8 @@ param( [Parameter(ParameterSetName='Retrieve', Mandatory)] [Parameter(ParameterSetName='RetrieveExpanded', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RetrieveViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -78,6 +98,8 @@ param( [Parameter(ParameterSetName='Retrieve')] [Parameter(ParameterSetName='RetrieveExpanded')] + [Parameter(ParameterSetName='RetrieveViaJsonFilePath')] + [Parameter(ParameterSetName='RetrieveViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] @@ -89,24 +111,43 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='RetrieveViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RetrieveViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter(ParameterSetName='Retrieve', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='RetrieveViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RetrieveViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionRetrieveDefaultDefinitionParameters] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionRetrieveDefaultDefinitionParameters] # Parameters used to specify the type of function to retrieve the default definition for. - # To construct, see NOTES section for FUNCTIONRETRIEVEDEFAULTDEFINITIONPARAMETER properties and create a hash table. ${FunctionRetrieveDefaultDefinitionParameter}, - [Parameter(ParameterSetName='RetrieveExpanded', Mandatory)] - [Parameter(ParameterSetName='RetrieveViaIdentityExpanded', Mandatory)] + [Parameter(ParameterSetName='RetrieveExpanded')] + [Parameter(ParameterSetName='RetrieveViaIdentityExpanded')] + [Parameter(ParameterSetName='RetrieveViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # Indicates the function binding type. ${BindingType}, + [Parameter(ParameterSetName='RetrieveViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Retrieve operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RetrieveViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Retrieve operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -163,16 +204,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Retrieve = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_Retrieve'; RetrieveExpanded = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_RetrieveExpanded'; RetrieveViaIdentity = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentity'; RetrieveViaIdentityExpanded = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityExpanded'; + RetrieveViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjob'; + RetrieveViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaIdentityStreamingjobExpanded'; + RetrieveViaJsonFilePath = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonFilePath'; + RetrieveViaJsonString = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsDefaultFunctionDefinition_RetrieveViaJsonString'; } - if (('Retrieve', 'RetrieveExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Retrieve', 'RetrieveExpanded', 'RetrieveViaJsonFilePath', 'RetrieveViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -181,6 +227,9 @@ begin { } $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) @@ -221,12 +270,12 @@ Lists all of the available Stream Analytics related operations. {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/get-azstreamanalyticsoperation #> function Get-AzStreamAnalyticsOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOperation])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOperation])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -285,12 +334,18 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ List = 'Az.StreamAnalytics.private\Get-AzStreamAnalyticsOperation_List'; } $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) @@ -322,20 +377,20 @@ end { <# .Synopsis -Creates a function or replaces an already existing function under an existing streaming job. +Create a function or replaces an already existing function under an existing streaming job. .Description -Creates a function or replaces an already existing function under an existing streaming job. +Create a function or replaces an already existing function under an existing streaming job. .Example New-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name function-01 -File .\test\template-json\Function_JavascriptUdf.json .Example New-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name function-01 -File .\test\template-json\MachineLearningServices.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Notes COMPLEX PARAMETER PROPERTIES @@ -345,7 +400,7 @@ FUNCTION : A function object, containing all information associated w [ConfigurationProperty ]: [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -356,7 +411,7 @@ FUNCTION : A function object, containing all information associated w FUNCTIONCONFIGURATIONPROPERTY : . [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -373,15 +428,29 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsfunction #> function New-AzStreamAnalyticsFunction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -389,6 +458,10 @@ param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('FunctionName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -397,6 +470,8 @@ param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -405,6 +480,8 @@ param( [Parameter(ParameterSetName='Create')] [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -416,9 +493,15 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -436,28 +519,41 @@ param( [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction] # A function object, containing all information associated with the named function. # All functions are contained under a streaming job. - # To construct, see NOTES section for FUNCTION properties and create a hash table. ${Function}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration] # . - # To construct, see NOTES section for FUNCTIONCONFIGURATIONPROPERTY properties and create a hash table. ${FunctionConfigurationProperty}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # Indicates the type of function. ${PropertiesType}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -514,16 +610,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Create = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_Create'; CreateExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_CreateExpanded'; CreateViaIdentity = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_CreateViaIdentity'; CreateViaIdentityExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_CreateViaIdentityExpanded'; + CreateViaIdentityStreamingjob = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_CreateViaIdentityStreamingjob'; + CreateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_CreateViaIdentityStreamingjobExpanded'; + CreateViaJsonFilePath = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsFunction_CreateViaJsonString'; } - if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -532,6 +633,9 @@ begin { } $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) @@ -563,20 +667,20 @@ end { <# .Synopsis -Creates an input or replaces an already existing input under an existing streaming job. +Create an input or replaces an already existing input under an existing streaming job. .Description -Creates an input or replaces an already existing input under an existing streaming job. +Create an input or replaces an already existing input under an existing streaming job. .Example New-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name input-01 -File .\test\template-json\EventHub.json .Example New-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name input-01 -File .\test\template-json\IotHub.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Notes COMPLEX PARAMETER PROPERTIES @@ -590,7 +694,7 @@ INPUT : An input object, containing all information associated with the Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the cluster. @@ -610,16 +714,30 @@ PROPERTY : The properties that are associated with an input. R Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsinput #> function New-AzStreamAnalyticsInput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -627,6 +745,10 @@ param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('InputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -635,6 +757,8 @@ param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -643,6 +767,8 @@ param( [Parameter(ParameterSetName='Create')] [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -654,9 +780,15 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -674,22 +806,34 @@ param( [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput] # An input object, containing all information associated with the named input. # All inputs are contained under a streaming job. - # To construct, see NOTES section for INPUT properties and create a hash table. ${Input}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties] # The properties that are associated with an input. # Required on PUT (CreateOrReplace) requests. - # To construct, see NOTES section for PROPERTY properties and create a hash table. ${Property}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -746,16 +890,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Create = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_Create'; CreateExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_CreateExpanded'; CreateViaIdentity = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_CreateViaIdentity'; CreateViaIdentityExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_CreateViaIdentityExpanded'; + CreateViaIdentityStreamingjob = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_CreateViaIdentityStreamingjob'; + CreateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_CreateViaIdentityStreamingjobExpanded'; + CreateViaJsonFilePath = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsInput_CreateViaJsonString'; } - if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -764,6 +913,9 @@ begin { } $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) @@ -795,18 +947,14 @@ end { <# .Synopsis -Creates a streaming job or replaces an already existing streaming job. +Create a streaming job or replaces an already existing streaming job. .Description -Creates a streaming job or replaces an already existing streaming job. +Create a streaming job or replaces an already existing streaming job. .Example New-AzStreamAnalyticsJob -ResourceGroupName azure-rg-test -Name sajob-02-pwsh -Location westcentralus -SkuName Standard -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob .Notes COMPLEX PARAMETER PROPERTIES @@ -816,7 +964,7 @@ FUNCTION : A list of one or more functions for the streaming job. T [ConfigurationProperty ]: [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -832,123 +980,42 @@ INPUT : A list of one or more inputs to the streaming job. The name pr Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - -INPUTOBJECT : Identity Parameter - [ClusterName ]: The name of the cluster. - [FunctionName ]: The name of the function. - [Id ]: Resource identity path - [InputName ]: The name of the input. - [JobName ]: The name of the streaming job. - [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ - [OutputName ]: The name of the output. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. - [TransformationName ]: The name of the transformation. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. OUTPUT : A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output. [Datasource ]: Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. Type : Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. [ETag ]: - [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. [SizeWindow ]: [TimeWindow ]: - -STREAMINGJOB : A streaming job object, containing all information associated with the named streaming job. - [Location ]: The geo-location where the resource lives - [Tag ]: Resource tags. - [(Any) ]: This indicates any property can be added to this object. - [ClusterId ]: The resource id of cluster. - [CompatibilityLevel ]: Controls certain runtime behaviors of the streaming job. - [ContentStoragePolicy ]: Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. . - [DataLocale ]: The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to 'en-US' if none specified. - [ETag ]: - [EventsLateArrivalMaxDelayInSecond ]: The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a value of -1. - [EventsOutOfOrderMaxDelayInSecond ]: The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. - [EventsOutOfOrderPolicy ]: Indicates the policy to apply to events that arrive out of order in the input event stream. - [ExternalContainer ]: - [ExternalPath ]: - [Function ]: A list of one or more functions for the streaming job. The name property for each function is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual transformation. - [ConfigurationProperty ]: - [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. - Type : Indicates the function binding type. - [Input ]: - [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx - [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. - [Output ]: Describes the output of a function. - [DataType ]: The (Azure Stream Analytics supported) data type of the function output. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx - [ETag ]: - [PropertiesType ]: Indicates the type of function. - [IdentityPrincipalId ]: - [IdentityTenantId ]: - [IdentityType ]: - [Input ]: A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual input. - [ETag ]: - [Property ]: The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. - Type : Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests. - [Compression ]: Describes how input data is compressed - Type : - [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data - [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - [JobStorageAccountAuthenticationMode ]: Authentication Mode. - [JobStorageAccountKey ]: The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [JobStorageAccountName ]: The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [JobType ]: Describes the type of the job. Valid modes are `Cloud` and 'Edge'. - [Output ]: A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output. - [Datasource ]: Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. - [ETag ]: - [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - [SizeWindow ]: - [TimeWindow ]: - [OutputErrorPolicy ]: Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size). - [OutputStartMode ]: This property should only be utilized when it is desired that the job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time. - [OutputStartTime ]: Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. This property must have a value if outputStartMode is set to CustomTime. - [Query ]: Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. - [SkuName ]: The name of the SKU. Required on PUT (CreateOrReplace) requests. - [StorageAccountKey ]: The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [StorageAccountName ]: The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [StreamingUnit ]: Specifies the number of streaming units that the streaming job uses. - [TransformationETag ]: .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsjob #> function New-AzStreamAnalyticsJob { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Create', Mandatory)] - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. ${Name}, - [Parameter(ParameterSetName='Create', Mandatory)] - [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Create')] - [Parameter(ParameterSetName='CreateExpanded')] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -964,41 +1031,29 @@ param( # Other values will result in a 412 Pre-condition Failed response. ${IfNoneMatch}, - [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob] - # A streaming job object, containing all information associated with the named streaming job. - # To construct, see NOTES section for STREAMINGJOB properties and create a hash table. - ${StreamingJob}, - [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The resource id of cluster. ${ClusterId}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("1.0")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel] + [System.String] # Controls certain runtime behaviors of the streaming job. ${CompatibilityLevel}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("SystemAccount", "JobStorageAccount")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy] + [System.String] # Valid values are JobStorageAccount and SystemAccount. # If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. # . ${ContentStoragePolicy}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The data locale of the stream analytics job. @@ -1007,7 +1062,12 @@ param( ${DataLocale}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Determines whether to enable a system-assigned identity for the resource. + ${EnableSystemAssignedIdentity}, + + [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Int32] # The maximum tolerable delay in seconds where events arriving late could be included. @@ -1016,89 +1076,70 @@ param( ${EventsLateArrivalMaxDelayInSecond}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Int32] # The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. ${EventsOutOfOrderMaxDelayInSecond}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Adjust", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy] + [System.String] # Indicates the policy to apply to events that arrive out of order in the input event stream. ${EventsOutOfOrderPolicy}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # . ${ExternalContainer}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # . ${ExternalPath}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[]] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction[]] # A list of one or more functions for the streaming job. # The name property for each function is required when specifying this property in a PUT request. # This property cannot be modify via a PATCH operation. # You must use the PATCH API available for the individual transformation. - # To construct, see NOTES section for FUNCTION properties and create a hash table. ${Function}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # . ${IdentityPrincipalId}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # . ${IdentityTenantId}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [System.String] - # . - ${IdentityType}, - - [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[]] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput[]] # A list of one or more inputs to the streaming job. # The name property for each input is required when specifying this property in a PUT request. # This property cannot be modify via a PATCH operation. # You must use the PATCH API available for the individual input. - # To construct, see NOTES section for INPUT properties and create a hash table. ${Input}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode] + [System.String] # Authentication Mode. ${JobStorageAccountAuthenticationMode}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The account key for the Azure Storage account. @@ -1106,7 +1147,6 @@ param( ${JobStorageAccountKey}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The name of the Azure Storage account. @@ -1114,52 +1154,45 @@ param( ${JobStorageAccountName}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Cloud", "Edge")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType] + [System.String] # Describes the type of the job. # Valid modes are `Cloud` and 'Edge'. ${JobType}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The geo-location where the resource lives ${Location}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[]] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput[]] # A list of one or more outputs for the streaming job. # The name property for each output is required when specifying this property in a PUT request. # This property cannot be modify via a PATCH operation. # You must use the PATCH API available for the individual output. - # To construct, see NOTES section for OUTPUT properties and create a hash table. ${Output}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Stop", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy] + [System.String] # Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size). ${OutputErrorPolicy}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode] + [System.String] # This property should only be utilized when it is desired that the job be started immediately upon creation. # Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time. ${OutputStartMode}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.DateTime] # Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. @@ -1167,7 +1200,6 @@ param( ${OutputStartTime}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # Specifies the query that will be run in the streaming job. @@ -1176,16 +1208,14 @@ param( ${Query}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Standard")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName] + [System.String] # The name of the SKU. # Required on PUT (CreateOrReplace) requests. ${SkuName}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The account key for the Azure Storage account. @@ -1193,7 +1223,6 @@ param( ${StorageAccountKey}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # The name of the Azure Storage account. @@ -1201,20 +1230,30 @@ param( ${StorageAccountName}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Int32] # Specifies the number of streaming units that the streaming job uses. ${StreamingUnit}, [Parameter(ParameterSetName='CreateExpanded')] - [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1283,16 +1322,16 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ - Create = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsJob_Create'; CreateExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsJob_CreateExpanded'; - CreateViaIdentity = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsJob_CreateViaIdentity'; - CreateViaIdentityExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsJob_CreateViaIdentityExpanded'; + CreateViaJsonFilePath = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsJob_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsJob_CreateViaJsonString'; } - if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1301,6 +1340,9 @@ begin { } $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) @@ -1332,18 +1374,18 @@ end { <# .Synopsis -Creates an output or replaces an already existing output under an existing streaming job. +Create an output or replaces an already existing output under an existing streaming job. .Description -Creates an output or replaces an already existing output under an existing streaming job. +Create an output or replaces an already existing output under an existing streaming job. .Example -New-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name output-01 -File .\test\template-json\StroageAccount.json +New-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-02-pwsh -Name output-01 -File .\test\template-json\StorageAccount.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Notes COMPLEX PARAMETER PROPERTIES @@ -1368,18 +1410,32 @@ OUTPUT : An output object, containing all information associated with t [Datasource ]: Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. Type : Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. [ETag ]: - [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. [SizeWindow ]: [TimeWindow ]: + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/new-azstreamanalyticsoutput #> function New-AzStreamAnalyticsOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -1387,6 +1443,10 @@ param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Alias('OutputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -1395,6 +1455,8 @@ param( [Parameter(ParameterSetName='Create', Mandatory)] [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -1403,6 +1465,8 @@ param( [Parameter(ParameterSetName='Create')] [Parameter(ParameterSetName='CreateExpanded')] + [Parameter(ParameterSetName='CreateViaJsonFilePath')] + [Parameter(ParameterSetName='CreateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -1414,9 +1478,15 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -1434,33 +1504,35 @@ param( [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput] # An output object, containing all information associated with the named output. # All outputs are contained under a streaming job. - # To construct, see NOTES section for OUTPUT properties and create a hash table. ${Output}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource] # Describes the data source that output will be written to. # Required on PUT (CreateOrReplace) requests. - # To construct, see NOTES section for DATASOURCE properties and create a hash table. ${Datasource}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType])] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType] + [System.String] # Indicates the type of serialization that the input or output uses. # Required on PUT (CreateOrReplace) requests. ${SerializationType}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Single] # . @@ -1468,11 +1540,24 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] + [Parameter(ParameterSetName='CreateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # . ${TimeWindow}, + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1529,16 +1614,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Create = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_Create'; CreateExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_CreateExpanded'; CreateViaIdentity = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_CreateViaIdentity'; CreateViaIdentityExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_CreateViaIdentityExpanded'; + CreateViaIdentityStreamingjob = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_CreateViaIdentityStreamingjob'; + CreateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_CreateViaIdentityStreamingjobExpanded'; + CreateViaJsonFilePath = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.StreamAnalytics.private\New-AzStreamAnalyticsOutput_CreateViaJsonString'; } - if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1547,6 +1637,9 @@ begin { } $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) @@ -1587,11 +1680,11 @@ This can range from testing the connection to the underlying web service behind Test-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name mlsfunction-01 .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -1601,7 +1694,7 @@ FUNCTION : A function object, containing all information associated w [ConfigurationProperty ]: [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -1612,7 +1705,7 @@ FUNCTION : A function object, containing all information associated w FUNCTIONCONFIGURATIONPROPERTY : . [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -1629,15 +1722,29 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/test-azstreamanalyticsfunction #> function Test-AzStreamAnalyticsFunction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus])] [CmdletBinding(DefaultParameterSetName='TestExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -1645,6 +1752,10 @@ param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Alias('FunctionName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -1653,6 +1764,8 @@ param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -1661,6 +1774,8 @@ param( [Parameter(ParameterSetName='Test')] [Parameter(ParameterSetName='TestExpanded')] + [Parameter(ParameterSetName='TestViaJsonFilePath')] + [Parameter(ParameterSetName='TestViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -1672,33 +1787,52 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter(ParameterSetName='Test', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='TestViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction] # A function object, containing all information associated with the named function. # All functions are contained under a streaming job. - # To construct, see NOTES section for FUNCTION properties and create a hash table. ${Function}, [Parameter(ParameterSetName='TestExpanded')] [Parameter(ParameterSetName='TestViaIdentityExpanded')] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration] # . - # To construct, see NOTES section for FUNCTIONCONFIGURATIONPROPERTY properties and create a hash table. ${FunctionConfigurationProperty}, [Parameter(ParameterSetName='TestExpanded')] [Parameter(ParameterSetName='TestViaIdentityExpanded')] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # Indicates the type of function. ${PropertiesType}, + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Test operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Test operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1767,16 +1901,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Test = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_Test'; TestExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_TestExpanded'; TestViaIdentity = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_TestViaIdentity'; TestViaIdentityExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_TestViaIdentityExpanded'; + TestViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_TestViaIdentityStreamingjob'; + TestViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_TestViaIdentityStreamingjobExpanded'; + TestViaJsonFilePath = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_TestViaJsonFilePath'; + TestViaJsonString = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_TestViaJsonString'; } - if (('Test', 'TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Test', 'TestExpanded', 'TestViaJsonFilePath', 'TestViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -1785,6 +1924,9 @@ begin { } $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) @@ -1823,11 +1965,11 @@ Tests whether an input’s datasource is reachable and usable by the Azure Strea Test-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name input-01 .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -1841,7 +1983,7 @@ INPUT : An input object, containing all information associated with the Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the cluster. @@ -1861,16 +2003,30 @@ PROPERTY : The properties that are associated with an input. R Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/test-azstreamanalyticsinput #> function Test-AzStreamAnalyticsInput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus])] [CmdletBinding(DefaultParameterSetName='TestExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -1878,6 +2034,10 @@ param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Alias('InputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -1886,6 +2046,8 @@ param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -1894,6 +2056,8 @@ param( [Parameter(ParameterSetName='Test')] [Parameter(ParameterSetName='TestExpanded')] + [Parameter(ParameterSetName='TestViaJsonFilePath')] + [Parameter(ParameterSetName='TestViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -1905,27 +2069,45 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter(ParameterSetName='Test', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='TestViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput] # An input object, containing all information associated with the named input. # All inputs are contained under a streaming job. - # To construct, see NOTES section for INPUT properties and create a hash table. ${Input}, [Parameter(ParameterSetName='TestExpanded')] [Parameter(ParameterSetName='TestViaIdentityExpanded')] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties] # The properties that are associated with an input. # Required on PUT (CreateOrReplace) requests. - # To construct, see NOTES section for PROPERTY properties and create a hash table. ${Property}, + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Test operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Test operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -1994,16 +2176,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Test = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_Test'; TestExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_TestExpanded'; TestViaIdentity = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_TestViaIdentity'; TestViaIdentityExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_TestViaIdentityExpanded'; + TestViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_TestViaIdentityStreamingjob'; + TestViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_TestViaIdentityStreamingjobExpanded'; + TestViaJsonFilePath = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_TestViaJsonFilePath'; + TestViaJsonString = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_TestViaJsonString'; } - if (('Test', 'TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Test', 'TestExpanded', 'TestViaJsonFilePath', 'TestViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2012,6 +2199,9 @@ begin { } $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) @@ -2050,11 +2240,11 @@ Tests whether an output’s datasource is reachable and usable by the Azure Stre Test-AzStreamAnalyticsOutput -ResourceGroupName lucas-rg-test -JobName sajob-01-pwsh -Name output-01 .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -2079,18 +2269,32 @@ OUTPUT : An output object, containing all information associated with t [Datasource ]: Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. Type : Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. [ETag ]: - [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. [SizeWindow ]: [TimeWindow ]: + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/test-azstreamanalyticsoutput #> function Test-AzStreamAnalyticsOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus])] [CmdletBinding(DefaultParameterSetName='TestExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -2098,6 +2302,10 @@ param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Alias('OutputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -2106,6 +2314,8 @@ param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -2114,6 +2324,8 @@ param( [Parameter(ParameterSetName='Test')] [Parameter(ParameterSetName='TestExpanded')] + [Parameter(ParameterSetName='TestViaJsonFilePath')] + [Parameter(ParameterSetName='TestViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -2125,38 +2337,46 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter(ParameterSetName='Test', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='TestViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput] # An output object, containing all information associated with the named output. # All outputs are contained under a streaming job. - # To construct, see NOTES section for OUTPUT properties and create a hash table. ${Output}, [Parameter(ParameterSetName='TestExpanded')] [Parameter(ParameterSetName='TestViaIdentityExpanded')] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource] # Describes the data source that output will be written to. # Required on PUT (CreateOrReplace) requests. - # To construct, see NOTES section for DATASOURCE properties and create a hash table. ${Datasource}, [Parameter(ParameterSetName='TestExpanded')] [Parameter(ParameterSetName='TestViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType])] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType] + [System.String] # Indicates the type of serialization that the input or output uses. # Required on PUT (CreateOrReplace) requests. ${SerializationType}, [Parameter(ParameterSetName='TestExpanded')] [Parameter(ParameterSetName='TestViaIdentityExpanded')] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Single] # . @@ -2164,11 +2384,24 @@ param( [Parameter(ParameterSetName='TestExpanded')] [Parameter(ParameterSetName='TestViaIdentityExpanded')] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # . ${TimeWindow}, + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Test operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Test operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2237,16 +2470,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Test = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_Test'; TestExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_TestExpanded'; TestViaIdentity = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_TestViaIdentity'; TestViaIdentityExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_TestViaIdentityExpanded'; + TestViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_TestViaIdentityStreamingjob'; + TestViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_TestViaIdentityStreamingjobExpanded'; + TestViaJsonFilePath = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_TestViaJsonFilePath'; + TestViaJsonString = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_TestViaJsonString'; } - if (('Test', 'TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Test', 'TestExpanded', 'TestViaJsonFilePath', 'TestViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2255,6 +2493,9 @@ begin { } $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) @@ -2286,11 +2527,11 @@ end { <# .Synopsis -Updates an existing function under an existing streaming job. +Update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition. .Description -Updates an existing function under an existing streaming job. +Update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition. .Example @@ -2299,11 +2540,11 @@ Update-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob Get-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name function-01 | Update-AzStreamAnalyticsFunction -File .\test\template-json\MachineLearningServices.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Notes COMPLEX PARAMETER PROPERTIES @@ -2313,7 +2554,7 @@ FUNCTION : A function object, containing all information associated w [ConfigurationProperty ]: [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -2324,7 +2565,7 @@ FUNCTION : A function object, containing all information associated w FUNCTIONCONFIGURATIONPROPERTY : . [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -2341,15 +2582,29 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsfunction #> function Update-AzStreamAnalyticsFunction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -2357,6 +2612,10 @@ param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('FunctionName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -2365,6 +2624,8 @@ param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -2373,6 +2634,8 @@ param( [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -2384,9 +2647,15 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -2397,28 +2666,41 @@ param( [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction] # A function object, containing all information associated with the named function. # All functions are contained under a streaming job. - # To construct, see NOTES section for FUNCTION properties and create a hash table. ${Function}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration] # . - # To construct, see NOTES section for FUNCTIONCONFIGURATIONPROPERTY properties and create a hash table. ${FunctionConfigurationProperty}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # Indicates the type of function. ${PropertiesType}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2475,16 +2757,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Update = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_Update'; UpdateExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_UpdateExpanded'; UpdateViaIdentity = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_UpdateViaIdentityExpanded'; + UpdateViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_UpdateViaIdentityStreamingjob'; + UpdateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_UpdateViaIdentityStreamingjobExpanded'; + UpdateViaJsonFilePath = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Update', 'UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2493,6 +2780,9 @@ begin { } $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) @@ -2524,11 +2814,11 @@ end { <# .Synopsis -Updates an existing input under an existing streaming job. +Update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition. .Description -Updates an existing input under an existing streaming job. +Update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition. .Example @@ -2537,11 +2827,11 @@ Update-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-01 Get-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name input-01 | Update-AzStreamAnalyticsInput -File .\test\template-json\IotHub.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Notes COMPLEX PARAMETER PROPERTIES @@ -2555,7 +2845,7 @@ INPUT : An input object, containing all information associated with the Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the cluster. @@ -2575,16 +2865,30 @@ PROPERTY : The properties that are associated with an input. R Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsinput #> function Update-AzStreamAnalyticsInput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -2592,6 +2896,10 @@ param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('InputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -2600,6 +2908,8 @@ param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -2608,6 +2918,8 @@ param( [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -2619,9 +2931,15 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -2632,22 +2950,34 @@ param( [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput] # An input object, containing all information associated with the named input. # All inputs are contained under a streaming job. - # To construct, see NOTES section for INPUT properties and create a hash table. ${Input}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties] # The properties that are associated with an input. # Required on PUT (CreateOrReplace) requests. - # To construct, see NOTES section for PROPERTY properties and create a hash table. ${Property}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2704,16 +3034,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Update = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_Update'; UpdateExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_UpdateExpanded'; UpdateViaIdentity = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_UpdateViaIdentityExpanded'; + UpdateViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_UpdateViaIdentityStreamingjob'; + UpdateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_UpdateViaIdentityStreamingjobExpanded'; + UpdateViaJsonFilePath = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Update', 'UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -2722,6 +3057,9 @@ begin { } $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) @@ -2753,11 +3091,11 @@ end { <# .Synopsis -Updates an existing streaming job. +Update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. .Description -Updates an existing streaming job. +Update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. .Example @@ -2765,12 +3103,10 @@ Update-AzStreamAnalyticsJob -ResourceGroupName azure-rg-test -Name sajob-01-pwsh .Example Get-AzStreamAnalyticsJob -ResourceGroupName azure-rg-test -Name sajob-01-pwsh | Update-AzStreamAnalyticsJob -EventsLateArrivalMaxDelayInSecond 13 -EventsOutOfOrderMaxDelayInSecond 21 -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob .Notes COMPLEX PARAMETER PROPERTIES @@ -2780,7 +3116,7 @@ FUNCTION : A list of one or more functions for the streaming job. T [ConfigurationProperty ]: [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -2796,7 +3132,7 @@ INPUT : A list of one or more inputs to the streaming job. The name pr Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the cluster. @@ -2814,103 +3150,46 @@ OUTPUT : A list of one or more outputs for the streaming job. The nam [Datasource ]: Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. Type : Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. [ETag ]: - [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. [SizeWindow ]: [TimeWindow ]: - -STREAMINGJOB : A streaming job object, containing all information associated with the named streaming job. - [Location ]: The geo-location where the resource lives - [Tag ]: Resource tags. - [(Any) ]: This indicates any property can be added to this object. - [ClusterId ]: The resource id of cluster. - [CompatibilityLevel ]: Controls certain runtime behaviors of the streaming job. - [ContentStoragePolicy ]: Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. . - [DataLocale ]: The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to 'en-US' if none specified. - [ETag ]: - [EventsLateArrivalMaxDelayInSecond ]: The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a value of -1. - [EventsOutOfOrderMaxDelayInSecond ]: The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. - [EventsOutOfOrderPolicy ]: Indicates the policy to apply to events that arrive out of order in the input event stream. - [ExternalContainer ]: - [ExternalPath ]: - [Function ]: A list of one or more functions for the streaming job. The name property for each function is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual transformation. - [ConfigurationProperty ]: - [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. - Type : Indicates the function binding type. - [Input ]: - [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx - [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. - [Output ]: Describes the output of a function. - [DataType ]: The (Azure Stream Analytics supported) data type of the function output. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx - [ETag ]: - [PropertiesType ]: Indicates the type of function. - [IdentityPrincipalId ]: - [IdentityTenantId ]: - [IdentityType ]: - [Input ]: A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual input. - [ETag ]: - [Property ]: The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. - Type : Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests. - [Compression ]: Describes how input data is compressed - Type : - [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data - [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - [JobStorageAccountAuthenticationMode ]: Authentication Mode. - [JobStorageAccountKey ]: The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [JobStorageAccountName ]: The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [JobType ]: Describes the type of the job. Valid modes are `Cloud` and 'Edge'. - [Output ]: A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output. - [Datasource ]: Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. - [ETag ]: - [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - [SizeWindow ]: - [TimeWindow ]: - [OutputErrorPolicy ]: Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size). - [OutputStartMode ]: This property should only be utilized when it is desired that the job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time. - [OutputStartTime ]: Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. This property must have a value if outputStartMode is set to CustomTime. - [Query ]: Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. - [SkuName ]: The name of the SKU. Required on PUT (CreateOrReplace) requests. - [StorageAccountKey ]: The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [StorageAccountName ]: The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [StreamingUnit ]: Specifies the number of streaming units that the streaming job uses. - [TransformationETag ]: .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsjob #> function Update-AzStreamAnalyticsJob { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. ${Name}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -2921,14 +3200,6 @@ param( # Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. ${IfMatch}, - [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob] - # A streaming job object, containing all information associated with the named streaming job. - # To construct, see NOTES section for STREAMINGJOB properties and create a hash table. - ${StreamingJob}, - [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] @@ -2938,17 +3209,17 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("1.0")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel] + [System.String] # Controls certain runtime behaviors of the streaming job. ${CompatibilityLevel}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("SystemAccount", "JobStorageAccount")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy] + [System.String] # Valid values are JobStorageAccount and SystemAccount. # If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. # . @@ -2981,9 +3252,9 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Adjust", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy] + [System.String] # Indicates the policy to apply to events that arrive out of order in the input event stream. ${EventsOutOfOrderPolicy}, @@ -3005,12 +3276,11 @@ param( [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[]] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction[]] # A list of one or more functions for the streaming job. # The name property for each function is required when specifying this property in a PUT request. # This property cannot be modify via a PATCH operation. # You must use the PATCH API available for the individual transformation. - # To construct, see NOTES section for FUNCTION properties and create a hash table. ${Function}, [Parameter(ParameterSetName='UpdateExpanded')] @@ -3038,19 +3308,18 @@ param( [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[]] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput[]] # A list of one or more inputs to the streaming job. # The name property for each input is required when specifying this property in a PUT request. # This property cannot be modify via a PATCH operation. # You must use the PATCH API available for the individual input. - # To construct, see NOTES section for INPUT properties and create a hash table. ${Input}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode] + [System.String] # Authentication Mode. ${JobStorageAccountAuthenticationMode}, @@ -3072,45 +3341,37 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Cloud", "Edge")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType] + [System.String] # Describes the type of the job. # Valid modes are `Cloud` and 'Edge'. ${JobType}, - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[]] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput[]] # A list of one or more outputs for the streaming job. # The name property for each output is required when specifying this property in a PUT request. # This property cannot be modify via a PATCH operation. # You must use the PATCH API available for the individual output. - # To construct, see NOTES section for OUTPUT properties and create a hash table. ${Output}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Stop", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy] + [System.String] # Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size). ${OutputErrorPolicy}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode] + [System.String] # This property should only be utilized when it is desired that the job be started immediately upon creation. # Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time. ${OutputStartMode}, @@ -3134,9 +3395,9 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Standard")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName] + [System.String] # The name of the SKU. # Required on PUT (CreateOrReplace) requests. ${SkuName}, @@ -3167,11 +3428,23 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3228,16 +3501,17 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ - Update = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsJob_Update'; UpdateExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsJob_UpdateExpanded'; - UpdateViaIdentity = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsJob_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsJob_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsJob_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsJob_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3246,6 +3520,9 @@ begin { } $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) @@ -3277,24 +3554,24 @@ end { <# .Synopsis -Updates an existing output under an existing streaming job. +Update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. .Description -Updates an existing output under an existing streaming job. +Update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. .Example -Update-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01 -File .\test\template-json\StroageAccount.json +Update-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01 -File .\test\template-json\StorageAccount.json .Example -Get-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01| Update-AzStreamAnalyticsOutput -File .\test\template-json\StroageAccount.json +Get-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01| Update-AzStreamAnalyticsOutput -File .\test\template-json\StorageAccount.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Notes COMPLEX PARAMETER PROPERTIES @@ -3319,18 +3596,32 @@ OUTPUT : An output object, containing all information associated with t [Datasource ]: Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. Type : Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. [ETag ]: - [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. [SizeWindow ]: [TimeWindow ]: + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsoutput #> function Update-AzStreamAnalyticsOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -3338,6 +3629,10 @@ param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('OutputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -3346,6 +3641,8 @@ param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -3354,6 +3651,8 @@ param( [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -3365,9 +3664,15 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -3378,33 +3683,35 @@ param( [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput] # An output object, containing all information associated with the named output. # All outputs are contained under a streaming job. - # To construct, see NOTES section for OUTPUT properties and create a hash table. ${Output}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource] # Describes the data source that output will be written to. # Required on PUT (CreateOrReplace) requests. - # To construct, see NOTES section for DATASOURCE properties and create a hash table. ${Datasource}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType])] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType] + [System.String] # Indicates the type of serialization that the input or output uses. # Required on PUT (CreateOrReplace) requests. ${SerializationType}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Single] # . @@ -3412,11 +3719,24 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # . ${TimeWindow}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3473,16 +3793,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Update = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_Update'; UpdateExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_UpdateExpanded'; UpdateViaIdentity = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_UpdateViaIdentityExpanded'; + UpdateViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_UpdateViaIdentityStreamingjob'; + UpdateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_UpdateViaIdentityStreamingjobExpanded'; + UpdateViaJsonFilePath = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Update', 'UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3491,6 +3816,9 @@ begin { } $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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Test-AzStreamAnalyticsFunction.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Test-AzStreamAnalyticsFunction.ps1 index b04df2833560..e6ff90ba6524 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Test-AzStreamAnalyticsFunction.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Test-AzStreamAnalyticsFunction.ps1 @@ -25,11 +25,11 @@ This can range from testing the connection to the underlying web service behind Test-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name mlsfunction-01 .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -39,7 +39,7 @@ FUNCTION : A function object, containing all information associated w [ConfigurationProperty ]: [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -50,7 +50,7 @@ FUNCTION : A function object, containing all information associated w FUNCTIONCONFIGURATIONPROPERTY : . [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -67,15 +67,29 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/test-azstreamanalyticsfunction #> function Test-AzStreamAnalyticsFunction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus])] [CmdletBinding(DefaultParameterSetName='TestExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -83,6 +97,10 @@ param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Alias('FunctionName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -91,6 +109,8 @@ param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -99,6 +119,8 @@ param( [Parameter(ParameterSetName='Test')] [Parameter(ParameterSetName='TestExpanded')] + [Parameter(ParameterSetName='TestViaJsonFilePath')] + [Parameter(ParameterSetName='TestViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -110,33 +132,52 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter(ParameterSetName='Test', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='TestViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction] # A function object, containing all information associated with the named function. # All functions are contained under a streaming job. - # To construct, see NOTES section for FUNCTION properties and create a hash table. ${Function}, [Parameter(ParameterSetName='TestExpanded')] [Parameter(ParameterSetName='TestViaIdentityExpanded')] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration] # . - # To construct, see NOTES section for FUNCTIONCONFIGURATIONPROPERTY properties and create a hash table. ${FunctionConfigurationProperty}, [Parameter(ParameterSetName='TestExpanded')] [Parameter(ParameterSetName='TestViaIdentityExpanded')] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # Indicates the type of function. ${PropertiesType}, + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Test operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Test operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -205,16 +246,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Test = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_Test'; TestExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_TestExpanded'; TestViaIdentity = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_TestViaIdentity'; TestViaIdentityExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_TestViaIdentityExpanded'; + TestViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_TestViaIdentityStreamingjob'; + TestViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_TestViaIdentityStreamingjobExpanded'; + TestViaJsonFilePath = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_TestViaJsonFilePath'; + TestViaJsonString = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsFunction_TestViaJsonString'; } - if (('Test', 'TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Test', 'TestExpanded', 'TestViaJsonFilePath', 'TestViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -223,6 +269,9 @@ begin { } $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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Test-AzStreamAnalyticsInput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Test-AzStreamAnalyticsInput.ps1 index bda4d3fcc8b4..4bbe0e8cf558 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Test-AzStreamAnalyticsInput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Test-AzStreamAnalyticsInput.ps1 @@ -23,11 +23,11 @@ Tests whether an input’s datasource is reachable and usable by the Azure Strea Test-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name input-01 .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -41,7 +41,7 @@ INPUT : An input object, containing all information associated with the Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the cluster. @@ -61,16 +61,30 @@ PROPERTY : The properties that are associated with an input. R Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/test-azstreamanalyticsinput #> function Test-AzStreamAnalyticsInput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus])] [CmdletBinding(DefaultParameterSetName='TestExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -78,6 +92,10 @@ param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Alias('InputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -86,6 +104,8 @@ param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -94,6 +114,8 @@ param( [Parameter(ParameterSetName='Test')] [Parameter(ParameterSetName='TestExpanded')] + [Parameter(ParameterSetName='TestViaJsonFilePath')] + [Parameter(ParameterSetName='TestViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -105,27 +127,45 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter(ParameterSetName='Test', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='TestViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput] # An input object, containing all information associated with the named input. # All inputs are contained under a streaming job. - # To construct, see NOTES section for INPUT properties and create a hash table. ${Input}, [Parameter(ParameterSetName='TestExpanded')] [Parameter(ParameterSetName='TestViaIdentityExpanded')] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties] # The properties that are associated with an input. # Required on PUT (CreateOrReplace) requests. - # To construct, see NOTES section for PROPERTY properties and create a hash table. ${Property}, + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Test operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Test operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -194,16 +234,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Test = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_Test'; TestExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_TestExpanded'; TestViaIdentity = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_TestViaIdentity'; TestViaIdentityExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_TestViaIdentityExpanded'; + TestViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_TestViaIdentityStreamingjob'; + TestViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_TestViaIdentityStreamingjobExpanded'; + TestViaJsonFilePath = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_TestViaJsonFilePath'; + TestViaJsonString = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsInput_TestViaJsonString'; } - if (('Test', 'TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Test', 'TestExpanded', 'TestViaJsonFilePath', 'TestViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -212,6 +257,9 @@ begin { } $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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Test-AzStreamAnalyticsOutput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Test-AzStreamAnalyticsOutput.ps1 index 5aaf829cb0b2..35a931314a32 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Test-AzStreamAnalyticsOutput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Test-AzStreamAnalyticsOutput.ps1 @@ -23,11 +23,11 @@ Tests whether an output’s datasource is reachable and usable by the Azure Stre Test-AzStreamAnalyticsOutput -ResourceGroupName lucas-rg-test -JobName sajob-01-pwsh -Name output-01 .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus .Notes COMPLEX PARAMETER PROPERTIES @@ -52,18 +52,32 @@ OUTPUT : An output object, containing all information associated with t [Datasource ]: Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. Type : Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. [ETag ]: - [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. [SizeWindow ]: [TimeWindow ]: + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/test-azstreamanalyticsoutput #> function Test-AzStreamAnalyticsOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IResourceTestStatus])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IResourceTestStatus])] [CmdletBinding(DefaultParameterSetName='TestExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -71,6 +85,10 @@ param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Alias('OutputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -79,6 +97,8 @@ param( [Parameter(ParameterSetName='Test', Mandatory)] [Parameter(ParameterSetName='TestExpanded', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -87,6 +107,8 @@ param( [Parameter(ParameterSetName='Test')] [Parameter(ParameterSetName='TestExpanded')] + [Parameter(ParameterSetName='TestViaJsonFilePath')] + [Parameter(ParameterSetName='TestViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -98,38 +120,46 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter(ParameterSetName='Test', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='TestViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='TestViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput] # An output object, containing all information associated with the named output. # All outputs are contained under a streaming job. - # To construct, see NOTES section for OUTPUT properties and create a hash table. ${Output}, [Parameter(ParameterSetName='TestExpanded')] [Parameter(ParameterSetName='TestViaIdentityExpanded')] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource] # Describes the data source that output will be written to. # Required on PUT (CreateOrReplace) requests. - # To construct, see NOTES section for DATASOURCE properties and create a hash table. ${Datasource}, [Parameter(ParameterSetName='TestExpanded')] [Parameter(ParameterSetName='TestViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType])] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType] + [System.String] # Indicates the type of serialization that the input or output uses. # Required on PUT (CreateOrReplace) requests. ${SerializationType}, [Parameter(ParameterSetName='TestExpanded')] [Parameter(ParameterSetName='TestViaIdentityExpanded')] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Single] # . @@ -137,11 +167,24 @@ param( [Parameter(ParameterSetName='TestExpanded')] [Parameter(ParameterSetName='TestViaIdentityExpanded')] + [Parameter(ParameterSetName='TestViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # . ${TimeWindow}, + [Parameter(ParameterSetName='TestViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Test operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='TestViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Test operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -210,16 +253,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Test = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_Test'; TestExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_TestExpanded'; TestViaIdentity = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_TestViaIdentity'; TestViaIdentityExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_TestViaIdentityExpanded'; + TestViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_TestViaIdentityStreamingjob'; + TestViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_TestViaIdentityStreamingjobExpanded'; + TestViaJsonFilePath = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_TestViaJsonFilePath'; + TestViaJsonString = 'Az.StreamAnalytics.private\Test-AzStreamAnalyticsOutput_TestViaJsonString'; } - if (('Test', 'TestExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Test', 'TestExpanded', 'TestViaJsonFilePath', 'TestViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -228,6 +276,9 @@ begin { } $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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsFunction.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsFunction.ps1 index 06e394272c1b..73b06573afef 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsFunction.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsFunction.ps1 @@ -16,11 +16,11 @@ <# .Synopsis -Updates an existing function under an existing streaming job. +Update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition. .Description -Updates an existing function under an existing streaming job. +Update an existing function under an existing streaming job. This can be used to partially update (ie. update one or two properties) a function without affecting the rest the job or function definition. .Example @@ -29,11 +29,11 @@ Update-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob Get-AzStreamAnalyticsFunction -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name function-01 | Update-AzStreamAnalyticsFunction -File .\test\template-json\MachineLearningServices.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction .Notes COMPLEX PARAMETER PROPERTIES @@ -43,7 +43,7 @@ FUNCTION : A function object, containing all information associated w [ConfigurationProperty ]: [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -54,7 +54,7 @@ FUNCTION : A function object, containing all information associated w FUNCTIONCONFIGURATIONPROPERTY : . [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -71,15 +71,29 @@ INPUTOBJECT : Identity Parameter [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. [TransformationName ]: The name of the transformation. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsfunction #> function Update-AzStreamAnalyticsFunction { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -87,6 +101,10 @@ param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('FunctionName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -95,6 +113,8 @@ param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -103,6 +123,8 @@ param( [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -114,9 +136,15 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -127,28 +155,41 @@ param( [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction] # A function object, containing all information associated with the named function. # All functions are contained under a streaming job. - # To construct, see NOTES section for FUNCTION properties and create a hash table. ${Function}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunctionConfiguration] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunctionConfiguration] # . - # To construct, see NOTES section for FUNCTIONCONFIGURATIONPROPERTY properties and create a hash table. ${FunctionConfigurationProperty}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # Indicates the type of function. ${PropertiesType}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -205,16 +246,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Update = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_Update'; UpdateExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_UpdateExpanded'; UpdateViaIdentity = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_UpdateViaIdentityExpanded'; + UpdateViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_UpdateViaIdentityStreamingjob'; + UpdateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_UpdateViaIdentityStreamingjobExpanded'; + UpdateViaJsonFilePath = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsFunction_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Update', 'UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -223,6 +269,9 @@ begin { } $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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsInput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsInput.ps1 index dd86eae24cbb..0866c46c65ac 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsInput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsInput.ps1 @@ -16,11 +16,11 @@ <# .Synopsis -Updates an existing input under an existing streaming job. +Update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition. .Description -Updates an existing input under an existing streaming job. +Update an existing input under an existing streaming job. This can be used to partially update (ie. update one or two properties) an input without affecting the rest the job or input definition. .Example @@ -29,11 +29,11 @@ Update-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-01 Get-AzStreamAnalyticsInput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name input-01 | Update-AzStreamAnalyticsInput -File .\test\template-json\IotHub.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput .Notes COMPLEX PARAMETER PROPERTIES @@ -47,7 +47,7 @@ INPUT : An input object, containing all information associated with the Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the cluster. @@ -67,16 +67,30 @@ PROPERTY : The properties that are associated with an input. R Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsinput #> function Update-AzStreamAnalyticsInput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -84,6 +98,10 @@ param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('InputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -92,6 +110,8 @@ param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -100,6 +120,8 @@ param( [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -111,9 +133,15 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -124,22 +152,34 @@ param( [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput] # An input object, containing all information associated with the named input. # All inputs are contained under a streaming job. - # To construct, see NOTES section for INPUT properties and create a hash table. ${Input}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInputProperties] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInputProperties] # The properties that are associated with an input. # Required on PUT (CreateOrReplace) requests. - # To construct, see NOTES section for PROPERTY properties and create a hash table. ${Property}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -196,16 +236,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Update = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_Update'; UpdateExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_UpdateExpanded'; UpdateViaIdentity = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_UpdateViaIdentityExpanded'; + UpdateViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_UpdateViaIdentityStreamingjob'; + UpdateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_UpdateViaIdentityStreamingjobExpanded'; + UpdateViaJsonFilePath = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsInput_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Update', 'UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -214,6 +259,9 @@ begin { } $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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsJob.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsJob.ps1 index dc15eba06d7b..132c1759936a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsJob.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsJob.ps1 @@ -16,11 +16,11 @@ <# .Synopsis -Updates an existing streaming job. +Update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. .Description -Updates an existing streaming job. +Update an existing streaming job. This can be used to partially update (ie. update one or two properties) a streaming job without affecting the rest the job definition. .Example @@ -28,12 +28,10 @@ Update-AzStreamAnalyticsJob -ResourceGroupName azure-rg-test -Name sajob-01-pwsh .Example Get-AzStreamAnalyticsJob -ResourceGroupName azure-rg-test -Name sajob-01-pwsh | Update-AzStreamAnalyticsJob -EventsLateArrivalMaxDelayInSecond 13 -EventsOutOfOrderMaxDelayInSecond 21 -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob .Notes COMPLEX PARAMETER PROPERTIES @@ -43,7 +41,7 @@ FUNCTION : A list of one or more functions for the streaming job. T [ConfigurationProperty ]: [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. Type : Indicates the function binding type. - [Input ]: + [Input >]: [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. [Output ]: Describes the output of a function. @@ -59,7 +57,7 @@ INPUT : A list of one or more inputs to the streaming job. The name pr Type : [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. INPUTOBJECT : Identity Parameter [ClusterName ]: The name of the cluster. @@ -77,103 +75,46 @@ OUTPUT : A list of one or more outputs for the streaming job. The nam [Datasource ]: Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. Type : Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. [ETag ]: - [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. [SizeWindow ]: [TimeWindow ]: - -STREAMINGJOB : A streaming job object, containing all information associated with the named streaming job. - [Location ]: The geo-location where the resource lives - [Tag ]: Resource tags. - [(Any) ]: This indicates any property can be added to this object. - [ClusterId ]: The resource id of cluster. - [CompatibilityLevel ]: Controls certain runtime behaviors of the streaming job. - [ContentStoragePolicy ]: Valid values are JobStorageAccount and SystemAccount. If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. . - [DataLocale ]: The data locale of the stream analytics job. Value should be the name of a supported .NET Culture from the set https://msdn.microsoft.com/en-us/library/system.globalization.culturetypes(v=vs.110).aspx. Defaults to 'en-US' if none specified. - [ETag ]: - [EventsLateArrivalMaxDelayInSecond ]: The maximum tolerable delay in seconds where events arriving late could be included. Supported range is -1 to 1814399 (20.23:59:59 days) and -1 is used to specify wait indefinitely. If the property is absent, it is interpreted to have a value of -1. - [EventsOutOfOrderMaxDelayInSecond ]: The maximum tolerable delay in seconds where out-of-order events can be adjusted to be back in order. - [EventsOutOfOrderPolicy ]: Indicates the policy to apply to events that arrive out of order in the input event stream. - [ExternalContainer ]: - [ExternalPath ]: - [Function ]: A list of one or more functions for the streaming job. The name property for each function is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual transformation. - [ConfigurationProperty ]: - [Binding ]: The physical binding of the function. For example, in the Azure Machine Learning web service’s case, this describes the endpoint. - Type : Indicates the function binding type. - [Input ]: - [DataType ]: The (Azure Stream Analytics supported) data type of the function input parameter. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx - [IsConfigurationParameter ]: A flag indicating if the parameter is a configuration parameter. True if this input parameter is expected to be a constant. Default is false. - [Output ]: Describes the output of a function. - [DataType ]: The (Azure Stream Analytics supported) data type of the function output. A list of valid Azure Stream Analytics data types are described at https://msdn.microsoft.com/en-us/library/azure/dn835065.aspx - [ETag ]: - [PropertiesType ]: Indicates the type of function. - [IdentityPrincipalId ]: - [IdentityTenantId ]: - [IdentityType ]: - [Input ]: A list of one or more inputs to the streaming job. The name property for each input is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual input. - [ETag ]: - [Property ]: The properties that are associated with an input. Required on PUT (CreateOrReplace) requests. - Type : Indicates whether the input is a source of reference data or stream data. Required on PUT (CreateOrReplace) requests. - [Compression ]: Describes how input data is compressed - Type : - [PartitionKey ]: partitionKey Describes a key in the input data which is used for partitioning the input data - [Serialization ]: Describes how data from an input is serialized or how data is serialized when written to an output. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - [JobStorageAccountAuthenticationMode ]: Authentication Mode. - [JobStorageAccountKey ]: The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [JobStorageAccountName ]: The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [JobType ]: Describes the type of the job. Valid modes are `Cloud` and 'Edge'. - [Output ]: A list of one or more outputs for the streaming job. The name property for each output is required when specifying this property in a PUT request. This property cannot be modify via a PATCH operation. You must use the PATCH API available for the individual output. - [Datasource ]: Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. - Type : Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. - [ETag ]: - [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. - [SizeWindow ]: - [TimeWindow ]: - [OutputErrorPolicy ]: Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size). - [OutputStartMode ]: This property should only be utilized when it is desired that the job be started immediately upon creation. Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time. - [OutputStartTime ]: Value is either an ISO-8601 formatted time stamp that indicates the starting point of the output event stream, or null to indicate that the output event stream will start whenever the streaming job is started. This property must have a value if outputStartMode is set to CustomTime. - [Query ]: Specifies the query that will be run in the streaming job. You can learn more about the Stream Analytics Query Language (SAQL) here: https://msdn.microsoft.com/library/azure/dn834998 . Required on PUT (CreateOrReplace) requests. - [SkuName ]: The name of the SKU. Required on PUT (CreateOrReplace) requests. - [StorageAccountKey ]: The account key for the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [StorageAccountName ]: The name of the Azure Storage account. Required on PUT (CreateOrReplace) requests. - [StreamingUnit ]: Specifies the number of streaming units that the streaming job uses. - [TransformationETag ]: .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsjob #> function Update-AzStreamAnalyticsJob { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamingJob])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. ${Name}, - [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, [Parameter()] @@ -184,14 +125,6 @@ param( # Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. ${IfMatch}, - [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IStreamingJob] - # A streaming job object, containing all information associated with the named streaming job. - # To construct, see NOTES section for STREAMINGJOB properties and create a hash table. - ${StreamingJob}, - [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] @@ -201,17 +134,17 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("1.0")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.CompatibilityLevel] + [System.String] # Controls certain runtime behaviors of the streaming job. ${CompatibilityLevel}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("SystemAccount", "JobStorageAccount")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.ContentStoragePolicy] + [System.String] # Valid values are JobStorageAccount and SystemAccount. # If set to JobStorageAccount, this requires the user to also specify jobStorageAccount property. # . @@ -244,9 +177,9 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Adjust", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventsOutOfOrderPolicy] + [System.String] # Indicates the policy to apply to events that arrive out of order in the input event stream. ${EventsOutOfOrderPolicy}, @@ -268,12 +201,11 @@ param( [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IFunction[]] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IFunction[]] # A list of one or more functions for the streaming job. # The name property for each function is required when specifying this property in a PUT request. # This property cannot be modify via a PATCH operation. # You must use the PATCH API available for the individual transformation. - # To construct, see NOTES section for FUNCTION properties and create a hash table. ${Function}, [Parameter(ParameterSetName='UpdateExpanded')] @@ -301,19 +233,18 @@ param( [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IInput[]] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IInput[]] # A list of one or more inputs to the streaming job. # The name property for each input is required when specifying this property in a PUT request. # This property cannot be modify via a PATCH operation. # You must use the PATCH API available for the individual input. - # To construct, see NOTES section for INPUT properties and create a hash table. ${Input}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Msi", "UserToken", "ConnectionString")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.AuthenticationMode] + [System.String] # Authentication Mode. ${JobStorageAccountAuthenticationMode}, @@ -335,45 +266,37 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Cloud", "Edge")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.JobType] + [System.String] # Describes the type of the job. # Valid modes are `Cloud` and 'Edge'. ${JobType}, - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput[]] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput[]] # A list of one or more outputs for the streaming job. # The name property for each output is required when specifying this property in a PUT request. # This property cannot be modify via a PATCH operation. # You must use the PATCH API available for the individual output. - # To construct, see NOTES section for OUTPUT properties and create a hash table. ${Output}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Stop", "Drop")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputErrorPolicy] + [System.String] # Indicates the policy to apply to events that arrive at the output and cannot be written to the external storage due to being malformed (missing column values, column values of wrong type or size). ${OutputErrorPolicy}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("JobStartTime", "CustomTime", "LastOutputEventTime")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.OutputStartMode] + [System.String] # This property should only be utilized when it is desired that the job be started immediately upon creation. # Value may be JobStartTime, CustomTime, or LastOutputEventTime to indicate whether the starting point of the output event stream should start whenever the job is started, start at a custom user time stamp specified via the outputStartTime property, or start from the last event output time. ${OutputStartMode}, @@ -397,9 +320,9 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName])] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Standard")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.StreamingJobSkuName] + [System.String] # The name of the SKU. # Required on PUT (CreateOrReplace) requests. ${SkuName}, @@ -430,11 +353,23 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ApiV1.ITrackedResourceTags]))] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -491,16 +426,17 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ - Update = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsJob_Update'; UpdateExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsJob_UpdateExpanded'; - UpdateViaIdentity = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsJob_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsJob_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsJob_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsJob_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -509,6 +445,9 @@ begin { } $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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsOutput.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsOutput.ps1 index d8047232fe56..72003ab3999a 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsOutput.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/internal/Update-AzStreamAnalyticsOutput.ps1 @@ -16,24 +16,24 @@ <# .Synopsis -Updates an existing output under an existing streaming job. +Update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. .Description -Updates an existing output under an existing streaming job. +Update an existing output under an existing streaming job. This can be used to partially update (ie. update one or two properties) an output without affecting the rest the job or output definition. .Example -Update-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01 -File .\test\template-json\StroageAccount.json +Update-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01 -File .\test\template-json\StorageAccount.json .Example -Get-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01| Update-AzStreamAnalyticsOutput -File .\test\template-json\StroageAccount.json +Get-AzStreamAnalyticsOutput -ResourceGroupName azure-rg-test -JobName sajob-01-pwsh -Name output-01| Update-AzStreamAnalyticsOutput -File .\test\template-json\StorageAccount.json .Inputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Inputs Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput +Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput .Notes COMPLEX PARAMETER PROPERTIES @@ -58,18 +58,32 @@ OUTPUT : An output object, containing all information associated with t [Datasource ]: Describes the data source that output will be written to. Required on PUT (CreateOrReplace) requests. Type : Indicates the type of data source output will be written to. Required on PUT (CreateOrReplace) requests. [ETag ]: - [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. + [SerializationType ]: Indicates the type of serialization that the input or output uses. Required on PUT (CreateOrReplace) requests. [SizeWindow ]: [TimeWindow ]: + +STREAMINGJOBINPUTOBJECT : Identity Parameter + [ClusterName ]: The name of the cluster. + [FunctionName ]: The name of the function. + [Id ]: Resource identity path + [InputName ]: The name of the input. + [JobName ]: The name of the streaming job. + [Location ]: The region in which to retrieve the subscription's quota information. You can find out which regions Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ + [OutputName ]: The name of the output. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. + [TransformationName ]: The name of the transformation. .Link https://learn.microsoft.com/powershell/module/az.streamanalytics/update-azstreamanalyticsoutput #> function Update-AzStreamAnalyticsOutput { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the streaming job. @@ -77,6 +91,10 @@ param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Alias('OutputName')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] @@ -85,6 +103,8 @@ param( [Parameter(ParameterSetName='Update', Mandatory)] [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [System.String] # The name of the resource group. @@ -93,6 +113,8 @@ param( [Parameter(ParameterSetName='Update')] [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -104,9 +126,15 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IStreamAnalyticsIdentity] + # Identity Parameter + ${StreamingjobInputObject}, + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Header')] [System.String] @@ -117,33 +145,35 @@ param( [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjob', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutput] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutput] # An output object, containing all information associated with the named output. # All outputs are contained under a streaming job. - # To construct, see NOTES section for OUTPUT properties and create a hash table. ${Output}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.Api20170401Preview.IOutputDataSource] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Models.IOutputDataSource] # Describes the data source that output will be written to. # Required on PUT (CreateOrReplace) requests. - # To construct, see NOTES section for DATASOURCE properties and create a hash table. ${Datasource}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType])] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.PSArgumentCompleterAttribute("Csv", "Avro", "Json", "CustomClr", "Parquet")] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Support.EventSerializationType] + [System.String] # Indicates the type of serialization that the input or output uses. # Required on PUT (CreateOrReplace) requests. ${SerializationType}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.Single] # . @@ -151,11 +181,24 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityStreamingjobExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] [System.String] # . ${TimeWindow}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -212,16 +255,21 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } $mapping = @{ Update = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_Update'; UpdateExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_UpdateExpanded'; UpdateViaIdentity = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_UpdateViaIdentity'; UpdateViaIdentityExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_UpdateViaIdentityExpanded'; + UpdateViaIdentityStreamingjob = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_UpdateViaIdentityStreamingjob'; + UpdateViaIdentityStreamingjobExpanded = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_UpdateViaIdentityStreamingjobExpanded'; + UpdateViaJsonFilePath = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.StreamAnalytics.private\Update-AzStreamAnalyticsOutput_UpdateViaJsonString'; } - if (('Update', 'UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $testPlayback = $false - $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if (('Update', 'UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -230,6 +278,9 @@ begin { } $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) diff --git a/generated/StreamAnalytics/StreamAnalytics.Autorest/test-module.ps1 b/generated/StreamAnalytics/StreamAnalytics.Autorest/test-module.ps1 index cb1d32ec9b39..00f4fa58ecb1 100644 --- a/generated/StreamAnalytics/StreamAnalytics.Autorest/test-module.ps1 +++ b/generated/StreamAnalytics/StreamAnalytics.Autorest/test-module.ps1 @@ -12,17 +12,17 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) +param([switch]$NotIsolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) $ErrorActionPreference = 'Stop' -if(-not $Isolated) +if(-not $NotIsolated) { Write-Host -ForegroundColor Green 'Creating isolated process...' if ($PSBoundParameters.ContainsKey("TestName")) { $PSBoundParameters["TestName"] = $PSBoundParameters["TestName"] -join "," } $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path - & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated return } @@ -34,7 +34,7 @@ if ($PSBoundParameters.ContainsKey("TestName") -and ($TestName.count -eq 1) -and $ProgressPreference = 'SilentlyContinue' $baseName = $PSScriptRoot.BaseName $requireResourceModule = (($baseName -ne "Resources") -and ($Record.IsPresent -or $Live.IsPresent)) -. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule +. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule . ("$PSScriptRoot\test\utils.ps1") if ($requireResourceModule) @@ -95,4 +95,4 @@ try } } -Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file +Write-Host -ForegroundColor Green '-------------Done-------------'